/// <summary> /// Разобрать из json. /// </summary> /// <param name="response">Ответ сервера.</param> /// <returns></returns> public static AppGetObject FromJson(VkResponse response) { AppGetObject appGetObject; if (response.ContainsKey("items")) { appGetObject = new AppGetObject { TotalCount = response["count"], Apps = response["items"].ToVkCollectionOf<App>(r => r), Friends = response["profiles"].ToVkCollectionOf<User>(r => r) }; } else { appGetObject = new AppGetObject { TotalCount = response["count"], Apps = response["items"].ToVkCollectionOf<App>(r => r) }; } return appGetObject; }
/// <summary> /// Разобрать из json. /// </summary> /// <param name="response">Ответ сервера.</param> /// <returns></returns> public static AppGetObject FromJson(VkResponse response) { AppGetObject appGetObject; if (response.ContainsKey("items")) { appGetObject = new AppGetObject { TotalCount = response["count"], Apps = response["items"].ToVkCollectionOf <App>(r => r), Friends = response["profiles"].ToVkCollectionOf <User>(r => r) }; } else { appGetObject = new AppGetObject { TotalCount = response["count"], Apps = response["items"].ToVkCollectionOf <App>(r => r) }; } return(appGetObject); }