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


C# IAccountService类代码示例

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


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

示例1: Context

        protected override void Context()
        {
            AccountService = MockRepository.GenerateStub<IAccountService>();

            Identity = new FakeIdentity(Username);
            _user = new FakePrincipal(Identity, null);

            HttpRequest = MockRepository.GenerateStub<HttpRequestBase>();
            HttpContext = MockRepository.GenerateStub<HttpContextBase>();
            HttpContext.Stub(x => x.Request).Return(HttpRequest);
            HttpContext.User = _user;

            _httpResponse = MockRepository.GenerateStub<HttpResponseBase>();
            _httpResponse.Stub(x => x.Cookies).Return(new HttpCookieCollection());
            HttpContext.Stub(x => x.Response).Return(_httpResponse);

            Logger = MockRepository.GenerateStub<ILogger>();
            WebAuthenticationService = MockRepository.GenerateStub<IWebAuthenticationService>();

            MappingEngine = MockRepository.GenerateStub<IMappingEngine>();
            AccountCreator = MockRepository.GenerateStub<IAccountCreator>();

            AccountController = new AccountController(AccountService, Logger, WebAuthenticationService, MappingEngine, null, AccountCreator);
            AccountController.ControllerContext = new ControllerContext(HttpContext, new RouteData(), AccountController);
        }
开发者ID:AcklenAvenue,项目名称:PRTools,代码行数:25,代码来源:given_an_account_controller_context.cs

示例2: AccountController

 public AccountController(IAccountService accountService)
 {
     repository = new AccountRepository();
     if (accountService == null)
         throw new ArgumentNullException();
     this.accountService = accountService;
 }
开发者ID:denismaster,项目名称:dotnet01,代码行数:7,代码来源:AccountController.cs

示例3: CourseMenuPanel

 public CourseMenuPanel(IAccountService accountService, CourseModel courseModel)
     :this()
 {
     _accountService = accountService;
     _courseModel = courseModel;
     _courseModel = courseModel;
 }
开发者ID:ionhristiniuc,项目名称:EduTest,代码行数:7,代码来源:CourseMenuPanel.xaml.cs

示例4: TaskController

 public TaskController(IAccountService accountService, ITaskService taskService, ITaskListService taskListService, ITagService tagService)
 {
     _accountService = accountService;
     _taskService = taskService;
     _taskListService = taskListService;
     _tagService = tagService;
 }
开发者ID:kevinswarner,项目名称:Hover_OLD,代码行数:7,代码来源:TaskController.cs

示例5: BatchDocumentCreatorViewModel

 public BatchDocumentCreatorViewModel(IAccountService accountService, ICacheService cacheService)
 {
     Accounts = new ObservableCollection<AccountRowViewModel>();
     _accountService = accountService;
     _cacheService = cacheService;
     CreateDocuments = new CaptionCommand<string>(string.Format(Resources.Create_f, "").Trim(), OnCreateDocuments, CanCreateDocument);
 }
开发者ID:shuxingliu,项目名称:SambaPOS-3,代码行数:7,代码来源:BatchDocumentCreatorViewModel.cs

示例6: PlayerManager

 public PlayerManager(IDataService dataService, IAccountService accountService, IPlayerService playerService, IDialogService dialogservice, IResourceService resourceService)
 {
     this.m_dataService = dataService;
     this.m_accountService = accountService;
     this.PlayerService = playerService;
     this.m_dialogService = dialogservice;
     this.m_resourceService = resourceService;
     Messenger.Default.Register<MediaOpenedMessage>(this, message =>
     {
         this.OnMediaOpened();
     });
     Messenger.Default.Register<MediaEndedMessage>(this, message =>
     {
         this.OnMediaEnded();
     });
     Messenger.Default.Register<MediaNextPressedMessage>(this, message =>
     {
         if (this.CanExecuteNextTrack())
         {
             this.ExecuteNextTrack();
         }
     });
     Messenger.Default.Register<MediaPreviousPressedMessage>(this, message =>
     {
         if (this.CanExecutePreviousTrack())
         {
             this.ExecutePreviousTrack();
         }
     });
 }
