Share via


GelProperty.RegisterLazyInitializedProperty<TOwner> Method

Microsoft internal use only.

Registers a property with a getter callback.

Namespace:  Microsoft.Internal.VisualStudio.PlatformUI
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

'Declaration
Public Shared Function RegisterLazyInitializedProperty(Of TOwner) ( _
    name As String, _
    type As String, _
    format As __VSUIDATAFORMAT, _
    getter As GelPropertyGetterCallback _
) As GelProperty
public static GelProperty RegisterLazyInitializedProperty<TOwner>(
    string name,
    string type,
    __VSUIDATAFORMAT format,
    GelPropertyGetterCallback getter
)
public:
generic<typename TOwner>
static GelProperty^ RegisterLazyInitializedProperty(
    String^ name, 
    String^ type, 
    __VSUIDATAFORMAT format, 
    GelPropertyGetterCallback^ getter
)
static member RegisterLazyInitializedProperty : 
        name:string * 
        type:string * 
        format:__VSUIDATAFORMAT * 
        getter:GelPropertyGetterCallback -> GelProperty
JScript does not support generic types or methods.

Type Parameters

  • TOwner
    Owning type.

Parameters

Return Value

Type: Microsoft.Internal.VisualStudio.PlatformUI.GelProperty
The registered property.

Remarks

The getter function is invoked when the property's value is first needed (lazy initialized). After that, the value is cached for fast retrieval. However, the getter function will be called again if the property is reset through a call to ResetValue.

.NET Framework Security

See Also

Reference

GelProperty Class

Microsoft.Internal.VisualStudio.PlatformUI Namespace