本文整理汇总了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;
}
示例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");
}
示例3: SetBase
private static void SetBase(IConfig configSection, GroupsConfig groups) {
if(configSection.ContainsKey("groups", "base")) {
groups.Base = configSection.GetValue("groups", "base");
}
}
示例4: SetRangeRetrievalSupport
private static void SetRangeRetrievalSupport(IConfig configSection, ServerConfig server) {
if(configSection.ContainsKey("rangeRetrievalSupport")) {
server.RangeRetrievalSupport = configSection.GetValue<bool>("rangeRetrievalSupport");
}
}
示例5: SetPageSize
private static void SetPageSize(IConfig configSection, ServerConfig server) {
if(configSection.ContainsKey("pageSize")) {
var pageSize = configSection.GetValue<int>("pageSize");
server.PageSize = pageSize;
}
}
示例6: SetAllowWildcardSearch
private static void SetAllowWildcardSearch(IConfig configSection, ServerConfig server) {
if(configSection.ContainsKey("allowWildcardSearch")) {
server.AllowWildcardSearch = configSection.GetValue<bool>("allowWildcardSearch");
}
}
示例7: SetUsername
private static void SetUsername(IConfig configSection, ServerConfig server) {
if(configSection.ContainsKey("username")) {
server.Username = configSection.GetValue("username");
}
}
示例8: SetVirtualListViewSupport
private static void SetVirtualListViewSupport(IConfig configSection, ServerConfig server) {
if(configSection.ContainsKey("virtualListViewSupport")) {
server.VirtualListViewSupport = configSection.GetValue<bool>("virtualListViewSupport");
}
}
示例9: SetLastPasswordChangedDateAttribute
private static void SetLastPasswordChangedDateAttribute(IConfig configSection, UsersConfig users) {
if(configSection.ContainsKey("users", "lastPasswordChangedDateAttribute")) {
users.LastPasswordChangedDateAttribute = configSection.GetValue("users", "lastPasswordChangedDateAttribute");
}
}
示例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;
}
示例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);
}
}
示例12: SetMembershipAttribute
private static void SetMembershipAttribute(IConfig configSection, GroupsConfig groups) {
if(configSection.ContainsKey("groups", "membershipAttribute")) {
groups.MembershipAttribute = configSection.GetValue("groups", "membershipAttribute");
}
}
示例13: SetRdnInPath
private void SetRdnInPath(IConfig configSection, GroupsConfig groups) {
if(configSection.ContainsKey("groups", "rdnInPath")) {
groups.RdnInPath = configSection.GetValue<bool>("groups", "rdnInPath");
}
}
示例14: SetRdnAttribute
private static void SetRdnAttribute(IConfig configSection, GroupsConfig groups) {
if(configSection.ContainsKey("groups", "rdnAttribute")) {
groups.RdnAttribute = configSection.GetValue("groups", "rdnAttribute");
}
}
示例15: SetEmailAttribute
private static void SetEmailAttribute(IConfig configSection, UsersConfig users) {
if(configSection.ContainsKey("users", "emailAttribute")) {
users.EmailAttribute = configSection.GetValue("users", "emailAttribute");
}
}