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


C# NameValueCollection.GetInt32Value方法代码示例

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


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

示例1: Initialize

 /// <summary>
 /// Initializes the provider with the specified values.
 /// </summary>
 /// <param name="name">The name of the provider.</param>
 /// <param name="configValue">Provider specific attributes.</param>
 public override void Initialize(string name, NameValueCollection configValue)
 {
     base.Initialize(name, configValue);
     ServiceName = configValue.GetStringValue("serviceName", "");
     ServiceMachineName = configValue.GetStringValue("serviceMachineName", "");
     OutputFileNameToWatch = configValue.GetStringValue("outputFileNameToWatch", "");
     OutputFileExpectedAgeMinutes = configValue.GetInt32Value("outputFileExpectedAgeMinutes", 0);
     OutputFileMaxAgeMinutes = configValue.GetInt32Value("outputFileMaxAgeMinutes", 60);
     AssertConfigurationValid();
 }
开发者ID:Genyus,项目名称:candor-common,代码行数:15,代码来源:ServiceMonitorWorkerRoleTask.cs

示例2: InitializeInternal

        private void InitializeInternal(string name, NameValueCollection configValue)
        {
            base.Initialize(name, configValue);
            NameRegexExpression = configValue.GetStringValue("nameRegexExpression", "^([a-zA-Z0-9\\-_\\s])*$");
            EmailRegexExpression = configValue.GetStringValue("emailRegexExpression",
                                                              "^([0-9a-zA-Z]+[-\\._+&]*)*[0-9a-zA-Z][email protected]([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$");
            PasswordRegexExpression = configValue.GetStringValue("passwordRegexExpression", "^([[email protected]*#]{6,128})$");
            PasswordErrorMessage = configValue.GetStringValue("passwordErrorMessage",
                                                              "The password must be between 6 and 32 characters long; and can only contain letters, numbers, and these special symbols(@, *, #)");
            BaseHashIterations = configValue.GetInt32Value("baseHashIterations", 5000);
            HashGroupMinimum = configValue.GetInt32Value("hashGroupMinimum", 1);
            HashGroupMaximum = configValue.GetInt32Value("hashGroupMaximum", 1000);

            ExtendedSessionDuration = configValue.GetInt32Value("extendedSessionDuration", 20160); //20160=2weeks
            PublicSessionDuration = configValue.GetInt32Value("publicSessionDuration", 20); //20 minutes default.
            PasswordResetCodeExpirationHours = configValue.GetInt32Value("PasswordResetCodeExpirationHours", 1);
            GuestUserExpirationDays = configValue.GetInt32Value("GuestUserExpirationDays", 14);
            _hashProviderName = configValue.GetStringValue("hashProviderName", String.Empty);
            if (!string.IsNullOrEmpty(_hashProviderName))
            {
                // ReSharper disable NotResolvedInText
                if (HashManager.Providers[_hashProviderName] == null)
                    throw new ArgumentOutOfRangeException("hashProviderName", _hashProviderName,
                                                          "The specified HashProviderName does not exist.");
                // ReSharper restore NotResolvedInText
            }
            PasswordExpiration = configValue.GetInt32Value("passwordExpiration", PasswordExpiration);
            LoginExceededFailureMessage = configValue.GetStringValue("loginExceededFailureMessage",
                                                                     "Too many recent failed attempts have been made for this name.  " +
                                                                     "Either you entered the wrong password or an account by this name does not exist.  " +
                                                                     "If this is your account, try again later or email support with your problem.  " +
                                                                     "For security do not include your password in any email.");
            LoginCredentialsFailureMessage = configValue.GetStringValue("loginCredentialsFailureMessage",
                                                                        "The supplied name or password is incorrect.");
            FailurePeriodMinutes = configValue.GetInt32Value("failurePeriodMinutes", 20);
            AllowedFailuresPerPeriod = configValue.GetInt32Value("allowedFailuresPerPeriod", 5);
            String impersonateRoles = configValue.GetStringValue("impersonationAllowedRoles", "Administrator");
            ImpersonationAllowedRoles = !String.IsNullOrEmpty(impersonateRoles)
                                            ? impersonateRoles.Split(';', ',')
                                            : new string[] { };
        }
开发者ID:Genyus,项目名称:candor-common,代码行数:41,代码来源:UserProvider.cs


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