Open sandboxFocus

Method OfAttributeType

OfAttributeType(IType)

Gets all attributes whose type is convertible to the specified type using the default conversion kind.

Declaration
IEnumerable<IAttribute> OfAttributeType(IType type)
Parameters
Type Name Description
IType type

The attribute type to filter by.

Returns
Type Description
IEnumerable<IAttribute>

An enumeration of attributes whose type is convertible to type.

See Also

OfAttributeType(IType, ConversionKind)

Gets all attributes whose type is convertible to the specified type using the specified conversionKind.

Declaration
IEnumerable<IAttribute> OfAttributeType(IType type, ConversionKind conversionKind)
Parameters
Type Name Description
IType type

The attribute type to filter by.

ConversionKind conversionKind

The kind of conversion to use when comparing types.

Returns
Type Description
IEnumerable<IAttribute>

An enumeration of attributes whose type is convertible to type according to conversionKind.

See Also

OfAttributeType(Type)

Gets all attributes whose type is convertible to the specified reflection type using the default conversion kind.

Declaration
IEnumerable<IAttribute> OfAttributeType(Type type)
Parameters
Type Name Description
Type type

The reflection attribute type to filter by.

Returns
Type Description
IEnumerable<IAttribute>

An enumeration of attributes whose type is convertible to type.

See Also

OfAttributeType(Type, ConversionKind)

Gets all attributes whose type is convertible to the specified reflection type using the specified conversionKind.

Declaration
IEnumerable<IAttribute> OfAttributeType(Type type, ConversionKind conversionKind)
Parameters
Type Name Description
Type type

The reflection attribute type to filter by.

ConversionKind conversionKind

The kind of conversion to use when comparing types.

Returns
Type Description
IEnumerable<IAttribute>

An enumeration of attributes whose type is convertible to type according to conversionKind.

See Also

OfAttributeType(Func<IType, bool>)

Gets all attributes whose type satisfies the specified predicate.

Declaration
IEnumerable<IAttribute> OfAttributeType(Func<IType, bool> predicate)
Parameters
Type Name Description
Func<IType, bool> predicate

A function that evaluates whether an attribute type should be included in the results.

Returns
Type Description
IEnumerable<IAttribute>

An enumeration of attributes whose type matches the predicate.