ValidationContext.GetCache Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetCache<T>(String) |
Get a Cache object of a given class and name. Constructs an object if none already exists in this ValidationContext. |
GetCache<T>() |
Get the Cache object of a given class. Constructs an object if none already exists in this ValidationContext. |
GetCache<T>(String)
Get a Cache object of a given class and name. Constructs an object if none already exists in this ValidationContext.
public:
generic <typename T>
where T : class, gcnew() T GetCache(System::String ^ name);
public T GetCache<T> (string name) where T : class, new();
member this.GetCache : string -> 'T (requires 'T : null and 'T : (new : unit -> 'T))
Public Function GetCache(Of T As {Class, New}) (name As String) As T
Type Parameters
- T
A class with a parameterless constructor
Parameters
- name
- String
Name of the cache
Returns
An object of the given type.
Applies to
GetCache<T>()
Get the Cache object of a given class. Constructs an object if none already exists in this ValidationContext.
public:
generic <typename T>
where T : class, gcnew() T GetCache();
public T GetCache<T> () where T : class, new();
member this.GetCache : unit -> 'T (requires 'T : null and 'T : (new : unit -> 'T))
Public Function GetCache(Of T As {Class, New}) () As T
Type Parameters
- T
A class with a parameterless constructor