Show / Hide Table of Contents

Class SettingDefinition

Inheritance
System.Object
SettingDefinition
Namespace: Volo.Abp.Settings
Assembly: Volo.Abp.Settings.dll
Syntax
public class SettingDefinition : object

Constructors

SettingDefinition(String, String, ILocalizableString, ILocalizableString, Boolean, Boolean, Boolean)

Declaration
public SettingDefinition(string name, string defaultValue = null, ILocalizableString displayName = null, ILocalizableString description = null, bool isVisibleToClients = false, bool isInherited = true, bool isEncrypted = false)
Parameters
Type Name Description
System.String name
System.String defaultValue
ILocalizableString displayName
ILocalizableString description
System.Boolean isVisibleToClients
System.Boolean isInherited
System.Boolean isEncrypted

Properties

DefaultValue

Default value of the setting.

Declaration
public string DefaultValue { get; set; }
Property Value
Type Description
System.String

Description

Declaration
public ILocalizableString Description { get; set; }
Property Value
Type Description
ILocalizableString

DisplayName

Declaration
public ILocalizableString DisplayName { get; set; }
Property Value
Type Description
ILocalizableString

IsEncrypted

Is this setting stored as encrypted in the data source. Default: False.

Declaration
public bool IsEncrypted { get; set; }
Property Value
Type Description
System.Boolean

IsInherited

Is this setting inherited from parent scopes. Default: True.

Declaration
public bool IsInherited { get; set; }
Property Value
Type Description
System.Boolean

IsVisibleToClients

Can clients see this setting and it's value. It maybe dangerous for some settings to be visible to clients (such as an email server password). Default: false.

Declaration
public bool IsVisibleToClients { get; set; }
Property Value
Type Description
System.Boolean

Name

Unique name of the setting.

Declaration
public string Name { get; }
Property Value
Type Description
System.String

Properties

Can be used to get/set custom properties for this setting definition.

Declaration
public Dictionary<string, object> Properties { get; }
Property Value
Type Description
Dictionary<System.String, System.Object>

Providers

A list of allowed providers to get/set value of this setting. An empty list indicates that all providers are allowed.

Declaration
public List<string> Providers { get; }
Property Value
Type Description
List<System.String>

Methods

WithProperty(String, Object)

Sets a property in the Properties dictionary. This is a shortcut for nested calls on this object.

Declaration
public virtual SettingDefinition WithProperty(string key, object value)
Parameters
Type Name Description
System.String key
System.Object value
Returns
Type Description
SettingDefinition

WithProviders(String[])

Sets a property in the Properties dictionary. This is a shortcut for nested calls on this object.

Declaration
public virtual SettingDefinition WithProviders(params string[] providers)
Parameters
Type Name Description
System.String[] providers
Returns
Type Description
SettingDefinition

Extension Methods

AbpObjectExtensions.As<T>(Object)
AbpObjectExtensions.To<T>(Object)
AbpObjectExtensions.IsIn<T>(T, T[])
AbpObjectExtensions.If<T>(T, Boolean, Func<T, T>)
AbpObjectExtensions.If<T>(T, Boolean, Action<T>)
LockExtensions.Locking(Object, Action)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<TResult>(Object, Func<TResult>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
Back to top Powered by Volosoft