C# Class Spring.Objects.Factory.Support.ObjectDefinitionBuilder

Programmatic means of constructing a IObjectDefinition using the builder pattern. Intended primarily for use when implementing custom namespace parsers.
Set methods are used instead of properties, so that chaining of methods can be used to create 'one-liner'definitions that set multiple properties at one.
Afficher le fichier Open project: spring-projects/spring-net Class Usage Examples

Méthodes publiques

Méthode Description
AddConstructorArg ( object value ) : ObjectDefinitionBuilder

Adds an index constructor arg value. The current index is tracked internally and all addtions are at the present point

AddConstructorArgReference ( string objectName ) : ObjectDefinitionBuilder

Adds a reference to the named object as a constructor argument.

AddDependsOn ( string objectName ) : ObjectDefinitionBuilder

Adds the specified object name to the list of objects that this definition depends on.

AddPropertyReference ( string name, string objectName ) : ObjectDefinitionBuilder

Adds a reference to the specified object name under the property specified.

AddPropertyValue ( string name, object value ) : ObjectDefinitionBuilder

Adds the property value under the given name.

ChildObjectDefinition ( IObjectDefinitionFactory objectDefinitionFactory, string parentObjectName ) : ObjectDefinitionBuilder

Create a new ObjectDefinitionBuilder used to construct a child object definition..

GenericObjectDefinition ( ) : ObjectDefinitionBuilder

Creates a new ObjectDefinitionBuilder used to construct a Spring.Objects.Factory.Support.GenericObjectDefinition.

GenericObjectDefinition ( Type objectType ) : ObjectDefinitionBuilder

Creates a new ObjectDefinitionBuilder used to construct a Spring.Objects.Factory.Support.GenericObjectDefinition.

GenericObjectDefinition ( string objectTypeName ) : ObjectDefinitionBuilder

Creates a new ObjectDefinitionBuilder used to construct a Spring.Objects.Factory.Support.GenericObjectDefinition.

RootObjectDefinition ( IObjectDefinitionFactory objectDefinitionFactory, Type objectType ) : ObjectDefinitionBuilder

Create a new ObjectDefinitionBuilder used to construct a root object definition.

RootObjectDefinition ( IObjectDefinitionFactory objectDefinitionFactory, Type objectType, string factoryMethodName ) : ObjectDefinitionBuilder

Create a new ObjectDefinitionBuilder used to construct a root object definition.

RootObjectDefinition ( IObjectDefinitionFactory objectDefinitionFactory, string objectTypeName ) : ObjectDefinitionBuilder

Create a new ObjectDefinitionBuilder used to construct a root object definition.

RootObjectDefinition ( IObjectDefinitionFactory objectDefinitionFactory, string objectTypeName, string factoryMethodName ) : ObjectDefinitionBuilder

Create a new ObjectDefinitionBuilder used to construct a root object definition.

SetAbstract ( bool flag ) : ObjectDefinitionBuilder

Sets whether objects or not this definition is abstract.

SetAutowireCandidate ( bool autowireCandidate ) : ObjectDefinitionBuilder

Sets the autowire candidate value for this definition.

SetAutowireMode ( AutoWiringMode autowireMode ) : ObjectDefinitionBuilder

Sets the autowire mode for this definition.

SetDependencyCheck ( DependencyCheckingMode dependencyCheck ) : ObjectDefinitionBuilder

Sets the dependency check mode for this definition.

SetDestroyMethodName ( string methodName ) : ObjectDefinitionBuilder

Sets the name of the destroy method for this definition.

SetFactoryMethod ( string factoryMethod ) : ObjectDefinitionBuilder

Sets the name of the factory method to use for this definition.

SetFactoryObject ( string factoryObject, string factoryMethod ) : ObjectDefinitionBuilder

Sets the name of the factory object to use for this definition.

SetInitMethodName ( string methodName ) : ObjectDefinitionBuilder

Sets the name of the init method for this definition.

SetLazyInit ( bool lazy ) : ObjectDefinitionBuilder

Sets whether objects for this definition should be lazily initialized or not.

