Compartilhar via


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
Ee651008.pubclass(en-us,PandP.10).gif Builder
An implementation of IBuilder. It contains all the default strategies shipped with ObjectBuilder.
Ee651008.pubclass(en-us,PandP.10).gif BuilderAwareStrategy
Ee651008.pubclass(en-us,PandP.10).gif BuilderContext
Represents the context in which a build-up or tear-down operation runs.
Ee651008.pubclass(en-us,PandP.10).gif BuilderStrategy
Represents a strategy in the IBuilder's chain of responsibility. Strategies are required to support both BuildUp and TearDown.
Ee651008.pubclass(en-us,PandP.10).gif BuildFailedException
The exception that gets thrown if a build or teardown operation fails.
Ee651008.pubclass(en-us,PandP.10).gif BuildKey
Utility methods for dealing with arbitrary build key objects.
Ee651008.pubclass(en-us,PandP.10).gif BuildKeyMappingPolicy
Represents a builder policy for mapping build keys.
Ee651008.pubclass(en-us,PandP.10).gif BuildKeyMappingStrategy
Represents a strategy for mapping build keys in the build up operation.
Ee651008.pubclass(en-us,PandP.10).gif 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.
Ee651008.pubclass(en-us,PandP.10).gif 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.
Ee651008.pubclass(en-us,PandP.10).gif ConstructorSelectorPolicyBase<TInjectionConstructorMarkerAttribute>
Base class that provides an implementation of IConstructorSelectorPolicy which lets you override how the parameter resolvers are created.
Ee651008.pubclass(en-us,PandP.10).gif 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.
Ee651008.pubclass(en-us,PandP.10).gif DependencyMissingException
Represents that a dependency could not be resolved.
Ee651008.pubclass(en-us,PandP.10).gif DependencyResolverTrackerPolicy
Ee651008.pubclass(en-us,PandP.10).gif 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.
Ee651008.pubclass(en-us,PandP.10).gif DynamicMethodBuildPlanCreatorPolicy
An IBuildPlanCreatorPolicy implementation that constructs a build plan via dynamic Microsoft intermediate language emission.
Ee651008.pubclass(en-us,PandP.10).gif DynamicMethodCallStrategy
A BuilderStrategy that generates Microsoft intermediate language to call chosen methods (as specified by the current IMethodSelectorPolicy) as part of object build up.
Ee651008.pubclass(en-us,PandP.10).gif DynamicMethodConstructorStrategy
A BuilderStrategy that emits Microsoft intermediate language to call constructors as part of creating a build plan.
Ee651008.pubclass(en-us,PandP.10).gif DynamicMethodPropertySetterStrategy
A BuilderStrategy that generates Microsoft intermediate language to resolve properties on an object being built.
Ee651008.pubclass(en-us,PandP.10).gif 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.
Ee651008.pubclass(en-us,PandP.10).gif GenericTypeBuildKeyMappingPolicy
An implementation of IBuildKeyMappingPolicy that can map generic types.
Ee651008.pubclass(en-us,PandP.10).gif Guard
Represents a simple class for validating parameters and throwing exceptions.
Ee651008.pubclass(en-us,PandP.10).gif IllegalInjectionMethodException
The exception thrown when injection is attempted on a method that is an open generic or has out or reference parameters.
Ee651008.pubclass(en-us,PandP.10).gif LifetimeContainer
Represents a lifetime container.
Ee651008.pubclass(en-us,PandP.10).gif 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.
Ee651008.pubclass(en-us,PandP.10).gif Locator
An implementation of IReadableLocator and IReadWriteLocator.
Ee651008.pubclass(en-us,PandP.10).gif MethodSelectorPolicy<TMarkerAttribute>
An implementation of IMethodSelectorPolicy that selects methods by looking for the given TMarkerAttribute attribute on those methods.
Ee651008.pubclass(en-us,PandP.10).gif MethodSelectorPolicyBase<TMarkerAttribute>
Base class that provides an implementation of IMethodSelectorPolicy which lets you override how the parameter resolvers are created.
Ee651008.pubclass(en-us,PandP.10).gif PolicyList
A custom collection wrapper over IBuilderPolicy objects.
Ee651008.pubclass(en-us,PandP.10).gif PropertySelectorBase<TResolutionAttribute>
Base class that provides an implementation of IPropertySelectorPolicy which lets you override how the parameter resolvers are created.
Ee651008.pubclass(en-us,PandP.10).gif PropertySelectorPolicy<TResolutionAttribute>
An implementation of IPropertySelectorPolicy that looks for properties marked with the TResolutionAttribute attribute that are also settable and not indexers.
Ee651008.pubclass(en-us,PandP.10).gif ReadableLocator
Represents an abstract implementation of IReadableLocator.
Ee651008.pubclass(en-us,PandP.10).gif ReadOnlyLocator
An implementation of IReadableLocator that wraps an existing locator to ensure items are not written into the locator.
Ee651008.pubclass(en-us,PandP.10).gif ReadWriteLocator
Represents an abstract implementation of IReadWriteLocator.
Ee651008.pubclass(en-us,PandP.10).gif RecoveryStack
An implementation of IRecoveryStack.
Ee651008.pubclass(en-us,PandP.10).gif 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.
Ee651008.pubclass(en-us,PandP.10).gif SelectedMemberWithParameters
Base class for return of selector policies that need to keep track of a set of parameter keys.
Ee651008.pubclass(en-us,PandP.10).gif 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.
Ee651008.pubclass(en-us,PandP.10).gif 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.
Ee651008.pubclass(en-us,PandP.10).gif 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.
Ee651008.pubclass(en-us,PandP.10).gif Seq
Static class containing constructor methods for instances of Seq<T>, so that we get type inference.
Ee651008.pubclass(en-us,PandP.10).gif Seq<T>
And another helper class that makes it possible to chain sequence operations together.
Ee651008.pubclass(en-us,PandP.10).gif Sequence
A series of helper methods to deal with sequences - objects that implement IEnumerable<T>.
Ee651008.pubclass(en-us,PandP.10).gif SingletonLifetimePolicy
A ILifetimePolicy that stores objects in the locator and lifetime container provided by the context.
Ee651008.pubclass(en-us,PandP.10).gif StagedStrategyChain<TStageEnum>
Represents a chain of responsibility for builder strategies partitioned by stages.
Ee651008.pubclass(en-us,PandP.10).gif StrategyChain
Represents a chain of responsibility for builder strategies.
Ee651008.pubclass(en-us,PandP.10).gif TransientLifetimePolicy
An implementation of ILifetimePolicy that does nothing, ensuring that a new object gets created every time.
Ee651008.pubclass(en-us,PandP.10).gif WeakRefDictionary<TKey, TValue>
Represents a dictionary which stores the values as weak references instead of strong references. Null values are supported.

