• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# NameCase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中NameCase的典型用法代码示例。如果您正苦于以下问题:C# NameCase类的具体用法?C# NameCase怎么用?C# NameCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NameCase类属于命名空间,在下文中一共展示了NameCase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Get

        public User Get(long userId, ProfileFields fields = null,
            NameCase nameCase = null)
        {
            VkErrors.ThrowIfNumberIsNegative(() => userId);

            var parameters = new VkParameters { { "fields", fields }, { "name_case", nameCase }, { "user_ids", userId } };

            VkResponseArray response = _vk.Call("users.get", parameters, true);

            return response[0];
        }
开发者ID:Olegasdf,项目名称:vk,代码行数:11,代码来源:UsersCategory.cs


示例2: Get

        public ReadOnlyCollection<User> Get(long uid, ProfileFields fields = null, int? count = null, int? offset = null, FriendsOrder order = null, NameCase nameCase = null, int? listId = null)
        {
            if(listId != null && listId < 0)
				throw new ArgumentOutOfRangeException("listId", "listId must be a positive number.");
			
			var parameters = new VkParameters { { "user_id", uid }, { "fields", fields }, { "count", count }, { "offset", offset }, { "order", order }, {"list_id", listId} , {"name_case", nameCase}};

            var response = _vk.Call("friends.get", parameters);

		    if (fields != null)
                return response["items"].ToReadOnlyCollectionOf<User>(x => x);
		    return response.ToReadOnlyCollectionOf(id => new User { Id = id });
        }
开发者ID:odugen,项目名称:vk,代码行数:13,代码来源:FriendsCategory.cs


示例3: Get

        public User Get(int userId, ProfileFields[] fields = null, NameCase nameCase = NameCase.nom)
        {
            NameValueCollection qs = new NameValueCollection();
            qs["uids"] = userId.ToString();

            if (fields != null)
                qs["fields"] = String.Join(",", from field in fields select field.ToString());

            qs["name_case"] = nameCase.ToString();
            XmlDocument answer = VkResponse.ExecuteCommand("users.get", qs);
            XmlNode usersNodes = answer.SelectSingleNode("response/user");
            User user = new User(usersNodes);
            return user;
        }
开发者ID:natashalysakova,项目名称:VkApiLibarary,代码行数:14,代码来源:UserCategory.cs


示例4: GetAll

        public ReadOnlyCollection<User> GetAll(long uid, ProfileFields fields = null, FriendsOrder order = null, NameCase nameCase = null, int? listId = null)
        {
            const int count = 50;
            var i = 0;
            var result = new List<User>();

            do
            {
                var currentItems = _friends.Get(uid, fields, count, i * count, order, nameCase, listId);
                if (currentItems != null) result.AddRange(currentItems);
            } while (++i * count < (_vk.CountFromLastResponse ?? 0));

            return result.ToReadOnlyCollection();
        }
开发者ID:andrew-veresov,项目名称:vk,代码行数:14,代码来源:FriendsCategoryExtended.cs


示例5: GetAllFollowers

        public ReadOnlyCollection<User> GetAllFollowers(long? userId = null, ProfileFields fields = null, NameCase nameCase = null)
        {
            const int count = 1000;
            var i = 0;
            var result = new List<User>();

            do
            {
                var currentItems = _users.GetFollowers(userId, count, i * count, fields, nameCase);
                if (currentItems != null) result.AddRange(currentItems);
            } while (++i * count < (_vk.CountFromLastResponse ?? 0));

            return result.ToReadOnlyCollection();
        }
开发者ID:andrew-veresov,项目名称:vk,代码行数:14,代码来源:UsersCategoryExtended.cs


示例6: Get

		public ReadOnlyCollection<User> Get(long uid, ProfileFields fields = null, int? count = null, int? offset = null, FriendsOrder order = null, NameCase nameCase = null, int? listId = null)
		{
			if (listId != null && listId < 0)
				throw new ArgumentOutOfRangeException("listId", "listId must be a positive number.");

			var parameters = new FriendsGetParams
			{
				UserId = uid,
				Count = count,
				Offset = offset,
				Fields = fields,
				NameCase = nameCase,
				ListId = listId,
				Order = order
			};

			return Get(parameters).ToReadOnlyCollection();
		}
