// Constructor for standalone mode public HGInventoryService(InventoryServiceBase invService, IAssetService assetService, UserManagerBase userService, IHttpServer httpserver, string thisurl) { m_userService = userService; m_assetProvider = assetService; Init(invService, thisurl, httpserver); }
/// <summary>Creates service definition that can be registered with a server</summary> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static grpc::ServerServiceDefinition BindService(InventoryServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetInventories, serviceImpl.GetInventories) .AddMethod(__Method_GetInventory, serviceImpl.GetInventory) .AddMethod(__Method_DbMigration, serviceImpl.DbMigration).Build()); }
private void onCatalogSuccess(CatalogModel obj) { DIContainer.GetByID(0).RegisterInstance <CatalogModel>(obj); invs = ServiceResolver.GetForCurrentPlatform <InventoryServiceBase>(); invs.GetPlayerInventory(onPlayerInventorySuccess, onPlayerInventoryFailed); }
// Constructor for grid inventory server public HGInventoryService(InventoryServiceBase invService, string assetServiceURL, string userServiceURL, IHttpServer httpserver, string thisurl) { //m_UserServerURL = userServiceURL; m_AssetServerURL = assetServiceURL; m_AssetClient = new SynchronousGridAssetClient(m_AssetServerURL); Init(invService, thisurl, httpserver); }
public GrantZoneCompletionRewardsCMD(List <ServerPlayerModel> eventReceivers, ServerNpcModel[] serverNPCModels, bool isFinalZone, Action onCompleteHandler) { this.eventReceivers = eventReceivers; this.serverNPCModels = serverNPCModels; this.isFinalZone = isFinalZone; this.onCompleteHandler = onCompleteHandler; inventoryService = DIContainer.GetInstanceByContextID <InventoryServiceBase>(InstanceServerApplication.CONTEXT_ID); catalogModel = DIContainer.GetInstanceByContextID <CatalogModel>(InstanceServerApplication.CONTEXT_ID); }
public void PostInitialise() { if (enabled) { m_log.Info("[HGStandaloneInvModule]: Starting..."); //m_inventoryService = new InventoryService(m_scene); m_inventoryBase = (InventoryServiceBase)m_scene.CommsManager.SecureInventoryService; m_inventoryService = new HGInventoryService(m_inventoryBase, ((AssetServerBase)m_scene.CommsManager.AssetCache.AssetServer).AssetProviderPlugin, (UserManagerBase)m_scene.CommsManager.UserAdminService, m_scene.CommsManager.HttpServer, m_scene.CommsManager.NetworkServersInfo.InventoryURL); AddHttpHandlers(m_scene.CommsManager.HttpServer); m_inventoryService.AddHttpHandlers(); } }
private void Init(InventoryServiceBase invService, string thisurl, IHttpServer httpserver) { m_inventoryService = invService; m_thisInventoryUrl = thisurl; if (!m_thisInventoryUrl.EndsWith("/")) { m_thisInventoryUrl += "/"; } Uri uri = new Uri(m_thisInventoryUrl); if (uri != null) { m_thisHostname = uri.Host; m_thisPort = (uint)uri.Port; } httpServer = httpserver; AddHttpHandlers(); }
private void Init(InventoryServiceBase invService, string thisurl, IHttpServer httpserver) { m_inventoryService = invService; m_thisInventoryUrl = thisurl; if (!m_thisInventoryUrl.EndsWith("/")) m_thisInventoryUrl += "/"; Uri uri = new Uri(m_thisInventoryUrl); if (uri != null) { m_thisHostname = uri.Host; m_thisPort = (uint)uri.Port; } httpServer = httpserver; AddHttpHandlers(); }
/// <summary>Register service method implementations with a service binder. Useful when customizing the service binding logic. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary> /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static void BindService(grpc::ServiceBinderBase serviceBinder, InventoryServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_GetInventories, serviceImpl.GetInventories); serviceBinder.AddMethod(__Method_GetInventory, serviceImpl.GetInventory); serviceBinder.AddMethod(__Method_DbMigration, serviceImpl.DbMigration); }