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


C# IConfig.ContainsKey方法代码示例

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


在下文中一共展示了IConfig.ContainsKey方法的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: 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

示例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: SetSizeLimit

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

示例5: SetTimeLimit

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

示例6: SetPassword

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

示例7: SetAuthenticationTypes

		private static void SetAuthenticationTypes(IConfig configSection, ServerConfig server) {
			if(configSection.ContainsKey("authenticationTypes")) {
				var authenticationTypes = configSection.GetValueArray("authenticationTypes", "authenticationType");
				foreach(var authenticationType in authenticationTypes) {
					server.AuthenticationTypes |=
						(AuthenticationTypes)Enum.Parse(typeof(AuthenticationTypes), authenticationType, true);
				}
			}
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:9,代码来源:ServerConfigFactory.cs

示例8: SetPropertySortingSupport

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

示例9: SetDescriptionAttribute

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

示例10: 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

示例11: SetAttributeDefinitionList

		private static void SetAttributeDefinitionList(IConfig configSection, GroupsConfig groups) {
			var containsCustomAttributes = configSection.ContainsKey("groups", "attributes");
			var attributes = new List<IAttributeDefinition>(groups.Attributes);
			if(containsCustomAttributes) {
				attributes.Clear();
			}
			attributes.Attach(groups.MembershipAttribute, true);
			if(containsCustomAttributes) {
				var attributeValues = configSection.GetValueArray("groups/attributes", "attribute");
				foreach(var attribute in attributeValues) {
					var excludeFromNameSearch = false;
					var attributeKey = String.Format("groups/attributes/attribute[@value='{0}']", attribute);
					if(configSection.ContainsAttribute(attributeKey, "excludeFromNameSearch")) {
						excludeFromNameSearch = configSection.GetAttribute<bool>(attributeKey, "excludeFromNameSearch");
					}
					attributes.Attach(attribute, excludeFromNameSearch);
				}
			}
			groups.Attributes = attributes;
		}
开发者ID:aelveborn,项目名称:njupiter,代码行数:20,代码来源: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: SetCreationDateAttribute

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


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