StructureMap The "BuildUp" method takes in an already constructed object and uses Setter Injection to push in configured dependencies of that object Get the object of type T that is valid for this build session. Get the object of type T that is valid for this build session by name. Creates or finds the named instance of the pluginType Register a default object for the given PluginType that will be used throughout the rest of the current object request Same as GetInstance, but can gracefully return null if the Type does not already exist Same as GetInstance(name), but can gracefully return null if the Type and name does not already exist Creates or finds the default instance of the pluginType. Returns null if the pluginType is not known to the container. Creates or finds the named instance of the pluginType. Returns null if the named instance is not known to the container. Gets all objects in the current object graph that can be cast to T that have already been created Creates/Resolves every configured instance of PlutinType T Creates or resolves all registered instances of the pluginType Gets a reference to the BuildStack for this build session The concrete type of the immediate parent object in the object graph Gets the root "frame" of the object request The requested instance name of the object graph Expression Builder that has grammars for defining policies at the PluginType level. This expression is used for registering open generic types Convenience method that sets the default concrete type of the PluginType. The "concreteType" can only accept types that do not have any primitive constructor arguments. StructureMap has to know how to construct all of the constructor argument types. Use this configured Instance as is Shorter way to call TheDefaultIsConcreteType Shortcut to add a value by type Shortcut method to add an additional Instance to this Plugin Type as just a Concrete Type. This will only work if the Concrete Type has no primitive constructor or mandatory Setter arguments. Shortcut method to add an additional Instance to this Plugin Type as just a Concrete Type. This will only work if the Concrete Type has no primitive constructor or mandatory Setter arguments. Configure this type as the supplied value Sets the object creation of the instances of the PluginType. For example: PerRequest, Singleton, ThreadLocal, HttpContext, or Hybrid Register an Action to run against any object of this PluginType immediately after it is created, but before the new object is passed back to the caller Register a Func to run against any object of this PluginType immediately after it is created, but before the new object is passed back to the caller. Unlike OnCreation(), EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP scenarios or to return a decorator. Register a Func to run against any object of this PluginType immediately after it is created, but before the new object is passed back to the caller. Unlike OnCreation(), EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP scenarios or to return a decorator. Registers an IBuildInterceptor for this Plugin Type that executes before any object of this PluginType is created. IBuildInterceptor's can be used to create a custom scope Convenience method to mark a PluginFamily as a Singleton Convenience method to mark a PluginFamily as a Hybrid lifecycle Convenience method to mark a PluginFamily as HttpContext scoped Shortcut method to add an additional Instance to this Plugin Type as just a Concrete Type. You can also chain other declarations after this method to add constructor and setter arguments Shortcut method to add an additional Instance to this Plugin Type as just a Concrete Type by a specified name. You can also chain other declarations after this method to add constructor and setter arguments Specify the value of this explicit argument Pass in additional arguments by type T Pass in additional arguments by type Pass in additional arguments by name Gets the default instance of type T using the explicitly configured arguments from the "args" Gets a named instance of type T using the explicitly configured arguments from teh "args" Gets the default instance of the pluginType using the explicitly configured arguments from the "args" Gets all configured instances of type T using explicitly configured arguments Returns the System.Reflection.ConstructorInfo for the PluggedType. Uses either the "greediest" constructor with the most arguments or the constructor function marked with the [DefaultConstructor] The InstanceKey of the default instance of the PluginFamily The CLR Type that defines the "Plugin" interface for the PluginFamily Add an Assembly to the scanning operation Add an Assembly by name to the scanning operation Add the currently executing Assembly to the scanning operation Add the Assembly that contains type T to the scanning operation Add the Assembly that contains type to the scanning operation Sweep the designated path and add any Assembly's found in this folder to the scanning operation Sweep the designated path and add any Assembly's found in this folder to the scanning operation. The assemblyFilter can be used to filter or limit the Assembly's that are picked up. Sweep the application base directory of current app domain and add any Assembly's found to the scanning operation. Sweep the application base directory of current app domain and add any Assembly's found to the scanning operation. The assemblyFilter can be used to filter or limit the Assembly's that are picked up. Adds an ITypeScanner object to the scanning operation Creates and adds a new ITypeScanner of type T to this scanning operation Directs the scanning operation to automatically detect and include any Registry classes found in the Assembly's being scanned Add all concrete types of the Plugin Type as Instances of Plugin Type Add all concrete types of the Plugin Type as Instances of Plugin Type Makes this scanning operation ignore all [PluginFamily] and [Pluggable] attributes Exclude types that match the Predicate from being scanned Exclude all types in this nameSpace or its children from the scanning operation Exclude all types in this nameSpace or its children from the scanning operation Only include types matching the Predicate in the scanning operation. You can use multiple Include() calls in a single scanning operation Only include types from this nameSpace or its children in the scanning operation. You can use multiple Include() calls in a single scanning operation Only include types from this nameSpace or its children in the scanning operation. You can use multiple Include() calls in a single scanning operation Exclude this specific type from the scanning operation Adds a registration convention to be applied to all the types in this logical "scan" operation Adds a registration convention to be applied to all the types in this logical "scan" operation Adds the DefaultConventionScanner to the scanning operations. I.e., a concrete class named "Something" that implements "ISomething" will be automatically added to PluginType "ISomething" Scans for PluginType's and Concrete Types that close the given open generic type Automatically registers all concrete types without primitive arguments against its first interface, if any Directs the scanning to automatically register any type that is the single implementation of an interface against that interface. The filters apply Adds the DefaultConventionScanner to the scanning operations. I.e., a concrete class named "Something" that implements "ISomething" will be automatically added to PluginType "ISomething" Scans for PluginType's and Concrete Types that close the given open generic type Automatically registers all concrete types without primitive arguments against its first interface, if any Directs the scanning to automatically register any type that is the single implementation of an interface against that interface. The filters apply A TypeInterceptor that is only applied if the MatchesType() method is true for a given Type An InstanceInterceptor can be registered on a per-Instance basis to act on, or even replace, the object that is created before it is passed back to the caller. This is primarily a hook for runtime AOP scenarios. Does this TypeInterceptor apply to the given type? Specify how objects matching the Type predicate will be intercepted Specify how objects matching the Type predicate will be intercepted Used for auto-mocking container. When the factory is missing, we can generate a mock for it An Instance class that builds objects by calling a constructor function on a concrete type and filling setter properties. ConfiguredInstance should only be used for open generic types. Favor SmartInstance{T} for all other usages. Register an Action to perform on the object created by this Instance before it is returned to the caller Register an Action to perform on the object created by this Instance before it is returned to the caller Register a Func to potentially enrich or substitute for the object created by this Instance before it is returned to the caller Register a Func to potentially enrich or substitute for the object created by this Instance before it is returned to the caller Inline definition of a dependency array like IService[] or IHandler[] Inline definition of a dependency array like IService[] or IHandler[] Inline definition of a dependency array like IService[] or IHandler[] Start the definition of a child instance for type CONSTRUCTORARGUMENTTYPE Start the definition of a child instance for type CONSTRUCTORARGUMENTTYPE Inline definition of a constructor or a setter property dependency Starts the definition of a child instance specifying the argument name in the case of a constructor function that consumes more than one argument of type T Inline definition of a constructor dependency Inline definition of a setter dependency Start the definition of a primitive argument to a constructor argument Configure a primitive constructor argument Configures an array of Instance's for the array dependency Part of the Fluent Interface, represents a nonprimitive argument to a constructure function Use a previously configured and named instance for the child Start the definition of a child instance by defining the concrete type Start the definition of a child instance by defining the concrete type Registers a configured instance to use as the argument to the parent's constructor Directs StructureMap to fill this dependency with the Default Instance of the constructor or property type Base class for many of the Instance subclasses to support method chaining in the Registry DSL for common options Set the name of this Instance Register an Action to perform on the object created by this Instance before it is returned to the caller Register a Func to potentially enrich or substitute for the object created by this Instance before it is returned to the caller Register a Func to potentially enrich or substitute for the object created by this Instance before it is returned to the caller Register an InstanceInterceptor with this Instance Used to override the constructor of a class to be used by StructureMap to create a Pluggable object Examines a System.Type object and determines the ConstructorInfo to use in creating instances of the Type Used to implicitly mark a class as a Plugin candidate for StructureMap Determines whether a Type object is marked as Pluggable The ConcreteKey alias of the Type Declares a class, abstract class, or interface to be the target of a PluginFamily in the container Determines if a Type object is marked as a PluginFamily If set, determines the shared "scope" of the instance -- PerRequest, Singleton, ThreadLocal, HttpContext, etc. InstanceKey of the default instance. Used to implicitly define the default without declaring the instance in StructureMap.config Declares the target to be built by StructureMap as a Singleton. One object instance will be created for each named instance Marks a Property in a Pluggable class as filled by setter injection Marks a method with no parameters as a method that validates an instance. StructureMap uses this method to validate the configuration file. If the method does not throw an exception, the object is assumed to be valid. Returns an array of any MethodInfo's on a Type that are marked as ValidationMethod CLR Type to search for validation methods Constants for the names of Xml nodes and attributes in the StructureMap.config file The name of the default configuration file. The value is always StructurMap.config Returns the absolute path to the StructureMap.config file Expression Builder that has grammars for defining policies at the PluginType level Add multiple Instance's to this PluginType Conditional binding of instances Access to all of the uncommon Instance types Access to all of the uncommon Instance types Convenience method that sets the default concrete type of the PluginType. Type T can only accept types that do not have any primitive constructor arguments. StructureMap has to know how to construct all of the constructor argument types. Shorthand to say TheDefault.Is.ConstructedBy(func) Shorthand to say TheDefault.Is.ConstructedBy(func) Shorthand to say TheDefault.IsThis(@object) Sets the object creation of the instances of the PluginType. For example: PerRequest, Singleton, ThreadLocal, HttpContext, or Hybrid Convenience method to mark a PluginFamily as a Singleton Convenience method to mark a PluginFamily as a Transient Convenience method to mark a PluginFamily as a Hybrid lifecycle Convenience method to mark a PluginFamily as HttpContext scoped Register an Action to run against any object of this PluginType immediately after it is created, but before the new object is passed back to the caller Register an Action to run against any object of this PluginType immediately after it is created, but before the new object is passed back to the caller Adds an Interceptor to only this PluginType Register an Action to run against any object of this PluginType immediately after it is created, but before the new object is passed back to the caller Register an Action to run against any object of this PluginType immediately after it is created, but before the new object is passed back to the caller Register a Func to run against any object of this PluginType immediately after it is created, but before the new object is passed back to the caller. Unlike OnCreation(), EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP scenarios or to return a decorator. Register a Func to run against any object of this PluginType immediately after it is created, but before the new object is passed back to the caller. Unlike OnCreation(), EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP scenarios or to return a decorator. Register a Func to run against any object of this PluginType immediately after it is created, but before the new object is passed back to the caller. Unlike OnCreation(), EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP scenarios or to return a decorator. Register a Func to run against any object of this PluginType immediately after it is created, but before the new object is passed back to the caller. Unlike OnCreation(), EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP scenarios or to return a decorator. Shortcut method to add an additional Instance to this Plugin Type as just a Concrete Type. This will only work if the Concrete Type has no primitive constructor or mandatory Setter arguments. Registers an ILifecycle for this Plugin Type that executes before any object of this PluginType is created. ILifecycle's can be used to create a custom scope Largely deprecated and unnecessary with the ability to add Xml configuration files Forces StructureMap to always use a unique instance to stop the "BuildSession" caching Adds the object to to the PLUGINTYPE Add an Instance to this type created by a Lambda Define the Default Instance for this PluginType Expression class to help define a runtime Profile Starts the definition of the default instance for the containing Profile. This is still valid, but Type() is recommended Designate or define the Instance for a type within this Profile Use statement to define the Profile defaults for a Generic type Expression Builder inside of a Profile creation for open generic types Use this concreteType for the Instance of this Profile for the PluginType Use this concreteType for the Instance of this Profile for the PluginType Use this Instance for the Profile Instance of this Plugin Type Use the named Instance as the Profile Instance for this PluginType Use the named Instance as the Profile Instance for this PluginType For this type and profile, build the object with this Lambda Expression Builder within defining a Profile Use a named, preconfigured instance as the default instance for this profile Use a named, preconfigured instance as the default instance for this profile Define the default instance of the PluginType for the containing Profile For this Profile, use an Instance with this Func For this Profile, use an Instance with this Func For this Profile, use this object Access to the uncommon types of Instance For this Profile, use the Concrete Type For this profile, use this concrete type A Registry class provides methods and grammars for configuring a Container or ObjectFactory. Using a Registry subclass is the recommended way of configuring a StructureMap Container. public class MyRegistry : Registry { public MyRegistry() { ForRequestedType(typeof(IService)).TheDefaultIsConcreteType(typeof(Service)); } } Adds the concreteType as an Instance of the pluginType Adds the concreteType as an Instance of the pluginType with a name Add the pluggedType as an instance to any configured pluginType where pluggedType could be assigned to the pluginType Imports the configuration from another registry into this registry. Imports the configuration from another registry into this registry. Expression Builder used to define policies for a PluginType including Scoping, the Default Instance, and interception. BuildInstancesOf() and ForRequestedType() are synonyms Expression Builder used to define policies for a PluginType including Scoping, the Default Instance, and interception. This method is specifically meant for registering open generic types This method is a shortcut for specifying the default constructor and setter arguments for a ConcreteType. ForConcreteType is shorthand for: ForRequestedType[T]().Use[T].************** when the PluginType and ConcreteType are the same Type Expression Builder used to define policies for a PluginType including Scoping, the Default Instance, and interception. BuildInstancesOf() and ForRequestedType() are synonyms Convenience method. Equivalent of ForRequestedType[PluginType]().AsSingletons() Uses the configuration expressions of this Registry to create a PluginGraph object that could be used to initialize a Container. This method is mostly for internal usage, but might be helpful for diagnostics Adds an additional, non-Default Instance to the PluginType T. Adds an additional, non-Default Instance to the designated pluginType This method is mostly meant for open generic types Expression Builder to define the defaults for a named Profile. Each call to CreateProfile is additive. An alternative way to use CreateProfile that uses ProfileExpression as a Nested Closure. This usage will result in cleaner code for multiple declarations Registers a new TypeInterceptor object with the Container Allows you to define a TypeInterceptor inline with Lambdas or anonymous delegates IfTypeMatches( ... ).InterceptWith( o => new ObjectWrapper(o) ); Designates a policy for scanning assemblies to auto register types Directs StructureMap to always inject dependencies into any and all public Setter properties of the type PLUGINTYPE. Creates automatic "policies" for which public setters are considered mandatory properties by StructureMap that will be "setter injected" as part of the construction process. Use to programmatically select the constructor function of a concrete class. Applies globally to all Containers in a single AppDomain. All requests For the "TO" types will be filled by fetching the "FROM" type and casting it to "TO" GetInstance(typeof(TO)) basically becomes (TO)GetInstance(typeof(FROM)) Syntactic Sugar for saying ForRequestedType().TheDefault.IsThis( @object ) Syntactic Sugar for saying ForRequestedType().TheDefault.IsThis( instance ) Shorthand for ForRequestedType(pluginType) Advanced Usage Only! Skips the Registry and goes right to the inner Semantic Model of StructureMap. Use with care Adds the concreteType as an Instance of the pluginType. Mostly useful for conventions Adds the concreteType as an Instance of the pluginType with a name. Mostly useful for conventions Add the pluggedType as an instance to any configured pluginType where pluggedType. Mostly useful for conventions Imports the configuration from another registry into this registry. Imports the configuration from another registry into this registry. Expression Builder used to define policies for a PluginType including Scoping, the Default Instance, and interception. BuildInstancesOf() and ForRequestedType() are synonyms Expression Builder used to define policies for a PluginType including Scoping, the Default Instance, and interception. This method is specifically meant for registering open generic types This method is a shortcut for specifying the default constructor and setter arguments for a ConcreteType. ForConcreteType is shorthand for: For[T]().Use[T].************** when the PluginType and ConcreteType are the same Type Expression Builder used to define policies for a PluginType including Scoping, the Default Instance, and interception. BuildInstancesOf() and ForRequestedType() are synonyms Convenience method. Equivalent of ForRequestedType[PluginType]().Singletons() Uses the configuration expressions of this Registry to create a PluginGraph object that could be used to initialize a Container. This method is mostly for internal usage, but might be helpful for diagnostics Adds an additional, non-Default Instance to the PluginType T. Adds an additional, non-Default Instance to the designated pluginType This method is mostly meant for open generic types Expression Builder to define the defaults for a named Profile. Each call to CreateProfile is additive. An alternative way to use CreateProfile that uses ProfileExpression as a Nested Closure. This usage will result in cleaner code for multiple declarations Registers a new TypeInterceptor object with the Container Allows you to define a TypeInterceptor inline with Lambdas or anonymous delegates IfTypeMatches( ... ).InterceptWith( o => new ObjectWrapper(o) ); Designates a policy for scanning assemblies to auto register types Directs StructureMap to always inject dependencies into any and all public Setter properties of the type PLUGINTYPE. Creates automatic "policies" for which public setters are considered mandatory properties by StructureMap that will be "setter injected" as part of the construction process. Use to programmatically select the constructor function of a concrete class. Applies globally to all Containers in a single AppDomain. All requests For the "TO" types will be filled by fetching the "FROM" type and casting it to "TO" GetInstance(typeof(TO)) basically becomes (TO)GetInstance(typeof(FROM)) Syntactic Sugar for saying ForRequestedType().TheDefault.IsThis( @object ) Syntactic Sugar for saying ForRequestedType().TheDefault.IsThis( instance ) Expression Builder used to define policies for a PluginType including Scoping, the Default Instance, and interception. BuildInstancesOf() and ForRequestedType() are synonyms Expression Builder used to define policies for a PluginType including Scoping, the Default Instance, and interception. This method is specifically meant for registering open generic types Advanced Usage Only! Skips the Registry and goes right to the inner Semantic Model of StructureMap. Use with care Define the constructor and setter arguments for the default T Thrown by IProperty classes when an invalid value is applied to a property of an InstanceGraph Main exception for StructureMap. Use the ErrorCode to aid in troubleshooting StructureMap problems Represents a concrete class that can be built by StructureMap as an instance of the parent PluginFamily’s PluginType. The properties of a Plugin are the CLR Type of the concrete class, and the human-friendly concrete key that StructureMap will use to identify the Type. The ConcreteKey that identifies the Plugin within a PluginFamily The concrete CLR Type represented by the Plugin Property's that will be filled by setter injection Conceptually speaking, a PluginFamily object represents a point of abstraction or variability in the system. A PluginFamily defines a CLR Type that StructureMap can build, and all of the possible Plugin’s implementing the CLR Type. The CLR Type that defines the "Plugin" interface for the PluginFamily The InstanceKey of the default instance of the PluginFamily Custom collection class for PluginFamily's Adds the concreteType as an Instance of the pluginType Adds the concreteType as an Instance of the pluginType with a name Add the pluggedType as an instance to any configured pluginType where pluggedType could be assigned to the pluginType Models the runtime configuration of a StructureMap Container Closes the PluginGraph for adding or removing members. Runs all the AssemblyScanner's and attempts to attach concrete types to the proper plugin types. Calculates the Profile defaults. Adds the concreteType as an Instance of the pluginType Adds the concreteType as an Instance of the pluginType with a name Add the pluggedType as an instance to any configured pluginType where pluggedType could be assigned to the pluginType Adds an AssemblyScanner to the PluginGraph. Used for Testing. Add configuration to a PluginGraph with the Registry DSL Designates whether a PluginGraph has been "Sealed." Represents a PropertyInfo of a Plugin.PluggedType that is filled by Setter Injection Custom collection class for SetterProperty objects Designates a CLR type that is loaded by name. Interface for a "Factory" pattern class that creates object instances of the PluginType The main "container" object that implements the Service Locator pattern Creates or finds the named instance of the pluginType Creates or finds the default instance of the pluginType Creates a new instance of the requested type using the supplied Instance. Mostly used internally Creates or finds the named instance of T Creates or finds the default instance of type T Creates a new instance of the requested type T using the supplied Instance. Mostly used internally Creates or resolves all registered instances of type T Creates or resolves all registered instances of the pluginType Creates or finds the named instance of the pluginType. Returns null if the named instance is not known to the container. Creates or finds the default instance of the pluginType. Returns null if the pluginType is not known to the container. Creates or finds the default instance of type T. Returns the default value of T if it is not known to the container. Creates or finds the named instance of type T. Returns the default value of T if the named instance is not known to the container. Used to add additional configuration to a Container *after* the initialization. Injects the given object into a Container as the default for the designated PLUGINTYPE. Mostly used for temporarily setting up return values of the Container to introduce mocks or stubs during automated testing scenarios Injects the given object into a Container as the default for the designated pluginType. Mostly used for temporarily setting up return values of the Container to introduce mocks or stubs during automated testing scenarios Sets the default instance for all PluginType's to the designated Profile. Returns a report detailing the complete configuration of all PluginTypes and Instances Use with caution! Does a full environment test of the configuration of this container. Will try to create every configured instance and afterward calls any methods marked with the [ValidationMethod] attribute Gets all configured instances of type T using explicitly configured arguments from the "args" Gets the default instance of type T using the explicitly configured arguments from the "args" Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency of type T should be "arg" Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency or primitive argument with the designated name should be the next value. Gets the default instance of the pluginType using the explicitly configured arguments from the "args" Removes all configured instances of type T from the Container. Use with caution! The "BuildUp" method takes in an already constructed object and uses Setter Injection to push in configured dependencies of that object Convenience method to request an object using an Open Generic Type and its parameter Types IFlattener flattener1 = container.ForGenericType(typeof (IFlattener<>)) .WithParameters(typeof (Address)).GetInstanceAs<IFlattener>(); Gets the named instance of the pluginType using the explicitly configured arguments from the "args" Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency of type T should be "arg" Starts a "Nested" Container for atomic, isolated access Starts a new "Nested" Container for atomic, isolated service location. Opens Provides queryable access to the configured PluginType's and Instances of this Container The name of the container. By default this is set to a random Guid. This is a convience property to assist with debugging. Feel free to set to anything, as this is not used in any logic. Default implementation of IInstanceFactory Constructor to use when troubleshooting possible configuration issues. Constructor to create an Container PluginGraph containing the instance and type definitions for the Container Creates or finds the named instance of T Creates a new instance of the requested type T using the supplied Instance. Mostly used internally Gets the default instance of the pluginType using the explicitly configured arguments from the "args" Gets the default instance of the pluginType using the explicitly configured arguments from the "args" Gets all configured instances of type T using explicitly configured arguments from the "args" Creates or finds the default instance of type T Creates or resolves all registered instances of type T Sets the default instance for all PluginType's to the designated Profile. Creates or finds the named instance of the pluginType Creates or finds the named instance of the pluginType. Returns null if the named instance is not known to the container. Creates or finds the default instance of the pluginType. Returns null if the pluginType is not known to the container. Creates or finds the default instance of type T. Returns the default value of T if it is not known to the container. The "BuildUp" method takes in an already constructed object and uses Setter Injection to push in configured dependencies of that object Creates or finds the named instance of type T. Returns the default value of T if the named instance is not known to the container. Creates or finds the default instance of the pluginType Creates a new instance of the requested type using the supplied Instance. Mostly used internally Creates or resolves all registered instances of the pluginType Used to add additional configuration to a Container *after* the initialization. Returns a report detailing the complete configuration of all PluginTypes and Instances Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency of type T should be "arg" Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency of type T should be "arg" Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency or primitive argument with the designated name should be the next value. Use with caution! Does a full environment test of the configuration of this container. Will try to create every configured instance and afterward calls any methods marked with the [ValidationMethod] attribute Removes all configured instances of type T from the Container. Use with caution! Convenience method to request an object using an Open Generic Type and its parameter Types IFlattener flattener1 = container.ForGenericType(typeof (IFlattener<>)) .WithParameters(typeof (Address)).GetInstanceAs<IFlattener>(); Starts a "Nested" Container for atomic, isolated access Starts a new "Nested" Container for atomic, isolated service location. Opens Injects the given object into a Container as the default for the designated PLUGINTYPE. Mostly used for temporarily setting up return values of the Container to introduce mocks or stubs during automated testing scenarios Injects the given object into a Container as the default for the designated pluginType. Mostly used for temporarily setting up return values of the Container to introduce mocks or stubs during automated testing scenarios Sets the default instance for the PluginType Provides queryable access to the configured PluginType's and Instances of this Container The name of the container. By default this is set to a random Guid. This is a convience property to assist with debugging. Feel free to set to anything, as this is not used in any logic. GoF Memento representing an Object Instance Retrieves the named property value as a string Template method for implementation specific retrieval of the named property Returns the named child InstanceMemento Template method for implementation specific retrieval of the named property This method is made public for testing. It is not necessary for normal usage. Used to create a templated InstanceMemento The named type of the object instance represented by the InstanceMemento. Translates to a concrete type The named key of the object instance represented by the InstanceMemento Gets the referred template name Template pattern property specifying whether the InstanceMemento is simply a reference to another named instance. Useful for child objects. Template pattern property specifying the instance key that the InstanceMemento refers to Is the InstanceMemento a reference to the default instance of the plugin type? A TypeInterceptor that always applies to all Instances of a given Plugin Type Abstract class that is the supertype of all storage and retrieval mechanisms of InstanceMemento instances Retrieves the named InstanceMemento The instanceKey of the requested InstanceMemento Retrieves an array of all InstanceMemento's stored by this MementoSource Template pattern method. Determines if the MementoSource contains a definition for the requested instanceKey. Template pattern method. Retrieves an InstanceMemento for the instanceKey The type of MementoSource String description of the MementoSource. Used in the StructureMap-Client UI. An in-memory implementation of InstanceMemento. Creates an instance of MemoryInstanceMemento that represents a reference to another instance. The referenced instance key to another instance Creates a MemoryInstanceMemento that represents a reference to the default instance of a plugin type. Constructs a MemoryInstanceMemento without properties The concrete key of the plugin type The identifying instance key Constructs a MemoryInstanceMemento with properties The concrete key of the plugin type The identifying instance key NameValueCollection of instance properties Sets the value of the named property Deletes a named property from the DefaultInstanceMemento Links a child InstanceMemento as a named property Links an array of InstanceMemento's to a named array property See InstanceMemento See InstanceMemento See InstanceMemento See InstanceMemento See InstanceMemento The main static Facade for the StructureMap container Restarts ObjectFactory and blows away all Singleton's and cached instances. Use with caution. Remove and dispose all objects scoped by HttpContext. Call this method at the *end* of an Http request to clean up resources Injects the given object into a Container as the default for the designated pluginType. Mostly used for temporarily setting up return values of the Container to introduce mocks or stubs during automated testing scenarios Injects the given object into a Container as the default for the designated PLUGINTYPE. Mostly used for temporarily setting up return values of the Container to introduce mocks or stubs during automated testing scenarios Returns a report detailing the complete configuration of all PluginTypes and Instances Use with caution! Does a full environment test of the configuration of this container. Will try to create every configured instance and afterward calls any methods marked with the [ValidationMethod] attribute Creates or finds the default instance of the pluginType Creates or finds the default instance of type T Creates a new instance of the requested type using the supplied Instance. Mostly used internally Creates a new instance of the requested type T using the supplied Instance. Mostly used internally Creates or finds the named instance of the pluginType Creates or finds the named instance of T Creates or resolves all registered instances of the pluginType Creates or resolves all registered instances of type T Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency of type T should be "arg" Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency or primitive argument with the designated name should be the next value. Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency of type T should be "arg" Removes all configured instances of type T from the Container. Use with caution! Creates or finds the named instance of the pluginType. Returns null if the named instance is not known to the container. Creates or finds the default instance of the pluginType. Returns null if the pluginType is not known to the container. Creates or finds the default instance of type T. Returns the default value of T if it is not known to the container. Creates or finds the named instance of type T. Returns the default value of T if the named instance is not known to the container. The "BuildUp" method takes in an already constructed object and uses Setter Injection to push in configured dependencies of that object Convenience method to request an object using an Open Generic Type and its parameter Types IFlattener flattener1 = container.ForGenericType(typeof (IFlattener<>)) .WithParameters(typeof (Address)).GetInstanceAs<IFlattener>(); Used to add additional configuration to a Container *after* the initialization. Provides queryable access to the configured PluginType's and Instances of the inner Container Sets the default instance for all PluginType's to the designated Profile. Reads configuration XML documents and builds the structures necessary to initialize the Container/IInstanceFactory/InstanceBuilder/ObjectInstanceActivator objects Reads the configuration information and returns the PluginGraph definition of plugin families and plugin's Generic implementation of an XmlMementoSource Base class for all MementoSource classes that store InstanceMemento's as node-normalized Xml Implementation of MementoSource that stores and retrieves an XmlInstanceMemento per file in a named directory. DirectoryXmlMementoSource is meant to simplify complicated object graph configurations by isolating each instance to a separate editable file. Stores an Xml InstanceMemento per file in a directory A ";" delimited list of directories to look for mementos. DirectoryXmlMementoSource will use the FIRST directory it finds The file extension of the InstanceMemento files without a dot. Typically "xml" NodeNormalized or AttributeNormalized Implementation of MementoSource that stores and retrieves an XmlInstanceMemento per Embedded Resource file in a named namespace. EmbeddedFolderXmlMementoSource is meant to simplify complicated object graph configurations by isolating each instance to a separate editable file. NodeNormalized or AttributeNormalized The name of the Assembly with the embedded resources The root namespace of all of the mementos. The file extension of the memento files - "xml" An in-memory MementoSource Retrieves Xml InstanceMemento's from an xml file stored as an embedded resource in an assembly. Designates the nodes that are memento nodes NodeNormalized or AttributeNormalized The name of the Assembly the file is embedded into The path to the embedded resource within the file Default Constructor MementoSource that contains the Memento Templates MementoSource that contains instances consisting of Template valuee Stores Attribute-normalized InstanceMemento's in an external file Implementation of XmlMementoSource that reads InstanceMemento's from an external file. Useful to break the StructureMap.config file into smaller pieces. Default constructor Path to the xml file that contains the instance configuration XPath expression to the parent node that contains the InstanceMemento nodes. If empty, it defaults to the top node The name of the nodes that are InstanceMemento nodes. Useful to store different types of instances in the same file An implementation of InstanceMemento that stores properties as Xml attributes Limited functionality Implementation of InstanceMemento that stores information in a node-normalized Xml format. specify what type you'd like the service returned as Specify the open generic type that should have a single generic parameter Used as the argument in the Container.Configure() method to describe configuration directives and specify the sources of configuration for a Container Creates and adds a Registry object of type T. The Registry Type Imports all the configuration from a Registry object Imports configuration from an Xml file. The fileName must point to an Xml file with valid StructureMap configuration Imports configuration directly from an XmlNode. This method was intended for scenarios like Xml being embedded into an assembly. The node must be a 'StructureMap' node If true, directs StructureMap to look for configuration in the App.config. The default value is false. Expression Builder to define an Instance Register a previously built Instance. This provides a "catch all" method to attach custom Instance objects. Synonym for Instance() Inject this object directly. Synonym to Object() Gives you full access to all the different ways to specify an "Instance" An Expression Builder to define Instances of a PluginType. This is mostly used for configuring open generic types Shortcut to register a Concrete Type as an instance. This method supports method chaining to allow you to add constructor and setter arguments for the concrete type Shortcut to simply use the Instance with the given name An Expression Builder that is used throughout the Registry DSL to add and define Instances Register a previously built Instance. This provides a "catch all" method to attach custom Instance objects. Synonym for IsThis() Inject this object directly. Synonym to IsThis() Build the Instance with the constructor function and setter arguments. Starts the definition of a SmartInstance Build the Instance with the constructor function and setter arguments. Starts the definition of a SmartInstance Build the Instance with the constructor function and setter arguments. Use this method for open generic types, and favor the generic version of OfConcreteType for all other types Build the Instance with the constructor function and setter arguments. Use this method for open generic types, and favor the generic version of OfConcreteType for all other types Create an Instance that builds an object by calling a Lambda or an anonymous delegate with no arguments Create an Instance that builds an object by calling a Lambda or an anonymous delegate with the IContext representing the current object graph. Use the Instance of this PluginType with the specified name. This is generally only used while configuring child dependencies within a deep object graph Use the default Instance of this PluginType. This is generally only used while configuring child dependencies within a deep object graph Creates an Instance that stores this object of type T, and returns a cloned copy of the template. Caches template as a serialized byte stream. Uses deserialization to create copies when the Instance is built. Creates an Instance that will load an ASCX user control from the url Creates an Instance according to conditional rules Used as an expression builder to specify setter injection policies Directs StructureMap to treat all public setters of type T as mandatory properties Directs StructureMap to tread all public setters with a PropertyType that matches the predicate as a mandatory setter Directs StructureMap to treat all public setters that match the rule as mandatory properties Directs StructureMap to treat all public setters with a property type in the specified namespace as mandatory properties Directs StructureMap to treat all public setters with a property type in the specified namespace as mandatory properties Directs StructureMap to treat all public setters where to property name matches the specified rule as a mandatory property Base class for creating an object instance from an InstanceMemento. SubClasses are emitted for each concrete Plugin with constructor parameters. Allows built-in registration conventions to be configurable through the assembly scanning DSL Intended for StructureMap internal use only. Custom registration convention instances can be directly configured before being passed to IAssemblyScanner.With(IRegistrationConvention). Simply query to see if there are any implementations registered Ejects any instances of this instance from the current container and permanently removes the instance from the container configuration Eject all instances of this PluginType from the current container, but leaves the lifecycle behavior The "instance" that will be used when Container.GetInstance(PluginType) is called. See InstanceRef for more information The build "policy" for this PluginType. Used by the WhatDoIHave() diagnostics methods All of the InstanceRef's registered for this PluginType Simply query to see if there are any implementations registered The "instance" that will be used when Container.GetInstance(PluginType) is called. See InstanceRef for more information The build "policy" for this PluginType. Used by the WhatDoIHave() diagnostics methods All of the InstanceRef's registered for this PluginType Simply query to see if there are any implementations registered The "instance" that will be used when Container.GetInstance(PluginType) is called. See InstanceRef for more information The build "policy" for this PluginType. Used by the WhatDoIHave() diagnostics methods All of the InstanceRef's registered for this PluginType Models the state of a Container or ObjectFactory. Can be used to query for the existence of types registered with StructureMap Can StructureMap fulfill a request to ObjectFactory.GetInstance(pluginType) from the current configuration. This does not include concrete classes that could be auto-configured upon demand Can StructureMap fulfill a request to ObjectFactory.GetInstance<T>() from the current configuration. This does not include concrete classes that could be auto-configured upon demand Queryable access to all of the InstanceRef for a given PluginType Queryable access to all of the InstanceRef for a given PluginType Does the current container have existing configuration for the "pluginType" Does the current container have existing configuration for the type T Find the concrete type for the default Instance of T. In other words, when I call Container.GetInstance(Type), what do I get? May be indeterminate Find the concrete type for the default Instance of pluginType. In other words, when I call Container.GetInstance(Type), what do I get? May be indeterminate Retrieves the configuration for the given type Retrieves the configuration for the given type Eject all objects, configuration, and Plugin Types matching this filter Eject all objects and configuration for any Plugin Type that matches this filter Eject all objects and Instance configuration for this PluginType Get each and every configured instance that could possibly be cast to T Access to all the Plugin Type registrations Makes sure that every request for this object returns a unique object Simply query to see if there are any implementations registered The "instance" that will be used when Container.GetInstance(PluginType) is called. See InstanceRef for more information The build "policy" for this PluginType. Used by the WhatDoIHave() diagnostics methods All of the InstanceRef's registered for this PluginType The actual concrete type of this Instance. Not every type of IInstance can determine the ConcreteType Ejects and removes all objects and the configuration for the named instance from the container Ejects and removes all objects and configuration for the instances that match the filter Determines if the pluggedType can be upcast to the pluginType Determines if the PluggedType is a valid Plugin into the PluginType Imports configuration from an Xml file. The fileName must point to an Xml file with valid StructureMap configuration Imports configuration directly from an XmlNode. This method was intended for scenarios like Xml being embedded into an assembly. The node must be a 'StructureMap' node Creates and adds a Registry object of type T. The Registry Type Imports all the configuration from a Registry object If true, makes the existence of the StructureMap.config mandatory. The default is false. If true, the StructureMap.config file will be ignored even if it exists. The default is false. If true, directs StructureMap to look for configuration in the App.config. The default value is false. Designate the Default Profile. This will be applied as soon as the Container is initialized. Retrieves the configuration for the given type Retrieves the configuration for the given type Eject all objects, configuration, and Plugin Types matching this filter Eject all objects and configuration for any Plugin Type that matches this filter Eject all objects and Instance configuration for this PluginType Get each and every configured instance that could possibly be cast to T The requested PluginType of the Instance being create The Name of the Instance being created The actual ConcreteType being created. This will not always be available Models the current place in an object graph during the construction of an instance. Provides contextual information that can be used to alter the desired construction of child objects The requested PluginType of the Instance being create The Name of the Instance being created The actual ConcreteType being created. This will not always be available Provides metadata about the object graph being constructed. More or less a stack trace of the GetInstance() pipeline that can be used for "contextual" object construction The top level of the object graph. Describes the original requested instance The current BuildFrame The immediate parent BuildFrame Defines the value of a primitive argument to a constructur argument Sets the value of the constructor argument Sets the value of the constructor argument to the key/value in the AppSettings The key in appSettings for the value to use. Sets the value of the constructor argument to the key/value in the AppSettings when it exists. Otherwise uses the provided default value. The key in appSettings for the value to use. The value to use if an entry for does not exist in the appSettings section. Instance that builds objects with by calling constructor functions and using setter properties The concrete type constructed by SmartInstance Sets the name of this Instance Sets the name of this Instance Register an Action to perform on the object created by this Instance before it is returned to the caller Register an Action to perform on the object created by this Instance before it is returned to the caller Register a Func to potentially enrich or substitute for the object created by this Instance before it is returned to the caller Register a Func to potentially enrich or substitute for the object created by this Instance before it is returned to the caller Register a Func to potentially enrich or substitute for the object created by this Instance before it is returned to the caller Register a Func to potentially enrich or substitute for the object created by this Instance before it is returned to the caller Register an InstanceInterceptor with this Instance Define a primitive constructor argument Set simple setter properties Define a primitive setter property by specifying the property name with an expression Define a primitive setter property by specifying the property name Inline definition of a constructor dependency. Select the constructor argument by type. Do not use this method if there is more than one constructor arguments of the same type Inline definition of a constructor dependency. Select the constructor argument by type. Do not use this method if there is more than one constructor arguments of the same type Inline definition of a constructor dependency. Select the constructor argument by type and constructor name. Use this method if there is more than one constructor arguments of the same type Inline definition of a constructor dependency. Select the constructor argument by type and constructor name. Use this method if there is more than one constructor arguments of the same type Inline definition of a setter dependency. The property name is specified with an Expression Inline definition of a setter dependency. The property name is specified with an Expression Inline definition of a setter dependency. Only use this method if there is only a single property of the SETTERTYPE Inline definition of a setter dependency. Only use this method if there is only a single property of the SETTERTYPE Inline definition of a dependency on an Array of the CHILD type. I.e. CHILD[]. This method can be used for either constructor arguments or setter properties Inline definition of a dependency on an Array of the CHILD type and the specified setter property or constructor argument name. I.e. CHILD[]. This method can be used for either constructor arguments or setter properties Inline definition of a dependency on an Array of the CHILD type. I.e. CHILD[]. This method can be used for either constructor arguments or setter properties Inline definition of a dependency on an Array of the CHILD type and the specified setter property or constructor argument name. I.e. CHILD[]. This method can be used for either constructor arguments or setter properties Expression Builder to help define multiple Instances for an Array dependency Nested Closure that allows you to add an unlimited number of child Instances Specify an array of Instance objects directly for an Array dependency Expression Builder that helps to define child dependencies inline Sets the value of the constructor argument to the key/value in the AppSettings The key in appSettings for the value to use. Sets the value of the constructor argument to the key/value in the AppSettings when it exists. Otherwise uses the provided default value. The key in appSettings for the value to use. The value to use if an entry for does not exist in the appSettings section. Nested Closure to define a child dependency inline Shortcut to set an inline dependency to an Instance Shortcut to set an inline dependency to a designated object Shortcut to set an inline dependency to a designated object Set an Inline dependency to the Default Instance of the Property type Used mostly to force an optional Setter property to be filled by StructureMap Shortcut method to define a child dependency inline Shortcut method to define a child dependency inline and configure the child dependency Provides virtual methods that can be used by subclasses to parse an expression tree. This class actually already exists in the System.Core assembly...as an internal class. I can only speculate as to why it is internal, but it is obviously much too dangerous for anyone outside of Microsoft to be using...