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

C# IUserService类代码示例

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

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



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

示例1: UserContext

 public UserContext(ICurrentUserRetriever currentUserRetriever, IUserService userService)
 {
     Contract.Requires<ArgumentNullException>(currentUserRetriever.IsNotNull());
     Contract.Requires<ArgumentNullException>(userService.IsNotNull());
     this.user = new Lazy<User>(currentUserRetriever.GetCurrentUser);
     this.userService = userService;
 }
开发者ID:dzhivtsov,项目名称:GangsterBank,代码行数:7,代码来源:UserContext.cs


示例2: UsersController

 public UsersController(IUserService service, IPlansService service2, ICMSService service3)
     : base(service)
 {
     this._userService = service;
     this._plansService = service2;
     this._cmsService = service3;
 }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:7,代码来源:UsersController.cs


示例3: ReplyViewModel

        public ReplyViewModel(IBaconProvider baconProvider, Thing replyTargetThing, RelayCommand cancel, Action<Thing> convertIntoUIReply, bool isEdit = false)
        {
            _convertIntoUIReply = convertIntoUIReply;
            _cancel = cancel;
            _baconProvider = baconProvider;
            _redditService = _baconProvider.GetService<IRedditService>();
            _userService = _baconProvider.GetService<IUserService>();
            _markdownProcessor = _baconProvider.GetService<IMarkdownProcessor>();
            _replyTargetThing = replyTargetThing;

            if (isEdit)
            {
                Editing = true;
                EditingId = ((Comment)_replyTargetThing.Data).Name;
                ReplyBody = ((Comment)_replyTargetThing.Data).Body.Replace("&gt;", ">").Replace("&lt;", "<");
            }

			RefreshUserImpl();

            _addBold = new RelayCommand(AddBoldImpl);
            _addItalic = new RelayCommand(AddItalicImpl);
            _addStrike = new RelayCommand(AddStrikeImpl);
            _addSuper = new RelayCommand(AddSuperImpl);
            _addLink = new RelayCommand(AddLinkImpl);
            _addQuote = new RelayCommand(AddQuoteImpl);
            _addCode = new RelayCommand(AddCodeImpl);
            _addBullets = new RelayCommand(AddBulletsImpl);
            _addNumbers = new RelayCommand(AddNumbersImpl);
            _submit = new RelayCommand(SubmitImpl);
			_refreshUser = new RelayCommand(RefreshUserImpl);
        }
开发者ID:Synergex,项目名称:Baconography,代码行数:31,代码来源:ReplyViewModel.cs


示例4: DefaultTokenService

 public DefaultTokenService(IUserService users, ICoreSettings settings, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles)
 {
     _users = users;
     _settings = settings;
     _claimsProvider = claimsProvider;
     _tokenHandles = tokenHandles;
 }
开发者ID:JackBao,项目名称:Thinktecture.IdentityServer.v3,代码行数:7,代码来源:DefaultTokenService.cs


示例5: ApiController

 public ApiController(
     IEntitiesContext entitiesContext,
     IPackageService packageService,
     IPackageFileService packageFileService,
     IUserService userService,
     INuGetExeDownloaderService nugetExeDownloaderService,
     IContentService contentService,
     IIndexingService indexingService,
     ISearchService searchService,
     IAutomaticallyCuratePackageCommand autoCuratePackage,
     IStatusService statusService,
     IAppConfiguration config)
 {
     EntitiesContext = entitiesContext;
     PackageService = packageService;
     PackageFileService = packageFileService;
     UserService = userService;
     NugetExeDownloaderService = nugetExeDownloaderService;
     ContentService = contentService;
     StatisticsService = null;
     IndexingService = indexingService;
     SearchService = searchService;
     AutoCuratePackage = autoCuratePackage;
     StatusService = statusService;
     _config = config;
 }
开发者ID:whyleee,项目名称:RemoteFeedNuGetGallery,代码行数:26,代码来源:ApiController.cs


示例6: PackagesController

 public PackagesController(
     IPackageService packageService,
     IUploadFileService uploadFileService,
     IUserService userService,
     IMessageService messageService,
     ISearchService searchService,
     IAutomaticallyCuratePackageCommand autoCuratedPackageCmd,
     INuGetExeDownloaderService nugetExeDownloaderService,
     IPackageFileService packageFileService,
     IEntitiesContext entitiesContext,
     IAppConfiguration config,
     IIndexingService indexingService,
     ICacheService cacheService)
 {
     _packageService = packageService;
     _uploadFileService = uploadFileService;
     _userService = userService;
     _messageService = messageService;
     _searchService = searchService;
     _autoCuratedPackageCmd = autoCuratedPackageCmd;
     _nugetExeDownloaderService = nugetExeDownloaderService;
     _packageFileService = packageFileService;
     _entitiesContext = entitiesContext;
     _config = config;
     _indexingService = indexingService;
     _cacheService = cacheService;
 }