开发者ID:uwe-e,项目名称:BSE.Tunes,代码行数:30,代码来源:PlayerManager.cs

示例7: BasePlaylistableViewModel

 public BasePlaylistableViewModel(IDataService dataService, IAccountService accountService, IDialogService dialogService, IResourceService resourceService)
 {
     this.DataService = dataService;
     this.AccountService = accountService;
     this.DialogService = dialogService;
     this.ResourceService = resourceService;
 }
开发者ID:uwe-e,项目名称:BSE.Tunes,代码行数:7,代码来源:BasePlaylistableViewModel.cs

示例8: OrderRepository

 public OrderRepository(IOrderService orderService, IAccountService accountService, IShippingMethodService shippingMethodService, ISuspensionManagerState suspensionManagerState)
 {
     _orderService = orderService;
     _accountService = accountService;
     _shippingMethodService = shippingMethodService;
     _suspensionManagerState = suspensionManagerState;
 }
开发者ID:stevenh77,项目名称:ItineraryHunter-Win8,代码行数:7,代码来源:OrderRepository.cs

示例9: BaseController

 public BaseController()
 {
     _accountService = DependencyResolver.Current.GetService<IAccountService>();
     _dictionaryService = DependencyResolver.Current.GetService<IDictionaryService>();
     CacheService = CacheProvider.Current.GetCache();
     _adminData = DependencyResolver.Current.GetService<IAdminScheduleService>();
 }
开发者ID:gerasyana,项目名称:Academy,代码行数:7,代码来源:BaseController.cs

示例10: FormsAuthenticationService

 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="httpContext">HTTP context</param>
 /// <param name="accountService">account service</param>
 public FormsAuthenticationService(HttpContextBase httpContext,
     IAccountService accountService)
 {
     this._httpContext = httpContext;
     this._accountService = accountService;
     this._expirationTimeSpan = FormsAuthentication.Timeout;
 }
开发者ID:KhangTranIt,项目名称:Bluesky,代码行数:12,代码来源:FormsAuthenticationService.cs

