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


C# IConfig.GetValue方法代码示例

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


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

示例1: GetPredefinedPropertyKey

		private static string GetPredefinedPropertyKey(string property, IConfig config) {
			string result = null;
			if(config.ContainsKey("predefinedProperties", property)) {
				result = config.GetValue("predefinedProperties", property);
			}
			return result;
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:7,代码来源:PredefinedNamesFactory.cs

示例2: PublishPackage

        public PublishPackage(IConfig config, [NotNull] string tempDir, [NotNull] IOutput output)
        {
            if (tempDir == null) throw new ArgumentNullException("tempDir");
            if (output == null) throw new ArgumentNullException("output");
            this.tempDir = tempDir;
            this.output = output;

            releaseLogPath = config.GetValue("release log path");
            packageBinPath = config.GetValue("package bin path");
            webServiceRootUrl = config.GetValue("web service root url");
            webServiceControllerPath = config.GetValue("web service controller path");
            webServiceLogin = config.GetValue("web service login");
            webServicePassword = config.GetValue("web service password");
            appName = config.GetValue("app name");
            slackIntegrationSubUrl = config.GetValue("slack integration sub url");
            buildType = config.GetValue("build type");
        }
开发者ID:imtheman,项目名称:WurmAssistant3,代码行数:17,代码来源:PublishPackage.cs

示例3: SetBase

		private static void SetBase(IConfig configSection, GroupsConfig groups) {
			if(configSection.ContainsKey("groups", "base")) {
				groups.Base = configSection.GetValue("groups", "base");
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:5,代码来源:GroupsConfigFactory.cs

示例4: SetRangeRetrievalSupport

		private static void SetRangeRetrievalSupport(IConfig configSection, ServerConfig server) {
			if(configSection.ContainsKey("rangeRetrievalSupport")) {
				server.RangeRetrievalSupport = configSection.GetValue<bool>("rangeRetrievalSupport");
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:5,代码来源:ServerConfigFactory.cs

示例5: SetPageSize

		private static void SetPageSize(IConfig configSection, ServerConfig server) {
			if(configSection.ContainsKey("pageSize")) {
				var pageSize = configSection.GetValue<int>("pageSize");
				server.PageSize = pageSize;
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:6,代码来源:ServerConfigFactory.cs

示例6: SetAllowWildcardSearch

		private static void SetAllowWildcardSearch(IConfig configSection, ServerConfig server) {
			if(configSection.ContainsKey("allowWildcardSearch")) {
				server.AllowWildcardSearch = configSection.GetValue<bool>("allowWildcardSearch");
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:5,代码来源:ServerConfigFactory.cs

示例7: SetUsername

		private static void SetUsername(IConfig configSection, ServerConfig server) {
			if(configSection.ContainsKey("username")) {
				server.Username = configSection.GetValue("username");
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:5,代码来源:ServerConfigFactory.cs

示例8: SetVirtualListViewSupport

		private static void SetVirtualListViewSupport(IConfig configSection, ServerConfig server) {
			if(configSection.ContainsKey("virtualListViewSupport")) {
				server.VirtualListViewSupport = configSection.GetValue<bool>("virtualListViewSupport");
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:5,代码来源:ServerConfigFactory.cs

示例9: SetLastPasswordChangedDateAttribute

		private static void SetLastPasswordChangedDateAttribute(IConfig configSection, UsersConfig users) {
			if(configSection.ContainsKey("users", "lastPasswordChangedDateAttribute")) {
				users.LastPasswordChangedDateAttribute = configSection.GetValue("users", "lastPasswordChangedDateAttribute");
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:5,代码来源:UsersConfigFactory.cs

示例10: SetPath

		private static void SetPath(IConfig configSection, GroupsConfig groups) {
			var groupUri = new Uri(configSection.GetValue("url"));
			if(!String.IsNullOrEmpty(groups.Base)) {
				groupUri = new Uri(groupUri, groups.Base);
			}
			groups.Path = groupUri.OriginalString;
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:7,代码来源:GroupsConfigFactory.cs

示例11: SetNameType

		private static void SetNameType(IConfig configSection, GroupsConfig groups) {
			if(configSection.ContainsKey("groups", "nameType")) {
				var nameType = configSection.GetValue("groups", "nameType");
				groups.NameType = (NameType)Enum.Parse(typeof(NameType), nameType, true);
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:6,代码来源:GroupsConfigFactory.cs

示例12: SetMembershipAttribute

		private static void SetMembershipAttribute(IConfig configSection, GroupsConfig groups) {
			if(configSection.ContainsKey("groups", "membershipAttribute")) {
				groups.MembershipAttribute = configSection.GetValue("groups", "membershipAttribute");
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:5,代码来源:GroupsConfigFactory.cs

示例13: SetRdnInPath

		private void SetRdnInPath(IConfig configSection, GroupsConfig groups) {
			if(configSection.ContainsKey("groups", "rdnInPath")) {
				groups.RdnInPath = configSection.GetValue<bool>("groups", "rdnInPath");
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:5,代码来源:GroupsConfigFactory.cs

示例14: SetRdnAttribute

		private static void SetRdnAttribute(IConfig configSection, GroupsConfig groups) {
			if(configSection.ContainsKey("groups", "rdnAttribute")) {
				groups.RdnAttribute = configSection.GetValue("groups", "rdnAttribute");
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:5,代码来源:GroupsConfigFactory.cs

示例15: SetEmailAttribute

		private static void SetEmailAttribute(IConfig configSection, UsersConfig users) {
			if(configSection.ContainsKey("users", "emailAttribute")) {
				users.EmailAttribute = configSection.GetValue("users", "emailAttribute");
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:5,代码来源:UsersConfigFactory.cs


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