本文整理汇总了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);
}
示例2: AccountController
public AccountController(IAccountService accountService)
{
repository = new AccountRepository();
if (accountService == null)
throw new ArgumentNullException();
this.accountService = accountService;
}
示例3: CourseMenuPanel
public CourseMenuPanel(IAccountService accountService, CourseModel courseModel)
:this()
{
_accountService = accountService;
_courseModel = courseModel;
_courseModel = courseModel;
}
示例4: TaskController
public TaskController(IAccountService accountService, ITaskService taskService, ITaskListService taskListService, ITagService tagService)
{
_accountService = accountService;
_taskService = taskService;
_taskListService = taskListService;
_tagService = tagService;
}
示例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);
}
示例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();
}
});
}
示例7: BasePlaylistableViewModel
public BasePlaylistableViewModel(IDataService dataService, IAccountService accountService, IDialogService dialogService, IResourceService resourceService)
{
this.DataService = dataService;
this.AccountService = accountService;
this.DialogService = dialogService;
this.ResourceService = resourceService;
}
示例8: OrderRepository
public OrderRepository(IOrderService orderService, IAccountService accountService, IShippingMethodService shippingMethodService, ISuspensionManagerState suspensionManagerState)
{
_orderService = orderService;
_accountService = accountService;
_shippingMethodService = shippingMethodService;
_suspensionManagerState = suspensionManagerState;
}
示例9: BaseController
public BaseController()
{
_accountService = DependencyResolver.Current.GetService<IAccountService>();
_dictionaryService = DependencyResolver.Current.GetService<IDictionaryService>();
CacheService = CacheProvider.Current.GetCache();
_adminData = DependencyResolver.Current.GetService<IAdminScheduleService>();
}
示例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;
}
示例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 = "" });
}
示例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)));
}
示例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();
}
示例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();
}
示例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();
}