Esempio n. 1
0
        public void Initialize()
        {
            if (!_initialized)
            {
                _retrievalStrategy.Initialize();
                _securitySettings = new SecurityGroup
                {
                    EncryptionKey        = _retrievalStrategy.GetCoreConfigurationValue <string>("Security", "EncryptionKey"),
                    EncryptionSalt       = _retrievalStrategy.GetCoreConfigurationValue <string>("Security", "EncryptionSalt"),
                    EncryptionIV         = _retrievalStrategy.GetCoreConfigurationValue <string>("Security", "EncryptionIV"),
                    AccessDeniedRedirect = _retrievalStrategy.GetCoreConfigurationValue <string>("Security", "AccessDeniedRedirect"),
                    EnableInternetUser   = _retrievalStrategy.GetCoreConfigurationValue <bool>("Security", "EnableInternetUser"),
                    EnableRememberMe     = _retrievalStrategy.GetCoreConfigurationValue <bool>("Security", "EnableRememberMe"),

                    AdministratorRole       = _retrievalStrategy.GetCoreConfigurationValue <Guid>("Security", "AdministratorRole"),
                    UseWindowAuthentication = _retrievalStrategy.GetCoreConfigurationValue <bool>("Security", "UseWindowAuthentication")
                };

                _baseSettings = new GeneralSettingGroup()
                {
                    ConnectionString             = ConfigurationManager.ConnectionStrings["Connection"].ConnectionString,
                    DefaultPassword              = _retrievalStrategy.GetCoreConfigurationValue <string>("General", "DefaultPassword"),
                    UploadDocumentFolder         = _retrievalStrategy.GetCoreConfigurationValue <string>("General", "UploadDocumentFolder"),
                    UploadImgValidFileExtensions = _retrievalStrategy.GetCoreConfigurationValue <string>("General", "UploadImgValidFileExts"),
                    UploadDocumentValidFileExts  = _retrievalStrategy.GetCoreConfigurationValue <string>("General", "UploadDocumentValidFileExts"),
                };


                _smtpSettings = new SmtpSettingConfiguration()
                {
                    SmtpFrom = _retrievalStrategy.SmtpConfigurationSection.From
                };
                _initialized = true;
            }
        }
Esempio n. 2
0
    public void Initialize()
    {
      if (!_initialized)
      {
        _retrievalStrategy.Initialize();
        _securitySettings = new SecurityGroup
        {
          EncryptionKey = _retrievalStrategy.GetCoreConfigurationValue<string>("Security", "EncryptionKey"),
          EncryptionSalt = _retrievalStrategy.GetCoreConfigurationValue<string>("Security", "EncryptionSalt"),
          EncryptionIV = _retrievalStrategy.GetCoreConfigurationValue<string>("Security", "EncryptionIV"),
          AccessDeniedRedirect = _retrievalStrategy.GetCoreConfigurationValue<string>("Security", "AccessDeniedRedirect"),
          EnableInternetUser = _retrievalStrategy.GetCoreConfigurationValue<bool>("Security", "EnableInternetUser"),
          EnableRememberMe = _retrievalStrategy.GetCoreConfigurationValue<bool>("Security", "EnableRememberMe"),

          AdministratorRole = _retrievalStrategy.GetCoreConfigurationValue<Guid>("Security", "AdministratorRole"),
          UseWindowAuthentication = _retrievalStrategy.GetCoreConfigurationValue<bool>("Security", "UseWindowAuthentication")
        };

        _baseSettings = new GeneralSettingGroup()
        {
          ConnectionString = ConfigurationManager.ConnectionStrings["Connection"].ConnectionString,
          DefaultPassword = _retrievalStrategy.GetCoreConfigurationValue<string>("General", "DefaultPassword"),
          UploadDocumentFolder = _retrievalStrategy.GetCoreConfigurationValue<string>("General", "UploadDocumentFolder"),
          UploadImgValidFileExtensions = _retrievalStrategy.GetCoreConfigurationValue<string>("General", "UploadImgValidFileExts"),
          UploadDocumentValidFileExts = _retrievalStrategy.GetCoreConfigurationValue<string>("General", "UploadDocumentValidFileExts"),
        };


        _smtpSettings = new SmtpSettingConfiguration()
        {
          SmtpFrom = _retrievalStrategy.SmtpConfigurationSection.From
        };
        _initialized = true;
      }
    }