开发者ID:ryanhartley84332,项目名称:NuGetGallery,代码行数:27,代码来源:PackagesController.cs


示例7: AuthenticationController

 public AuthenticationController(
     IFormsAuthenticationService formsAuthSvc,
     IUserService userSvc)
 {
     this.formsAuthSvc = formsAuthSvc;
     this.userSvc = userSvc;
 }
开发者ID:Redsandro,项目名称:chocolatey.org,代码行数:7,代码来源:AuthenticationController.cs


示例8: UsersController

 public UsersController(
     ScimServerConfiguration serverConfiguration,
     IUserService userService)
     : base(serverConfiguration)
 {
     _UserService = userService;
 }
开发者ID:PowerDMS,项目名称:Owin.Scim,代码行数:7,代码来源:UsersController.cs


示例9: UserModule

           public UserModule(IUserService userService):base("/users")
           {
               Get["/{id}", true] = async (ctx, cancel) =>
                   {
                       var request = this.Bind<GetUserByIdRequest>();

                       var user = await userService.GetUserById(new GetUserById()
                           {
                               Id = request.Id
                           });
                       return Response.AsJson(user);
                   };

               Post["/", true] = async (ctx, cancel) =>
                   {
                       var request = this.Bind<CreateUserRequest>();

                       var user = await userService.CreateUser(new CreateUser()
                           {
                               HourlyRate = request.HourlyRate,
                               Salary = request.Salary
                           });
                       
                       return Response.AsJson(user);
                   };
           }
开发者ID:EIrwin,项目名称:naylor-api,代码行数:26,代码来源:UserModule.cs


示例10: UserController

 public UserController(IUserRepository userRepository
     , IUserService userService
    )
 {
     _userRepository = userRepository;
     _userService = userService;
 }
开发者ID:avenxyc,项目名称:RealRecycling,代码行数:7,代码来源:UserController.cs


示例11: MemberController

        public MemberController(IMemberService memberService, IUserService userService, IRoleService roleService, ILevelService levelService)
		{
			_memberService = memberService;
            _userService = userService;
            _roleService = roleService;
            _levelService = levelService;
        }
开发者ID:glustful,项目名称:.NetProject,代码行数:7,代码来源:MemberController.cs


示例12: UserRoleController

 public UserRoleController(CoreSettings coreSettings, IPermissionService permissionService, IUserService userService, IWorkContext workContext)
 {
     _coreSettings = coreSettings;
     _permissionService = permissionService;
     _userService = userService;
     _workContext = workContext;
 }
开发者ID:revolutionaryarts,项目名称:wewillgather,代码行数:7,代码来源:UserRoleController.cs


示例13: SetUp

        public void SetUp()
        {
            // you have to be an administrator to access the product controller
            Thread.CurrentPrincipal = new GenericPrincipal(new GenericIdentity("admin"), new[] { "Administrator" });

            categoryRepository = MockRepositoryBuilder.CreateCategoryRepository();

            productRepository = MockRepositoryBuilder.CreateProductRepository();

            productOrderableService = MockRepository.GenerateStub<IOrderableService<ProductCategory>>();
            MockRepository.GenerateStub<IOrderableService<ProductImage>>();

        	userService = MockRepository.GenerateStub<IUserService>();
            productBuilder = MockRepository.GenerateStub<IProductBuilder>();

			productController = new ProductController(
                productRepository, 
                categoryRepository, 
                productOrderableService, 
                userService, 
                MockRepository.GenerateStub<IUnitOfWorkManager>(),
                productBuilder);

        	userService.Stub(c => c.CurrentUser).Return(new User { Role = Role.Administrator });
        }
开发者ID:mikehadlow,项目名称:sutekishop,代码行数:25,代码来源:ProductControllerTests.cs


示例14: DepartmentSelectorView

 public DepartmentSelectorView(IApplicationStateSetter applicationStateSetter, IApplicationState applicationState,
     IUserService userService, ICacheService cacheService)
 {
     InitializeComponent();
     _applicationStateSetter = applicationStateSetter;
     DataContext = new DepartmentSelectorViewModel(applicationState, _applicationStateSetter, userService, cacheService);
 }
开发者ID:neapolis,项目名称:SambaPOS-3,代码行数:7,代码来源:DepartmentSelectorView.xaml.cs


