Microsoft.Practices.Unity.Configuration
A configuration element storing information about a single type alias.
Base class for configuration elements with a default implementation of
public deserialization.
Load this element from the given .
Contains the XML to initialize from.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Construct a new, uninitialized .
Construct a new that is initialized
to alias to the target .
Alias to use.
Type that is aliased.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
The alias used for this type.
The fully qualified name this alias refers to.
A collection of s.
Specialization of
that provides a canned implementation of .
Type of configuration element in the collection.
A base helper class for implementing configuration collections.
Type of configuration element contained in
the collection.
Plug point to get objects out of the collection.
Index in the collection to retrieve the item from.
Item at that index or null if not present.
Plug point to get objects out of the collection.
Key to look up the object by.
Item with that key or null if not present.
Load this element from the given .
Contains the XML to initialize from.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
1
Add a new element to the collection.
Element to add.
Remove an element from the collection at the given index.
The index of the item to remove.
Remove all the items in the collection.
Write out the contents of this collection to the given
without a containing element
corresponding directly to this container element. Each
child element will have a tag name given by
.
to output XML to.
Name of tag to generate.
Indexer to retrieve items in the collection by index.
Index of the item to get or set.
The item at the given index.
When overridden in a derived class, creates a new .
A new .
Causes the configuration system to throw an exception.
true if the unrecognized element was deserialized successfully; otherwise, false. The default is false.
The name of the unrecognized element.
An input stream that reads XML from the configuration file.
The element specified in is the <clear> element.
starts with the reserved prefix "config" or "lock".
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for.
Indexer that allows you to get or set an alias by the alias name.
Alias of element to get or set.
The type name at that alias.
A configuration element used to configure injection of
a specific set of values into an array.
Base class for configuration elements that describe a value that will
be injected.
Initialize a new instance of .
Generate an object
that will be used to configure the container for a type registration.
Container that is being configured. Supplied in order
to let custom implementations retrieve services; do not configure the container
directly in this method.
Type of the
Validate that an expected attribute is present in the given
dictionary and that it has a non-empty value.
Dictionary of name/value pairs to check.
attribute name to check.
Return a unique string that can be used to identify this object. Used
by the configuration collection support.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Generate an object
that will be used to configure the container for a type registration.
Container that is being configured. Supplied in order
to let custom implementations retrieve services; do not configure the container
directly in this method.
Type of the
Type of array to inject. This is actually the type of the array elements,
not the array type. Optional, if not specified we take the type from
our containing element.
Values used to calculate the contents of the array.
A configuration element representing the namespace
tags in the config file.
An element with a single "name" property, used for
the namespaces and assemblies.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Name attribute for this element.
A collection of s in configuration.
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for.
Helpful extension methods when implementing configuration sections
that deserialize "unwrapped" elements - elements that should be
deserialized into a container but can be present outside
that container in the actual config file.
Deserialize an element of the given type, store it in
the collection object, and
Type of element to create and deserialize.
Parent element containing element to deserialize.
Xml reader containing state to deserialize from.
Collection to store the created element into.
The created element.
Deserialize an element, basing the element type on the one
supplied at runtime, and then store the element into the
given .
This method is useful when reading elements into a polymorphic collection.
Base type of element to store.
Element that contains the collection being stored into.
Xml Reader containing state to deserialize from.
Runtime type of element to create.
Collection to store the created element into.
The created element.
Class that tracks the current input state of the parser.
A simple implementing of the rules for a Parsing Expression Grammar
parsing algorithm. This supplies basic methods to do the primitives
of the PEG, and combinators to create larger rules.
The PEG "dot" operator that matches and consumes one character.
Input to the parser.
The parse result.
Parse function generator that returns a method to match a single,
specific character.
Character to match.
The generated parsing function.
Parse function generator that checks if the current character matches
the predicate supplied.
Predicate used to determine if the character is in
the given range.
The generated parsing function.
The "*" operator - match zero or more of the inner parse expressions.
Parse method to repeat matching.
The generated parsing function.
Parsing combinator that matches all of the given expressions in
order, or matches none of them.
Expressions that form the sequence to match.
The combined sequence.
Parsing combinator that implements the PEG prioritized choice operator. Basically,
try each of the expressions in order, and match if any of them match, stopping on the
first match.
Expressions that form the set of alternatives.
The combined parsing method.
Parsing combinator implementing the "not" predicate. This wraps
the given parsing method with a check
to see if it matched. If it matched, then the Not fails, and vice
versa. The result consumes no input.
The parse method to wrap.
The generated parsing function.
Parsing expression that matches End of input.
Parser input.
Parse result
Combinator that executes an action if the given expression matched.
Parsing expression to match.
Action to execute if
matched. Input is the matched text from .
The result of .
Combinator that executes an action if the given expression matched.
parsing expression to match.
Method to execute if a match happens. This method returns
the that will be returned from the combined expression.
The result of if expression matched, else
whatever returned.
Object containing the result of attempting to match a PEG rule.
This object is the return type for all parsing methods.
Did the rule match?
The characters that were matched (if any)
Any extra information provided by the parsing expression
(only set if the parse matched). The nature
of the data varies depending on the parsing expression.
Helper methods to make it easier to pull the data
out of the result of a sequence expression.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
2
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
1
Adds an item to the .
The object to add to the .
The is read-only.
Removes all items from the .
The is read-only.
Determines whether the contains a specific value.
true if is found in the ; otherwise, false.
The object to locate in the .
Copies the elements of the sequence to an , starting at a particular index.
The one-dimensional that is the destination of the elements copied from this sequence. The must have zero-based indexing.
The zero-based index in at which copying begins.
is null.
is less than 0.
is multidimensional.
-or-
is equal to or greater than the length of .
-or-
The number of elements in the source is greater than the available space from to the end of the destination .
Removes the first occurrence of a specific object from the .
true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original .
The object to remove from the .
The is read-only.
Determines the index of a specific item in the .
The index of if found in the list; otherwise, -1.
The object to locate in the .
Inserts an item to the at the specified index.
The zero-based index at which should be inserted.
The object to insert into the .
is not a valid index in the .
The is read-only.
Removes the item at the specified index.
The zero-based index of the item to remove.
is not a valid index in the .
The is read-only.
Gets the number of elements contained in the .
The number of elements contained in the .
Gets a value indicating whether the is read-only.
true if the is read-only; otherwise, false.
Gets or sets the element at the specified index.
The element at the specified index.
The zero-based index of the element to get or set.
is not a valid index in the .
The property is set and the is read-only.
Class containing information about a type name.
The base name of the class
Namespace if any
Assembly name, if any
Helper methods on .
A helper method to make it more foolproof to write elements. This takes care of writing the
start and end element tags, and takes a nested closure with the code to write the content of
the tag. That way the caller doesn't need to worry about the details of getting the start
and end tags correct.
We don't support XML Namespaces here because .NET configuration doesn't use them so
we don't need it for this current implementation.
XmlWriter to write to.
Name of element.
Nested lambda which, when executed, will create the content for the
element.
(for method chaining if desired).
A helper method to make it easier to output attributes. If the is
null or an empty string, output nothing, else output the given XML attribute.
Writer to output to.
Attribute name to write.
Value for the attribute.
(for method chaining if desired).
A base class for those elements that can be used
to configure a unity container.
Create a new instance of .
Apply this element's configuration to the given .
Container to configure.
Return a unique key that can be used to manage this element in a collection.
A couple of useful extension methods on IDictionary
Get the value from a dictionary, or null if there is no value.
Key type of dictionary.
Value type of dictionary.
Dictionary to search.
Key to look up.
The value at the key or null if not in the dictionary.
A helper class used to map element tag names to a handler method
used to interpret that element.
Add method to enable dictionary initializer syntax
Process an unknown element according to the map entries.
Parent element that hit this unknown element.
Name of the unknown element.
XmlReader positioned at start of element.
true if processed, false if not.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
2
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
1
A helper class used to map element tag names to a handler method
used to interpret that element.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
2
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
1
A helper class that assists in deserializing parameter and property
elements. These elements both have a single "value" child element that
specify the value to inject for the property or parameter.
Create a new that wraps reading
values and storing them in the given .
Element that contains the value elements.
Gets a , or if none is present,
returns a default .
The .
The given , unless
is null, in which case returns
a .
Helper method used during deserialization to handle
attributes for the dependency and value tags.
attribute name.
attribute value.
true
Helper method used during deserialization to handle the default
value element tags.
The element name.
XML data to read.
True if deserialization succeeded, false if it failed.
Call this method at the end of deserialization of your element to
set your value element.
Serialize a object out to XML.
This method is aware of and implements the shorthand attributes
for dependency and value elements.
Writer to output XML to.
The to serialize.
If true, always output an element. If false, then
dependency and value elements will be serialized as attributes in the parent tag.
Configuration element representing a constructor configuration.
Base class for configuration elements that generate
object to configure a container.
Return the set of s that are needed
to configure the container according to this configuration element.
Container that is being configured.
Type that is being registered.
Type that is being mapped to.
Name this registration is under.
One or more objects that should be
applied to the container registration.
Get the standard tag name for an
taking into account currently loaded section extensions.
Element to get the name for.
The element name.
If the member element is not currently registered
with the section.
Each element must have a unique key, which is generated by the subclasses.
Element name to use to serialize this into XML.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Return the set of s that are needed
to configure the container according to this configuration element.
Container that is being configured.
Type that is being registered.
Type that is being mapped to.
Name this registration is under.
One or more objects that should be
applied to the container registration.
The parameters of the constructor to call.
Each element must have a unique key, which is generated by the subclasses.
Element name to use to serialize this into XML.
A collection of s as
loaded from configuration.
When overridden in a derived class, creates a new .
A new .
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for.
A configuration element class defining the set of registrations to be
put into a container.
Original configuration API kept for backwards compatibility.
Container to configure
Apply the configuration information in this element to the
given .
Container to configure.
Gets a value indicating whether an unknown element is encountered during deserialization.
true when an unknown element is encountered while deserializing; otherwise, false.
The name of the unknown subelement.
The being used for deserialization.
The element identified by is locked.
- or -
One or more of the element's attributes is locked.
- or -
is unrecognized, or the element has an unrecognized attribute.
- or -
The element has a Boolean attribute with an invalid value.
- or -
An attempt was made to deserialize a property more than once.
- or -
An attempt was made to deserialize a property that is not a valid member of the element.
- or -
The element cannot contain a CDATA or text element.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Name for this container configuration as given in the config file.
The type registrations in this container.
Any instances to register in the container.
Any extensions to add to the container.
Set of any extra configuration elements that were added by a
section extension.
This is not marked as a configuration property because we don't want
the actual property to show up as a nested element in the configuration.
Configuration element representing an extension to add to a container.
Add the extension specified in this element to the container.
Container to configure.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Type of the extension to add.
A collection of s.
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for.
A derived class that describes
a parameter that should be resolved through the container.
Create a new instance of .
Create a new instance of with
properties initialized from the contents of
.
Dictionary of name/value pairs to
initialize this object with.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Write the contents of this element to the given . This
method always outputs an explicit <dependency> tag, instead of providing
attributes to the parent method.
Writer to send XML content to.
Generate an object
that will be used to configure the container for a type registration.
Container that is being configured. Supplied in order
to let custom implementations retrieve services; do not configure the container
directly in this method.
Type of the
Name to use to when resolving. If empty, resolves the default.
Name of type this dependency should resolve to. This is optional;
without it the container will resolve the type of whatever
property or parameter this element is contained in.
Base class used to derive new elements that can occur
directly within a container element.
Initialize a new instance of .
When overridden in a derived class, this method will make configuration
calls into the given according to its contents.
The container to configure.
Unique key generated for use in the collection class.
A collection of s.
When overridden in a derived class, creates a new .
A new .
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for.
This class manages the set of extension elements
added by section elements.
Clear the current set of extension elements.
Register a new ContainerExtensionConfigurationElement with he section so it
can be read.
prefix if any.
tag name.
Type of element to register.
Register a new with the section
so it can be read.
prefix if any.
Tag name.
Type of element to register.
Register a new with the section
so it can be read.
prefix if any.
Tag name.
Type of element to register.
Retrieve the registered for the given
tag.
Tag to look up.
Type of element, or null if not registered.
Retrieve the ContainerExtensionConfigurationElement registered for the given
tag.
Tag to look up.
Type of element, or null if not registered.
Retrieve the ContainerExtensionConfigurationElement registered for the given
tag.
Tag to look up.
Type of element, or null if not registered.
Retrieve the correct tag to use when serializing the given
to XML.
Element to be serialized.
The tag for that element type.
if the element is of a type that
is not registered with the section already.
A polymorphic collection of s.
Causes the configuration system to throw an exception.
true if the unrecognized element was deserialized successfully; otherwise, false. The default is false.
The name of the unrecognized element.
An input stream that reads XML from the configuration file.
The element specified in is the <clear> element.
starts with the reserved prefix "config" or "lock".
When overridden in a derived class, creates a new .
A new .
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for.
Indexer that lets you access elements by their key.
Key to retrieve element with.
The element.
A configuration element that describes an instance to add to the container.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Add the instance defined by this element to the given container.
Container to configure.
Name to register instance under
Value for this instance
Type of the instance. If not given, defaults to string
Type name for the type converter to use to create the instance. If not
given, defaults to the default type converter for this instance type.
Key used to keep these instances unique in the config collection.
A collection of s.
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for.
An element that has a child Value property.
String that will be deserialized to provide the value.
A string describing where the value this element contains
is being used. For example, if setting a property Prop1,
this should return "property Prop1" (in english).
A configuration element that represents lifetime managers.
Create the described by
this element.
A instance.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Type of the lifetime manager.
Extra initialization information used by the type converter for this lifetime manager.
Type of to use to create the
lifetime manager.
A configuration element representing a method to call.
Construct a new instance of .
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Return the set of s that are needed
to configure the container according to this configuration element.
Container that is being configured.
Type that is being registered.
Type that is being mapped to.
Name this registration is under.
One or more objects that should be
applied to the container registration.
Name of the method to call.
Parameters to the method call.
Each element must have a unique key, which is generated by the subclasses.
Element name to use to serialize this into XML.
A configuration element representing the namespace
tags in the config file.
A collection of s in configuration.
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for
A configuration element that specifies that a value
is optional.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Generate an object
that will be used to configure the container for a type registration.
Container that is being configured. Supplied in order
to let custom implementations retrieve services; do not configure the container
directly in this method.
Type of the
Name used to resolve the dependency, leave out or blank to resolve default.
Type of dependency to resolve. If left out, resolved the type of
the containing parameter or property.
Configuration element representing a parameter passed to a constructor
or a method.
Construct a new instance of .
Returns the required needed
to configure the container so that the correct value is injected.
Container being configured.
Type of the parameter.
The value to use to configure the container.
Does the information in this match
up with the given ?
Information about the parameter.
True if this is a match, false if not.
Reads XML from the configuration file.
The that reads from the configuration file.
true to serialize only the collection key properties; otherwise, false.
The element to read is locked.
- or -
An attribute of the current node is not recognized.
- or -
The lock status of the current node cannot be determined.
Gets a value indicating whether an unknown attribute is encountered during deserialization.
true when an unknown attribute is encountered while deserializing; otherwise, false.
The name of the unrecognized attribute.
The value of the unrecognized attribute.
Gets a value indicating whether an unknown element is encountered during deserialization.
true when an unknown element is encountered while deserializing; otherwise, false.
The name of the unknown subelement.
The being used for deserialization.
The element identified by is locked.
- or -
One or more of the element's attributes is locked.
- or -
is unrecognized, or the element has an unrecognized attribute.
- or -
The element has a Boolean attribute with an invalid value.
- or -
An attempt was made to deserialize a property more than once.
- or -
An attempt was made to deserialize a property that is not a valid member of the element.
- or -
The element cannot contain a CDATA or text element.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Name of this parameter.
Type of this parameter.
This is only needed in order to disambiguate method overloads. Normally
the parameter name is sufficient.
Element that describes the value for this property.
This is NOT marked as a ConfigurationProperty because this
child element is polymorphic, and the element tag determines
the type. Standard configuration properties only let you do
this if it's a collection, but we only want one value. Thus
the separate property. The element is deserialized in
.
A string describing where the value this element contains
is being used. For example, if setting a property Prop1,
this should return "property Prop1" (in english).
A collection of objects.
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for.
A collection of objects.
Causes the configuration system to throw an exception.
true if the unrecognized element was deserialized successfully; otherwise, false. The default is false.
The name of the unrecognized element.
An input stream that reads XML from the configuration file.
The element specified in is the <clear> element.
starts with the reserved prefix "config" or "lock".
When overridden in a derived class, creates a new .
A new .
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for.
String that will be deserialized to provide the value.
A string describing where the value this element contains
is being used. For example, if setting a property Prop1,
this should return "property Prop1" (in english).
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
Looks up a localized string similar to An abstract ContainerConfiguringElement cannot be created. Please specify a concrete type..
Looks up a localized string similar to An abstract ExtensionConfigurationElement object cannot be created. Please specify a concrete type..
Looks up a localized string similar to An abstract InjectionMemberElement object cannot be created. Please specify a concrete type..
Looks up a localized string similar to An abstract ParameterValueElement object cannot be created. Please specify a concrete type..
Looks up a localized string similar to The type name or alias {0} could not be resolved. Please check your configuration file and verify this type name..
Looks up a localized string similar to The dependency element for generic parameter {0} must not have an explicit type name but has '{1}'..
Looks up a localized string similar to The optional dependency element for generic parameter {0} must not have an explicit type name but has '{1}'..
Looks up a localized string similar to {0} {1}.
Looks up a localized string similar to The injection configuration for {0} has multiple values..
Looks up a localized string similar to The configuration element type {0} has not been registered with the section..
Looks up a localized string similar to The injection configuration for {0} is specified through both attributes and child value elements..
Looks up a localized string similar to Could not load section extension type {0}..
Looks up a localized string similar to The extension type {0} does not derive from SectionExtension..
Looks up a localized string similar to The extension element type {0} that is being added does not derive from ContainerConfiguringElement, InjectionMemberElement, or ParameterValueElement. An extension element must derive from one of these types..
Looks up a localized string similar to No valid attributes were found to construct the value for the {0}. Please check the configuration file..
Looks up a localized string similar to Configuration is incorrect, the type {0} does not have a constructor that takes parameters named {1}..
Looks up a localized string similar to Configuration is incorrect, the type {0} does not have a method named {1} that takes parameters named {2}..
Looks up a localized string similar to The container named "{0}" is not defined in this configuration section..
Looks up a localized string similar to The type {0} does not have a property named {1}..
Looks up a localized string similar to The configuration is set to inject an array, but the type {0} is not an array type..
Looks up a localized string similar to parameter.
Looks up a localized string similar to property.
Looks up a localized string similar to The attribute {0} must be present and non-empty..
Looks up a localized string similar to The value element for {1} was specified for the generic array type {0}. Value elements are not allowed for generic array types..
Looks up a localized string similar to The value element for {1} was specified for the generic parameter type {0}. Value elements are not allowed for generic parameter types..
Looks up a localized string similar to The value element for {1} was specified for the generic type {0}. Value elements are not allowed for generic types..
A class representing a property configuration element.
Construct a new instance of
Reads XML from the configuration file.
The that reads from the configuration file.
true to serialize only the collection key properties; otherwise, false.
The element to read is locked.
- or -
An attribute of the current node is not recognized.
- or -
The lock status of the current node cannot be determined.
Gets a value indicating whether an unknown attribute is encountered during deserialization.
true when an unknown attribute is encountered while deserializing; otherwise, false.
The name of the unrecognized attribute.
The value of the unrecognized attribute.
Gets a value indicating whether an unknown element is encountered during deserialization.
true when an unknown element is encountered while deserializing; otherwise, false.
The name of the unknown subelement.
The being used for deserialization.
The element identified by is locked.
- or -
One or more of the element's attributes is locked.
- or -
is unrecognized, or the element has an unrecognized attribute.
- or -
The element has a Boolean attribute with an invalid value.
- or -
An attempt was made to deserialize a property more than once.
- or -
An attempt was made to deserialize a property that is not a valid member of the element.
- or -
The element cannot contain a CDATA or text element.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Return the set of s that are needed
to configure the container according to this configuration element.
Container that is being configured.
Type that is being registered.
Type that is being mapped to.
Name this registration is under.
One or more objects that should be
applied to the container registration.
Name of the property that will be set.
Each element must have a unique key, which is generated by the subclasses.
String that will be deserialized to provide the value.
A string describing where the value this element contains
is being used. For example, if setting a property Prop1,
this should return "property Prop1" (in english).
Element name to use to serialize this into XML.
A configuration element representing a single container type registration.
Apply the registrations from this element to the given container.
Container to configure.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
The type that is registered.
Name registered under.
Type that is mapped to.
Lifetime manager to register for this registration.
Any injection members (constructor, properties, etc.) that are specified for
this registration.
A collection of s.
Causes the configuration system to throw an exception.
true if the unrecognized element was deserialized successfully; otherwise, false. The default is false.
The name of the unrecognized element.
An input stream that reads XML from the configuration file.
The element specified in is the <clear> element.
starts with the reserved prefix "config" or "lock".
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for.
Base class for Unity configuration section extensions.
Derived classes are used to add custom elements and aliases
into the configuration section being loaded.
Add the extensions to the section via the context.
Context object that can be used to add elements and aliases.
An object that gives the ability to add
elements and aliases to a configuration section.
Add a new alias to the configuration section. This is useful
for those extensions that add commonly used types to configuration
so users don't have to alias them repeatedly.
The alias to use.
Type the alias maps to.
Add a new alias to the configuration section. This is useful
for those extensions that add commonly used types to configuration
so users don't have to alias them repeatedly.
Type the alias maps to.
The alias to use
Add a new element to the configuration section schema.
Tag name in the XML.
Type the tag maps to.
Add a new element to the configuration section schema.
Type the tag maps to.
Tag name in the XML.
A configuration element used to specify which extensions to
add to the configuration schema.
Reads XML from the configuration file.
The that reads from the configuration file.
true to serialize only the collection key properties; otherwise, false.
The element to read is locked.
- or -
An attribute of the current node is not recognized.
- or -
The lock status of the current node cannot be determined.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Type of the section extender object that will provide new elements to the schema.
Optional prefix that will be added to the element names added by this
section extender. If left out, no prefix will be added.
The extension object represented by this element.
A collection of s.
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for.
Type that manage access to a set of type aliases and implements
the logic for converting aliases to their actual types.
Set the set of aliases to use for resolution.
Configuration section containing the various
type aliases, namespaces and assemblies.
Resolves a type alias or type FullName to a concrete type.
Type alias or type FullName
Type object or null if resolve fails.
Thrown if alias lookup fails.
Resolves a type alias or type FullName to a concrete type.
Alias or name to resolve.
if true and the alias does not
resolve, throw an , otherwise
return null on failure.
The type object or null if resolve fails and
is false.
Resolve a type alias or type full name to a concrete type.
If is null or empty, return the
given instead.
Type alias or full name to resolve.
Value to return if typeName is null or empty.
The concrete .
Thrown if alias lookup fails.
Resolve a type alias or type full name to a concrete type.
If is null or empty, return the
given instead.
Type alias or full name to resolve.
Value to return if typeName is null or empty.
if true and the alias does not
resolve, throw an , otherwise
return null on failure.
The concrete .
Thrown if alias lookup fails and
is true.
A helper class that implements the actual logic for resolving a shorthand
type name (alias or raw type name) into an actual type object.
Construct a new that uses the given
sequence of alias, type name pairs to resolve types.
Type aliases from the configuration file.
Assembly names to search.
Namespaces to search.
Resolves a type alias or type FullName to a concrete type.
Alias or name to resolve.
if true and the alias does not
resolve, throw an , otherwise
return null on failure.
The type object or null if resolve fails and
is false.
Resolve a type alias or type full name to a concrete type.
If is null or empty, return the
given instead.
Type alias or full name to resolve.
Value to return if typeName is null or empty.
if true and the alias does not
resolve, throw an , otherwise
return null on failure.
If is null or an empty string,
then return .
Otherwise, return the resolved type object. If the resolution fails
and is false, then return null.
A configuration section describing configuration for an .
The name of the section where unity configuration is expected to be found.
XML Namespace string used for IntelliSense in this section.
Apply the configuration in the default container element to the given container.
Container to configure.
The passed in .
Apply the configuration in the default container element to the given container.
Container to configure.
Name of the container element to use to configure the container.
The passed in .
Reads XML from the configuration file.
The object, which reads from the configuration file.
found no elements in the configuration file.
Gets a value indicating whether an unknown element is encountered during deserialization.
true when an unknown element is encountered while deserializing; otherwise, false.
The name of the unknown subelement.
The being used for deserialization.
The element identified by is locked.
- or -
One or more of the element's attributes is locked.
- or -
is unrecognized, or the element has an unrecognized attribute.
- or -
The element has a Boolean attribute with an invalid value.
- or -
An attempt was made to deserialize a property more than once.
- or -
An attempt was made to deserialize a property that is not a valid member of the element.
- or -
The element cannot contain a CDATA or text element.
Creates an XML string containing an unmerged view of the object as a single section to write to a file.
An XML string containing an unmerged view of the object.
The instance to use as the parent when performing the un-merge.
The name of the section to create.
The instance to use when writing to a string.
The current that is being deserialized
or being configured from.
Storage for XML namespace. The namespace isn't used or validated by config, but
it is useful for Visual Studio XML IntelliSense to kick in.
The set of containers defined in this configuration section.
The set of type aliases defined in this configuration file.
Any schema extensions that are added.
Any namespaces added to the type search list.
Any assemblies added to the type search list.
Add a new alias to the configuration section. This is useful
for those extensions that add commonly used types to configuration
so users don't have to alias them repeatedly.
The alias to use.
Type the alias maps to.
Add a new element to the configuration section schema.
Tag name in the XML.
Type the tag maps to.
Collection element for s.
Plug point to get objects out of the collection.
Index in the collection to retrieve the item from.
Item at that index or null if not present.
Plug point to get objects out of the collection.
Key to look up the object by.
Item with that key or null if not present.
Gets the element key for a specified configuration element when overridden in a derived class.
An that acts as the key for the specified .
The to return the key for.
Retrieve a stored by name.
Name to look up.
The stored container or null if not in the collection.
Return the default container in the collection. The default is the one without a name.
Extensions to to simplify
loading configuration into a container.
Apply configuration from the given section and named container
into the given container.
Unity container to configure.
Configuration section with config information.
Named container.
.
Apply configuration from the default section (named "unity" pulled out of
ConfigurationManager) and the named container.
Unity container to configure.
Named container element in configuration.
.
Apply configuration from the default section and unnamed container element.
Container to configure.
.
Apply configuration from the default container in the given section.
Unity container to configure.
Configuration section.
.
Element that describes a constant value that will be
injected into the container.
Construct a new object.
Construct a new object,
initializing properties from the contents of
.
Name/value pairs which
contain the values to initialize properties to.
Write the contents of this element to the given .
The caller of this method has already written the start element tag before
calling this method, so deriving classes only need to write the element content, not
the start or end tags.
Writer to send XML content to.
Write the contents of this element to the given . This
method always outputs an explicit <dependency> tag, instead of providing
attributes to the parent method.
Writer to send XML content to.
Generate an object
that will be used to configure the container for a type registration.
Container that is being configured. Supplied in order
to let custom implementations retrieve services; do not configure the container
directly in this method.
Type of the parameter to get the value for.
The required object.
Value for this element