Gets an instance of a specified type.
- Namespace
- Statiq
.Common - Containing Type
- Class
Catalog Extensions
Syntax
public static T GetInstance<T>(this ClassCatalog classCatalog)
Type Parameters
Name | Description |
---|---|
T | The type of the instance to get. |
Parameters
Name | Type | Description |
---|---|---|
classCatalog | ClassCatalog | The class catalog. |
Return Value
Type | Description |
---|---|
T |
An instance of the specified type, or the first class that can be assigned to the specified type, or null .
|