开发者ID:kadkin,项目名称:vk,代码行数:18,代码来源:FriendsCategory.Obsolete.cs


示例7: GetAsync

        public async Task<ReadOnlyCollection<User>> GetAsync([NotNull] IEnumerable<string> screenNames, ProfileFields fields = null, NameCase nameCase = null)
        {
            if (screenNames == null)
                throw new ArgumentNullException("screenNames");

            var parameters = new VkParameters
                {
                    { "user_ids", screenNames }, 
                    { "fields", fields }, 
                    { "name_case", nameCase }
                };

            VkResponseArray response = await _vk.CallAsync("users.get", parameters);
            return response.ToReadOnlyCollectionOf<User>(x => x);
        }
开发者ID:J2GIS,项目名称:vk,代码行数:15,代码来源:UsersCategory.cs


示例8: get

 /// <summary>Возвращает список идентификаторов друзей пользователя или расширенную информацию о друзьях пользователя (при использовании параметра</summary>
 /// <param name="uid">идентификатор пользователя, для которого необходимо получить список друзей</param>
 /// <param name="fields">перечисленные через запятую поля анкет, необходимые для получения</param>
 /// <param name="name_case">падеж для склонения имени и фамилии пользователя</param>
 /// <param name="count">количество друзей, которое нужно вернуть</param>
 /// <param name="offset">смещение, необходимое для выборки определенного подмножества друзей</param>
 /// <param name="lid">идентификатор списка друзей, полученный методом friends</param>
 /// <param name="order">Порядок в котором нужно вернуть список друзей</param>
 /// <returns>Ответ сервера в XML или JSON формате.</returns>
 private VKResponseBase get(System.Int64? uid, ProfileFields? fields, NameCase? name_case, System.Int32? count, System.Int32? offset, System.Int64? lid, string order)
 {
     manager.AddValueByName("@uid", uid);
     manager.AddValueByName("@fields", fields);
     manager.AddValueByName("@name_case", name_case);
     manager.AddValueByName("@count", count);
     manager.AddValueByName("@offset", offset);
     manager.AddValueByName("@lid", lid);
     manager.AddValueByName("@order", order);
     return new VKResponseBase(GetResponse("get"), IsXMLResponse);
 }
开发者ID:salterok,项目名称:VK-2-years-old-,代码行数:20,代码来源:VKApiManager.Friends.cs


示例9: Get

 /// <summary>Возвращает список идентификаторов друзей пользователя или расширенную информацию о друзьях пользователя (при использовании параметра</summary>
 /// <param name="fields">перечисленные через запятую поля анкет, необходимые для получения</param>
 /// <param name="name_case">падеж для склонения имени и фамилии пользователя</param>
 /// <param name="lid">идентификатор списка друзей, полученный методом friends</param>
 /// <param name="count">количество друзей, которое нужно вернуть</param>
 /// <param name="offset">смещение, необходимое для выборки определенного подмножества друзей</param>
 /// <returns>Ответ сервера в XML или JSON формате.</returns>
 public VKResponseBase Get(ProfileFields fields, NameCase name_case, System.Int64? lid = null, System.Int32? count = null, System.Int32? offset = null)
 {
     return get(null, fields, name_case, count, offset, lid, null);
 }
开发者ID:salterok,项目名称:VK-2-years-old-,代码行数:11,代码来源:VKApiManager.Friends.cs