SetPrimary ( bool primary ) : ObjectDefinitionBuilder

Sets the primary value for this definition.

SetResourceDescription ( string resourceDescription ) : ObjectDefinitionBuilder

Sets the resource description for this definition.

SetSingleton ( bool singleton ) : ObjectDefinitionBuilder

Sets whether or not this definition describes a singleton object.

Private Methods

Méthode Description
ObjectDefinitionBuilder ( ) : System

Initializes a new instance of the ObjectDefinitionBuilder class, private to force use of factory methods.

Method Details

AddConstructorArg() public méthode

Adds an index constructor arg value. The current index is tracked internally and all addtions are at the present point
public AddConstructorArg ( object value ) : ObjectDefinitionBuilder
value object The constructor arg value.
Résultat ObjectDefinitionBuilder

AddConstructorArgReference() public méthode

Adds a reference to the named object as a constructor argument.
public AddConstructorArgReference ( string objectName ) : ObjectDefinitionBuilder
objectName string Name of the object.
Résultat ObjectDefinitionBuilder

AddDependsOn() public méthode

Adds the specified object name to the list of objects that this definition depends on.
public AddDependsOn ( string objectName ) : ObjectDefinitionBuilder
objectName string Name of the object.
Résultat ObjectDefinitionBuilder

AddPropertyReference() public méthode

Adds a reference to the specified object name under the property specified.
public AddPropertyReference ( string name, string objectName ) : ObjectDefinitionBuilder
name string The name.
objectName string Name of the object.
Résultat ObjectDefinitionBuilder

AddPropertyValue() public méthode

Adds the property value under the given name.
public AddPropertyValue ( string name, object value ) : ObjectDefinitionBuilder
name string The name.
value object The value.
Résultat ObjectDefinitionBuilder

ChildObjectDefinition() public static méthode

Create a new ObjectDefinitionBuilder used to construct a child object definition..
public static ChildObjectDefinition ( IObjectDefinitionFactory objectDefinitionFactory, string parentObjectName ) : ObjectDefinitionBuilder
objectDefinitionFactory IObjectDefinitionFactory The object definition factory.
parentObjectName string Name of the parent object.
Résultat ObjectDefinitionBuilder

GenericObjectDefinition() public static méthode

Creates a new ObjectDefinitionBuilder used to construct a Spring.Objects.Factory.Support.GenericObjectDefinition.
public static GenericObjectDefinition ( ) : ObjectDefinitionBuilder
Résultat ObjectDefinitionBuilder

GenericObjectDefinition() public static méthode

Creates a new ObjectDefinitionBuilder used to construct a Spring.Objects.Factory.Support.GenericObjectDefinition.
public static GenericObjectDefinition ( Type objectType ) : ObjectDefinitionBuilder
objectType System.Type the of the object that the definition is being created for
Résultat ObjectDefinitionBuilder

GenericObjectDefinition() public static méthode

Creates a new ObjectDefinitionBuilder used to construct a Spring.Objects.Factory.Support.GenericObjectDefinition.
public static GenericObjectDefinition ( string objectTypeName ) : ObjectDefinitionBuilder
objectTypeName string the name of the of the object that the definition is being created for
Résultat ObjectDefinitionBuilder

RootObjectDefinition() public static méthode

Create a new ObjectDefinitionBuilder used to construct a root object definition.
public static RootObjectDefinition ( IObjectDefinitionFactory objectDefinitionFactory, Type objectType ) : ObjectDefinitionBuilder
objectDefinitionFactory IObjectDefinitionFactory The object definition factory.
objectType System.Type Type of the object.
Résultat ObjectDefinitionBuilder

RootObjectDefinition() public static méthode

Create a new ObjectDefinitionBuilder used to construct a root object definition.
public static RootObjectDefinition ( IObjectDefinitionFactory objectDefinitionFactory, Type objectType, string factoryMethodName ) : ObjectDefinitionBuilder
objectDefinitionFactory IObjectDefinitionFactory The object definition factory.
objectType System.Type Type of the object.
factoryMethodName string Name of the factory method.
Résultat ObjectDefinitionBuilder

