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


C# IniConfigSource.ExpandKeyValues方法代码示例

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


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

示例1: SettingsManager

        private static bool _fileExists = false; // does the ini file exists?

        static SettingsManager()
        {
            try
            {
                ConfigFile = string.Format("{0}/{1}", FileHelpers.AssemblyRoot, "config.ini"); // the config file's location.
                Parser = new IniConfigSource(ConfigFile); // see if the file exists by trying to parse it.
                _fileExists = true;
            }
            catch (Exception e)
            {
                Parser = new IniConfigSource(); // initiate a new .ini source.
                _fileExists = false;
                Logger.WarnException(e, "Error loading settings config.ini, will be using default settings. Exception thrown: ");
            }
            finally
            {
                // adds aliases so we can use On and Off directives in ini files.
                Parser.Alias.AddAlias("On", true);
                Parser.Alias.AddAlias("Off", false);

                // logger level aliases.
                Parser.Alias.AddAlias("MinimumLevel", Logger.Level.Trace);
                Parser.Alias.AddAlias("MaximumLevel", Logger.Level.Trace);
            }

            Parser.ExpandKeyValues();
        }
开发者ID:Cyberbanan,项目名称:voxeliq,代码行数:29,代码来源:SettingsManager.cs

示例2: ConfigurationManager

        private static bool _fileExists = false; // does the ini file exists?

        static ConfigurationManager()
        {
            try
            {
                Parser = new IniConfigSource(ConfigFile); // see if the file exists by trying to parse it.
                _fileExists = true;
            }
            catch (Exception)
            {
                Parser = new IniConfigSource(); // initiate a new .ini source.
                _fileExists = false;
                Logger.Warn("Error loading settings config.ini, will be using default settings.");
            }
            finally
            {
                // adds aliases so we can use On and Off directives in ini files.
                Parser.Alias.AddAlias("On", true); 
                Parser.Alias.AddAlias("Off", false);

                // logger level aliases.
                Parser.Alias.AddAlias("MinimumLevel", Logger.Level.Trace);
                Parser.Alias.AddAlias("MaximumLevel", Logger.Level.Trace);
            }

            Parser.ExpandKeyValues();
        }
开发者ID:nerdymerky,项目名称:mooege,代码行数:28,代码来源:ConfigManager.cs

示例3: ConfigurationManager

        private static bool _fileExists = false; // does the ini file exists?

        #endregion Fields

        #region Constructors

        static ConfigurationManager()
        {
            try
            {
                ConfigFile = string.Format("{0}/{1}", Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "config.ini"); // the config file's location.
                Parser = new IniConfigSource(ConfigFile); // see if the file exists by trying to parse it.
                _fileExists = true;
            }
            catch (Exception)
            {
                Parser = new IniConfigSource(); // initiate a new .ini source.
                _fileExists = false;
            }
            finally
            {
                // adds aliases so we can use On and Off directives in ini files.
                Parser.Alias.AddAlias("On", true);
                Parser.Alias.AddAlias("Off", false);
            }

            Parser.ExpandKeyValues();
        }
开发者ID:scriptord3,项目名称:Mjolnir,代码行数:28,代码来源:ConfigurationManager.cs

示例4: ConfigManager

        private static bool _fileExists = false; // does the ini file exists?

        #endregion Fields

        #region Constructors

        static ConfigManager()
        {
            try
            {
                ConfigFile = string.Format("{0}/{1}", FileHelpers.AssemblyRoot, "config.ini"); // the config file's location.
                Parser = new IniConfigSource(ConfigFile); // see if the file exists by trying to parse it.
                _fileExists = true;
            }
            catch (Exception)
            {
                Parser = new IniConfigSource(); // initiate a new .ini source.
                _fileExists = false;
                Console.WriteLine("Error loading settings config.ini, will be using default settings.");
            }
            finally
            {
                // adds aliases so we can use On and Off directives in ini files.
                Parser.Alias.AddAlias("On", true);
                Parser.Alias.AddAlias("Off", false);
            }

            Parser.ExpandKeyValues();
        }
