/// <summary>Synchronously send the ListItemProperties request</summary> /// <param name="request">Request to be sent</param> /// <returns>Response from the API</returns> public IEnumerable <PropertyInfo> Send(ListItemProperties request) { var task = Task.Run(async() => await SendAsync(request)); var result = task.WaitAndUnwrapException(); return(result); }
/// <summary>Synchronously send the ListItemProperties request</summary> /// <param name="request">Request to be sent</param> /// <returns>Response from the API</returns> public IEnumerable <PropertyInfo> Send(ListItemProperties request) { var task = SendAsync(request); RaiseExceptionOnFault(task); return(task.Result); }
public void TestListItemProperties() { ListItemProperties req; Request req2; IEnumerable <PropertyInfo> resp; // it 'lists properties' req = new ListItemProperties(); resp = client.Send(req); Assert.Equal(2, resp.Count()); }
// internal ListItem(string name) : base(name) { VideoStreamInfos = new StreamInfos(StreamInfosType.Video, this); AudioStreamInfos = new StreamInfos(StreamInfosType.Audio, this); SubtitleStreamInfos = new StreamInfos(StreamInfosType.Subtitle, this); Properties = new ListItemProperties(this); ContextMenuItems = new ContextMenu(this); Cast = new Actors(this); SeasonsInfos = new Seasons(this); _name = name; }
public async void TestListItemPropertiesAsync() { ListItemProperties req; Request req2; IEnumerable <PropertyInfo> resp; // it 'lists properties' req = new ListItemProperties(); System.Threading.Thread.Sleep(10000); resp = await client.SendAsync(req); Assert.Equal(2, resp.Count()); }
/// <summary>Send the ListItemProperties request</summary> /// <param name="request">Request to be sent</param> /// <returns>Response from the API</returns> public async Task <IEnumerable <PropertyInfo> > SendAsync(ListItemProperties request) { var json = await SendRequestAsync(request).ConfigureAwait(false); return(ParseResponse(json, request)); }
/// <summary>Parse JSON response</summary> /// <param name="json">JSON string from the API</param> /// <param name="request">Request sent to the API</param> /// <returns>Parsed response</returns> protected IEnumerable <PropertyInfo> ParseResponse(string json, ListItemProperties request) { return(JsonConvert.DeserializeObject <PropertyInfo[]>(json)); }
/// <summary>Send the ListItemProperties request</summary> /// <param name="request">Request to be sent</param> /// <returns>Response from the API</returns> public IEnumerable <PropertyInfo> Send(ListItemProperties request) { var json = SendRequest(request); return(ParseResponse(json, request)); }