RootObjectDefinition() public static méthode

Create a new ObjectDefinitionBuilder used to construct a root object definition.
public static RootObjectDefinition ( IObjectDefinitionFactory objectDefinitionFactory, string objectTypeName ) : ObjectDefinitionBuilder
objectDefinitionFactory IObjectDefinitionFactory The object definition factory.
objectTypeName string The type name of the object.
Résultat ObjectDefinitionBuilder

RootObjectDefinition() public static méthode

Create a new ObjectDefinitionBuilder used to construct a root object definition.
public static RootObjectDefinition ( IObjectDefinitionFactory objectDefinitionFactory, string objectTypeName, string factoryMethodName ) : ObjectDefinitionBuilder
objectDefinitionFactory IObjectDefinitionFactory The object definition factory.
objectTypeName string Name of the object type.
factoryMethodName string Name of the factory method.
Résultat ObjectDefinitionBuilder

SetAbstract() public méthode

Sets whether objects or not this definition is abstract.
public SetAbstract ( bool flag ) : ObjectDefinitionBuilder
flag bool if set to true [flag].
Résultat ObjectDefinitionBuilder

SetAutowireCandidate() public méthode

Sets the autowire candidate value for this definition.
public SetAutowireCandidate ( bool autowireCandidate ) : ObjectDefinitionBuilder
autowireCandidate bool The autowire candidate value
Résultat ObjectDefinitionBuilder

SetAutowireMode() public méthode

Sets the autowire mode for this definition.
public SetAutowireMode ( AutoWiringMode autowireMode ) : ObjectDefinitionBuilder
autowireMode AutoWiringMode The autowire mode.
Résultat ObjectDefinitionBuilder

SetDependencyCheck() public méthode

Sets the dependency check mode for this definition.
public SetDependencyCheck ( DependencyCheckingMode dependencyCheck ) : ObjectDefinitionBuilder
dependencyCheck DependencyCheckingMode The dependency check.
Résultat ObjectDefinitionBuilder

SetDestroyMethodName() public méthode

Sets the name of the destroy method for this definition.
public SetDestroyMethodName ( string methodName ) : ObjectDefinitionBuilder
methodName string Name of the method.
Résultat ObjectDefinitionBuilder

SetFactoryMethod() public méthode

Sets the name of the factory method to use for this definition.
public SetFactoryMethod ( string factoryMethod ) : ObjectDefinitionBuilder
factoryMethod string The factory method.
Résultat ObjectDefinitionBuilder

SetFactoryObject() public méthode

Sets the name of the factory object to use for this definition.
public SetFactoryObject ( string factoryObject, string factoryMethod ) : ObjectDefinitionBuilder
factoryObject string The factory object.
factoryMethod string The factory method.
Résultat ObjectDefinitionBuilder

SetInitMethodName() public méthode

Sets the name of the init method for this definition.
public SetInitMethodName ( string methodName ) : ObjectDefinitionBuilder
methodName string Name of the method.
Résultat ObjectDefinitionBuilder

SetLazyInit() public méthode

Sets whether objects for this definition should be lazily initialized or not.
public SetLazyInit ( bool lazy ) : ObjectDefinitionBuilder
lazy bool if set to true [lazy].
Résultat ObjectDefinitionBuilder

SetPrimary() public méthode

Sets the primary value for this definition.
public SetPrimary ( bool primary ) : ObjectDefinitionBuilder
primary bool If object is primary
Résultat ObjectDefinitionBuilder

SetResourceDescription() public méthode

Sets the resource description for this definition.
public SetResourceDescription ( string resourceDescription ) : ObjectDefinitionBuilder
resourceDescription string The resource description.
Résultat ObjectDefinitionBuilder

SetSingleton() public méthode

Sets whether or not this definition describes a singleton object.
public SetSingleton ( bool singleton ) : ObjectDefinitionBuilder
singleton bool if set to true [singleton].
Résultat ObjectDefinitionBuilder