/// <summary> /// Привести к типу VkParameters. /// </summary> /// <param name="p">Параметры.</param> /// <returns></returns> public static VkParameters ToVkParameters(PhotoGetUserPhotosParams p) { var parameters = new VkParameters { { "user_id", p.UserId }, { "count", p.Count }, { "offset", p.Offset }, { "extended", p.Extended }, { "sort", p.Sort } }; return(parameters); }
/// <summary> /// Привести к типу VkParameters. /// </summary> /// <param name="p">Параметры.</param> /// <returns></returns> internal static VkParameters ToVkParameters(PhotoGetUserPhotosParams p) { var parameters = new VkParameters { { "user_id", p.UserId }, { "count", p.Count }, { "offset", p.Offset }, { "extended", p.Extended }, { "sort", p.Sort } }; return parameters; }
public ReadOnlyCollection<Photo> GetUserPhotos(out int count, PhotoGetUserPhotosParams @params) { var response = GetUserPhotos(@params); count = Convert.ToInt32(response.TotalCount); return response.ToReadOnlyCollection(); }
public ReadOnlyCollection<Photo> GetUserPhotos(out int count, PhotoGetUserPhotosParams @params) { var response = _vk.Call("photos.getUserPhotos", @params); count = response["count"]; return response["items"].ToReadOnlyCollectionOf<Photo>(x => x); }