public AccountService(IAccountCache cache, IAccountDatabase db) { _cache = cache; _db = db; _db.GetAccountsOnce().ForEach( account => _cache.AddOrUpdate(account) ); }
/// <summary> /// Creates a new authorization HTTP server class instance /// </summary> public AuthHttpServer(Version version, TAccountFactory accountFactory, IAccountDatabase <TAccount, TAccountFactory> accountDatabase, ILogger logger, string address) : base(logger, address) { this.version = version ?? throw new ArgumentNullException(); this.accountFactory = accountFactory ?? throw new ArgumentNullException(); this.accountDatabase = accountDatabase ?? throw new ArgumentNullException(); listener.Prefixes.Add($"{address}{SignUpHttpRequest.Type}/"); listener.Prefixes.Add($"{address}{SignInHttpRequest.Type}/"); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IAccountDatabase accountDatabase) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseMvc(); app.Run(async(context) => { await context.Response.WriteAsync($"Helloy World"); }); }
public BaseAccount(string accountName, IAccountDatabase storage, string NetworkId) { AccountName = accountName; _storage = storage; //new AccountDatabase(); this.NetworkId = NetworkId; }
public LoginController(IAccountDatabase db) { _db = db; }
/// <summary> /// Creates a new room HTTP server class instance /// </summary> public RoomHttpServer(Version version, RoomDictionary <TRoom, TAccount> rooms, TAccountFactory accountFactory, IAccountDatabase <TAccount, TAccountFactory> accountDatabase, ILogger logger, string address) : base(version, accountFactory, accountDatabase, logger, address) { this.rooms = rooms ?? throw new ArgumentNullException(); listener.Prefixes.Add($"{address}{GetRoomInfosHttpRequest.Type}/"); listener.Prefixes.Add($"{address}{JoinRoomHttpRequest.Type}/"); }
public ExchangeAccountWallet(IAccountDatabase storage, string NetworkId) : base(storage, NetworkId) { }
public AccountService(IAccountCache cache, IAccountDatabase db) { _cache = cache; _db = db; }
protected BrokerWallet(IAccountDatabase storage, string name, ILyraAPI rpcClient = null) : base(storage, name, rpcClient) { }