SettingValue<T> Class

Definition

The value of a setting.

public sealed class SettingValue<T> : Microsoft.VisualStudio.Extensibility.Settings.ISettingValue
type SettingValue<'T> = class
    interface ISettingValue
Public NotInheritable Class SettingValue(Of T)
Implements ISettingValue

Type Parameters

T

The type of the setting's value.

Inheritance
SettingValue<T>
Implements

Properties

Name Description
Error

Gets the error that occurred during the retrieval of the setting value. Error is null if the retrieval of the value was successful.

SettingIdentifier

Gets the full identifiers of the setting, including the category it is nested under.

Succeeded

Gets a value indicating whether Error is null, meaning that the retrieval of the setting's value was successful.

Value

Gets the value of the setting.

Methods

Name Description
ValueOrDefault(T)

Gets the value, if the retrieval was successful. Returns defaultValue otherwise.

Explicit Interface Implementations

Name Description
ISettingValue.ConvertTo<TExpected>()

Gets this ISettingValue object converted to a SettingValue<T>, if the conversion to T is successful.

ISettingValue.SettingIdentifier
ISettingValue.Value<TInterface>()

Gets the value converted to the type T.

ISettingValue.ValueOrDefault<TInterface>(TInterface)

Gets the value converted to the type T, if the retrieval and the conversion to T are successful. Returns defaultValue otherwise.

Applies to