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

C# IRegistryCore类代码示例

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

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



IRegistryCore类属于命名空间,在下文中一共展示了IRegistryCore类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Initialize

        public void Initialize(IGenericData GenericData, IConfigSource source, IRegistryCore registry,
                               string defaultConnectionString)
        {
            GD = GenericData;
            m_registry = registry;

            IConfig config = source.Configs["Currency"];
            if (config == null || source.Configs["Currency"].GetString("Module", "") != "BaseCurrency")
                return;

            IConfig gridInfo = source.Configs["GridInfoService"];
            if (gridInfo != null)
            {
                InWorldCurrency = gridInfo.GetString ("CurrencySymbol", string.Empty) + " ";
                RealCurrency = gridInfo.GetString ("RealCurrencySymbol", string.Empty) + " ";
            }

            if (source.Configs[Name] != null)
                defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);

            if (GenericData != null)
                GenericData.ConnectToDatabase(defaultConnectionString, "SimpleCurrency", true);
            Framework.Utilities.DataManager.RegisterPlugin(Name, this);

            m_config = new BaseCurrencyConfig(config);

            Init(m_registry, Name, "", "/currency/", "CurrencyServerURI");

        }
开发者ID:WhiteCoreSim,项目名称:WhiteCore-Dev,代码行数:29,代码来源:Base.CurrencyConnector.cs


示例2: LoadLibrary

        public void LoadLibrary(ILibraryService service, IConfigSource source, IRegistryCore registry)
        {
            m_service = service;
            m_registry = registry;
            m_Database = Framework.Utilities.DataManager.RequestPlugin<IInventoryData>();

            IConfig libConfig = source.Configs["InventoryIARLoader"];
            const string pLibrariesLocation = "DefaultInventory/";
            AddDefaultAssetTypes();
            if (libConfig != null)
            {
                if (libConfig.GetBoolean("WipeLibrariesOnNextLoad", false))
                {
                    service.ClearDefaultInventory(); //Nuke it
                    libConfig.Set("WipeLibrariesOnNextLoad", false);
                    source.Save();
                }
                if (libConfig.GetBoolean("PreviouslyLoaded", false))
                    return; //If it is loaded, don't reload
                foreach (string iarFileName in Directory.GetFiles(pLibrariesLocation, "*.iar"))
                {
                    LoadLibraries(iarFileName);
                }
            }
        }
开发者ID:emperorstarfinder,项目名称:My-Aurora-Sim,代码行数:25,代码来源:DefaultInventoryIARLoader.cs


示例3: Initialize

 public void Initialize(IConfigSource config, IRegistryCore registry)
 {
     ReadConfig(config);
     IConfig handlers = config.Configs["Handlers"];
     if (handlers.GetString("NeighborHandler", "") == Name)
         registry.RegisterModuleInterface<INeighborService>(this);
 }
开发者ID:kow,项目名称:Aurora-Sim,代码行数:7,代码来源:LocalNeighborServiceConnector.cs