开发者ID:Ebbo,项目名称:dboservertw,代码行数:29,代码来源:ConfigManager.cs

示例5: ExpandTextOtherSection

        public void ExpandTextOtherSection()
        {
            StringWriter writer = new StringWriter ();
            writer.WriteLine ("[web]");
            writer.WriteLine (" apache = Apache implements ${protocol}");
            writer.WriteLine (" protocol = http");
            writer.WriteLine ("[server]");
            writer.WriteLine (" domain = ${web|protocol}://nini.sf.net/");
            IniConfigSource source = new IniConfigSource
                                    (new StringReader (writer.ToString ()));
            source.ExpandKeyValues ();

            IConfig config = source.Configs["web"];
            Assert.AreEqual ("http", config.Get ("protocol"));
            Assert.AreEqual ("Apache implements http", config.Get ("apache"));
            config = source.Configs["server"];
            Assert.AreEqual ("http://nini.sf.net/", config.Get ("domain"));
        }
开发者ID:rwhitworth,项目名称:nini,代码行数:18,代码来源:ConfigSourceBaseTests.cs

示例6: ExpandText

        public void ExpandText()
        {
            StringWriter writer = new StringWriter ();
            writer.WriteLine ("[Test]");
            writer.WriteLine (" author = Brent");
            writer.WriteLine (" domain = ${protocol}://nini.sf.net/");
            writer.WriteLine (" apache = Apache implements ${protocol}");
            writer.WriteLine (" developer = author of Nini: ${author} !");
            writer.WriteLine (" love = We love the ${protocol} protocol");
            writer.WriteLine (" combination = ${author} likes ${protocol}");
            writer.WriteLine (" fact = fact: ${apache}");
            writer.WriteLine (" protocol = http");
            IniConfigSource source = new IniConfigSource
                                    (new StringReader (writer.ToString ()));
            source.ExpandKeyValues ();

            IConfig config = source.Configs["Test"];
            Assert.AreEqual ("http", config.Get ("protocol"));
            Assert.AreEqual ("fact: Apache implements http", config.Get ("fact"));
            Assert.AreEqual ("http://nini.sf.net/", config.Get ("domain"));
            Assert.AreEqual ("Apache implements http", config.Get ("apache"));
            Assert.AreEqual ("We love the http protocol", config.Get ("love"));
            Assert.AreEqual ("author of Nini: Brent !", config.Get ("developer"));
            Assert.AreEqual ("Brent likes http", config.Get ("combination"));
        }
开发者ID:rwhitworth,项目名称:nini,代码行数:25,代码来源:ConfigSourceBaseTests.cs

示例7: ExpandKeyValuesKeyError

        public void ExpandKeyValuesKeyError()
        {
            StringWriter writer = new StringWriter ();
            writer.WriteLine ("[web]");
            writer.WriteLine ("not-protocol = hah!");
            writer.WriteLine ("[server]");
            writer.WriteLine (" domain1 = ${web|protocol}://nini.sf.net/");
            IniConfigSource source = new IniConfigSource
                                    (new StringReader (writer.ToString ()));

            try {
                source.ExpandKeyValues ();
            }
            catch (Exception ex) {
                Assert.AreEqual ("Expand key not found: protocol", ex.Message);
            }
        }
开发者ID:rwhitworth,项目名称:nini,代码行数:17,代码来源:ConfigSourceBaseTests.cs

示例8: ExpandKeyInfiniteRecursion

        public void ExpandKeyInfiniteRecursion()
        {
            StringWriter writer = new StringWriter ();
            writer.WriteLine ("[replace]");
            writer.WriteLine ("test = ${test} broken");
            IniConfigSource source = new IniConfigSource
                                    (new StringReader (writer.ToString ()));

            try {
                source.ExpandKeyValues ();
            }
            catch (ArgumentException ex) {
                Assert.AreEqual
                    ("Key cannot have a expand value of itself: test", ex.Message);
            }
        }
开发者ID:rwhitworth,项目名称:nini,代码行数:16,代码来源:ConfigSourceBaseTests.cs

