November Happy Hour will be moved to Thursday December 5th.

Class Setting

Used for adding not commonly used settings for IComponent.

Inheritance
System.Object
Setting
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Shell.ViewComposition
Assembly: EPiServer.Shell.dll
Version: 9.12.2
Syntax
public class Setting

Constructors

Setting(String, Boolean)

Initializes a new instance of the Setting class.

Declaration
public Setting(string key, bool personalizable)
Parameters
Type Name Description
System.String key

The key for the setting.

System.Boolean personalizable

if set to true the value can be personalized.

Setting(String, Object)

Initializes a new instance of the Setting class with the Personalizable property set to false.

Declaration
public Setting(string key, object value)
Parameters
Type Name Description
System.String key

The key for the setting.

System.Object value

The value for the setting.

Setting(String, Object, Boolean)

Initializes a new instance of the Setting class with information if the setting can be personalized.

Declaration
public Setting(string key, object value, bool personalizable)
Parameters
Type Name Description
System.String key

The key for the setting.

System.Object value

The value for the setting.

System.Boolean personalizable

if set to true the value can be personalized.

Properties

Key

The key to use in the settings collection

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

Personalizable

Gets a value indicating whether this Setting can be personalized.

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

true if this setting is personalizable; otherwise, false.

Value

The value to insert into the settings collection

Declaration
public object Value { get; set; }
Property Value
Type Description
System.Object

Methods

Copy()

Copies this instance.

Declaration
public Setting Copy()
Returns
Type Description
Setting

A new instance with the values from the current settings object.

Equals(Object)

Determines whether the specified System.Object is equal to this instance.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The System.Object to compare with this instance.

Returns
Type Description
System.Boolean

true if the specified System.Object is equal to this instance; otherwise, false.

Overrides
System.Object.Equals(System.Object)

GetHashCode()

Returns a hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides
System.Object.GetHashCode()

Operators

Equality(Setting, Setting)

Implements the == operator.

Declaration
public static bool operator ==(Setting left, Setting right)
Parameters
Type Name Description
Setting left

A Setting to compare.

Setting right

A Setting to compare.

Returns
Type Description
System.Boolean

True if Key and Value of left and right are equal.

Inequality(Setting, Setting)

Implements the operator !=.

Declaration
public static bool operator !=(Setting left, Setting right)
Parameters
Type Name Description
Setting left

A Setting to compare.

Setting right

A Setting to compare.

Returns
Type Description
System.Boolean

True if key and Value of left and right differs.

Extension Methods