示例4: Start

        public void Start(IConfigSource config, IRegistryCore registry)
        {
            if (config.Configs["Currency"] == null ||
                config.Configs["Currency"].GetString("Module", "") != "SimpleCurrency")
                return;
            if (!config.Configs["Currency"].GetBoolean("RunServer", false))
                return;

            m_connector = DataManager.RequestPlugin<ISimpleCurrencyConnector>() as SimpleCurrencyConnector;

            if (m_connector.GetConfig().ClientPort == 0 && MainServer.Instance == null)
                return;
            IHttpServer server =
                registry.RequestModuleInterface<ISimulationBase>()
                        .GetHttpServer((uint) m_connector.GetConfig().ClientPort);
            server.AddXmlRPCHandler("getCurrencyQuote", QuoteFunc);
            server.AddXmlRPCHandler("buyCurrency", BuyFunc);
            server.AddXmlRPCHandler("preflightBuyLandPrep", PreflightBuyLandPrepFunc);
            server.AddXmlRPCHandler("buyLandPrep", LandBuyFunc);
            server.AddXmlRPCHandler("getBalance", GetbalanceFunc);
            server.AddXmlRPCHandler("/currency.php", GetbalanceFunc);
            server.AddXmlRPCHandler("/landtool.php", GetbalanceFunc);

            m_syncMessagePoster = registry.RequestModuleInterface<ISyncMessagePosterService>();
            m_agentInfoService = registry.RequestModuleInterface<IAgentInfoService>();
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:26,代码来源:RPCHandler.cs


示例5: Initialize

        public void Initialize(IConfigSource config, IRegistryCore registry)
        {
            if (MainConsole.Instance != null)
            {
                MainConsole.Instance.Commands.AddCommand(
                    "save archive",
                    "save archive",
                    "Saves a WhiteCore '.abackup' archive (deprecated)",
                    SaveWhiteCoreArchive, true, false);

                MainConsole.Instance.Commands.AddCommand(
                    "load archive",
                    "load archive",
                    "Loads a WhiteCore '.abackupArchive",
                    LoadWhiteCoreArchive, true, false);
            }
            //Register the extension
            const string ext = ".abackup";
            try
            {
                if(Util.IsWindows())
                {
                    RegistryKey key = Registry.ClassesRoot.CreateSubKey(ext + "\\DefaultIcon");
                    key.SetValue("", Application.StartupPath + "\\CrateDownload.ico");
                    key.Close();
                }
            }
            catch
            {
            }
            //Register the interface
            registry.RegisterModuleInterface<IWhiteCoreBackupArchiver>(this);
        }
开发者ID:CaseyraeStarfinder,项目名称:WhiteCore-Dev,代码行数:33,代码来源:WhiteCoreArchiver.cs


示例6: Start

 public void Start(IConfigSource config, IRegistryCore registry)
 {
     m_Database = Framework.Utilities.DataManager.RequestPlugin<IAvatarData>();
     m_ArchiveService = registry.RequestModuleInterface<IAvatarAppearanceArchiver>();
     registry.RequestModuleInterface<ISimulationBase>()
             .EventManager.RegisterEventHandler("DeleteUserInformation", DeleteUserInformation);
 }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:7,代码来源:AvatarService.cs


示例7: Initialize

 public void Initialize(IConfigSource config, IRegistryCore registry)
 {
     IConfig handlerConfig = config.Configs["Handlers"];
     if (handlerConfig.GetString("AssetHandler", "") != Name)
         return;
     Configure(config, registry);
 }
开发者ID:RevolutionSmythe,项目名称:Aurora-Sim,代码行数:7,代码来源:AssetService.cs


示例8: Configure

 public void Configure(IConfigSource config, IRegistryCore registry)
 {
     if (MainConsole.Instance != null)
     {
         MainConsole.Instance.Commands.AddCommand(
                 "create user",
                 "create user [<first> [<last> [<pass> [<email>]]]]",
                 "Create a new user", HandleCreateUser);
         MainConsole.Instance.Commands.AddCommand("reset user password",
                 "reset user password [<first> [<last> [<password>]]]",
                 "Reset a user password", HandleResetUserPassword);
         MainConsole.Instance.Commands.AddCommand (
                 "show account",
                 "show account <first> <last>",
                 "Show account details for the given user", HandleShowAccount);
         MainConsole.Instance.Commands.AddCommand (
                     "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);
     }
     registry.RegisterModuleInterface<IUserAccountService>(this);
 }
开发者ID:HGExchange,项目名称:Aurora-Sim,代码行数:25,代码来源:UserAccountService.cs


示例9: AssetServerGetHandler

 public AssetServerGetHandler(IAssetService service, string url, string SessionID, IRegistryCore registry) :
     base("GET", url)
 {
     m_AssetService = service;
     m_SessionID = SessionID;
     m_registry = registry;
 }
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:7,代码来源:AssetServerGetHandler.cs


示例10: Initialize

 public void Initialize(IConfigSource config, IRegistryCore registry)
 {
     m_config = config;
     m_registry = registry;
     registry.RequestModuleInterface<ISimulationBase>().EventManager.RegisterEventHandler("PreRegisterRegion",
                                                                                          EventManager_OnGenericEvent);
 }
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:7,代码来源:SimulationServiceInConnector.cs


示例11: AbuseReportsHandler

 public AbuseReportsHandler(string url, IAbuseReports service, IRegistryCore reg, string SessionID) :
     base("POST", url)
 {
     m_AbuseReportsService = service;
     m_registry = reg;
     m_SessionID = SessionID;
 }
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:7,代码来源:AbuseReportsHandler.cs


示例12: Initialize

        public void Initialize (ILoginService service, IConfigSource config, IRegistryCore registry)
        {
            IConfig loginServerConfig = config.Configs ["LoginService"];
            if (loginServerConfig != null) {
                m_UseTOS = loginServerConfig.GetBoolean ("UseTermsOfServiceOnFirstLogin", false);
                m_TOSLocation = loginServerConfig.GetString ("FileNameOfTOS", "");

                if (m_TOSLocation.Length > 0) {
                    // html appears to be broken
                    if (m_TOSLocation.ToLower ().StartsWith ("http://", StringComparison.Ordinal))
                        m_TOSLocation = m_TOSLocation.Replace ("ServersHostname", MainServer.Instance.HostName);
                    else {
                        var simBase = registry.RequestModuleInterface<ISimulationBase> ();
                        var TOSFileName = PathHelpers.VerifyReadFile (m_TOSLocation, ".txt", simBase.DefaultDataPath);
                        if (TOSFileName == "") {
                            m_UseTOS = false;
                            MainConsole.Instance.ErrorFormat ("Unable to locate the Terms of Service file : '{0}'", m_TOSLocation);
                            MainConsole.Instance.Error (" Show 'Terms of Service' for a new user login is disabled!");
                        } else
                            m_TOSLocation = TOSFileName;
                    }
                } else
                    m_UseTOS = false;

            }
            m_AuthenticationService = registry.RequestModuleInterface<IAuthenticationService> ();
            m_LoginService = service;
        }
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:28,代码来源:BannedUserLoginModule.cs


示例13: AvatarServerPostHandler

 public AvatarServerPostHandler(string url, IAvatarService service, string SessionID, IRegistryCore registry) :
     base("POST", url)
 {
     m_AvatarService = service;
     m_SessionID = SessionID;
     m_registry = registry;
 }
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:7,代码来源:AvatarServerPostHandler.cs


示例14: MessagingServiceInPostHandler

 public MessagingServiceInPostHandler (string url, IRegistryCore registry, MessagingServiceInHandler handler, string SessionID) :
         base("POST", url)
 {
     m_handler = handler;
     m_SessionID = SessionID;
     ulong.TryParse (SessionID, out m_ourRegionHandle);
 }
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:7,代码来源:MessagingServiceInPostHandler.cs


示例15: Start

 public virtual void Start(IConfigSource config, IRegistryCore registry)
 {
     m_Database = Aurora.DataManager.DataManager.RequestPlugin<IInventoryData> ();
     m_UserAccountService = registry.RequestModuleInterface<IUserAccountService>();
     m_LibraryService = registry.RequestModuleInterface<ILibraryService>();
     m_AssetService = registry.RequestModuleInterface<IAssetService>();
 }
开发者ID:chazzmac,项目名称:Aurora-Sim,代码行数:7,代码来源:InventoryService.cs


示例16: Configure

        public virtual void Configure(IConfigSource config, IRegistryCore registry)
        {
            m_registry = registry;

            m_database = Framework.Utilities.DataManager.RequestPlugin<IAssetDataPlugin>();

            registry.RegisterModuleInterface<IAssetService>(this);

            IConfig handlers = config.Configs["Handlers"];
            if (handlers != null)
                doDatabaseCaching = handlers.GetBoolean("AssetHandlerUseCache", false);

            if (MainConsole.Instance != null && !DoRemoteCalls)
            {
                MainConsole.Instance.Commands.AddCommand(
                    "show digest",
                    "show digest <ID>",
                    "Show asset digest",
                    HandleShowDigest, false, true);

                MainConsole.Instance.Commands.AddCommand(
                    "delete asset",
                    "delete asset <ID>",
                    "Delete asset from database",
                    HandleDeleteAsset, false, true);

                MainConsole.Instance.Commands.AddCommand("get asset",
                    "get asset <ID>",
                    "Gets info about asset from database",
                    HandleGetAsset, false, true);

            }

            MainConsole.Instance.Debug("[ASSET SERVICE]: Local asset service enabled");
        }
开发者ID:QueenStarfinder,项目名称:WhiteCore-Dev,代码行数:35,代码来源:AssetService.cs


示例17: Start

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

            m_registry = registry;
            m_port = handlerConfig.GetUInt("AssetInHandlerPort");

            if (handlerConfig.GetBoolean("UnsecureUrls", false))
            {
                IHttpServer server = m_registry.RequestModuleInterface<ISimulationBase>().GetHttpServer(m_port);
                m_port = server.Port;
                string url = "/assets";

                IAssetService m_AssetService = m_registry.RequestModuleInterface<IAssetService>();
                server.AddStreamHandler(new AssetServerGetHandler(m_AssetService, url, 0, registry));
                server.AddStreamHandler(new AssetServerPostHandler(m_AssetService, url, 0, registry));
                server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService, m_allowDelete, url, 0, registry));
            }

            IConfig serverConfig = config.Configs[m_ConfigName];
            m_allowDelete = serverConfig != null ? serverConfig.GetBoolean("AllowRemoteDelete", false) : false;

            m_registry.RequestModuleInterface<IGridRegistrationService>().RegisterModule(this);
        }
