Click or drag to resize

ConfigurationActionBuilder Class

Allows you to build up a set of configuration actions that can be used all at once to configure a new ILifetimeScope.
Inheritance Hierarchy
SystemObject
  System.Collections.GenericListActionContainerBuilder
    Autofac.MultitenantConfigurationActionBuilder

Namespace:  Autofac.Multitenant
Assembly:  Autofac.Multitenant (in Autofac.Multitenant.dll) Version: 4.2.0
Syntax
public class ConfigurationActionBuilder : List<Action<ContainerBuilder>>

The ConfigurationActionBuilder type exposes the following members.

Constructors
  NameDescription
Public methodConfigurationActionBuilder
Initializes a new instance of the ConfigurationActionBuilder class
Top
Properties
  NameDescription
Public propertyCapacity
Gets or sets the total number of elements the internal data structure can hold without resizing.
(Inherited from ListActionContainerBuilder.)
Public propertyCount (Inherited from ListActionContainerBuilder.)
Public propertyItem
Gets or sets the element at the specified index.
(Inherited from ListActionContainerBuilder.)
Top
Methods
  NameDescription
Public methodAdd (Inherited from ListActionContainerBuilder.)
Public methodAddRange (Inherited from ListActionContainerBuilder.)
Public methodAsReadOnly (Inherited from ListActionContainerBuilder.)
Public methodBinarySearch(T)
Searches the entire sorted ListT for an element using the default comparer and returns the zero-based index of the element.
(Inherited from ListActionContainerBuilder.)
Public methodBinarySearch(T, IComparerT)
Searches the entire sorted ListT for an element using the specified comparer and returns the zero-based index of the element.
(Inherited from ListActionContainerBuilder.)
Public methodBinarySearch(Int32, Int32, T, IComparerT)
Searches a range of elements in the sorted ListT for an element using the specified comparer and returns the zero-based index of the element.
(Inherited from ListActionContainerBuilder.)
Public methodBuild
Creates an aggregated action based on the list of actions contained in the builder.
Public methodClear (Inherited from ListActionContainerBuilder.)
Public methodContains (Inherited from ListActionContainerBuilder.)
Public methodConvertAllTOutput (Inherited from ListActionContainerBuilder.)
Public methodCopyTo(T) (Inherited from ListActionContainerBuilder.)
Public methodCopyTo(T, Int32) (Inherited from ListActionContainerBuilder.)
Public methodCopyTo(Int32, T, Int32, Int32)
Copies a range of elements from the ListT to a compatible one-dimensional array, starting at the specified index of the target array.
(Inherited from ListActionContainerBuilder.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExists (Inherited from ListActionContainerBuilder.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFind
Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire ListT.
(Inherited from ListActionContainerBuilder.)
Public methodFindAll
Retrieves all the elements that match the conditions defined by the specified predicate.
(Inherited from ListActionContainerBuilder.)
Public methodFindIndex(PredicateT)
Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire ListT.
(Inherited from ListActionContainerBuilder.)
Public methodFindIndex(Int32, PredicateT)
Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the ListT that extends from the specified index to the last element.
(Inherited from ListActionContainerBuilder.)
Public methodFindIndex(Int32, Int32, PredicateT)
Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the ListT that starts at the specified index and contains the specified number of elements.
(Inherited from ListActionContainerBuilder.)
Public methodFindLast
Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire ListT.
(Inherited from ListActionContainerBuilder.)
Public methodFindLastIndex(PredicateT)
Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire ListT.
(Inherited from ListActionContainerBuilder.)
Public methodFindLastIndex(Int32, PredicateT)
Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the ListT that extends from the first element to the specified index.
(Inherited from ListActionContainerBuilder.)
Public methodFindLastIndex(Int32, Int32, PredicateT)
Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the ListT that contains the specified number of elements and ends at the specified index.
(Inherited from ListActionContainerBuilder.)
Public methodForEach (Inherited from ListActionContainerBuilder.)
Public methodGetEnumerator (Inherited from ListActionContainerBuilder.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetRange (Inherited from ListActionContainerBuilder.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf(T) (Inherited from ListActionContainerBuilder.)
Public methodIndexOf(T, Int32)
Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the ListT that extends from the specified index to the last element.
(Inherited from ListActionContainerBuilder.)
Public methodIndexOf(T, Int32, Int32)
Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the ListT that starts at the specified index and contains the specified number of elements.
(Inherited from ListActionContainerBuilder.)
Public methodInsert (Inherited from ListActionContainerBuilder.)
Public methodInsertRange (Inherited from ListActionContainerBuilder.)
Public methodLastIndexOf(T) (Inherited from ListActionContainerBuilder.)
Public methodLastIndexOf(T, Int32)
Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the ListT that extends from the first element to the specified index.
(Inherited from ListActionContainerBuilder.)
Public methodLastIndexOf(T, Int32, Int32)
Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the ListT that contains the specified number of elements and ends at the specified index.
(Inherited from ListActionContainerBuilder.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove (Inherited from ListActionContainerBuilder.)
Public methodRemoveAll
Removes all the elements that match the conditions defined by the specified predicate.
(Inherited from ListActionContainerBuilder.)
Public methodRemoveAt (Inherited from ListActionContainerBuilder.)
Public methodRemoveRange (Inherited from ListActionContainerBuilder.)
Public methodReverse (Inherited from ListActionContainerBuilder.)
Public methodReverse(Int32, Int32)
Reverses the order of the elements in the specified range.
(Inherited from ListActionContainerBuilder.)
Public methodSort (Inherited from ListActionContainerBuilder.)
Public methodSort(IComparerT) (Inherited from ListActionContainerBuilder.)
Public methodSort(ComparisonT) (Inherited from ListActionContainerBuilder.)
Public methodSort(Int32, Int32, IComparerT) (Inherited from ListActionContainerBuilder.)
Public methodToArray (Inherited from ListActionContainerBuilder.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTrimExcess (Inherited from ListActionContainerBuilder.)
Public methodTrueForAll (Inherited from ListActionContainerBuilder.)
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate methodIListAdd
Adds an item to the IList.
(Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate methodIListContains
Determines whether the IList contains a specific value.
(Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate methodICollectionCopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
(Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate methodIEnumerableTGetEnumerator
Returns an enumerator that iterates through a collection.
(Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate methodIEnumerableGetEnumerator
Returns an enumerator that iterates through a collection.
(Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate methodIListIndexOf
Determines the index of a specific item in the IList.
(Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate methodIListInsert
Inserts an item to the IList at the specified index.
(Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate propertyIListIsFixedSize
Gets a value indicating whether the IList has a fixed size.
(Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate propertyICollectionTIsReadOnly (Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate propertyIListIsReadOnly
Gets a value indicating whether the IList is read-only.
(Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate propertyICollectionIsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
(Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate propertyIListItem
Gets or sets the element at the specified index.
(Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate methodIListRemove
Removes the first occurrence of a specific object from the IList.
(Inherited from ListActionContainerBuilder.)
Explicit interface implementationPrivate propertyICollectionSyncRoot
Gets an object that can be used to synchronize access to the ICollection.
(Inherited from ListActionContainerBuilder.)
Top
Remarks

Usually when you are building an ILifetimeScope and you wish to update the registrations in the new scope, you are required to pass in a single lambda configuration action. Sometimes, though, there is a need to perform some logic, or otherwise programmatically register several things into the new lifetime across different calls or in different locations in your application.

This builder allows you to collect a set of configuration actions and use a final Build method to create a single aggregate action that can be used to finally create the lifetime scope.

See Also