public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
        {
            ApplicationName = config.GetConfigValue("applicationName", null);
            userTableName   = CFMembershipSettings.UserTable ?? "Users";
            roleTableName   = CFMembershipSettings.RoleTable ?? "Roles";

            base.Initialize(name, config);
        }
        public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
        {
            // Perform basic initialization
            base.Initialize(name, config);

            // Initialize connection string
            this.ConnectionStringName = config.GetConfigValue("connectionStringName", null);

            // Get other configuration
            this.ContainerName      = config.GetConfigValue("containerName", DEFAULT_CONTAINER_NAME);
            this.DefaultContentType = config.GetConfigValue("defaultContentType", DEFAULT_CONTENT_TYPE);

            // Throw error on excess attributes
            if (config.Count != 0)
            {
                throw new ConfigurationErrorsException("Unrecognized configuration attributes found: " + string.Join(", ", config.AllKeys));
            }
        }
        public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
        {
            // Perform basic initialization
            base.Initialize(name, config);

            // Get data path
            this.FolderName = config.GetConfigValue("folderName", string.Empty);

            // Get other configuration
            this.DefaultContentType = config.GetConfigValue("defaultContentType", DEFAULT_CONTENT_TYPE);
            this.BufferSize         = config.GetConfigValue("bufferSize", DEFAULT_BUFFER_SIZE);

            // Throw error on excess attributes
            if (config.Count != 0)
            {
                throw new ConfigurationErrorsException("Unrecognized configuration attributes found: " + string.Join(", ", config.AllKeys));
            }
        }
Esempio n. 4
0
        public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
        {
            ApplicationName = config.GetConfigValue("applicationName", null);

            minRequiredNonAlphanumericCharacters = config.GetConfigValue("minRequiredNonAlphanumericCharacters", 0);
            minRequiredPasswordLength            = config.GetConfigValue("minRequiredPasswordLength", 8);
            passwordStrengthRegularExpression    = config.GetConfigValue("passwordStrengthRegularExpression", null);
            requiresUniqueEmail       = config.GetConfigValue("requiresUniqueEmail", true);
            generatedNonAlpha         = config.GetConfigValue("generatedNonAlpha", 6);
            generatedPassLength       = config.GetConfigValue("generatedPassLength", 12);
            emailRegularExpression    = config.GetConfigValue("emailRegularExpression", DEFAULT_EMAIL_REGEX);
            requiresQuestionAndAnswer = config.GetConfigValue("requiresQuestionAndAnswer", false);
            enablePasswordReset       = config.GetConfigValue("enablePasswordReset", true);
            userTableName             = CFMembershipSettings.UserTable ?? "Users";
            roleTableName             = CFMembershipSettings.RoleTable ?? "Roles";
            allowLoginWithEmail       = CFMembershipSettings.AllowLoginWithEmail;
            useEmailAsUsername        = CFMembershipSettings.UseEmailAsUsername;

            base.Initialize(name, config);
        }