当前位置: 首页>>代码示例>>C#>>正文


C# NameCase类代码示例

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


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


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