SettingsProperty SettingsProperty SettingsProperty SettingsProperty Class

Definition

Used internally as the class that represents metadata about an individual configuration property.

public ref class SettingsProperty
public class SettingsProperty
type SettingsProperty = class
Public Class SettingsProperty
Inheritance
SettingsPropertySettingsPropertySettingsPropertySettingsProperty

Remarks

SettingsProperty is used to describe settings properties of a class derived from SettingsBase. The Settings API allows a collection of settings properties to be grouped into a common language runtime class.

When persisting settings, the SettingsBase base class asks for a collection of SettingsProperty objects, grouped in a collection of type SettingsPropertyCollection. It does this by calling its own Properties member. Inherited classes should return a collection of properties to persist.

Each SettingsProperty object includes metadata about the property, including the following:

  • Name.

  • Default value.

  • Property type.

  • Serialization method.

  • Provider to use for persistence.

  • Other arbitrary attributes that are context and provider specific.

Constructors

SettingsProperty(SettingsProperty) SettingsProperty(SettingsProperty) SettingsProperty(SettingsProperty) SettingsProperty(SettingsProperty)

Initializes a new instance of the SettingsProperty class, based on the supplied parameter.

SettingsProperty(String) SettingsProperty(String) SettingsProperty(String) SettingsProperty(String)

Initializes a new instance of the SettingsProperty class. based on the supplied parameter.

SettingsProperty(String, Type, SettingsProvider, Boolean, Object, SettingsSerializeAs, SettingsAttributeDictionary, Boolean, Boolean) SettingsProperty(String, Type, SettingsProvider, Boolean, Object, SettingsSerializeAs, SettingsAttributeDictionary, Boolean, Boolean) SettingsProperty(String, Type, SettingsProvider, Boolean, Object, SettingsSerializeAs, SettingsAttributeDictionary, Boolean, Boolean) SettingsProperty(String, Type, SettingsProvider, Boolean, Object, SettingsSerializeAs, SettingsAttributeDictionary, Boolean, Boolean)

Creates a new instance of the SettingsProperty class based on the supplied parameters.

Properties

Attributes Attributes Attributes Attributes

Gets a SettingsAttributeDictionary object containing the attributes of the SettingsProperty object.

DefaultValue DefaultValue DefaultValue DefaultValue

Gets or sets the default value of the SettingsProperty object.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Gets or sets a value specifying whether a SettingsProperty object is read-only.

Name Name Name Name

Gets or sets the name of the SettingsProperty.

PropertyType PropertyType PropertyType PropertyType

Gets or sets the type for the SettingsProperty.

Provider Provider Provider Provider

Gets or sets the provider for the SettingsProperty.

SerializeAs SerializeAs SerializeAs SerializeAs

Gets or sets a SettingsSerializeAs object for the SettingsProperty.

ThrowOnErrorDeserializing ThrowOnErrorDeserializing ThrowOnErrorDeserializing ThrowOnErrorDeserializing

Gets or sets a value specifying whether an error will be thrown when the property is unsuccessfully deserialized.

ThrowOnErrorSerializing ThrowOnErrorSerializing ThrowOnErrorSerializing ThrowOnErrorSerializing

Gets or sets a value specifying whether an error will be thrown when the property is unsuccessfully serialized.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to