public override IEnumerable<SettingDefinition> GetSettingDefinitions(SettingDefinitionProviderContext context)
 {
     return new[]
     {
         new SettingDefinition(LocalizationSettingNames.DefaultLanguage, null, L("DefaultLanguage"), scopes: SettingScopes.Application | SettingScopes.Tenant | SettingScopes.User, isVisibleToClients: true)
     };
 }
 public override IEnumerable<SettingDefinition> GetSettingDefinitions(SettingDefinitionProviderContext context)
 {
     return new[]
     {
         new SettingDefinition(ClearCacheSettingNames.Password, "123qweasdZXC")
     };
 }
        public void Initialize()
        {
            var context = new SettingDefinitionProviderContext();

            foreach (var providerType in _settingsConfiguration.Providers)
            {
                var provider = CreateProvider(providerType);
                foreach (var settings in provider.GetSettingDefinitions(context))
                {
                    _settings[settings.Name] = settings;
                }
            }
        }
 public override IEnumerable<SettingDefinition> GetSettingDefinitions(SettingDefinitionProviderContext context)
 {
     return new[]
            {
                new SettingDefinition(EmailSettingNames.Smtp.Host, "127.0.0.1", L("SmtpHost"), scopes: SettingScopes.Application | SettingScopes.Tenant),
                new SettingDefinition(EmailSettingNames.Smtp.Port, "25", L("SmtpPort"), scopes: SettingScopes.Application | SettingScopes.Tenant),
                new SettingDefinition(EmailSettingNames.Smtp.UserName, "", L("Username"), scopes: SettingScopes.Application | SettingScopes.Tenant),
                new SettingDefinition(EmailSettingNames.Smtp.Password, "", L("Password"), scopes: SettingScopes.Application | SettingScopes.Tenant),
                new SettingDefinition(EmailSettingNames.Smtp.Domain, "", L("DomainName"), scopes: SettingScopes.Application | SettingScopes.Tenant),
                new SettingDefinition(EmailSettingNames.Smtp.EnableSsl, "false", L("UseSSL"), scopes: SettingScopes.Application | SettingScopes.Tenant),
                new SettingDefinition(EmailSettingNames.Smtp.UseDefaultCredentials, "true", L("UseDefaultCredentials"), scopes: SettingScopes.Application | SettingScopes.Tenant),
                new SettingDefinition(EmailSettingNames.DefaultFromAddress, "", L("DefaultFromSenderEmailAddress"), scopes: SettingScopes.Application | SettingScopes.Tenant),
                new SettingDefinition(EmailSettingNames.DefaultFromDisplayName, "", L("DefaultFromSenderDisplayName"), scopes: SettingScopes.Application | SettingScopes.Tenant)
            };
 }
Esempio n. 5
0
 /// <summary>
 /// Gets all setting definitions provided by this provider.
 /// 获取此提供程序所提供的所有设置定义。
 /// </summary>
 /// <returns>List of settings(设置列表)</returns>
 public abstract IEnumerable<SettingDefinition> GetSettingDefinitions(SettingDefinitionProviderContext context);