Show / Hide Table of Contents

Class AttributeFetcher

Helper class (static method collection) that will fetch a given attribute from a type, or an instance of a type

Inheritance
object
AttributeFetcher
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Util
Assembly: SoCore.dll
Syntax
public static class AttributeFetcher

Methods

FetchAttribute<AttributeClass>(object)

Fetch the first (if any) attribute of the given type from an instance of some source type

Declaration
public static AttributeClass FetchAttribute<AttributeClass>(object source) where AttributeClass : Attribute
Parameters
Type Name Description
object source

An instance of the type (class) to fetch the attribute from

Returns
Type Description
AttributeClass

Attribute instance if present, otherwise null

Type Parameters
Name Description
AttributeClass

The attribute to fetch

FetchAttribute<AttributeClass>(Type)

Fetch the first (if any) attribute of the given type from some source type

Declaration
public static AttributeClass FetchAttribute<AttributeClass>(Type sourceType) where AttributeClass : Attribute
Parameters
Type Name Description
Type sourceType

The type (class) to fetch the attribute from

Returns
Type Description
AttributeClass

Attribute instance if present, otherwise null

Type Parameters
Name Description
AttributeClass

The attribute to fetch

© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top