开发者ID:kow,项目名称:Aurora-Sim,代码行数:26,代码来源:AssetServerConnector.cs


示例18: Initialize

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

            var simBase = registry.RequestModuleInterface<ISimulationBase> ();
            m_defaultDataPath = simBase.DefaultDataPath;

            Configure (config, registry);
            Init (registry, Name, serverPath: "/user/", serverHandlerName: "UserAccountServerURI");

            // check for user name seed
            IConfig loginConfig = config.Configs ["LoginService"];
            if (loginConfig != null) {
                string userNameSeed = loginConfig.GetString ("UserNameSeed", "");
                if (userNameSeed != "")
                    m_userNameSeed = userNameSeed.Split (',');
            }

            // check for initial stipend payment for new users
            IConfig currConfig = config.Configs ["Currency"];
            if (currConfig != null)
                m_newUserStipend = currConfig.GetInt ("NewUserStipend", 0);

        }
开发者ID:WhiteCoreSim,项目名称:WhiteCore-Dev,代码行数:26,代码来源:UserAccountService.cs


示例19: Configure

        public virtual void Configure(IConfigSource config, IRegistryCore registry)
        {
            m_registry = registry;

            m_database = DataManager.RequestPlugin<IAssetDataPlugin>();
            if (m_database == null)
                throw new Exception("Could not find a storage interface in the given module");

            registry.RegisterModuleInterface<IAssetService>(this);

            IConfig handlers = config.Configs["Handlers"];
            if (handlers != null)
                doDatabaseCaching = handlers.GetBoolean("AssetHandlerUseCache", false);

            if (MainConsole.Instance != null)
            {
                MainConsole.Instance.Commands.AddCommand("show digest",
                                                         "show digest <ID>",
                                                         "Show asset digest", HandleShowDigest);

                MainConsole.Instance.Commands.AddCommand("delete asset",
                                                         "delete asset <ID>",
                                                         "Delete asset from database", HandleDeleteAsset);
            }

            MainConsole.Instance.Debug("[ASSET SERVICE]: Local asset service enabled");
        }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:27,代码来源:AssetService.cs


