public async Task RunAsync() { var output = await _profileAppService.GetAsync(); Console.WriteLine($"UserName : {output.UserName}"); Console.WriteLine($"Email : {output.Email}"); Console.WriteLine($"Name : {output.Name}"); Console.WriteLine($"Surname : {output.Surname}"); }
public async Task RunAsync() { var output = await _profileAppService.GetAsync(); Console.WriteLine($"UserName : {output.UserName}"); Console.WriteLine($"Email : {output.Email}"); Console.WriteLine($"Name : {output.Name}"); Console.WriteLine($"Surname : {output.Surname}"); var value = _andonService.GetAndonAsync("1", "1", "1"); Console.WriteLine(JsonConvert.SerializeObject(value)); }
public async Task GetAsync() { //Arrange _currentUser.Id.Returns(_testData.UserJohnId); _currentUser.IsAuthenticated.Returns(true); //Act var result = await _profileAppService.GetAsync(); //Assert var johnNash = GetUser("john.nash"); result.UserName.ShouldBe(johnNash.UserName); result.Email.ShouldBe(johnNash.Email); result.PhoneNumber.ShouldBe(johnNash.PhoneNumber); }
public async Task <IActionResult> Info() { var profile = await _profileAppService.GetAsync(); //var user = await _userAppService.GetAsync(CurrentUser.GetId()); var roles = await _userAppService.GetRolesAsync(CurrentUser.GetId()); var auth = await GetAuthConfigAsync(); var data = new Dictionary <string, object>(3); data.Add("profile", profile); data.Add("roles", roles.Items); data.Add("auth", auth); return(Json(new { code = 1, data = data })); }
public async Task RunAsync() { var profileDto = await _profileAppService.GetAsync(); Console.WriteLine($"UserName : {profileDto.UserName}"); Console.WriteLine($"Email : {profileDto.Email}"); Console.WriteLine($"Name : {profileDto.Name}"); Console.WriteLine($"Surname : {profileDto.Surname}"); Console.WriteLine(); var resultDto = await _identityUserAppService.GetListAsync(new GetIdentityUsersInput()); Console.WriteLine($"Total users: {resultDto.TotalCount}"); foreach (var identityUserDto in resultDto.Items) { Console.WriteLine($"- [{identityUserDto.Id}] {identityUserDto.Name}"); } }
public async Task RunAsync() { var output = await _profileAppService.GetAsync(); Console.WriteLine($"UserName : {output.UserName}"); Console.WriteLine($"Email : {output.Email}"); Console.WriteLine($"Name : {output.Name}"); Console.WriteLine($"Surname : {output.Surname}"); await _demoAppService.AccessWithDefaultPasswordAuthAsync(); // await _demoAppService.AccessWithClientAuthAsync();// will throw using (PluzIdentityClientSwitcher.Use("client")) { await _demoAppService.AccessWithClientAuthAsync();// will not throw } }
public async Task RunAsync() { var output = await _profileAppService.GetAsync(); Console.WriteLine($"UserName : {output.UserName}"); Console.WriteLine($"Email : {output.Email}"); Console.WriteLine($"Name : {output.Name}"); Console.WriteLine($"Surname : {output.Surname}"); var id = Guid.NewGuid(); var remoteContent = new RemoteStreamContent(new MemoryStream(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 })) { ContentType = "application/octet-stream" }; await _testAppService.Upload(remoteContent, id); var dl = await _testAppService.Download(id); var ms = new MemoryStream(); await dl.GetStream().CopyToAsync(ms); }
public async Task OnGetAsync() { var user = await _profileAppService.GetAsync(); PersonalSettingsInfoModel = ObjectMapper.Map <ProfileDto, PersonalSettingsInfoModel>(user); }
public Task <ProfileDto> GetAsync() { return(_profileAppService.GetAsync()); }
/// <summary> /// 获取基本信息 /// </summary> /// <returns>Task<ProfileDto>.</returns> public virtual Task <ProfileDto> Get() { return(_appService.GetAsync()); }