当前位置: 首页>>代码示例>>C#>>正文


C# IConfig.GetBoolean方法代码示例

本文整理汇总了C#中IConfig.GetBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# IConfig.GetBoolean方法的具体用法?C# IConfig.GetBoolean怎么用?C# IConfig.GetBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IConfig的用法示例。


在下文中一共展示了IConfig.GetBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialise

 public void Initialise(IConfigSource source)
 {
     m_config = source.Configs["CombatModule"];
     m_enabled = m_config.GetBoolean("Enabled", true);
     MaximumHealth = m_config.GetFloat("MaximumHealth", 100);
     ForceRequireCombatPermission = m_config.GetBoolean("ForceRequireCombatPermission", ForceRequireCombatPermission);
     DisallowTeleportingForCombatants = m_config.GetBoolean("DisallowTeleportingForCombatants", DisallowTeleportingForCombatants);
 }
开发者ID:shangcheng,项目名称:Aurora,代码行数:8,代码来源:CombatModule.cs

示例2: UserAccountServerPostHandler

        public UserAccountServerPostHandler(IUserAccountService service, IConfig config) :
                base("POST", "/accounts")
        {
            m_UserAccountService = service;

            if (config != null)
            {
                m_AllowCreateUser = config.GetBoolean("AllowCreateUser", m_AllowCreateUser);
                m_AllowSetAccount = config.GetBoolean("AllowSetAccount", m_AllowSetAccount);
            }
        }
开发者ID:JamesStallings,项目名称:Ubit-opensim,代码行数:11,代码来源:UserAccountServerPostHandler.cs

示例3: AuthenticationServerPostHandler

        public AuthenticationServerPostHandler(IAuthenticationService service, IConfig config) :
                base("POST", "/auth")
        {
            m_AuthenticationService = service;

            if (config != null)
            {
                m_AllowGetAuthInfo = config.GetBoolean("AllowGetAuthInfo", m_AllowGetAuthInfo);
                m_AllowSetAuthInfo = config.GetBoolean("AllowSetAuthInfo", m_AllowSetAuthInfo);
                m_AllowSetPassword = config.GetBoolean("AllowSetPassword", m_AllowSetPassword);
            }
        }
开发者ID:justasabc,项目名称:opensim,代码行数:12,代码来源:AuthenticationServerPostHandler.cs

示例4: Initialise

 public void Initialise(IConfigSource config)
 {
     m_config = config.Configs["RegionReady"];
     if (m_config != null) 
     {
         m_enabled = m_config.GetBoolean("enabled", false);
         
         if (m_enabled) 
         {
             m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify);
             m_disable_logins = m_config.GetBoolean("login_disable", false);
             m_uri = m_config.GetString("alert_uri",string.Empty);
         }
     }
 }
开发者ID:p07r0457,项目名称:opensim,代码行数:15,代码来源:RegionReadyModule.cs

示例5: Initialize

        public void Initialize(Scene scene, IConfigSource source)
        {
            // New region is being created
            // Create a new script engine
            // Make sure we have config
            try
            {
                if (ConfigSource == null)
                    return;

                if (ConfigSource.Configs["SECS"] == null)
                    ConfigSource.AddConfig("SECS");
                ScriptConfigSource = ConfigSource.Configs["SECS"];

                // Is SECS enabled?
                if (ScriptConfigSource.GetBoolean("Enabled", false))
                {
                    LoadEngine();
                    if (scriptEngine != null)
                        scriptEngine.Initialize(scene, source);
                }
            }
            catch (NullReferenceException)
            {
            }
        }
开发者ID:kf6kjg,项目名称:halcyon,代码行数:26,代码来源:RegionEngineLoader.cs