示例20: Initialize

        public void Initialize(IGenericData GenericData, IConfigSource source, IRegistryCore simBase,
                               string defaultConnectionString)
        {
            GD = GenericData;

            if (source.Configs[Name] != null)
                defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);

            GD.ConnectToDatabase(defaultConnectionString, "AbuseReports",
                                 source.Configs["AuroraConnectors"].GetBoolean("ValidateTables", true));

            DataManager.DataManager.RegisterPlugin(Name + "Local", this);
            if (source.Configs["AuroraConnectors"].GetString("AbuseReportsConnector", "LocalConnector") ==
                "LocalConnector")
            {
                WebPassword = Util.Md5Hash(source.Configs["Handlers"].GetString("WireduxHandlerPassword", String.Empty));

                //List<string> Results = GD.Query("Method", "abusereports", "passwords", "Password");
                //if (Results.Count == 0)
                //{
                //    string newPass = MainConsole.Instance.PasswdPrompt("Password to access Abuse Reports");
                //    GD.Insert("passwords", new object[] { "abusereports", Util.Md5Hash(Util.Md5Hash(newPass)) });
                //}
                DataManager.DataManager.RegisterPlugin(Name, this);
            }
        }
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:26,代码来源:LocalAbuseReportsConnector.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IRelationalRow类代码示例发布时间:2022-05-24
下一篇:
C# IRegistry类代码示例发布时间: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