ValidationContext.GetCache<T> Generic Method (String)

Gets the cache for the specified class.

Namespace:  Microsoft.VisualStudio.Modeling.Validation
Assembly:  Microsoft.VisualStudio.Modeling.Sdk (in Microsoft.VisualStudio.Modeling.Sdk.dll)

Syntax

'宣言
Public Function GetCache(Of T As {Class, New}) ( _
    name As String _
) As T
'使用
Dim instance As ValidationContext
Dim name As String
Dim returnValue As T

returnValue = instance.GetCache(name)
public T GetCache<T>(
    string name
) where T : class, new()
public:
generic<typename T>
where T : ref class, gcnew()
T GetCache(
    String^ name
)
JScript does not support generic types or methods.

Type Parameters

  • T

Parameters

Return Value

Type: T

The cache for the specified class.

Remarks

When you provide the name for a cache, another cache is created, and it uses the specific name that you gave it. Therefore, you can have more than one cache for the same class.

Permissions

See Also

Reference

ValidationContext Class

ValidationContext Members

GetCache Overload

Microsoft.VisualStudio.Modeling.Validation Namespace