示例9: makeTargetConfig


//.........这里部分代码省略.........
            cm.Set("dmcc_devices.bat", @"${cmRoot}\dmcc_devices.bat");
            cm.Set("DMCCWrapperLib.dll", @"${cmRoot}\DMCCWrapperLib.dll");
            cm.Set("DMCCWrapperLib.pdb", @"${cmRoot}\DMCCWrapperLib.pdb");
            cm.Set("DMCCWrapperLib.tlb", @"${cmRoot}\DMCCWrapperLib.tlb");
            cm.Set("gacutil.exe", @"${cmRoot}\AlvasAudio\gacutil.exe");
            cm.Set("IPXChannel.dll", @"${cmRoot}\IPXChannel.dll");
            cm.Set("IPXChannel.pdb", @"${cmRoot}\IPXChannel.pdb");
            cm.Set("regasm.exe", @"${cmRoot}\AlvasAudio\regasm.exe");
            cm.Set("RtpTransmitter.dll", @"${cmRoot}\RtpTransmitter.dll");
            cm.Set("RtpTransmitter.pdb", @"${cmRoot}\RtpTransmitter.pdb");
            cm.Set("server.dll", @"${cmRoot}\server.dll");
            cm.Set("server.pdb", @"${cmRoot}\server.pdb");
            cm.Set("SIPChannel.dll", @"${cmRoot}\SIPChannel.dll");
            cm.Set("SIPChannel.pdb", @"${cmRoot}\SIPChannel.pdb");
            cm.Set("SIPConfigLib.dll", @"${cmRoot}\SIPConfigLib.dll");
            cm.Set("SIPConfigLib.pdb", @"${cmRoot}\SIPConfigLib.pdb");
            cm.Set("SIPPhone.dll", @"${cmRoot}\SIPPhone.dll");
            cm.Set("SIPPhone.pdb", @"${cmRoot}\SIPPhone.pdb");
            cm.Set("SIPWrapperLib.dll", @"${cmRoot}\SIPWrapperLib.dll");
            cm.Set("SIPWrapperLib.pdb", @"${cmRoot}\SIPWrapperLib.pdb");
            cm.Set("SIPWrapperLib.tlb", @"${cmRoot}\SIPWrapperLib.tlb");
            cm.Set("SIP_events.properties", @"${cmRoot}\SIP_events.properties");
            cm.Set("states.BIB.xml", @"${cmRoot}\states.BIB.xml");

            // EnvisionSR
            cm.Set("EnvisionSR.bat", @"${cmRoot}\EnvisionSR\EnvisionSR.bat");
            cm.Set("EnvisionSR.reg", @"${cmRoot}\EnvisionSR\EnvisionSR.reg");
            cm.Set("instsrv.exe", @"${cmRoot}\EnvisionSR\instsrv.exe");
            cm.Set("sleep.exe", @"${cmRoot}\EnvisionSR\sleep.exe");
            cm.Set("srvany.exe", @"${cmRoot}\EnvisionSR\srvany.exe");
            cm.Set("svcmgr.exe", @"${cmRoot}\EnvisionSR\svcmgr.exe");

            // SIPGateway
            cm.Set("InstallUtil.exe", @"${cmRoot}\SIPGateway\InstallUtil.exe");
            cm.Set("LumiSoft.Net.dll", @"${cmRoot}\LumiSoft.Net.dll|${cmRoot}\SIPGateway\LumiSoft.Net.dll");
            cm.Set("LumiSoft.Net.pdb", @"${cmRoot}\LumiSoft.Net.pdb|${cmRoot}\SIPGateway\LumiSoft.Net.pdb");
            cm.Set("LumiSoft.Net.xml", @"${cmRoot}\LumiSoft.Net.xml|${cmRoot}\SIPGateway\LumiSoft.Net.xml");
            cm.Set("log4net.dll", @"${cmRoot}\SIPGateway\log4net.dll");
            cm.Set("sc.exe", @"${cmRoot}\SIPGateway\sc.exe");
            cm.Set("server.dll_1", @"${cmRoot}\SIPGateway\server.dll");
            cm.Set("server.pdb_1", @"${cmRoot}\SIPGateway\server.pdb");
            cm.Set("SIPWrapperLogging.xml", @"${cmRoot}\SIPWrapperLogging.xml");

            // AlvasAudio
            cm.Set("AlvasAudio.bat", @"${cmRoot}\AlvasAudio\AlvasAudio.bat");
            cm.Set("AlvasAudio.dll", @"${cmRoot}\AlvasAudio\AlvasAudio.dll");
            cm.Set("gacutil.exe", @"${cmRoot}\AlvasAudio\gacutil.exe");
            cm.Set("regasm.exe", @"${cmRoot}\AlvasAudio\regasm.exe");

            IConfig wmws = source.AddConfig("WMWrapperService");
            wmws.Set("wmwsRoot", @".");
            wmws.Set("DefaultEnvisionProfile.prx", @"${wmwsRoot}\DefaultEnvisionProfile.prx");
            wmws.Set("server.dll", @"${wmwsRoot}\server.dll");
            wmws.Set("WMWrapperService.exe", @"${wmwsRoot}\WMWrapperService.exe");

            IConfig tools = source.AddConfig("Tools");
            tools.Set("toolsRoot", @".");
            tools.Set("DBMigration_84SP9_To_10.sql", @"${toolsRoot}\DBMigration\DBMigration_84SP9_To_10.sql");

            IConfig webapps = source.AddConfig("WebApps");
            webapps.Set("webappsRoot", @".");
            webapps.Set("webapps_version", webapps_version);

            // AVPlayer
            webapps.Set("AVPlayer.application", @"${webappsRoot}\AVPlayer\AVPlayer.application");
            webapps.Set("AgentSupport.exe.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\AgentSupport.exe.deploy");
            webapps.Set("AVPlayer.exe.config.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\AVPlayer.exe.config.deploy");
            webapps.Set("AVPlayer.exe.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\AVPlayer.exe.deploy");
            webapps.Set("AVPlayer.exe.manifest", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\AVPlayer.exe.manifest");
            webapps.Set("CentricityApp.dll.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\CentricityApp.dll.deploy");
            webapps.Set("hasp_windows.dll.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\hasp_windows.dll.deploy");
            webapps.Set("Interop.WMPLib.dll.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\Interop.WMPLib.dll.deploy");
            webapps.Set("log4net.dll.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\log4net.dll.deploy");
            webapps.Set("nativeServiceWin32.dll.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\nativeServiceWin32.dll.deploy");
            webapps.Set("server.dll.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\server.dll.deploy");
            webapps.Set("SharedResources.dll.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\SharedResources.dll.deploy");
            webapps.Set("ISource.dll.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\_ISource.dll.deploy");
            webapps.Set("AVPlayer.resources.dll.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\de\AVPlayer.resources.dll.deploy");
            webapps.Set("AVPlayer.resources.dll.deploy_1", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\es\AVPlayer.resources.dll.deploy");
            webapps.Set("CentricityApp.resources.dll.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\de\CentricityApp.resources.dll.deploy");
            webapps.Set("CentricityApp.resources.dll.deploy_1", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\es\CentricityApp.resources.dll.deploy");
            webapps.Set("AVPlayerIcon.ico.deploy", @"${webappsRoot}\AVPlayer\Application Files\AVPlayer_${webapps_version}\Resources\AVPlayerIcon.ico.deploy");

            // RecordingDownloadTool
            webapps.Set("RecordingDownloadTool.application", @"${webappsRoot}\RecordingDownloadTool\RecordingDownloadTool.application");
            webapps.Set("CentricityApp.dll.deploy_1", @"${webappsRoot}\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\CentricityApp.dll.deploy");
            webapps.Set("log4net.dll.deploy_1", @"${webappsRoot}\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\log4net.dll.deploy");
            webapps.Set("RecordingDownloadTool.exe.config.deploy", @"${webappsRoot}\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\RecordingDownloadTool.exe.config.deploy");
            webapps.Set("RecordingDownloadTool.exe.deploy", @"${webappsRoot}\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\RecordingDownloadTool.exe.deploy");
            webapps.Set("RecordingDownloadTool.exe.manifest", @"${webappsRoot}\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\RecordingDownloadTool.exe.manifest");
            webapps.Set("server.dll.deploy_1", @"${webappsRoot}\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\server.dll.deploy");
            webapps.Set("sox.exe.deploy", @"${webappsRoot}\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\sox.exe.deploy");
            webapps.Set("CentricityApp.resources.dll.deploy_2", @"${webappsRoot}\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\de\CentricityApp.resources.dll.deploy");
            webapps.Set("CentricityApp.resources.dll.deploy_3", @"${webappsRoot}\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\es\CentricityApp.resources.dll.deploy");
            webapps.Set("RecordingDownloadTool.resources.dll.deploy", @"${webappsRoot}\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\de\RecordingDownloadTool.resources.dll.deploy");
            webapps.Set("RecordingDownloadTool.resources.dll.deploy_1", @"${webappsRoot}\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\es\RecordingDownloadTool.resources.dll.deploy");

            source.ExpandKeyValues();
            source.Save("Aristotle_targets.config");
        }
开发者ID:tcondit,项目名称:PatchTool,代码行数:101,代码来源:PatchLib.cs

示例10: makeSourceConfig


//.........这里部分代码省略.........
            config.Set("SIP_events.properties", @"${srcRoot}\config\chanmgr\SIP_events.properties");
            config.Set("SIPPhone.dll", @"${srcRoot}\workdir\ChannelManager\SIPPhone.dll");
            config.Set("SIPPhone.pdb", @"${srcRoot}\workdir\ChannelManager\SIPPhone.pdb");
            config.Set("SIPWrapperLib.dll", @"${srcRoot}\workdir\ChannelManager\SIPWrapperLib.dll");
            config.Set("SIPWrapperLib.pdb", @"${srcRoot}\workdir\ChannelManager\SIPWrapperLib.pdb");
            config.Set("SIPWrapperLib.tlb", @"${srcRoot}\workdir\ChannelManager\SIPWrapperLib.tlb");
            config.Set("SIPWrapperLogging.xml", @"${srcRoot}\config\chanmgr\SIPWrapperLogging.xml");
            config.Set("SiteToGroupAgentMover.ascx", @"${srcRoot}\workdir\centricity\ET\UserControls\Movers\SiteToGroupAgentMover.ascx");
            config.Set("SiteToGroupAgentMover.ascx.resx", @"${srcRoot}\workdir\centricity\ET\UserControls\Movers\App_LocalResources\SiteToGroupAgentMover.ascx.resx");
            config.Set("SiteToGroupAgentMover.ascx.de.resx", @"${srcRoot}\workdir\centricity\ET\UserControls\Movers\App_LocalResources\SiteToGroupAgentMover.ascx.de.resx");
            config.Set("SiteToGroupAgentMover.ascx.es.resx", @"${srcRoot}\workdir\centricity\ET\UserControls\Movers\App_LocalResources\SiteToGroupAgentMover.ascx.es.resx");
            config.Set("sleep.exe", @"${srcRoot}\src\tools\Scripts\ChannelManager\EnvisionSR\sleep.exe");
            config.Set("SourceRunnerService.exe", @"${srcRoot}\workdir\ContactSourceRunner\SourceRunnerService.exe");
            config.Set("SourceRunnerService.pdb", @"${srcRoot}\workdir\ContactSourceRunner\SourceRunnerService.pdb");
            config.Set("srvany.exe", @"${srcRoot}\src\tools\Scripts\ChannelManager\EnvisionSR\srvany.exe");
            config.Set("states.BIB.xml", @"${srcRoot}\config\chanmgr\states.BIB.xml");
            config.Set("svcmgr.exe", @"${srcRoot}\src\tools\Scripts\ChannelManager\EnvisionSR\svcmgr.exe");
            config.Set("TeliaCallGuide.dll", @"${srcRoot}\workdir\ContactSourceRunner\TeliaCallGuide.dll");
            config.Set("TeliaCallGuide.pdb", @"${srcRoot}\workdir\ContactSourceRunner\TeliaCallGuide.pdb");
            config.Set("TokenService.xml", @"${srcRoot}\config\server\ArchitectureServiceDescriptions\TokenService.xml");

            // FIXME these should come from the same place.  Installer and the patch tool should be updated.
            config.Set("Tsapi.dll", @"${srcRoot}\workdir\ContactSourceRunner\Tsapi.dll");
            config.Set("Tsapi.pdb", @"${srcRoot}\src\contactsources\tsapi\Release\Tsapi.pdb");

            //config.Set("web.config", @"${srcRoot}\src\clients\centricity\ET\web.config");
            config.Set("WMWrapperService.exe", @"${srcRoot}\src\winservices\WMWrapperService\bin\Release\WMWrapperService.exe");

            // AVPlayer
            config.Set("AVPlayer.application", @"${srcRoot}\workdir\AVPlayer\AVPlayer.application");
            config.Set("AgentSupport.exe.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\AgentSupport.exe.deploy");
            config.Set("AVPlayer.exe.config.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\AVPlayer.exe.config.deploy");
            config.Set("AVPlayer.exe.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\AVPlayer.exe.deploy");
            config.Set("AVPlayer.exe.manifest", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\AVPlayer.exe.manifest");
            config.Set("CentricityApp.dll.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\CentricityApp.dll.deploy");
            config.Set("hasp_windows.dll.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\hasp_windows.dll.deploy");
            config.Set("Interop.WMPLib.dll.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\Interop.WMPLib.dll.deploy");
            config.Set("log4net.dll.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\log4net.dll.deploy");
            config.Set("nativeServiceWin32.dll.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\nativeServiceWin32.dll.deploy");
            config.Set("server.dll.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\server.dll.deploy");
            config.Set("SharedResources.dll.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\SharedResources.dll.deploy");
            config.Set("ISource.dll.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\_ISource.dll.deploy");
            config.Set("AVPlayer.resources.dll.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\de\AVPlayer.resources.dll.deploy");
            config.Set("AVPlayer.resources.dll.deploy_1", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\es\AVPlayer.resources.dll.deploy");
            config.Set("CentricityApp.resources.dll.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\de\CentricityApp.resources.dll.deploy");
            config.Set("CentricityApp.resources.dll.deploy_1", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\es\CentricityApp.resources.dll.deploy");
            config.Set("AVPlayerIcon.ico.deploy", @"${srcRoot}\workdir\AVPlayer\Application Files\AVPlayer_${webapps_version}\Resources\AVPlayerIcon.ico.deploy");

            // RecordingDownloadTool
            config.Set("RecordingDownloadTool.application", @"${srcRoot}\workdir\RecordingDownloadTool\RecordingDownloadTool.application");
            config.Set("CentricityApp.dll.deploy_1", @"${srcRoot}\workdir\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\CentricityApp.dll.deploy");
            config.Set("log4net.dll.deploy_1", @"${srcRoot}\workdir\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\log4net.dll.deploy");
            config.Set("RecordingDownloadTool.exe.config.deploy", @"${srcRoot}\workdir\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\RecordingDownloadTool.exe.config.deploy");
            config.Set("RecordingDownloadTool.exe.deploy", @"${srcRoot}\workdir\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\RecordingDownloadTool.exe.deploy");
            config.Set("RecordingDownloadTool.exe.manifest", @"${srcRoot}\workdir\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\RecordingDownloadTool.exe.manifest");
            config.Set("server.dll.deploy_1", @"${srcRoot}\workdir\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\server.dll.deploy");
            config.Set("sox.exe.deploy", @"${srcRoot}\workdir\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\sox.exe.deploy");
            config.Set("CentricityApp.resources.dll.deploy_2", @"${srcRoot}\workdir\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\de\CentricityApp.resources.dll.deploy");
            config.Set("CentricityApp.resources.dll.deploy_3", @"${srcRoot}\workdir\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\es\CentricityApp.resources.dll.deploy");
            config.Set("RecordingDownloadTool.resources.dll.deploy", @"${srcRoot}\workdir\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\de\RecordingDownloadTool.resources.dll.deploy");
            config.Set("RecordingDownloadTool.resources.dll.deploy_1", @"${srcRoot}\workdir\RecordingDownloadTool\Application Files\RecordingDownloadTool_${webapps_version}\es\RecordingDownloadTool.resources.dll.deploy");

            // from %ETSDK%
            try
            {
                string ETSDK = Environment.GetEnvironmentVariable("ETSDK");
                string gacutil = Path.Combine(ETSDK, @"Microsoft.NET\v3.5\gacutil.exe");
                config.Set("gacutil.exe", gacutil);
                string installutil = Path.Combine(ETSDK, @"Microsoft.NET\v2.0\InstallUtil.exe");
                config.Set("InstallUtil.exe", installutil);
                string regasm = Path.Combine(ETSDK, @"Microsoft.NET\v2.0\regasm.exe");
                config.Set("regasm.exe", regasm);
                string sc = Path.Combine(ETSDK, @"Microsoft\sc.exe");
                config.Set("sc.exe", sc);

                string jtapi_jar = Path.Combine(ETSDK, @"cti_libs\jtapi\jtapi.jar");
                config.Set("jtapi.jar", jtapi_jar);
                string jtracing_jar = Path.Combine(ETSDK, @"cti_libs\jtapi\jtracing.jar");
                config.Set("jtracing.jar", jtracing_jar);
                string updater_jar = Path.Combine(ETSDK, @"cti_libs\jtapi\updater.jar");
                config.Set("updater.jar", updater_jar);

                // LAA-BIN
                string dumpbin = Path.Combine(Environment.GetEnvironmentVariable("ETSDK"), @"java\LAA-BIN\dumpbin.exe");
                config.Set("dumpbin.exe", dumpbin);
                string EnvisionServer = Path.Combine(Environment.GetEnvironmentVariable("ETSDK"), @"java\LAA-BIN\EnvisionServer.exe");
                config.Set("EnvisionServer.exe", EnvisionServer);
                string java = Path.Combine(Environment.GetEnvironmentVariable("ETSDK"), @"java\LAA-BIN\java.exe");
                config.Set("java.exe", java);
                string javaw = Path.Combine(Environment.GetEnvironmentVariable("ETSDK"), @"java\LAA-BIN\javaw.exe");
                config.Set("javaw.exe", javaw);
            }
            catch (ArgumentNullException)
            {
                logger.Fatal("Please set %ETSDK% and try again");
            }

            source.ExpandKeyValues();
            source.Save("Aristotle_sources.config");
        }
开发者ID:tcondit,项目名称:PatchTool,代码行数:101,代码来源:PatchLib.cs

示例11: LoadMainConfig

        private static void LoadMainConfig()
        {
            try
            {
                _mainConfigFile = string.Format("{0}/Conf/{1}", FileHelpers.AssemblyRoot, "default.conf"); // the config file's location.
                _mainConfigParser = new IniConfigSource(_mainConfigFile); // see if the file exists by trying to parse it.
                _mainConfigFileExists = true;
            }
            catch (Exception)
            {
                _mainConfigParser = new IniConfigSource(); // initiate a new .ini source.
                _mainConfigFileExists = false;
                Log.Warning("Error loading settings {0}, will be using default settings.", _mainConfigFile);
            }
            finally
            {
                // adds aliases so we can use On and Off directives in ini files.
                _mainConfigParser.Alias.AddAlias("On", true);
                _mainConfigParser.Alias.AddAlias("Off", false);

                // logger level aliases.
                //Parser.Alias.AddAlias("MinimumLevel", Logger.Level.Trace);
                //Parser.Alias.AddAlias("MaximumLevel", Logger.Level.Trace);

                _mainConfigParser.ExpandKeyValues();
            }
        }
开发者ID:Ziftr,项目名称:CoiniumServ,代码行数:27,代码来源:ConfigManager.cs


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