• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IGridService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IGridService的典型用法代码示例。如果您正苦于以下问题:C# IGridService类的具体用法?C# IGridService怎么用?C# IGridService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IGridService类属于命名空间,在下文中一共展示了IGridService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 ();
 }
开发者ID:JAllard,项目名称:HyperGrid,代码行数:12,代码来源:GatekeeperServices.cs


示例2: MessageRegionModule

        public MessageRegionModule(MessageServerConfig config, IGridServiceCore messageCore)
        {
            m_cfg = config;
            m_messageCore = messageCore;

            m_GridService = new GridServicesConnector(m_cfg.GridServerURL);
        }
开发者ID:intari,项目名称:OpenSimMirror,代码行数:7,代码来源:MessageRegionModule.cs


示例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));
        }
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:28,代码来源:MapCAPS.cs


示例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));

        }
开发者ID:CassieEllen,项目名称:opensim,代码行数:30,代码来源:MapAddServerConnector.cs


示例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);
            }
        }
开发者ID:ffoliveira,项目名称:opensimulator,代码行数:58,代码来源:UserAccountService.cs


示例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);
 }
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:9,代码来源:LoginSwitch.cs


示例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");
 }
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:9,代码来源:UserAccountService.cs


示例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>();
 }
开发者ID:RevolutionSmythe,项目名称:Aurora-Sim,代码行数:9,代码来源:GridServerPostHandler.cs


示例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");
        }
开发者ID:WordfromtheWise,项目名称:Aurora,代码行数:10,代码来源:PresenceService.cs


示例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);
        }
开发者ID:KristenMynx,项目名称:Aurora-Sim,代码行数:12,代码来源:GridServerConnector.cs


示例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));
        }
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:13,代码来源:MapCAPS.cs


示例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;
 }
开发者ID:wezmag,项目名称:Coevery,代码行数:16,代码来源:EntityController.cs


示例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));
 }
开发者ID:Barosonix,项目名称:Barosonix-Store-Module,代码行数:47,代码来源:WebStoreRobustConnector.cs


示例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);
 }
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:17,代码来源:RealXtendLogin.cs


示例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));
        }
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:18,代码来源:MapCAPS.cs


示例16: GridServiceConnector

        public GridServiceConnector(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 gridService = serverConfig.GetString("LocalServiceModule",
                    String.Empty);

            if (gridService == String.Empty)
                throw new Exception("No LocalServiceModule in config file");

            Object[] args = new Object[] { config };
            m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);

            server.AddStreamHandler(new GridServerPostHandler(m_GridService));
        }
开发者ID:BackupTheBerlios,项目名称:seleon,代码行数:18,代码来源:GridServerConnector.cs


示例17: PresenceService

 public PresenceService(IConfigSource config)
     : base(config)
 {
     IConfig presenceConfig = config.Configs["PresenceService"];
     if (presenceConfig != null)
     {
         m_allowDuplicatePresences =
                presenceConfig.GetBoolean("AllowDuplicatePresences",
                                          m_allowDuplicatePresences);
         m_checkLastSeen =
                presenceConfig.GetBoolean("CheckLastSeen",
                                          m_checkLastSeen);
         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");
 }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:18,代码来源:PresenceService.cs


示例18: UserAccountService

        public UserAccountService(IConfigSource config)
            : base(config)
        {
            IConfig userConfig = config.Configs["UserAccountService"];
            if (userConfig == null)
                throw new Exception("No UserAccountService configuration");

            // 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)
            {
                m_RootInstance = this;
                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("PresenceService", string.Empty);
                if (presenceServiceDll != string.Empty)
                    m_PresenceService = LoadPlugin<IPresenceService>(presenceServiceDll, new Object[] { config });

                string invServiceDll = userConfig.GetString("InventoryService", string.Empty);
                if (invServiceDll != string.Empty)
                    m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config });

                if (MainConsole.Instance != null)
                {
                    MainConsole.Instance.Commands.AddCommand("UserService", false,
                            "create user",
                            "create user [<first> [<last> [<pass> [<email>]]]]",
                            "Create a new user", HandleCreateUser);
                    MainConsole.Instance.Commands.AddCommand("UserService", false, "reset user password",
                            "reset user password [<first> [<last> [<password>]]]",
                            "Reset a user password", HandleResetUserPassword);
                }

            }

        }
开发者ID:gumho,项目名称:diva-distribution,代码行数:42,代码来源:UserAccountService.cs


示例19: Initialize

        public void Initialize(IConfigSource config, IRegistryCore registry)
        {
            IConfig handlerConfig = config.Configs["Handlers"];
            if (handlerConfig.GetString("GridHandler", "") != Name)
                return;

            string localHandler = handlerConfig.GetString("LocalGridHandler", "GridService");
            List<IGridService> services = Aurora.Framework.AuroraModuleLoader.PickupModules<IGridService>();
            foreach(IGridService s in services)
                if(s.GetType().Name == localHandler)
                    m_localService = s;

            m_registry = registry;
            if(m_localService == null)
                m_localService = new GridService();
            m_localService.Configure(config, registry);
            m_remoteService = new GridServicesConnector();
            m_remoteService.Initialize(config, registry);
            registry.RegisterModuleInterface<IGridService>(this);
        }
开发者ID:NickyPerian,项目名称:Aurora-Sim,代码行数:20,代码来源:IWCGridConnector.cs


示例20: 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);

            HttpServerHandle method = delegate(string path, Stream request, OSHttpRequest httpRequest,
                                                            OSHttpResponse httpResponse)
            {
                return MapLayerRequest(request.ReadUntilEnd(), httpRequest, httpResponse, m_service.AgentID);
            };
            m_service.AddStreamHandler("MapLayer",
                                       new GenericStreamHandler("POST", m_service.CreateCAPS("MapLayer", ""),
                                                             method));
            m_service.AddStreamHandler("MapLayerGod",
                                       new GenericStreamHandler("POST", m_service.CreateCAPS("MapLayerGod", ""),
                                                             method));
        }
开发者ID:JAllard,项目名称:Aurora-Sim,代码行数:21,代码来源:MapCAPS.cs



注:本文中的IGridService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IGroup类代码示例发布时间:2022-05-24
下一篇:
C# IGrid类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap