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


C# IUser.HasNotValue方法代码示例

本文整理汇总了C#中IUser.HasNotValue方法的典型用法代码示例。如果您正苦于以下问题:C# IUser.HasNotValue方法的具体用法?C# IUser.HasNotValue怎么用?C# IUser.HasNotValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IUser的用法示例。


在下文中一共展示了IUser.HasNotValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnNavigatedTo

		public override async Task OnNavigatedTo(object navigationParameter)
		{
			modUser = navigationParameter as IUser;

			if (modUser.HasNotValue())
				return;

			IsBusy = true;

			IEnumerable<IDialog> dialogs = await modIWebService.GetDialogWithFriend(modUser);
			this.Dialogs = new ObservableCollection<DialogVm>(dialogs.Select(x => new DialogVm(x)));
			this.OnPropertyChanged(x => x.Dialogs);

			IsBusy = false;
		}
开发者ID:coolhunter33,项目名称:SocialNetworkApi,代码行数:15,代码来源:PageDialogWithFriendVm.cs

示例2: GetUserInfoRequest

		public async Task<IUser> GetUserInfoRequest(IUser user, enSocialNetwork socialNetwork)
		{
			if (user.HasNotValue())
				return null;

			switch (socialNetwork)
			{
				case enSocialNetwork.VK:
					return await GetVkUserInfoRequest(user);

				case enSocialNetwork.Twitter:
					return await GetTwitterInfoRequest(user);

				default:
					break;
			}

			return null;
		}
开发者ID:deadean,项目名称:SocialNetworkApi,代码行数:19,代码来源:OAuthService.cs

示例3: GetUserInfoRequest

		public async Task<IUser> GetUserInfoRequest(IUser user, enSocialNetwork socialNetwork)
		{
			if (user.HasNotValue())
				return null;

			Account accCurrent = Account.Deserialize(user.SerializeInfo);
			if (accCurrent.HasNotValue())
				return null;

			if (String.IsNullOrWhiteSpace(user.Uid))
				return null;

			var request = new OAuth2Request("GET", new Uri("https://api.vk.com/method/users.get"), null, accCurrent);
			request.Parameters.Add("uids", user.Uid);

			var res = await request.GetResponseAsync();
			var responseText = res.GetResponseText();

			var users = JsonConvert.DeserializeObject<XamarinSocialApp.Droid.Data.VkData.VkUsers>(responseText);

			var jsonUser = users.response.First();
			return new DataUser() { FirstName = jsonUser.first_name, LastName = jsonUser.last_name, ID = jsonUser.uid, Uid = jsonUser.uid };
		}
开发者ID:coolhunter33,项目名称:SocialNetworkApi,代码行数:23,代码来源:OAuthService.cs

示例4: OnNavigatedTo

		public override async Task OnNavigatedTo(object navigationParameter)
		{
			PageDialogWithFriendNavParams param = navigationParameter as PageDialogWithFriendNavParams;
			if (param.HasNotValue())
				return;

			modUser = param.User;

			if (modUser.HasNotValue())
				return;

			modFriend = param.Friend;

			IsBusy = true;

			IDialog dialog = await modIWebService.GetDialogWithFriend(modUser, modFriend);
			this.Messages = new ObservableCollection<MessageVm>(dialog.Messages.Select(x => new MessageVm(x)));
			this.OnPropertyChanged(x => x.Messages);

			Messenger.Default.Register<MessagesUI.MessageNewMessageWasSentToMe>(this, OnNewMessageWasSentToMe);
			Messenger.Default.Register<MessagesUI.MessageNewMyMessageWasSent>(this, OnMessageNewMyMessageWasSent);

			IsBusy = false;
		}
开发者ID:deadean,项目名称:SocialNetworkApi,代码行数:24,代码来源:PageDialogWithFriendVm.cs

示例5: OnNavigatedTo

		public override async Task OnNavigatedTo(object navigationParameter)
		{
			modUser = navigationParameter as IUser;
			if (modUser.HasNotValue())
				return;

			IEnumerable<IUser> friends = await modIWebService.GetUserFriends(modUser);
			if (friends == null)
				return;

			IsBusy = true;

			this.Friends = new ObservableCollection<FriendsVm>(friends.Select(x => new FriendsVm(x)));
			this.OnPropertyChanged(x => x.Friends);

			IsBusy = false;
		}
开发者ID:deadean,项目名称:SocialNetworkApi,代码行数:17,代码来源:PageUserFriendsVm.cs


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