예제 #1
0
 public Handler(
     IAccountStorage accountStorage,
     IPortfolioStorage storage)
 {
     _storage  = storage;
     _accounts = accountStorage;
 }
예제 #2
0
 public AuthService(
     IAccountStorage accountStorage,
     IMapper mapper)
 {
     _mapper         = mapper;
     _accountStorage = accountStorage;
 }
예제 #3
0
 public SqLiteQuickTransactionStorage(IQuickTransactionFactory quickTransactionFactory,
                                      IAccountStorage accountStorage, ICategoryStorage categoryStorage) :
     base(quickTransactionFactory)
 {
     _accountStorage  = accountStorage;
     _categoryStorage = categoryStorage;
 }
예제 #4
0
        public void Init()
        {
            string[]        strArray    = Utility.GetConfig().AppSettings.Settings["AccountStorageImpl"].Value.Split(new char[] { ' ' });
            ConstructorInfo constructor = Assembly.Load(strArray[0]).GetType(strArray[1]).GetConstructor(new Type[0]);

            this.m_IAccountStorage = constructor.Invoke(new object[0]) as IAccountStorage;
        }
예제 #5
0
 public Account(IAuthorization auth, IAccountStorage <TModel> storage)
 {
     _auth                 = auth;
     _accounts             = new Dictionary <Token, TModel>();
     _auth.OnAccountLogin += AccountLoginHandler;
     _storage              = storage;
 }
예제 #6
0
 public Handler(
     IAccountStorage storage,
     IPortfolioStorage portfolioStorage)
 {
     _storage   = storage;
     _portfolio = portfolioStorage;
 }
예제 #7
0
 public SignUpViewModel(IAccountStorage accountStorage, INotificationCenter notificationCenter,
     ICurrentUser currentUser)
 {
     _accountStorage = accountStorage;
     _notificationCenter = notificationCenter;
     _currentUser = currentUser;
 }
예제 #8
0
 public SaveUseCase(
     IAccountStorage accountStorage,
     IDreamsStorage storage)
 {
     _accountStorage = accountStorage;
     _dreamsStorage  = storage;
 }
예제 #9
0
 public DeleteAccountUseCase(
     IAccountStorage accountStorage,
     IDreamsStorage dreamsStorage)
 {
     _accountStorage = accountStorage;
     _dreamsStorage  = dreamsStorage;
 }
예제 #10
0
 public SignUpViewModel(IAccountStorage accountStorage, INotificationCenter notificationCenter,
                        ICurrentUser currentUser)
 {
     _accountStorage     = accountStorage;
     _notificationCenter = notificationCenter;
     _currentUser        = currentUser;
 }
예제 #11
0
 public SqLiteTransactionStorage(ITransactionFactory transactionFactory,
                                 IAccountStorage accountStorage,
                                 ICategoryStorage categoryStorage) : base(transactionFactory)
 {
     _accountStorage  = accountStorage;
     _categoryStorage = categoryStorage;
 }
예제 #12
0
 public DeleteDreamUseCase(
     IAccountStorage accountStorage,
     IDreamsStorage storage)
 {
     _accountStorage = accountStorage;
     _dreamsStorage  = storage;
 }
        /// <summary>
        /// Create instance of BankAccountService.
        /// </summary>
        /// <param name="account"></param>
        /// <param name="storage"></param>
        /// <param name="exchenger"></param>
        public BankAccountService(IBankAccount account, IAccountStorage storage, IBallExchenger exchenger)
        {
            this.CurrentAccount = account ?? throw new ArgumentNullException("account", "Try to set null as IBankAccount.");

            this.Storage = storage ?? throw new ArgumentNullException("storage", "Try to set null as IAccountStorage.");

            this.Exchenger = exchenger ?? throw new ArgumentNullException("exchenger", "Try to set null as IBallExchenger.");
        }
예제 #14
0
 public EditAccountViewModel(IAccountStorage accountStorage, IAccount account)
 {
     Name            = account.Name;
     Description     = account.Description;
     Currency        = account.Currency;
     _account        = account;
     _accountStorage = accountStorage;
 }
예제 #15
0
 public Handler(
     IAccountStorage storage,
     IPortfolioStorage portfolioStorage,
     IEmailService emailService)
 {
     _storage   = storage;
     _portfolio = portfolioStorage;
     _emails    = emailService;
 }
예제 #16
0
 public RS_REALMLIST_Handler(
     IAccountStorage accountStorage,
     RS_REALMLIST_Reader RS_REALMLIST_Reader,
     AUTH_REALMLIST_Writer AUTH_REALMLIST_Writer)
 {
     this.accountStorage        = accountStorage;
     this.RS_REALMLIST_Reader   = RS_REALMLIST_Reader;
     this.AUTH_REALMLIST_Writer = AUTH_REALMLIST_Writer;
 }
