PostSharp SDK6.6//Post­Sharp.​Sdk.​Code­Model.​Collections Namespace/Custom­Attribute­Declaration­Collection Class

CustomAttributeDeclarationCollection Class

Collection of custom attributes (CustomAttributeDeclaration).
Inheritance Hierarchy
System.Object
  PostSharp.Sdk.CodeModel.Collections.ElementCollection
    PostSharp.Sdk.CodeModel.Collections.ElementCollection<CustomAttributeDeclaration>
      TokenOrderedDeclarationCollection<CustomAttributeDeclaration>
        PostSharp.Sdk.CodeModel.Collections.CustomAttributeDeclarationCollection

Namespace:  PostSharp.Sdk.CodeModel.Collections
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.6.3.0 (6.6.3.0)
Syntax
C#
public sealed class CustomAttributeDeclarationCollection : TokenOrderedDeclarationCollection<CustomAttributeDeclaration>

The CustomAttributeDeclarationCollection type exposes the following members.

Properties
  NameDescription
Public propertyCount
Gets the number of elements contained in the ICollection<T>.
(Inherited from ElementCollection<T>.)
Public propertyIsDisposed Obsolete.
Determines whether the current collection has been disposed.
(Inherited from ElementCollection<T>.)
Public propertyIsReadOnly
Gets a value indicating whether the ICollection<T> is read-only.
(Inherited from ElementCollection<T>.)
Public propertyOwner
Gets the owner Element.
(Inherited from ElementCollection<T>.)
Public propertyRole
Gets the role of the current collection in the owner element.
(Inherited from ElementCollection<T>.)
Methods
  NameDescription
Public methodAdd
Adds an item to the ICollection<T>.
(Inherited from ElementCollection<T>.)
Public methodAddRange
Adds a collection of items to the current collection.
(Inherited from ElementCollection<T>.)
Public methodClear
Removes all items from the ICollection<T>.
(Inherited from ElementCollection<T>.)
Public methodClearCache
Clear the cache (typically mapping to System.Reflection or, if the current element is a reference, to the related definition) of all items of this collection.
(Inherited from ElementCollection<T>.)
Public methodConstructRuntimeObjects(IType)
Constructs runtime objects for some of all declarations contained in the current collection and return them as an array.
Public methodConstructRuntimeObjects(IType, IList)
Constructs runtime objects for some of all declarations contained in the current collection and store them in a collection.
Public methodContains(T)
Determines whether the ICollection<T> contains a specific value.
(Inherited from ElementCollection<T>.)
Public methodContains(IType)
Determines whether the current collection contains a custom attribute of a given type.
Public methodCopyTo
Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.
(Inherited from ElementCollection<T>.)
Public methodDispose Obsolete.
Disposes the resources held by the current instance.
(Inherited from ElementCollection<T>.)
Public methodEndImport (Inherited from ElementCollection<T>.)
Public methodEnsureCapacity
Allocates additional capacity in the collection.
(Inherited from ElementCollection<T>.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetByTypeEnumerator(IType)
Gets an enumerator of all custom attribute instances of a given type, but does not return instances of derived types.
Public methodGetByTypeEnumerator(IType, Boolean)
Gets an enumerator of all custom attribute instances of a given type and specifies whether instances of derived types should be returned.
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
(Inherited from ElementCollection<T>.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetOneByType(String)
Gets one or zero custom attribute instance of a given type name.
Public methodGetOneByType(IType)
Gets one or zero custom attribute instance of a given type.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodMoveContentTo
Moved all the custom attributes from this collection to another.
Public methodRemove
Removes the first occurrence of a specific object from the ICollection<T>.
(Inherited from ElementCollection<T>.)
Public methodToArray
Converts the current collection into a typed array.
(Inherited from ElementCollection<T>.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Extension Methods
See Also