示例11: AccountModule

        public AccountModule(IRegionManager regionManager,
            IAutomationService automationService,
            IUserService userService,
            IAccountService accountService,
            AccountSelectorView accountSelectorView, AccountSelectorViewModel accountSelectorViewModel,
            AccountDetailsView accountDetailsView,
            DocumentCreatorView documentCreatorView,
            BatchDocumentCreatorView batchDocumentCreatorView, BatchDocumentCreatorViewModel batchDocumentCreatorViewModel)
            : base(regionManager, AppScreens.AccountList)
        {
            _regionManager = regionManager;
            _userService = userService;
            _accountService = accountService;
            _accountSelectorView = accountSelectorView;
            _accountSelectorViewModel = accountSelectorViewModel;
            _accountDetailsView = accountDetailsView;
            _documentCreatorView = documentCreatorView;
            _batchDocumentCreatorView = batchDocumentCreatorView;
            _batchDocumentCreatorViewModel = batchDocumentCreatorViewModel;

            AddDashboardCommand<EntityCollectionViewModelBase<AccountTypeViewModel, AccountType>>(Resources.AccountType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountViewModel, Account>>(Resources.Account.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountScreenViewModel, AccountScreen>>(Resources.AccountScreen.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionTypeViewModel, AccountTransactionType>>(Resources.TransactionType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionDocumentTypeViewModel, AccountTransactionDocumentType>>(Resources.DocumentType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionDocumentViewModel, AccountTransactionDocument>>(Resources.TransactionDocument.ToPlural(), Resources.Accounts, 40);

            PermissionRegistry.RegisterPermission(PermissionNames.NavigateAccountView, PermissionCategories.Navigation, Resources.CanNavigateCash);
            PermissionRegistry.RegisterPermission(PermissionNames.CreateAccount, PermissionCategories.Account, Resources.CanCreateAccount);

            SetNavigationCommand(Resources.Accounts, Resources.Common, "Images/Xls.png", 70);

            automationService.RegisterActionType(ActionNames.CreateAccountTransactionDocument, string.Format(Resources.Create_f, Resources.AccountTransactionDocument), new { AccountTransactionDocumentName = "" });
        }
开发者ID:Spanky81,项目名称:SambaPOS-3,代码行数:34,代码来源:AccountModule.cs

示例12: GetAccountSelectors

 private IEnumerable<AccountSelectViewModel> GetAccountSelectors(AccountTransactionDocumentType documentType, Account selectedAccount, IAccountService accountService, ICacheService cacheService)
 {
     var accountMap = documentType.AccountTransactionDocumentAccountMaps.FirstOrDefault(x => x.AccountId == selectedAccount.Id);
     return accountMap != null
                ? documentType.GetNeededAccountTypes().Select(x => new AccountSelectViewModel(accountService, cacheService.GetAccountTypeById(x), accountMap.MappedAccountId, accountMap.MappedAccountName))
                : documentType.GetNeededAccountTypes().Select(x => new AccountSelectViewModel(accountService, cacheService.GetAccountTypeById(x)));
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:7,代码来源:AccountRowViewModel.cs

示例13: AccountRowViewModel

 public AccountRowViewModel(Account account, AccountTransactionDocumentType documentType, IAccountService accountService, ICacheService cacheService)
 {
     _account = account;
     Amount = accountService.GetDefaultAmount(documentType, account);
     Description = accountService.GetDescription(documentType, account);
     TargetAccounts = GetAccountSelectors(documentType, account, accountService, cacheService).ToList();
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:7,代码来源:AccountRowViewModel.cs

示例14: ProfilePresenter

        public ProfilePresenter()
        {
            _redirector = ObjectFactory.GetInstance<IRedirector>();
            _userSession = ObjectFactory.GetInstance<IUserSession>();
            if (!_userSession.LoggedIn || _userSession.CurrentUser == null)
                _redirector.GoToAccountLoginPage();

            _alertService = ObjectFactory.GetInstance<IAlertService>();
            _webContext = ObjectFactory.GetInstance<IWebContext>();
            _accountService = ObjectFactory.GetInstance<IAccountService>();
            _privacyService = ObjectFactory.GetInstance<IPrivacyService>();
            _account = _userSession.CurrentUser;

            if (_webContext.AccountID > 0 && _webContext.AccountID != _userSession.CurrentUser.AccountID)
            {
                _accountBeingViewed = _accountService.GetAccountByID(_webContext.AccountID);
                _accountBeingViewed.Profile = Profile.GetProfileByAccountID(_webContext.AccountID);
            }
            else
            {
                _accountBeingViewed = _userSession.CurrentUser;
                _accountBeingViewed.Profile = Profile.GetProfileByAccountID(_userSession.CurrentUser.AccountID);
            }
            if (_accountBeingViewed == null)
                _redirector.GoToAccountLoginPage();
            if (_accountBeingViewed.Profile != null && _accountBeingViewed.Profile.ProfileID > 0)
                _privacyFlags = PrivacyFlag.GetPrivacyFlagsByProfileID(_accountBeingViewed.Profile.ProfileID);
            else
                _redirector.GoToHomePage();

        }
开发者ID:lengocluyen,项目名称:pescode,代码行数:31,代码来源:ProfilePresenter.cs

示例15: AccountController

 /// <summary>
 /// 默认构造函数
 /// </summary>
 /// <param name="accountService">帐号服务接口</param>
 /// <param name="gloCache">全局缓存</param>
 public AccountController(IAccountService accountService,
     GlobalCache gloCache)
 {
     this.accountService = accountService;
     this.gloCache = gloCache;
     ViewBag.UserCount = gloCache.UserCount();
 }
开发者ID:tihou,项目名称:Fx.InformationPlatform.,代码行数:12,代码来源:AccountController.cs


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