示例10: UsersGet

		public VKRequest<User> UsersGet(
			 UserFields fields = UserFields.None,
			 NameCase nameCase = NameCase.Nom,
			params uint[] userIds 
			){
			var req = new VKRequest<User>{
				MethodName = "users.get",
				Parameters = new Dictionary<string, string> {
					{ "fields", String.Join( ",", MiscTools.GetUserFields( fields ) ) },
			{ "name_case", nameCase.ToNClString() },
			{ "user_ids", (userIds??new uint[]{}).ToNCStringA() }
				}
			};
			if (IsLogged){
				req.Token = CurrentToken;
			}
			return req;
		}
开发者ID:nkomarov,项目名称:VKSharp,代码行数:18,代码来源:RequestApi1.cs


示例11: GetInvitedUsers

        public ReadOnlyCollection<User> GetInvitedUsers(long groupId, out int userCount, long? offset = null, long? count = null, UsersFields fields = null, NameCase nameCase = null)
        {
            var response = GetInvitedUsers(groupId, offset, count, fields, nameCase);

            userCount = Convert.ToInt32(response.TotalCount);

            return response.ToReadOnlyCollection();
        }
开发者ID:vknet,项目名称:vk,代码行数:8,代码来源:GroupsCategory.Obsolete.cs


示例12: GetBannedEx

 public NewsBannedExList GetBannedEx(UsersFields fields = null, NameCase nameCase = null)
 {
     var parameters = new VkParameters
     {
         { "extended", true },
         { "fields", fields },
         { "name_case", nameCase }
     };
     return _vk.Call("newsfeed.getBanned", parameters);
 }
开发者ID:Olegasdf,项目名称:vk,代码行数:10,代码来源:NewsFeedCategory.cs


示例13: UsersGetAsync

		public async Task<User[]> UsersGetAsync(
			 UserFields fields = UserFields.None,
			 NameCase nameCase = NameCase.Nom,
			params uint[] userIds 
			){
			return (await Executor.ExecAsync(
				_reqapi.UsersGet(
											fields,
											nameCase,
											userIds
									)
			)).Data;
		}
开发者ID:nkomarov,项目名称:VKSharp,代码行数:13,代码来源:VkApi.cs


示例14: GetChat

		public ReadOnlyCollection<Chat> GetChat(IEnumerable<long> chatIds, ProfileFields fields = null, NameCase nameCase = null)
		{
			var isNoEmpty = chatIds == null || !chatIds.Any();
			if (isNoEmpty)
			{
				throw new ArgumentException("At least one chat ID must be defined", "chatIds");
			}
			var parameters = new VkParameters { { "fields", fields }, { "name_case", nameCase } };
			if (chatIds.Count() > 1)
			{
				parameters.Add("chat_ids", chatIds);
			} else
			{
				parameters.Add("chat_id", chatIds.ElementAt(0));
			}
			var response = _vk.Call("messages.getChat", parameters);

			if (chatIds.Count() > 1)
			{
				return response.ToReadOnlyCollectionOf<Chat>(c => c);
			}
			return new ReadOnlyCollection<Chat>(new List<Chat> { response });
		}
开发者ID:kadkin,项目名称:vk,代码行数:23,代码来源:MessagesCategory.cs


示例15: GetChatUsers

		public ReadOnlyCollection<User> GetChatUsers(IEnumerable<long> chatIds, UsersFields fields, NameCase nameCase)
		{
			var parameters = new VkParameters {

				{ "chat_ids", chatIds },
				{ "fields", fields },
				{ "name_case", nameCase }
			};

			var response = _vk.Call("messages.getChatUsers", parameters);

			return response.ToReadOnlyCollectionOf(x => fields != null ? x : new User { Id = (long)x });
		}
开发者ID:kadkin,项目名称:vk,代码行数:13,代码来源:MessagesCategory.cs


