private static LocalAssetServicesConnector StartAssetService(Scene testScene, CoreAssetCache cache) { LocalAssetServicesConnector assetService = new LocalAssetServicesConnector(); IConfigSource config = new IniConfigSource(); config.AddConfig("Modules"); config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector"); config.AddConfig("AssetService"); config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService"); config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); assetService.Initialise(config); assetService.AddRegion(testScene); if (cache != null) { IConfigSource cacheConfig = new IniConfigSource(); cacheConfig.AddConfig("Modules"); cacheConfig.Configs["Modules"].Set("AssetCaching", "CoreAssetCache"); cacheConfig.AddConfig("AssetCache"); cache.Initialise(cacheConfig); cache.AddRegion(testScene); cache.RegionLoaded(testScene); testScene.AddRegionModule(cache.Name, cache); } assetService.RegionLoaded(testScene); testScene.AddRegionModule(assetService.Name, assetService); return(assetService); }
private static LocalAssetServicesConnector StartAssetService(CoreAssetCache cache) { IConfigSource config = new IniConfigSource(); config.AddConfig("Modules"); config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector"); config.AddConfig("AssetService"); config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService"); config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); LocalAssetServicesConnector assetService = new LocalAssetServicesConnector(); assetService.Initialise(config); if (cache != null) { IConfigSource cacheConfig = new IniConfigSource(); cacheConfig.AddConfig("Modules"); cacheConfig.Configs["Modules"].Set("AssetCaching", "CoreAssetCache"); cacheConfig.AddConfig("AssetCache"); cache.Initialise(cacheConfig); } return(assetService); }