예제 #17
0
 public Handler(
     IAccountStorage storage,
     IEmailService emails,
     IMediator mediator)
 {
     _storage  = storage;
     _emails   = emails;
     _mediator = mediator;
 }
예제 #18
0
        public MenuViewModel(IAccountStorage accountStorage, ICurrentUser currentUser, IArtportalenService artportalenService)
        {
            _accountStorage = accountStorage;
            _artportalenService = artportalenService;
            CurrentUser = currentUser;
            Title = "Meny";

            IsConnectedArtportalen = _artportalenService.HasAccount;
            IsNotConnectedArtportalen = !_artportalenService.HasAccount;
        }
예제 #19
0
        // Initialisation
        public Storage(string azureAccountName, string azureKey)
        {
            blobFactory = new BlobFactory(azureAccountName, azureKey);

            // allocate childrens
            user    = new UserStorage(blobFactory);
            account = new AccountStorage(blobFactory);
            list    = new ListStorage(blobFactory);
            msg     = new MsgStorage(blobFactory);
        }
예제 #20
0
        public TokenStorage(IAccountStorage accountStorage)
        {
            AccountStorage = accountStorage;

            _account     = null;
            AccessToken  = null;
            RefreshToken = null;
            UserToken    = null;
            XToken       = null;
        }
예제 #21
0
        // Initialisation
        public Storage(string azureAccountName, string azureKey)
        {
            blobFactory = new BlobFactory(azureAccountName, azureKey);

            // allocate childrens
            user = new UserStorage(blobFactory);
            account = new AccountStorage(blobFactory);
            list = new ListStorage(blobFactory);
            msg = new MsgStorage(blobFactory);
        }
예제 #22
0
        public SessionsViewModel(IAccountStorage accountStorage)
        {
            _accountStorage = accountStorage;

            Device.BeginInvokeOnMainThread(async() =>
            {
                var sessions = await _accountStorage.GetSessions();
                Sessions     = new ObservableCollection <Session>(sessions);
            });
        }
예제 #23
0
        public MenuViewModel(IAccountStorage accountStorage, ICurrentUser currentUser, IArtportalenService artportalenService)
        {
            _accountStorage     = accountStorage;
            _artportalenService = artportalenService;
            CurrentUser         = currentUser;
            Title = "Meny";

            IsConnectedArtportalen    = _artportalenService.HasAccount;
            IsNotConnectedArtportalen = !_artportalenService.HasAccount;
        }
예제 #24
0
        public SessionsViewModel(IAccountStorage accountStorage)
        {
            _accountStorage = accountStorage;

            Device.BeginInvokeOnMainThread(async () =>
            {
                var sessions = await _accountStorage.GetSessions();
                Sessions = new ObservableCollection<Session>(sessions);
            });
        }
예제 #25
0
 public void Setup()
 {
     _factory            = new BarCodeFactory();
     _accountStorage     = new SqLiteAccountStorage(new RegularAccountFactory());
     _categoryStorage    = new SqLiteCategoryStorage(new RegularCategoryFactory());
     _transactionStorage =
         new SqLiteTransactionStorage(new RegularTransactionFactory(), _accountStorage, _categoryStorage);
     _storage = new SqLiteBarCodeStorage(
         new BarCodeFactory(), _transactionStorage);
     _storage.DeleteAllData();
 }
예제 #26
0
 public RS_LOGON_PROOF_Handler(
     ILogger logger,
     IAccountStorage accountStorage,
     AUTH_LOGON_PROOF_Writer AUTH_LOGON_PROOF_Writer,
     RS_LOGON_PROOF_Reader RS_LOGON_PROOF_Reader)
 {
     this.logger                  = logger;
     this.accountStorage          = accountStorage;
     this.AUTH_LOGON_PROOF_Writer = AUTH_LOGON_PROOF_Writer;
     this.RS_LOGON_PROOF_Reader   = RS_LOGON_PROOF_Reader;
 }
예제 #27
0
 public ThirtyDaySellService(
     ILogger <ThirtyDaySellService> logger,
     IAccountStorage accounts,
     IEmailService emails,
     IMediator mediator)
 {
     _accounts = accounts;
     _emails   = emails;
     _logger   = logger;
     _mediator = mediator;
 }
