public UserAccountServiceBase(IConfigSource config) : base(config)
        {
            string dllName = String.Empty;
            string connString = String.Empty;
            string realm = "UserAccounts";

            IConfig dbConfig = config.Configs["DatabaseService"];
            if (dbConfig != null)
            {
                dllName = dbConfig.GetString("StorageProvider", String.Empty);
                connString = dbConfig.GetString("ConnectionString", String.Empty);
            }

            IConfig userConfig = config.Configs["UserAccountService"];
            if (userConfig == null)
                throw new Exception("No UserAccountService configuration");

            dllName = userConfig.GetString("StorageProvider", dllName);

            if (dllName == String.Empty)
                throw new Exception("No StorageProvider configured");

            connString = userConfig.GetString("ConnectionString", connString);

            realm = userConfig.GetString("Realm", realm);

            m_Database = LoadPlugin<IUserAccountData>(dllName, new Object[] {connString, realm});

            if (m_Database == null)
                throw new Exception("Could not find a storage interface in the given module");
        }
예제 #2
0
 public void Start(IConfigSource config, IRegistryCore registry)
 {
     m_GridService = registry.RequestModuleInterface<IGridService>();
     m_AuthenticationService = registry.RequestModuleInterface<IAuthenticationService>();
     m_InventoryService = registry.RequestModuleInterface<IInventoryService>();
     m_Database = DataManager.RequestPlugin<IUserAccountData>();
     if (m_Database == null)
         throw new Exception("Could not find a storage interface in the given module");
 }
예제 #3
0
 public void Start(IConfigSource config, IRegistryCore registry)
 {
     m_GridService           = registry.RequestModuleInterface <IGridService>();
     m_AuthenticationService = registry.RequestModuleInterface <IAuthenticationService>();
     m_InventoryService      = registry.RequestModuleInterface <IInventoryService>();
     m_Database = DataManager.RequestPlugin <IUserAccountData>();
     if (m_Database == null)
     {
         throw new Exception("Could not find a storage interface in the given module");
     }
 }
예제 #4
0
        public UserAccountServiceBase(IConfigSource config)
            : base(config)
        {
            string dllName    = String.Empty;
            string connString = String.Empty;
            string realm      = "UserAccounts";

            IConfig dbConfig = config.Configs["DatabaseService"];

            if (dbConfig != null)
            {
                dllName    = dbConfig.GetString("StorageProvider", String.Empty);
                connString = dbConfig.GetString("ConnectionString", String.Empty);
            }

            IConfig userConfig = config.Configs["UserAccountService"];

            if (userConfig == null)
            {
                throw new Exception("No UserAccountService configuration");
            }

            dllName = userConfig.GetString("StorageProvider", dllName);

            if (dllName == String.Empty)
            {
                throw new Exception("No StorageProvider configured");
            }

            connString = userConfig.GetString("ConnectionString", connString);

            realm = userConfig.GetString("Realm", realm);

            m_Database = LoadPlugin <IUserAccountData>(dllName, new Object[] { connString, realm });

            if (m_Database == null)
            {
                throw new Exception("Could not find a storage interface in the given module");
            }
        }
예제 #5
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app,
                              IHostingEnvironment env,
                              IConfiguration config,
                              IGreeter greeter,
                              ILogger <Startup> logger,
                              IStockData stockData,
                              IUserAccountData userAccountData)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseStaticFiles();

            app.UseMvc(ConfigureRoutes);

            app.Run(async(context) =>
            {
                var greeting = greeter.GetMessageOfTheDay();
                context.Response.ContentType = "text/plain";
                await context.Response.WriteAsync($"not found?");
            });
        }
예제 #6
0
 public UserAccountController(IUserAccountData userAccount)
 {
     _userAccount = userAccount;
 }
 public void Start(IConfigSource config, IRegistryCore registry)
 {
     m_AuthenticationService = registry.RequestModuleInterface<IAuthenticationService>();
     m_Database = Framework.Utilities.DataManager.RequestPlugin<IUserAccountData>();
     m_profileConnector = Framework.Utilities.DataManager.RequestPlugin<IProfileConnector>();
 }
예제 #8
0
 public void Start(IConfigSource config, IRegistryCore registry)
 {
     m_AuthenticationService = registry.RequestModuleInterface <IAuthenticationService>();
     m_Database         = Framework.Utilities.DataManager.RequestPlugin <IUserAccountData>();
     m_profileConnector = Framework.Utilities.DataManager.RequestPlugin <IProfileConnector>();
 }
 public UserAccountService(IUserAccountData userAccountData)
 {
     _userAccountData = userAccountData;
 }