本文整理汇总了C#中IAccountRepository类的典型用法代码示例。如果您正苦于以下问题:C# IAccountRepository类的具体用法?C# IAccountRepository怎么用?C# IAccountRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IAccountRepository类属于命名空间,在下文中一共展示了IAccountRepository类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Context
protected override void Context()
{
_handler = Resolve<AccountHandlers>();
_accountRepository = Resolve<IAccountRepository>();
_handler.AsDynamic().Handle(new AccountCreated(_id, "John Doe BVBA", "John", "Doe", "[email protected]", DateTime.UtcNow) { Version = 1 });
}
示例2: SetUp
public void SetUp()
{
_mockRepository = new MockRepository();
_accountRepository = _mockRepository.StrictMock<IAccountRepository>();
_transactionsRepository = _mockRepository.StrictMock<ITransactionsRepository>();
_paymentGateway = _mockRepository.StrictMock<IPaymentGateway>();
}
示例3: GetAccountRepo
public static IAccountRepository GetAccountRepo()
{
if (accountRepository == null)
accountRepository = new AccountRepository();
return accountRepository;
}
示例4: TransactionApp
public TransactionApp(ITransactionRepository transactionRepository, IAccountRepository accountRepository, ICategoryRepository categoryRepository, IPropertyRepository propertyRepository)
{
_transactionRepository = transactionRepository;
_accountRepository = accountRepository;
_categoryRepository = categoryRepository;
_propertyRepository = propertyRepository;
}
示例5: BankModule
public BankModule(ICashDispenser dispenser, IAccountRepository accountRepo)
{
_dispenser = dispenser;
_accountRepo = accountRepo;
Get["/"] = _ =>
{
return @"<html>
<body>
<form action='/withdraw' method='post'>
<label for='accountNo'>Account no</label>
<input type='text' name='accountNo' id='accountNo'>
<br />
<label for='amount'>Amount</label>
<input type='text' name='amount' id='amount'>
<br />
<input type='submit' name='withdraw' id='withdraw' value='Withdraw'>
</form>
</body>
</html>";
};
Post["/withdraw"] = p =>
{
var vm = this.Bind<WithdrawalVM>();
var account = _accountRepo.GetAccount(vm.AccountNo);
var teller = new Teller(_dispenser);
teller.AuthenticateAs(account);
teller.Withdraw(vm.Amount);
return "It's done!";
};
}
示例6: UserAccountRepository
public UserAccountRepository(IAccountRepository repository)
{
if (repository != null)
_repository = repository;
else
throw new ArgumentNullException();
}
示例7: AccountManager
public AccountManager(
ISecurityProvider securityProvider,
IAccountRepository accountRepository,
IAccountValidator accountValidator,
ITimeSource timeSource,
int accountSessionCollectionCapacity,
ISessionRepository sessionRepository,
IActionRightResolver actionRightResolver/*,
Func<TBizAccountRegistrationData, TBizAccount> accountRegistrationDataToAccount*/)
{
// todo1[ak] check args
_securityProvider = securityProvider;
_accountRepository = accountRepository;
_accountValidator = accountValidator;
_timeSource = timeSource;
_sessionManager = new SessionManager(
_securityProvider,
_timeSource,
accountSessionCollectionCapacity,
sessionRepository);
_actionRightResolver = actionRightResolver;
//_accountRegistrationDataToAccount = accountRegistrationDataToAccount;
}
示例8: FacebookAccountRepository
public FacebookAccountRepository(IAccountRepository accountRepository,
IFacebookDataRepository facebookDataRepository, IEventBus eventBus)
{
this.accountRepository = accountRepository;
this.facebookDataRepository = facebookDataRepository;
this.eventBus = eventBus;
}
示例9: AdminController
public AdminController(PostRepository repo, IRepository<Category> category, IRepository<Location> locationRepo, IAccountRepository account)
{
_postRepo = repo;
_categoryRepo = category;
_locationRepo = locationRepo;
_accountRepo = account;
}
示例10: AccountService
public AccountService(ILoggingService loggingService, IAccountRepository accountRepository,
ISharedHelper helper)
{
_loggingService = loggingService;
_accountRepository = accountRepository;
_helper = helper;
}
示例11: FileWriter
public FileWriter(IAccountRepository accountRepository, IAccountTagRepository accountTagRepository, ITemplateRepository templateRepository, IJournalRepository journalRepository)
{
_accountRepository = accountRepository;
_accountTagRepository = accountTagRepository;
_templateRepository = templateRepository;
_journalRepository = journalRepository;
}
示例12: ReportLogic
public ReportLogic(IUnitOfWork unit, IReportRepository repo, IActivityRepository a, IAccountRepository ac)
{
this.Unit = unit;
this.Repo = repo;
this.actRepo = a;
this.aRepo = ac;
}
示例13: AuthorizationService
public AuthorizationService(IAccountRepository accountRepository, ISessionRepository sessionRepository, IPasswordHashManager passwordHashManager)
{
_accountRepository = accountRepository;
_sessionRepository = sessionRepository;
_passwordHashManager = passwordHashManager;
}
示例14: AccountBrowserViewModel
public AccountBrowserViewModel(IAccountRepository accountRepository, IAccountTagRepository accountTagRepository, IMainWindowViewModel mainWindow = null)
{
_accountRepository = accountRepository;
_accountTagRepository = accountTagRepository;
_mainWindow = mainWindow;
_accounts = new ObservableCollection<AccountViewModel>();
}
示例15: JobController
public JobController()
{
this.profileRepo = new ProfileRepository(new MVCEntities());
this.jobRepo = new JobRepository(new MVCEntities());
this.accountRepo = new AccountRepository(new MVCEntities());
this.notiRepo = new NotificationRepository(new MVCEntities());
}