示例16: FriendsGetSuggestions

		public VKRequest<EntityList<User>> FriendsGetSuggestions(
			 FriendSuggestionFilters filters = FriendSuggestionFilters.Everything,
			 UserFields fields = UserFields.None,
			 NameCase nameCase = NameCase.Nom,
			 uint offset = 0,
			 uint count = 100
			){
			var req = new VKRequest<EntityList<User>>{
				MethodName = "friends.getSuggestions",
				Parameters = new Dictionary<string, string> {
					{ "filters", String.Join( ",", MiscTools.GetFilterFields( filters ) ) },
			{ "fields", String.Join( ",", MiscTools.GetUserFields( fields ) ) },
			{ "name_case", nameCase.ToNClString() },
			{ "offset", offset.ToNCString() },
			{ "count", count.ToNCString() }
				}
			};
				req.Token = CurrentToken;
			
			return req;
		}
开发者ID:nkomarov,项目名称:VKSharp,代码行数:21,代码来源:RequestApi1.cs


示例17: FriendsGet

		public VKRequest<EntityList<User>> FriendsGet(
			 uint? userId = null,
			 uint? listId = null,
			 UserFields fields = UserFields.None,
			 UserSortOrder order = UserSortOrder.ById,
			 NameCase nameCase = NameCase.Nom,
			 uint offset = 0,
			 uint count = 100
			){
			var req = new VKRequest<EntityList<User>>{
				MethodName = "friends.get",
				Parameters = new Dictionary<string, string> {
					{ "user_id", MiscTools.NullableString(userId) },
			{ "list_id", MiscTools.NullableString(listId) },
			{ "fields", String.Join( ",", MiscTools.GetUserFields( fields ) ) },
			{ "order", order.ToNClString() },
			{ "name_case", nameCase.ToNClString() },
			{ "offset", offset.ToNCString() },
			{ "count", count.ToNCString() }
				}
			};
			if (IsLogged){
				req.Token = CurrentToken;
			}
			return req;
		}
开发者ID:nkomarov,项目名称:VKSharp,代码行数:26,代码来源:RequestApi1.cs


示例18: Get

        public User Get([NotNull] string screenName, ProfileFields fields = null, NameCase nameCase = null)
        {
            VkErrors.ThrowIfNullOrEmpty(() => screenName);

            ReadOnlyCollection<User> users = Get(new[] {screenName}, fields, nameCase);
            return users.Count > 0 ? users[0] : null;
        }
开发者ID:J2GIS,项目名称:vk,代码行数:7,代码来源:UsersCategory.cs


示例19: UsersGetFollowersAsync

		public async Task<EntityList<User>> UsersGetFollowersAsync(
			 uint? userId = null,
			 UserFields fields = UserFields.None,
			 NameCase nameCase = NameCase.Nom,
			 uint offset = 0,
			 uint count = 100
			){
			return (await Executor.ExecAsync(
				_reqapi.UsersGetFollowers(
											userId,
											fields,
											nameCase,
											offset,
											count
									)
			)).Data.FirstOrDefault();
		}
开发者ID:nkomarov,项目名称:VKSharp,代码行数:17,代码来源:VkApi.cs


示例20: GetFollowers

        public ReadOnlyCollection<User> GetFollowers(long? userId = null, int? count = null, int? offset = null, ProfileFields fields = null, NameCase nameCase = null)
        {
            VkErrors.ThrowIfNumberIsNegative(() => userId);
            VkErrors.ThrowIfNumberIsNegative(() => count);
            VkErrors.ThrowIfNumberIsNegative(() => offset);

            var parameters = new VkParameters
                {
                    {"user_id", userId},
                    {"offset", offset},
                    {"count", count},
                    {"fields", fields},
                    {"name_case", nameCase}
                };

            VkResponseArray response = _vk.Call("users.getFollowers", parameters);

            // проверка: возвращается массив объектов или только идентификаторы пользователей
            if (response.Count > 0 && response[0].ContainsKey("id"))
            {
                return response.ToReadOnlyCollectionOf<User>(x => x);
            }

            return response.ToReadOnlyCollectionOf(x => new User{Id = x});
        }
开发者ID:J2GIS,项目名称:vk,代码行数:25,代码来源:UsersCategory.cs



注:本文中的NameCase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# NameCollection类代码示例发布时间:2022-05-24
下一篇:
C# Name类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap