CherieAppUploadZik/Helpers/FilesManager.cs
/// <summary>
/// Push a new sound to the db
/// </summary>
/// <param name="mySound">The sound to send.</param>
/// <returns>True if it's correct otherwise, false.</returns>
Push a new sound to the db
Push a new sound to the db
public async Task<bool> PushSound(MySound mySound)
    {
        try
        {
            var seri = JsonConvert.SerializeObject(mySound);
            var json = await APIService.Instance.Client.PostAsync("/create",
                new StringContent(seri, System.Text.Encoding.UTF8, "application/json")
                );
            if (json.IsSuccessStatusCode) return true;
            return false;
        }
        catch (Exception)
        {
            return false;
        }
    }
public async Task < bool > PushSound ( MySound mySound ) { try { var seri = JsonConvert . SerializeObject ( mySound ) ; var json = await APIService . Instance . Client . PostAsync ( " " , new StringContent ( seri , System . Text . Encoding . UTF8 , " " ) ) ; if ( json . IsSuccessStatusCode ) return true ; return false ; } catch ( Exception ) { return false ; } }
Push a new sound to the db
Push a new sound to the db
True if it's correct otherwise, false.
True if it ' s correct otherwise false .
mySound
MySound
The sound to send.
The sound to send .