예제 #1
0
        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;
        }
예제 #2
0
        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);
        }
예제 #3
0
        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;
 }
예제 #6
0
 /// <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);
 }
예제 #7
0
        public override void Initialise(IPlugin plugin)
        {
            IInventoryDataPlugin p = plugin as IInventoryDataPlugin;

            p.Initialise(connect);
        }
예제 #8
0
 protected override void InitService(object service)
 {
     ClearDB();
     db = (IInventoryDataPlugin)service;
     db.Initialise(m_connStr);
 }
예제 #9
0
 /// <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);
 }
예제 #10
0
 public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin, CommunicationsManager commsManager)
 {
     m_wrappedPlugin = wrappedPlugin;
     m_commsManager  = commsManager;
 }
예제 #11
0
 public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin, IUserAccountService userService)
 {
     m_wrappedPlugin      = wrappedPlugin;
     m_userAccountService = userService;
 }
 public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin, IUserAccountService userService)
 {
     m_wrappedPlugin = wrappedPlugin;
     m_userAccountService = userService;
 }