Class ExtensionsForICustomAttributeProvider
Extension methods for ICustomAttributeProvider
Inherited Members
Namespace: FluentMigrator.Infrastructure.Extensions
Assembly: FluentMigrator.dll
Syntax
public static class ExtensionsForICustomAttributeProvider
Methods
| Edit this page View SourceGetAllAttributes<T>(ICustomAttributeProvider)
Get all attributes of exactly the given type
Declaration
public static T[] GetAllAttributes<T>(this ICustomAttributeProvider member) where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
ICustomAttributeProvider | member |
Returns
Type | Description |
---|---|
T[] | The found attributes |
Type Parameters
Name | Description |
---|---|
T | The attribute type to search for |
GetAllAttributes<T>(ICustomAttributeProvider, bool)
Get all attributes of the given type
Declaration
public static T[] GetAllAttributes<T>(this ICustomAttributeProvider member, bool inherit) where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
ICustomAttributeProvider | member | |
bool | inherit |
|
Returns
Type | Description |
---|---|
T[] | The found attributes |
Type Parameters
Name | Description |
---|---|
T | The attribute type to search for |
GetOneAttribute<T>(ICustomAttributeProvider)
Get the first attribute of exactly the given type
Declaration
public static T GetOneAttribute<T>(this ICustomAttributeProvider member) where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
ICustomAttributeProvider | member |
Returns
Type | Description |
---|---|
T | The found attribute or |
Type Parameters
Name | Description |
---|---|
T | The attribute type to search for |
GetOneAttribute<T>(ICustomAttributeProvider, bool)
Get the first attribute of the given type
Declaration
public static T GetOneAttribute<T>(this ICustomAttributeProvider member, bool inherit) where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
ICustomAttributeProvider | member | |
bool | inherit |
|
Returns
Type | Description |
---|---|
T | The found attribute or |
Type Parameters
Name | Description |
---|---|
T | The attribute type to search for |
HasAttribute<T>(ICustomAttributeProvider)
Returns a value indicating whether the custom attribute provider contains the given attribute
Declaration
public static bool HasAttribute<T>(this ICustomAttributeProvider member) where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
ICustomAttributeProvider | member |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | The attribute type to search for |
HasAttribute<T>(ICustomAttributeProvider, bool)
Returns a value indicating whether the custom attribute provider contains the given attribute
Declaration
public static bool HasAttribute<T>(this ICustomAttributeProvider member, bool inherit) where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
ICustomAttributeProvider | member | |
bool | inherit |
|
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | The attribute type to search for |