예제 #28
0
 public CategoryTransactionsReportViewModel(IAccountStorage accountStorage, ICategoryStorage categoryStorage, ITransactionStorage transactionStorage)
 {
     _accountStorage     = accountStorage ?? throw new ArgumentNullException(nameof(accountStorage));
     _categoryStorage    = categoryStorage ?? throw new ArgumentNullException(nameof(categoryStorage));;
     _transactionStorage = transactionStorage ?? throw new ArgumentNullException(nameof(transactionStorage));
     _filteredSource     = new TransactionFilteredSource(DateTime.Now, DateTime.Now);
     Accounts            = new ObservableCollection <IAccount>(_accountStorage.GetAllAccounts());
     Categories          = new ObservableCollection <ICategory>(_categoryStorage.MakeFlatCategoryTree());
     StartDate           = DateTimeOffset.Now;
     EndDate             = StartDate;
 }
예제 #29
0
 public AdminController(
     IMediator mediator,
     IAccountStorage storage,
     IPortfolioStorage portfolio,
     IEmailService email)
 {
     _mediator  = mediator;
     _storage   = storage;
     _portfolio = portfolio;
     _email     = email;
 }
예제 #30
0
 public Handler(
     IEmailService emailService,
     IMediator mediator,
     ICSVParser parser,
     IAccountStorage storage)
 {
     _emailService = emailService;
     _mediator     = mediator;
     _parser       = parser;
     _storage      = storage;
 }
예제 #31
0
 public Handler(
     IAccountStorage storage,
     IPortfolioStorage portfolio,
     IAlertsStorage alerts,
     IEmailService emails,
     IMediator mediator)
 {
     _storage   = storage;
     _portfolio = portfolio;
     _alerts    = alerts;
 }
예제 #32
0
        public void Setup()
        {
            _accountFactory     = new RegularAccountFactory();
            _categoryFactory    = new RegularCategoryFactory();
            _accountStorage     = new CachedAccountStorage(new SqLiteAccountStorage(_accountFactory));
            _categoryStorage    = new CachedCategoryStorage(new SqLiteCategoryStorage(_categoryFactory));
            _transactionFactory = new RegularQuickTransactionFactory();
            _storage            = new CachedQuickTransactionStorage(new SqLiteQuickTransactionStorage(_transactionFactory, _accountStorage, _categoryStorage));
            _storage.DeleteAllData();

            _transaction = CreateTransaction();
        }
예제 #33
0
 public void Setup()
 {
     accountStorage     = new CachedAccountStorage(new SqLiteAccountStorage(new RegularAccountFactory()));
     categoryStorage    = new CachedCategoryStorage(new SqLiteCategoryStorage(new RegularCategoryFactory()));
     transactionFactory = new RegularTransactionFactory();
     storage            = new CachedTransactionStorage(new SqLiteTransactionStorage(transactionFactory, accountStorage, categoryStorage));
     categoryStorage.DeleteAllData();
     accountStorage.DeleteAllData();
     storage.DeleteAllData();
     transaction       = CreateTransaction(accountStorage, categoryStorage, transactionFactory);
     childTransaction  = CreateTransaction(accountStorage, categoryStorage, transactionFactory);
     childTransaction1 = CreateTransaction(accountStorage, categoryStorage, transactionFactory);
 }
예제 #34
0
        private ITransaction CreateTransaction(IAccountStorage accountManager, ICategoryStorage categoryManager, ITransactionFactory factory)
        {
            var transactionName  = "Test Transaction";
            var transactionTotal = 213.00m;


            var account  = accountManager.CreateAccount("Test account", "Account Description", "EUR");
            var category = categoryManager.CreateCategory("Sample category", "Category Description", 0, null);

            var result = factory.CreateTransaction(account, category, transactionName, transactionTotal, DateTime.Now, 0, 0.12m, null, null);

            return(result);
        }
예제 #35
0
 public LogInViewModel(IAccountStorage accountStorage)
 {
     _accountStorage = accountStorage;
 }
예제 #36
0
파일: AccountImpl.cs 프로젝트: cyyt/Lesktop
 public void Initialize(HttpContext context)
 {
     lock (lock_)
     {
         if (storage_impl_ == null)
         {
             string accStorage = System.Web.Configuration.WebConfigurationManager.AppSettings["AccountStorageImpl"];
             String[] accStorageInfo = accStorage.Split(new char[] { ' ' });
             Type type = Assembly.Load(accStorageInfo[0]).GetType(accStorageInfo[1]);
             ConstructorInfo ctor = type.GetConstructor(new Type[] { });
             storage_impl_ = ctor.Invoke(new object[] { }) as IAccountStorage;
         }
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DigestAuthenticator"/> class.
 /// </summary>
 /// <param name="realmRepository">Used to lookup the realm for a HTTP request</param>
 /// <param name="userService">Supplies users during authentication process.</param>
 public DigestAuthenticator(IRealmRepository realmRepository, IAccountStorage userService)
 {
     _realmRepository = realmRepository;
     _userService = userService;
 }
 public BasicAuthentication(IAccountStorage userService, string realm)
 {
     _userService = userService;
     _realm = realm;
 }