本文整理汇总了C#中IGridService类的典型用法代码示例。如果您正苦于以下问题:C# IGridService类的具体用法?C# IGridService怎么用?C# IGridService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IGridService类属于命名空间,在下文中一共展示了IGridService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FinishedStartup
public void FinishedStartup()
{
if (m_registry == null)
return; //Not enabled
m_CapsService = m_registry.RequestModuleInterface<ICapsService> ();
m_GridService = m_registry.RequestModuleInterface<IGridService> ();
m_PresenceService = m_registry.RequestModuleInterface<IAgentInfoService> ();
m_UserAccountService = m_registry.RequestModuleInterface<IUserAccountService> ();
m_UserAgentService = m_registry.RequestModuleInterface<IUserAgentService> ();
m_SimulationService = m_registry.RequestModuleInterface<ISimulationService> ();
m_DefaultGatewayRegion = FindDefaultRegion ();
}
示例2: MessageRegionModule
public MessageRegionModule(MessageServerConfig config, IGridServiceCore messageCore)
{
m_cfg = config;
m_messageCore = messageCore;
m_GridService = new GridServicesConnector(m_cfg.GridServerURL);
}
示例3: RegisterCaps
public void RegisterCaps(IRegionClientCapsService service)
{
m_service = service;
m_gridService = service.Registry.RequestModuleInterface<IGridService>();
IConfig config =
service.ClientCaps.Registry.RequestModuleInterface<ISimulationBase>().ConfigSource.Configs["MapCaps"];
if (config != null)
m_allowCapsMessage = config.GetBoolean("AllowCapsMessage", m_allowCapsMessage);
#if (!ISWIN)
RestMethod method = delegate(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
return MapLayerRequest(request, path, param, httpRequest, httpResponse, m_service.AgentID);
};
#else
RestMethod method =
(request, path, param, httpRequest, httpResponse) =>
MapLayerRequest(request, path, param, httpRequest, httpResponse,
m_service.AgentID);
#endif
m_service.AddStreamHandler("MapLayer",
new RestStreamHandler("POST", m_service.CreateCAPS("MapLayer", m_mapLayerPath),
method));
m_service.AddStreamHandler("MapLayerGod",
new RestStreamHandler("POST", m_service.CreateCAPS("MapLayerGod", m_mapLayerPath),
method));
}
示例4: MapAddServiceConnector
public MapAddServiceConnector(IConfigSource config, IHttpServer server, string configName) :
base(config, server, configName)
{
IConfig serverConfig = config.Configs[m_ConfigName];
if (serverConfig == null)
throw new Exception(String.Format("No section {0} in config file", m_ConfigName));
string mapService = serverConfig.GetString("LocalServiceModule",
String.Empty);
if (mapService == String.Empty)
throw new Exception("No LocalServiceModule in config file");
Object[] args = new Object[] { config };
m_MapService = ServerUtils.LoadPlugin<IMapImageService>(mapService, args);
string gridService = serverConfig.GetString("GridService", String.Empty);
if (gridService != string.Empty)
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
if (m_GridService != null)
m_log.InfoFormat("[MAP IMAGE HANDLER]: GridService check is ON");
else
m_log.InfoFormat("[MAP IMAGE HANDLER]: GridService check is OFF");
bool proxy = serverConfig.GetBoolean("HasProxy", false);
IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);
server.AddStreamHandler(new MapServerPostHandler(m_MapService, m_GridService, proxy, auth));
}
示例5: UserAccountService
public UserAccountService(IConfigSource config)
: base(config)
{
IConfig userConfig = config.Configs["UserAccountService"];
if (userConfig == null)
throw new Exception("No UserAccountService configuration");
string gridServiceDll = userConfig.GetString("GridService", string.Empty);
if (gridServiceDll != string.Empty)
m_GridService = LoadPlugin<IGridService>(gridServiceDll, new Object[] { config });
string authServiceDll = userConfig.GetString("AuthenticationService", string.Empty);
if (authServiceDll != string.Empty)
m_AuthenticationService = LoadPlugin<IAuthenticationService>(authServiceDll, new Object[] { config });
string presenceServiceDll = userConfig.GetString("GridUserService", string.Empty);
if (presenceServiceDll != string.Empty)
m_GridUserService = LoadPlugin<IGridUserService>(presenceServiceDll, new Object[] { config });
string invServiceDll = userConfig.GetString("InventoryService", string.Empty);
if (invServiceDll != string.Empty)
m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config });
string avatarServiceDll = userConfig.GetString("AvatarService", string.Empty);
if (avatarServiceDll != string.Empty)
m_AvatarService = LoadPlugin<IAvatarService>(avatarServiceDll, new Object[] { config });
m_CreateDefaultAvatarEntries = userConfig.GetBoolean("CreateDefaultAvatarEntries", false);
// In case there are several instances of this class in the same process,
// the console commands are only registered for the root instance
if (m_RootInstance == null && MainConsole.Instance != null)
{
m_RootInstance = this;
MainConsole.Instance.Commands.AddCommand("Users", false,
"create user",
"create user [<first> [<last> [<pass> [<email> [<user id>]]]]]",
"Create a new user", HandleCreateUser);
MainConsole.Instance.Commands.AddCommand("Users", false,
"reset user password",
"reset user password [<first> [<last> [<password>]]]",
"Reset a user password", HandleResetUserPassword);
MainConsole.Instance.Commands.AddCommand("Users", false,
"set user level",
"set user level [<first> [<last> [<level>]]]",
"Set user level. If >= 200 and 'allow_grid_gods = true' in OpenSim.ini, "
+ "this account will be treated as god-moded. "
+ "It will also affect the 'login level' command. ",
HandleSetUserLevel);
MainConsole.Instance.Commands.AddCommand("Users", false,
"show account",
"show account <first> <last>",
"Show account details for the given user", HandleShowAccount);
}
}
示例6: LoginSwitch
public LoginSwitch( UserLoginService service,
IInterServiceInventoryServices interInventoryService,
IInventoryService inventoryService,
IGridService gridService,
UserConfig config)
{
m_UserLoginService = service;
m_RealXtendLogin = new RealXtendLogin(service, interInventoryService, inventoryService, this, gridService, config);
}
示例7: Start
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");
}
示例8: GridServerPostHandler
public GridServerPostHandler (string url, IRegistryCore registry, IGridService service, bool secure, string SessionID) :
base("POST", url)
{
m_secure = secure;
m_GridService = service;
m_registry = registry;
m_SessionID = SessionID;
TelehubConnector = DataManager.RequestPlugin<IRegionConnector>();
}
示例9: PresenceService
public PresenceService(IConfigSource config)
: base(config)
{
IConfig presenceConfig = config.Configs["PresenceService"];
string gridServiceDll = presenceConfig.GetString("GridService", string.Empty);
if (gridServiceDll != string.Empty)
m_GridService = LoadPlugin<IGridService>(gridServiceDll, new Object[] { config });
m_log.Debug("[PRESENCE SERVICE]: Starting presence service");
}
示例10: PostStart
public void PostStart(IConfigSource config, IRegistryCore registry)
{
IConfig handlerConfig = config.Configs["Handlers"];
if (handlerConfig.GetString("GridInHandler", "") != Name)
return;
IHttpServer server = registry.RequestModuleInterface<ISimulationBase>().GetHttpServer((uint)handlerConfig.GetInt("GridInHandlerPort"));
m_GridService = registry.RequestModuleInterface<IGridService>();
GridServerPostHandler handler = new GridServerPostHandler(m_GridService);
server.AddStreamHandler(handler);
}
示例11: RegisterCaps
public void RegisterCaps(IRegionClientCapsService service)
{
m_service = service;
m_gridService = service.Registry.RequestModuleInterface<IGridService>();
RestMethod method = delegate(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
return MapLayerRequest(request, path, param, httpRequest, httpResponse, m_service.AgentID);
};
m_service.AddStreamHandler("MapLayer", new RestStreamHandler("POST", m_service.CreateCAPS("MapLayer", m_mapLayerPath),
method));
}
示例12: EntityController
public EntityController(
IContentManager iContentManager,
IOrchardServices orchardServices,
IProjectionManager projectionManager,
ITokenizer tokenizer,
IGridService gridService,
IRepository<FilterRecord> filterRepository,
IRepository<FilterGroupRecord> filterGroupRepository) {
_contentManager = iContentManager;
Services = orchardServices;
_projectionManager = projectionManager;
_tokenizer = tokenizer;
_gridService = gridService;
_filterRepository = filterRepository;
_filterGroupRepository = filterGroupRepository;
}
示例13: WebStoreRobustConnector
public WebStoreRobustConnector(IConfigSource config, IHttpServer server, string configName)
: base(config, server, configName)
{
if (configName != string.Empty)
{
m_ConfigName = configName;
}
IConfig config2 = config.Configs["WebStore"];
if (config2 == null)
{
this.m_Enabled = false;
WebStoreRobustConnector.m_log.DebugFormat("[Web.Store.Robust.Connector]: Configuration Error Not Enabled", new object[0]);
return;
}
this.m_Enabled = true;
string @string = config2.GetString("StorageProvider", string.Empty);
string string2 = config2.GetString("ConnectionString", string.Empty);
string string3 = config2.GetString("Realm", "store_transactions");
string string4 = config2.GetString("GridService", string.Empty);
string string5 = config2.GetString("UserAccountService", string.Empty);
string string6 = config2.GetString("PresenceService", string.Empty);
if (@string == string.Empty || string2 == string.Empty || string4 == string.Empty || string5 == string.Empty || string6 == string.Empty)
{
this.m_Enabled = false;
WebStoreRobustConnector.m_log.ErrorFormat("[Web.Store.Robust.Connector]: missing service specifications Not Enabled", new object[0]);
return;
}
object[] args = new object[]
{
config
};
this.m_GridService = ServerUtils.LoadPlugin<IGridService>(string4, args);
this.m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(string5, args);
this.m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(string6, args);
this.m_Database = ServerUtils.LoadPlugin<IStoreData>(@string, new object[]
{
string2,
string3
});
this.m_Funcs = new Functions();
WebStoreRobustConnector.m_log.DebugFormat("[Web.Store.Robust.Connector]: Initialzing", new object[0]);
if (MainConsole.Instance != null)
{
MainConsole.Instance.Commands.AddCommand("Debug", false, "Web Store Debug", "Web Store Debug <true|false>", "This setting turns on Web Store Debug", new CommandDelegate(this.HandleDebugStoreVerbose));
}
server.AddXmlRPCHandler("ProcessTransaction", new XmlRpcMethod(this.ProcessTransaction));
}
示例14: RealXtendLogin
public RealXtendLogin(UserLoginService service,
IInterServiceInventoryServices interInventoryService,
IInventoryService inventoryService,
LoginSwitch loginSwitch,
IGridService gridService,
UserConfig config)
{
m_UserLoginService = service;
m_interInventoryService = interInventoryService;
m_InventoryService = inventoryService;
m_LoginSwitch = loginSwitch;
m_GridService = gridService;
m_UserConfig = config;
m_defaultHomeX = m_UserConfig.DefaultX;
m_defaultHomeY = m_UserConfig.DefaultY;
m_OpenSimMap = new OpenSimMap(config.GridServerURL, m_GridService);
}
示例15: IncomingCapsRequest
public void IncomingCapsRequest (UUID agentID, GridRegion region, ISimulationBase simbase, ref OSDMap capURLs)
{
m_agentID = agentID;
m_region = region;
m_userScopeIDs = simbase.ApplicationRegistry.RequestModuleInterface<IUserAccountService> ().GetUserAccount (null, m_agentID).AllScopeIDs;
m_gridService = simbase.ApplicationRegistry.RequestModuleInterface<IGridService> ();
IConfig config = simbase.ConfigSource.Configs ["MapCAPS"];
if (config != null)
m_allowCapsMessage = config.GetBoolean ("AllowCapsMessage", m_allowCapsMessage);
HttpServerHandle method = (path, request, httpRequest, httpResponse) => MapLayerRequest (HttpServerHandlerHelpers.ReadString (request), httpRequest, httpResponse);
m_uri = "/CAPS/MapLayer/" + UUID.Random () + "/";
capURLs ["MapLayer"] = MainServer.Instance.ServerURI + m_uri;
capURLs ["MapLayerGod"] = MainServer.Instance.ServerURI + m_uri;
MainServer.Instance.AddStreamHandler (new GenericStreamHandler ("POST", m_uri, method));
}