示例15: CreateTokenRequestValidator

        //public static ClientValidator CreateClientValidator(
        //    IClientStore clients = null,
        //    IClientSecretValidator secretValidator = null)
        //{
        //    if (clients == null)
        //    {
        //        clients = new InMemoryClientStore(ClientValidationTestClients.Get());
        //    }

        //    if (secretValidator == null)
        //    {
        //        secretValidator = new HashedClientSecretValidator();
        //    }

        //    var owin = new OwinEnvironmentService(new OwinContext());

        //    return new ClientValidator(clients, secretValidator, owin);
        //}

        public static TokenRequestValidator CreateTokenRequestValidator(
            IdentityServerOptions options = null,
            IScopeStore scopes = null,
            IAuthorizationCodeStore authorizationCodeStore = null,
            IRefreshTokenStore refreshTokens = null,
            IUserService userService = null,
            IEnumerable<ICustomGrantValidator> customGrantValidators = null,
            ICustomRequestValidator customRequestValidator = null,
            ScopeValidator scopeValidator = null)
        {
            if (options == null)
            {
                options = TestIdentityServerOptions.Create();
            }

            if (scopes == null)
            {
                scopes = new InMemoryScopeStore(TestScopes.Get());
            }

            if (userService == null)
            {
                userService = new TestUserService();
            }

            if (customRequestValidator == null)
            {
                customRequestValidator = new DefaultCustomRequestValidator();
            }

            CustomGrantValidator aggregateCustomValidator;
            if (customGrantValidators == null)
            {
                aggregateCustomValidator = new CustomGrantValidator(new [] { new TestGrantValidator() });
            }
            else
            {
                aggregateCustomValidator = new CustomGrantValidator(customGrantValidators);
            }
                
            if (refreshTokens == null)
            {
                refreshTokens = new InMemoryRefreshTokenStore();
            }

            if (scopeValidator == null)
            {
                scopeValidator = new ScopeValidator(scopes);
            }

            return new TokenRequestValidator(
                options, 
                authorizationCodeStore, 
                refreshTokens, 
                userService, 
                aggregateCustomValidator, 
                customRequestValidator, 
                scopeValidator, 
                new DefaultEventService());
        }
开发者ID:henryng24,项目名称:IdentityServer3,代码行数:79,代码来源:Factory.cs


示例16: CachedUserService

 public CachedUserService(IUserService userService, ICacheProvider cacheProvider, IUserStorePathProvider userStorePathProvider)
 {
     _userService = userService;
     _cacheProvider = cacheProvider;
     _optoutCacheFileName = userStorePathProvider.GetOptoutFileName();
     _optinCacheFileName = userStorePathProvider.GetOptinFileName();
 }
开发者ID:medvekoma,项目名称:portfotolio,代码行数:7,代码来源:CachedUserService.cs


示例17: AccountController

 public AccountController(IDbConnection db, IMetricTracker metrics, ICacheClient cache, IMailController mailController, IUserService userService, IUserAuthenticationService authenticationService)
     : base(db, metrics, cache)
 {
     _mailController = mailController;
     _userService = userService;
     _authenticationService = authenticationService;
 }
开发者ID:pleepleus88,项目名称:MvcKickstart,代码行数:7,代码来源:AccountController.cs


示例18: HomeController

        public HomeController(
			IAuditService<User, UserAudit> auditService,
			IUserService userService)
        {
            this.AuditService = auditService;
            this.UserService = userService;
        }
开发者ID:Mike343,项目名称:Netcoders,代码行数:7,代码来源:HomeController.cs


示例19: UserController

 public UserController(
     IUserService userService,
     IFormsAuthenticationService formsAuthenticationService)
 {
     _formsAuthenticationService = formsAuthenticationService;
     _userService = userService;
 }
开发者ID:netexpert1983,项目名称:set-basic-aspnet-mvc,代码行数:7,代码来源:UserController.cs


示例20: Authenticate

        public async Task<AuthenticationResult> Authenticate(Dictionary<string, string> authenticationCtx, IUserService userService)
        {
            if (authenticationCtx["provider"] != Provider_Name)
            {
                return null;
            }

            string ticket;
            if (!authenticationCtx.TryGetValue("ticket", out ticket) || string.IsNullOrWhiteSpace(ticket))
            {
                return AuthenticationResult.CreateFailure("Steam session ticket must not be empty.", Provider_Name, authenticationCtx);
            }

            var steamId = await _authenticator.AuthenticateUserTicket(ticket);

            if (!steamId.HasValue)
            {
                return AuthenticationResult.CreateFailure("Invalid steam session ticket.", Provider_Name, authenticationCtx);
            }

            var steamIdString = steamId.GetValueOrDefault().ToString();
            var user = await userService.GetUserByClaim(Provider_Name, ClaimPath, steamIdString);

            if (user == null)
            {
                var uid = Provider_Name + "-" + steamIdString;
                user = await userService.CreateUser(uid, new JObject());

                user = await userService.AddAuthentication(user, Provider_Name, JObject.FromObject(new { CLAIMPATH = steamIdString }));
            }

            return AuthenticationResult.CreateSuccess(user, Provider_Name, authenticationCtx);
        }
开发者ID:Falanwe,项目名称:Stormancer-AuthenticationPlugin,代码行数:33,代码来源:SteamAuthenticationProvider.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IUserSession类代码示例发布时间:2022-05-24
下一篇:
C# IUserRepository类代码示例发布时间: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