Condividi tramite


EditorOptionValue<T> Class

Definition

The value of an editor option.

public sealed class EditorOptionValue<T> : Microsoft.VisualStudio.Extensibility.Editor.IEditorOptionValue
type EditorOptionValue<'T> = class
    interface IEditorOptionValue
Public NotInheritable Class EditorOptionValue(Of T)
Implements IEditorOptionValue

Type Parameters

T

The type of the editor option's value.

Inheritance
EditorOptionValue<T>
Implements

Constructors

EditorOptionValue<T>(Exception)

Initializes a new instance of the EditorOptionValue<T> class.

EditorOptionValue<T>(Object)

Initializes a new instance of the EditorOptionValue<T> class.

Properties

Error

The error that occurred during the retrieval of the editor option value. Error is null if the retrieval of the value was successful.

Succeeded

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

Value

Gets the value of the editor option.

Methods

ValueOrDefault(T)

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

Explicit Interface Implementations

IEditorOptionValue.Value<TInterface>()

Gets the value converted to the type T.

IEditorOptionValue.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