public override Task UpdateAsync(UpdateParameter parameter) { var dao = new PeercastDao(Address); return dao.SetMetaAsync(parameter.Name, parameter.Genre, parameter.Description, parameter.ContactUrl, parameter.Comment, parameter.TrackArtist, parameter.TrackTitle, parameter.TrackAlbum, parameter.TrackGenre, parameter.TrackContact) .ContinueWith(t => dao.Dispose()); }
private Task<XmlStatus> GetXmlStatusAsync() { var dao = new PeercastDao(Address); return dao.GetViewXmlAsync().ContinueWith(t => { dao.Dispose(); return new XmlStatus(t.Result); }); }
public override Task StopAsync(string id) { var dao = new PeercastDao(Address); return dao.StopAsync(id).ContinueWith(t => dao.Dispose()); }