Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: Microsoft.VisualStudio.Utilities
Assembly: Microsoft.VisualStudio.CoreUtility (in Microsoft.VisualStudio.CoreUtility.dll)
Syntax
'Declaration
Public Function GetOrCreateSingletonProperty(Of T As Class) ( _
key As Object, _
creator As Func(Of T) _
) As T
public T GetOrCreateSingletonProperty<T>(
Object key,
Func<T> creator
)
where T : class
public:
generic<typename T>
where T : ref class
T GetOrCreateSingletonProperty(
Object^ key,
Func<T>^ creator
)
member GetOrCreateSingletonProperty :
key:Object *
creator:Func<'T> -> 'T when 'T : not struct
JScript does not support generic types or methods.
Type Parameters
- T
Parameters
- key
Type: System.Object
- creator
Type: System.Func<T>
Return Value
Type: T
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.