Microsoft.Practices.ObjectBuilder2 Namespace
Retired Content |
---|
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The latest Unity Application Block information can be found at the Unity Application Block site. |
Classes
Class | Description | |
---|---|---|
Builder |
An implementation of IBuilder. It contains all the default strategies shipped with ObjectBuilder.
|
|
BuilderAwareStrategy |
Implementation of IBuilderStrategy which will notify an object about the completion of a BuildUp(IReadWriteLocator, ILifetimeContainer, IPolicyList, IStrategyChain, Object, Object) operation, or start of a TearDown<TItem>(IReadWriteLocator, ILifetimeContainer, IPolicyList, IStrategyChain, TItem) operation.
|
|
BuilderContext |
Represents the context in which a build-up or tear-down operation runs.
|
|
BuilderStrategy |
Represents a strategy in the IBuilder's chain of responsibility. Strategies are required to support both BuildUp and TearDown.
|
|
BuildFailedException |
The exception that gets thrown if a build or teardown operation fails.
|
|
BuildKey |
Utility methods for dealing with arbitrary build key objects.
|
|
BuildKeyMappingPolicy |
Represents a builder policy for mapping build keys.
|
|
BuildKeyMappingStrategy |
Represents a strategy for mapping build keys in the build up operation.
|
|
BuildPlanStrategy |
A BuilderStrategy that will look for a build plan in the current context. If it exists, it invokes it, otherwise it creates one and stores it for later, and invokes it.
|
|
ConstructorSelectorPolicy<TInjectionConstructorMarkerAttribute> |
An implementation of IConstructorSelectorPolicy that chooses constructors based on these criteria: first, pick a constructor marked with the TInjectionConstructorMarkerAttribute attribute. If there isn't one, then choose the constructor with the longest parameter list. If that is ambiguous, then throw.
|
|
ConstructorSelectorPolicyBase<TInjectionConstructorMarkerAttribute> |
Base class that provides an implementation of IConstructorSelectorPolicy which lets you override how the parameter resolvers are created.
|
|
DefaultDynamicBuilderMethodCreatorPolicy |
An implementation of IDynamicBuilderMethodCreatorPolicy that will check for full trust and if we're building a class or an interface. If in full trust, attach to the class or module of the interface respectively. If in partial trust, attach to the OB2 module instead.
|
|
DependencyMissingException |
Represents that a dependency could not be resolved.
|
|
DependencyResolverTrackerPolicy |
Implementation of IDependencyResolverTrackerPolicy.
|
|
DynamicBuildPlanGenerationContext |
This object tracks the current state of the build plan generation, accumulates the Microsoft intermediate language, provides the preamble & postamble for the dynamic method, and tracks things like local variables in the generated MSIL so that they can be reused across MSIL generation strategies.
|
|
DynamicMethodBuildPlanCreatorPolicy |
An IBuildPlanCreatorPolicy implementation that constructs a build plan via dynamic Microsoft intermediate language emission.
|
|
DynamicMethodCallStrategy |
A BuilderStrategy that generates Microsoft intermediate language to call chosen methods (as specified by the current IMethodSelectorPolicy) as part of object build up.
|
|
DynamicMethodConstructorStrategy |
A BuilderStrategy that emits Microsoft intermediate language to call constructors as part of creating a build plan.
|
|
DynamicMethodPropertySetterStrategy |
A BuilderStrategy that generates Microsoft intermediate language to resolve properties on an object being built.
|
|
FixedTypeResolverPolicy |
An implementation of IDependencyResolverPolicy that calls back into the build chain to build up the dependency, passing a type given at compile time as its build key.
|
|
GenericTypeBuildKeyMappingPolicy |
An implementation of IBuildKeyMappingPolicy that can map generic types.
|
|
Guard |
Represents a simple class for validating parameters and throwing exceptions.
|
|
IllegalInjectionMethodException |
The exception thrown when injection is attempted on a method that is an open generic or has out or reference parameters.
|
|
LifetimeContainer |
Represents a lifetime container.
|
|
LifetimeStrategy |
An IBuilderStrategy implementation that uses a ILifetimePolicy to figure out if an object has already been created and to update or remove that object from some backing store.
|
|
Locator |
An implementation of IReadableLocator and IReadWriteLocator.
|
|
MethodSelectorPolicy<TMarkerAttribute> |
An implementation of IMethodSelectorPolicy that selects methods by looking for the given TMarkerAttribute attribute on those methods.
|
|
MethodSelectorPolicyBase<TMarkerAttribute> |
Base class that provides an implementation of IMethodSelectorPolicy which lets you override how the parameter resolvers are created.
|
|
PolicyList |
A custom collection wrapper over IBuilderPolicy objects.
|
|
PropertySelectorBase<TResolutionAttribute> |
Base class that provides an implementation of IPropertySelectorPolicy which lets you override how the parameter resolvers are created.
|
|
PropertySelectorPolicy<TResolutionAttribute> |
An implementation of IPropertySelectorPolicy that looks for properties marked with the TResolutionAttribute attribute that are also settable and not indexers.
|
|
ReadableLocator |
Represents an abstract implementation of IReadableLocator.
|
|
ReadOnlyLocator |
An implementation of IReadableLocator that wraps an existing locator to ensure items are not written into the locator.
|
|
ReadWriteLocator |
Represents an abstract implementation of IReadWriteLocator.
|
|
RecoveryStack |
An implementation of IRecoveryStack.
|
|
SelectedConstructor |
Objects of this type are the return value from SelectConstructor(IBuilderContext). It encapsulates the desired ConstructorInfo with the string keys needed to look up the IDependencyResolverPolicy for each parameter.
|
|
SelectedMemberWithParameters |
Base class for return of selector policies that need to keep track of a set of parameter keys.
|
|
SelectedMemberWithParameters<TMemberInfoType> |
Base class for return values from selector policies that return a memberinfo of some sort plus a list of parameter keys to look up the parameter resolvers.
|
|
SelectedMethod |
Objects of this type are the return value from SelectMethods(IBuilderContext). It encapsulates the desired MethodInfo with the string keys needed to look up the IDependencyResolverPolicy for each parameter.
|
|
SelectedProperty |
Objects of this type are returned from SelectProperties(IBuilderContext). This class combines the PropertyInfo about the property with the string key used to look up the resolver for this property's value.
|
|
Seq |
Static class containing constructor methods for instances of Seq<T>, so that we get type inference.
|
|
Seq<T> |
And another helper class that makes it possible to chain sequence operations together.
|
|
Sequence |
A series of helper methods to deal with sequences - objects that implement IEnumerable<T>.
|
|
SingletonLifetimePolicy |
A ILifetimePolicy that stores objects in the locator and lifetime container provided by the context.
|
|
StagedStrategyChain<TStageEnum> |
Represents a chain of responsibility for builder strategies partitioned by stages.
|
|
StrategyChain |
Represents a chain of responsibility for builder strategies.
|
|
TransientLifetimePolicy |
An implementation of ILifetimePolicy that does nothing, ensuring that a new object gets created every time.
|
|
WeakRefDictionary<TKey, TValue> |
Represents a dictionary which stores the values as weak references instead of strong references. Null values are supported.
|
Structures
Structure | Description | |
---|---|---|
NamedTypeBuildKey |
Build key used to combine a type object with a string name. Used by ObjectBuilder to indicate exactly what is being built.
|
Interfaces
Interface | Description | |
---|---|---|
IBuilder |
Represents the main interface for an object builder.
|
|
IBuilderAware |
Implemented on a class when it wants to receive notifications about the build process.
|
|
IBuilderContext |
Represents the context in which a build-up or tear-down operation runs.
|
|
IBuilderPolicy |
Represents a builder policy interface. Since there are no fixed requirements for policies, it acts as a marker interface from which to derive all other policy interfaces.
|
|
IBuilderStrategy |
Represents a strategy in the IBuilder's chain of responsibility. Strategies are required to support both BuildUp and TearDown. Although you can implement this interface directly, you may also choose to use BuilderStrategy as the base class for your strategies, as this class provides useful helper methods and makes support BuildUp and TearDown optional.
|
|
IBuildKey |
Represents a build key based on type.
|
|
IBuildKeyMappingPolicy |
Represents a builder policy for mapping build keys.
|
|
IBuildPlanCreatorPolicy |
A IBuilderPolicy that can create and return an IBuildPlanPolicy for the given build key.
|
|
IBuildPlanPolicy |
A build plan is an object that, when invoked, will create a new object or fill in a given existing one. It encapsulates all the information gathered by the strategies to construct a particular object.
|
|
IConstructorSelectorPolicy |
A IBuilderPolicy that, when implemented, will determine which constructor to call from the build plan.
|
|
IDependencyResolverPolicy |
A IBuilderPolicy that is used at build plan execution time to resolve a dependent value.
|
|
IDependencyResolverTrackerPolicy |
A builder policy that lets you keep track of the current resolvers and will remove them from the given policy set.
|
|
IDynamicBuilderMethodCreatorPolicy |
This interface defines a policy that manages creation of the dynamic methods used by the ObjectBuilder code generation. This way, we can replace the details of how the dynamic method is created to handle differences in common language runtime (like Silverlight versus desktop) or security policies.
|
|
ILifetimeContainer |
Represents a lifetime container.
|
|
ILifetimeFactoryPolicy |
A builder policy used to create lifetime policy instances. Used by the LifetimeStrategy when instantiating open generic types.
|
|
ILifetimePolicy |
A IBuilderPolicy that controls how instances are persisted and recovered from an external store. Used to implement things like singletons and per-http-request lifetime.
|
|
IMethodSelectorPolicy |
An IBuilderPolicy that will examine the given types and return a sequence of MethodInfo objects that should be called as part of building the object.
|
|
IPolicyList |
A custom collection over IBuilderPolicy objects.
|
|
IPropertySelectorPolicy |
An IBuilderPolicy that returns a sequence of properties that should be injected for the given type.
|
|
IReadableLocator |
Represents a locator that can be read from.
|
|
IReadWriteLocator |
Represents a locator that can be read from and written to.
|
|
IRecoveryStack |
Data structure that stores the set of IRequiresRecovery objects and executes them when requested.
|
|
IRequiresRecovery |
This interface provides a hook for the builder context to implement error recovery when a builder strategy throws an exception. Since we can't get try/finally blocks onto the call stack for later stages in the chain, we instead add these objects to the context. If there's an exception, all the current IRequiresRecovery instances will have their Recover methods called.
|
|
IStagedStrategyChain |
This interface defines a standard method to convert any StagedStrategyChain<TStageEnum> regardless of the stage enum into a regular, flat strategy chain.
|
|
IStrategyChain |
Represents a chain of responsibility for builder strategies.
|
Delegates
Delegate | Description | |
---|---|---|
Sequence.Reducer<TSource, TDest> |
A delegate that defines the function passed to the Reduce<TSource, TDest>(IEnumerable<TSource>, TDest, Sequence.Reducer<TSource, TDest>) methods.
|
Enumerations
Enumeration | Description | |
---|---|---|
BuilderStage |
Enumeration to represent the object builder stages.
|