示例6: Initialise

        public void Initialise(IConfigSource config)
        {
            m_windConfig = config.Configs["Wind"];
//            string desiredWindPlugin = m_dWindPluginName;

            if (m_windConfig != null)
            {
                m_enabled = m_windConfig.GetBoolean("enabled", true);

                m_frameUpdateRate = m_windConfig.GetInt("wind_update_rate", 150);

                // Determine which wind model plugin is desired
                if (m_windConfig.Contains("wind_plugin"))
                {
                    m_dWindPluginName = m_windConfig.GetString("wind_plugin", m_dWindPluginName);
                }
            }

            if (m_enabled)
            {
                m_log.InfoFormat("[WIND] Enabled with an update rate of {0} frames.", m_frameUpdateRate);

            }

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

示例7: Initialise

        public void Initialise(IConfigSource config)
        {
            m_config = config.Configs["IRC"];
            if (m_config == null)
            {
                //                m_log.InfoFormat("[IRC-Bridge] module not configured");
                return;
            }

            if (!m_config.GetBoolean("enabled", false))
            {
                //                m_log.InfoFormat("[IRC-Bridge] module disabled in configuration");
                m_config = null;
                return;
            }

            if (config.Configs["RemoteAdmin"] != null)
            {
                m_password = config.Configs["RemoteAdmin"].GetString("access_password", m_password);
            }

            Enabled = true;

            m_log.InfoFormat("[IRC-Bridge]: Module is enabled");
        }
开发者ID:TomDataworks,项目名称:opensim,代码行数:25,代码来源:IRCBridgeModule.cs

示例8: GetProviderFromConfigName

        public static IGroupDataProvider GetProviderFromConfigName(ILog log, IConfig groupsConfig, string configName)
        {
            switch (configName)
            {
                case "XmlRpc":
                    string ServiceURL = groupsConfig.GetString("XmlRpcServiceURL");
                    bool DisableKeepAlive = groupsConfig.GetBoolean("XmlRpcDisableKeepAlive", false);

                    string ServiceReadKey = groupsConfig.GetString("XmlRpcServiceReadKey", String.Empty);
                    string ServiceWriteKey = groupsConfig.GetString("XmlRpcServiceWriteKey", String.Empty);

                    log.InfoFormat("[GROUPS]: XmlRpc Service URL set to: {0}", ServiceURL);

                    return new XmlRpcGroupDataProvider(ServiceURL, DisableKeepAlive, ServiceReadKey, ServiceWriteKey);


                case "Native":
                    string dbType = groupsConfig.GetString("NativeProviderDBType");
                    string connStr = groupsConfig.GetString("NativeProviderConnString");

                    ConnectionFactory connFactory = new ConnectionFactory(dbType, connStr);
                    return new NativeGroupDataProvider(connFactory);

            }

            return null;
        }
开发者ID:kf6kjg,项目名称:halcyon,代码行数:27,代码来源:ProviderFactory.cs

示例9: Init

        public void Init(VPServices app, Instance bot)
        {
            app.Commands.AddRange(new[] {
                new Command
                (
                    "IRC: Connect", "^irc(start|connect)$",
                    (s,a,d) => { return connect(); },
                    @"Starts the IRC-VP bridge", "!ircstart", 60
                ),

                new Command
                (
                    "IRC: Disconnect", "^irc(end|disconnect)$",
                    (s,a,d) => { return disconnect(); },
                    @"Stops the IRC-VP bridge", "!ircend", 60
                )
            });

            config = app.Settings.Configs["IRC"] ?? app.Settings.Configs.Add("IRC");

            this.app  = app;
            host      = config.Get("Server", "irc.ablivion.net");
            port      = config.GetInt("Port", 6667);
            channel   = config.Get("Channel", "#vp");
            bot.Chat += onWorldChat;

            if (config.GetBoolean("Autoconnect", false))
                connect();
        }
开发者ID:edwinr,项目名称:VPServices,代码行数:29,代码来源:IRC.cs

示例10: Initialise

 public void Initialise(IConfigSource source)
 {
     m_Config = source.Configs["OMP.WebSocket.RegionModule"];
     if (m_Config != null && m_Config.Contains("Enabled"))
         Enabled = m_Config.GetBoolean("Enabled");
     else
         Enabled = false;
 }
开发者ID:rryk,项目名称:omp-addon,代码行数:8,代码来源:RegionModule.cs

示例11: ScriptProtectionModule

        public ScriptProtectionModule(IConfig config)
		{
            m_config = config;
            EnabledAPIs = new List<string>(config.GetString("AllowedAPIs", "LSL").Split(','));

            allowHTMLLinking = config.GetBoolean("AllowHTMLLinking", true);
            GetThreatLevel();
		}
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:8,代码来源:ScriptProtectionModule.cs

示例12: Initialise

        public override void Initialise(IConfigSource config)
        {
            m_config = config.Configs["Concierge"];

            if (null == m_config)
                return;

            if (!m_config.GetBoolean("enabled", false))
                return;

            m_enabled = true;


            // check whether ChatModule has been disabled: if yes,
            // then we'll "stand in"
            try
            {
                if (config.Configs["Chat"] == null)
                {
                    // if Chat module has not been configured it's
                    // enabled by default, so we are not going to
                    // replace it.
                    m_replacingChatModule = false;
                }
                else 
                {
                    m_replacingChatModule  = !config.Configs["Chat"].GetBoolean("enabled", true);
                }
            }
            catch (Exception)
            {
                m_replacingChatModule = false;
            }
            
            m_log.InfoFormat("[Concierge] {0} ChatModule", m_replacingChatModule ? "replacing" : "not replacing");

            // take note of concierge channel and of identity
            m_conciergeChannel = config.Configs["Concierge"].GetInt("concierge_channel", m_conciergeChannel);
            m_whoami = m_config.GetString("whoami", "conferencier");
            m_welcomes = m_config.GetString("welcomes", m_welcomes);
            m_announceEntering = m_config.GetString("announce_entering", m_announceEntering);
            m_announceLeaving = m_config.GetString("announce_leaving", m_announceLeaving);
            m_xmlRpcPassword = m_config.GetString("password", m_xmlRpcPassword);
            m_brokerURI = m_config.GetString("broker", m_brokerURI);
            m_brokerUpdateTimeout = m_config.GetInt("broker_timeout", m_brokerUpdateTimeout);
            
            m_log.InfoFormat("[Concierge] reporting as \"{0}\" to our users", m_whoami);

            // calculate regions Regex
            if (m_regions == null)
            {
                string regions = m_config.GetString("regions", String.Empty);
                if (!String.IsNullOrEmpty(regions))
                {
                    m_regions = new Regex(@regions, RegexOptions.Compiled | RegexOptions.IgnoreCase);
                }
            }
        }
开发者ID:CCIR,项目名称:opensim,代码行数:58,代码来源:ConciergeModule.cs

示例13: Initialise

 public void Initialise(IConfigSource source)
 {
     m_config = source.Configs["CombatModule"];
     if (m_config != null)
     {
         m_enabled = m_config.GetBoolean("Enabled", true);
         MaximumHealth = m_config.GetFloat("MaximumHealth", 100);
         ForceRequireCombatPermission = m_config.GetBoolean("ForceRequireCombatPermission", ForceRequireCombatPermission);
         DisallowTeleportingForCombatants = m_config.GetBoolean("DisallowTeleportingForCombatants", DisallowTeleportingForCombatants);
         AllowTeamKilling = m_config.GetBoolean ("AllowTeamKilling", true);
         AllowTeams = m_config.GetBoolean ("AllowTeams", false);
         SendTeamKillerInfo = m_config.GetBoolean ("SendTeamKillerInfo", false);
         TeamHitsBeforeSend = m_config.GetFloat ("TeamHitsBeforeSend", 3);
         DamageToTeamKillers = m_config.GetFloat ("DamageToTeamKillers", 100);
         MaximumHealth = m_config.GetFloat ("MaximumHealth", 100);
         MaximumDamageToInflict = m_config.GetFloat ("MaximumDamageToInflict", 100);
         m_RespawnPosition.X = m_config.GetFloat ("RespawnPositionX", 128);
         m_RespawnPosition.Y = m_config.GetFloat ("RespawnPositionY", 128);
         m_RespawnPosition.Z = m_config.GetFloat ("RespawnPositionZ", 128);
         m_SecondsBeforeRespawn = m_config.GetInt ("SecondsBeforeRespawn", 5);
         m_shouldRespawn = m_config.GetBoolean ("ShouldRespawn", false);
         m_regenHealth = m_config.GetBoolean ("RegenerateHealth", true);
         RegenerateHealthSpeed = m_config.GetFloat ("RegenerateHealthSpeed", 0.0625f);
     }
 }
开发者ID:HGExchange,项目名称:Aurora-Sim,代码行数:25,代码来源:CombatModule.cs

示例14: Initialise

        public void Initialise(IConfigSource config)
        {
            m_log.Info("[RegionReady] Initialising");

            m_config = config.Configs["RegionReady"];
            if (m_config != null) 
            {
                m_enabled = m_config.GetBoolean("enabled", false);
                if (m_enabled) 
                {
                    m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify);
                } 
            }

            if (!m_enabled)
                m_log.Info("[RegionReady] disabled.");
        }
开发者ID:Ideia-Boa,项目名称:diva-distribution,代码行数:17,代码来源:RegionReadyModule.cs

示例15: Initialise

        public void Initialise(Scene scene, IConfigSource config)
        {
            m_log.Info("[RegionReady] Initialising");
            m_scene = scene;
            m_firstEmptyCompileQueue = true;
            m_oarFileLoading = false;
            m_lastOarLoadedOk = true;
            m_config = config.Configs["RegionReady"];

            if (m_config != null) 
            {
                m_enabled = m_config.GetBoolean("enabled", false);
                if (m_enabled) 
                {
                    m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify);
                } 
            }
        }
开发者ID:ChrisD,项目名称:opensim,代码行数:18,代码来源:RegionReady.cs


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