public TestCommunicationsManager(NetworkServersInfo serversInfo) : base(serversInfo, new BaseHttpServer(666), null, false, null) { SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin()); m_assetCache = new AssetCache(assetService); LocalInventoryService lis = new LocalInventoryService(); m_inventoryDataPlugin = new TestInventoryDataPlugin(); lis.AddPlugin(m_inventoryDataPlugin); m_interServiceInventoryService = lis; AddInventoryService(lis); LocalUserServices lus = new LocalUserServices(991, 992, this); lus.AddPlugin(new TemporaryUserProfilePlugin()); m_userDataPlugin = new TestUserDataPlugin(); lus.AddPlugin(m_userDataPlugin); m_userService = lus; m_userAdminService = lus; LocalBackEndServices gs = new LocalBackEndServices(); m_gridService = gs; }
public InventoryServiceBase(IConfigSource config) : base(config) { string dllName = String.Empty; string connString = String.Empty; // // Try reading the [DatabaseService] section first, if it exists // IConfig dbConfig = config.Configs["DatabaseService"]; if (dbConfig != null) { dllName = dbConfig.GetString("StorageProvider", String.Empty); connString = dbConfig.GetString("ConnectionString", String.Empty); } // // Try reading the more specific [InventoryService] section, if it exists // IConfig inventoryConfig = config.Configs["InventoryService"]; if (inventoryConfig != null) { dllName = inventoryConfig.GetString("StorageProvider", dllName); connString = inventoryConfig.GetString("ConnectionString", connString); } // // We tried, but this doesn't exist. We can't proceed. // if (dllName.Equals(String.Empty)) { throw new Exception("No InventoryService configuration"); } m_Database = LoadPlugin <IInventoryDataPlugin>(dllName); if (m_Database == null) { throw new Exception("Could not find a storage interface in the given module"); } m_Database.Initialise(connString); }
public TestCommunicationsManager(NetworkServersInfo serversInfo) : base(serversInfo, null) { LocalInventoryService lis = new LocalInventoryService(); m_inventoryDataPlugin = new TestInventoryDataPlugin(); lis.AddPlugin(m_inventoryDataPlugin); m_interServiceInventoryService = lis; AddInventoryService(lis); LocalUserServices lus = new LocalUserServices(991, 992, this); lus.AddPlugin(new TemporaryUserProfilePlugin()); m_userDataPlugin = new TestUserDataPlugin(); lus.AddPlugin(m_userDataPlugin); m_userService = lus; m_userAdminService = lus; LocalBackEndServices gs = new LocalBackEndServices(); m_gridService = gs; }
public InventoryServiceBase(IConfigSource config) : base(config) { string dllName = String.Empty; string connString = String.Empty; // // Try reading the [DatabaseService] section first, if it exists // IConfig dbConfig = config.Configs["DatabaseService"]; if (dbConfig != null) { dllName = dbConfig.GetString("StorageProvider", String.Empty); connString = dbConfig.GetString("ConnectionString", String.Empty); } // // Try reading the more specific [InventoryService] section, if it exists // IConfig inventoryConfig = config.Configs["InventoryService"]; if (inventoryConfig != null) { dllName = inventoryConfig.GetString("StorageProvider", dllName); connString = inventoryConfig.GetString("ConnectionString", connString); } // // We tried, but this doesn't exist. We can't proceed. // if (dllName.Equals(String.Empty)) throw new Exception("No InventoryService configuration"); m_Database = LoadPlugin<IInventoryDataPlugin>(dllName); if (m_Database == null) throw new Exception("Could not find a storage interface in the given module"); m_Database.Initialise(connString); }
public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin, CommunicationsManager commsManager) { m_wrappedPlugin = wrappedPlugin; m_commsManager = commsManager; }
/// <summary> /// Add a new inventory data plugin - plugins will be requested in the order they were added. /// </summary> /// <param name="plugin">The plugin that will provide data</param> public void AddPlugin(IInventoryDataPlugin plugin) { m_plugins.Add(plugin); }
public override void Initialise(IPlugin plugin) { IInventoryDataPlugin p = plugin as IInventoryDataPlugin; p.Initialise(connect); }
protected override void InitService(object service) { ClearDB(); db = (IInventoryDataPlugin)service; db.Initialise(m_connStr); }
public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin, IUserAccountService userService) { m_wrappedPlugin = wrappedPlugin; m_userAccountService = userService; }