Click or drag to resize

Extensions Class

The extensions collection is used to manage IExtension objects hooked to a particular object. The most common such object is an IMapper object. Extension events are fired through the collection and the collection ensures that all appropriate extensions receive the event and that the results are returned to the object firing the event.

Extensions are called in Priority order from highest Priority number to lowest. Note, however, that Priority is only enforced internally during FireEvent(ExtensionEvents, Object, EAPEventArgs). The extensions in the collection are not organized in any particular order so you should not assume an order when iterating through the collection using foreach or accessing an extension by index.

Inheritance Hierarchy

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
[SerializableAttribute]
public class Extensions : EAPCollectionBase

The Extensions type exposes the following members.

Constructors
  NameDescription
Public methodExtensions
Constructs a collection of extension instances.
Public methodExtensions(Int32)
Constructs a collection of extension instances.
Top
Properties
  NameDescription
Public propertyCount
The number of elements actually contained in the ArrayList.
(Inherited from EAPCollectionBase.)
Public propertyIsFixedSize
true if the ArrayList has a fixed size; otherwise, false. The default is false.
(Inherited from EAPCollectionBase.)
Public propertyIsReadOnly
Returns true if the collection is read-only. (Default is false)
(Inherited from EAPCollectionBase.)
Public propertyIsSynchronized
true if access to the internal ArrayList is synchronized (thread-safe); otherwise, false. The default is false.
(Inherited from EAPCollectionBase.)
Public propertyItemInt32
Indexer for this collection.
Public propertyItemString
Indexer for this collection.
Public propertyOwner
Gets/Sets the owning object for this collection
Public propertySyncRoot
An object that can be used to synchronize access to the ArrayList.
(Inherited from EAPCollectionBase.)
Top
Methods
  NameDescription
Public methodAdd(ExtensionInfo)
Adds a field to the collection
Protected methodAdd(String, Object)
Adds an object to the collection. Override. This method simply calls the Add method with CollectionAddFlags.replace as the flags.
(Inherited from EAPCollectionBase.)
Protected methodAdd(String, Object, CollectionAddFlags)
Adds an item to the collection
(Inherited from EAPCollectionBase.)
Public methodAdd(IExtension, Enum, ExtensionAttrs, Int32, Object)
Adds an extension to the collection
Protected methodAddAt
Adds an item to the collection at the specified index. To append an item use -1 or the collection item count as the index.
(Inherited from EAPCollectionBase.)
Public methodClear
Clears the collection
(Inherited from EAPCollectionBase.)
Public methodContains
Determines whether an element is in the collection.
(Inherited from EAPCollectionBase.)
Public methodContainsKey
Checks for the existence of an item in the hashtable
(Inherited from EAPCollectionBase.)
Public methodCopyTo
Copies the entire ArrayList to a compatible one-dimensional Array, starting at the beginning of the target array.
(Inherited from EAPCollectionBase.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExec
Execute a command on the collection itself.
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFind
Finds an ExtensionInfo item in the collection. Returns null if the item is not found.
Public methodFireEvent(ExtensionEvents, Object, EAPEventArgs)
Fires an event through the collection of extensions. This overload is preferred over the older FireEvent(Enum, ExtensionEvents, Object, EAPEventArgs, Int32, Object) which includes parameters that are not used at this time.
Public methodFireEvent(Enum, ExtensionEvents, Object, EAPEventArgs, Int32, Object)
Fires an event through the collection of extensions. This overload includes a number of parameters that are not used. Typically you can use the simpler FireEvent(ExtensionEvents, Object, EAPEventArgs) as the other parameters are not used at this time.
Public methodGetEnumerator
Returns an enumerator that can iterate through the ArrayList.
(Inherited from EAPCollectionBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Protected methodGetItem(Int32)
Returns an item that matches the specified string index
(Inherited from EAPCollectionBase.)
Protected methodGetItem(String)
Returns an item that matches the specified string index
(Inherited from EAPCollectionBase.)
Public methodGetItemName
Returns the name of the item.
(Overrides EAPCollectionBaseGetItemName(Object).)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf
Returns the zero-based index of the first occurrence of an object in the internal ArrayList or in a portion of it.
(Inherited from EAPCollectionBase.)
Public methodIndexOfKey
Returns the index of the item in the collection (by key)
(Inherited from EAPCollectionBase.)
Public methodInsert
Inserts an element into the internal ArrayList at the specified index
(Inherited from EAPCollectionBase.)
Protected methodIsMarkedForDeletion
Determines if this element is marked for deletion. Note that this base implementation must be overridden in order to support RemoveMarkedItems() for a partular collection.
(Inherited from EAPCollectionBase.)
Protected methodIsTypeOK
Verifies the item is an acceptable type. Generally this is a test like "return (item is [class]);".
(Overrides EAPCollectionBaseIsTypeOK(Object).)
Public methodItemInfo(Int32)
Returns the ExtensionInfo object at the given index
Public methodItemInfo(String)
Returns the ExtensionInfo object at the given name
Public methodLoad(IAppContext, Object, String, String)
Loads the extensions from the metadata into the collection
Public methodLoad(IAppContext, Object, String, String, Boolean)
Loads the extensions from the metadata into the collection.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodRecalcHash
Recalculates the internal hash
(Inherited from EAPCollectionBase.)
Public methodRemove(Object)
Removes the first occurrence of a specific object from the collection
(Inherited from EAPCollectionBase.)
Public methodRemove(String)
Remove the specified item from the collection.
(Inherited from EAPCollectionBase.)
Public methodRemoveAt
Removes the element at the specified index
(Inherited from EAPCollectionBase.)
Public methodRemoveMarkedItems
Removes the properties marked for deletion.
(Inherited from EAPCollectionBase.)
Public methodRemoveRange
Removes the element at the specified index
(Inherited from EAPCollectionBase.)
Protected methodSetItem(Int32, Object)
Sets an item's value at the specified index.
(Inherited from EAPCollectionBase.)
Protected methodSetItem(String, Object)
Sets an item's value at the string index indicated by the parameters.
(Inherited from EAPCollectionBase.)
Public methodSort(Boolean)
Sort the list by its key value.
(Inherited from EAPCollectionBase.)
Public methodSort(IComparer)
Sort the collection using the provided comparer.
(Inherited from EAPCollectionBase.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodTruncate
Truncate the array starting at the specified index.
(Inherited from EAPCollectionBase.)
Protected methodUnload
Called when the extension collection is cleared, this method iterates through all extensions in the collection and fires their OnUnload() events.
(Overrides EAPCollectionBaseUnload.)
Public methodStatic memberUnloadExtensions
Unload any extensions loaded into a dedicated extension AppDomain.
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
See Also