Structures

  Structure Description
Ee651008.pubstructure(en-us,PandP.10).gif 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
Ee651008.pubinterface(en-us,PandP.10).gif IBuilder
Represents the main interface for an object builder.
Ee651008.pubinterface(en-us,PandP.10).gif IBuilderAware
Implemented on a class when it wants to receive notifications about the build process.
Ee651008.pubinterface(en-us,PandP.10).gif IBuilderContext
Represents the context in which a build-up or tear-down operation runs.
Ee651008.pubinterface(en-us,PandP.10).gif 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.
Ee651008.pubinterface(en-us,PandP.10).gif 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.
Ee651008.pubinterface(en-us,PandP.10).gif IBuildKey
Represents a build key based on type.
Ee651008.pubinterface(en-us,PandP.10).gif IBuildKeyMappingPolicy
Represents a builder policy for mapping build keys.
Ee651008.pubinterface(en-us,PandP.10).gif IBuildPlanCreatorPolicy
A IBuilderPolicy that can create and return an IBuildPlanPolicy for the given build key.
Ee651008.pubinterface(en-us,PandP.10).gif 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.
Ee651008.pubinterface(en-us,PandP.10).gif IConstructorSelectorPolicy
A IBuilderPolicy that, when implemented, will determine which constructor to call from the build plan.
Ee651008.pubinterface(en-us,PandP.10).gif IDependencyResolverPolicy
A IBuilderPolicy that is used at build plan execution time to resolve a dependent value.
Ee651008.pubinterface(en-us,PandP.10).gif IDependencyResolverTrackerPolicy
A builder policy that lets you keep track of the current resolvers and will remove them from the given policy set.
Ee651008.pubinterface(en-us,PandP.10).gif 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.
Ee651008.pubinterface(en-us,PandP.10).gif ILifetimeContainer
Represents a lifetime container.
Ee651008.pubinterface(en-us,PandP.10).gif ILifetimeFactoryPolicy
A builder policy used to create lifetime policy instances. Used by the LifetimeStrategy when instantiating open generic types.
Ee651008.pubinterface(en-us,PandP.10).gif 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.
Ee651008.pubinterface(en-us,PandP.10).gif 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.
Ee651008.pubinterface(en-us,PandP.10).gif IPolicyList
A custom collection over IBuilderPolicy objects.
Ee651008.pubinterface(en-us,PandP.10).gif IPropertySelectorPolicy
An IBuilderPolicy that returns a sequence of properties that should be injected for the given type.
Ee651008.pubinterface(en-us,PandP.10).gif IReadableLocator
Represents a locator that can be read from.
Ee651008.pubinterface(en-us,PandP.10).gif IReadWriteLocator
Represents a locator that can be read from and written to.
Ee651008.pubinterface(en-us,PandP.10).gif IRecoveryStack
Data structure that stores the set of IRequiresRecovery objects and executes them when requested.
Ee651008.pubinterface(en-us,PandP.10).gif 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.
Ee651008.pubinterface(en-us,PandP.10).gif IStagedStrategyChain
This interface defines a standard method to convert any StagedStrategyChain<TStageEnum> regardless of the stage enum into a regular, flat strategy chain.
Ee651008.pubinterface(en-us,PandP.10).gif IStrategyChain
Represents a chain of responsibility for builder strategies.

Delegates

  Delegate Description
Ee651008.pubdelegate(en-us,PandP.10).gif 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
Ee651008.pubenumeration(en-us,PandP.10).gif BuilderStage
Enumeration to represent the object builder stages.