diff --git a/Libraries/Castle.Core.dll b/Libraries/Castle.Core.dll deleted file mode 100644 index 34c155ab4..000000000 Binary files a/Libraries/Castle.Core.dll and /dev/null differ diff --git a/Libraries/Castle.Core.xml b/Libraries/Castle.Core.xml deleted file mode 100644 index d3d950979..000000000 --- a/Libraries/Castle.Core.xml +++ /dev/null @@ -1,4937 +0,0 @@ - - - - Castle.Core - - - - - Assignes a specific dictionary key. - - - - - Defines the contract for customizing dictionary access. - - - - - Determines relative order to apply related behaviors. - - - - - Determines relative order to apply related behaviors. - - - - - Defines the contract for updating dictionary values. - - - - - Sets the stored dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if the property should be stored. - - - - Abstract adapter for the support - needed by the - - - - - Adds an element with the provided key and value to the object. - - The to use as the key of the element to add. - The to use as the value of the element to add. - An element with the same key already exists in the object. - key is null. - The is read-only.-or- The has a fixed size. - - - - Removes all elements from the object. - - The object is read-only. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - key is null. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - The type of the source cannot be cast automatically to the type of the destination array. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - Gets or sets the with the specified key. - - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Abstract implementation of . - - - - - Conract for traversing a . - - - - - Identifies a property should be represented as a nested component. - - - - - Defines the contract for building typed dictionary keys. - - - - - Builds the specified key. - - The dictionary adapter. - The current key. - The property. - The updated key - - - - Defines the contract for retrieving dictionary values. - - - - - Gets the effective dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if return only existing. - The effective property value. - - - - Applies no prefix. - - - - - Gets or sets the prefix. - - The prefix. - - - - Identifies the dictionary adapter types. - - - - - Identifies an interface or property to be pre-feteched. - - - - - Instructs fetching to occur. - - - - - Instructs fetching according to - - - - - - Gets whether or not fetching should occur. - - - - - Assigns a property to a group. - - - - - Constructs a group assignment. - - The group name. - - - - Constructs a group assignment. - - The group name. - - - - Gets the group the property is assigned to. - - - - - Assigns a specific dictionary key. - - - - - Initializes a new instance of the class. - - The key. - - - - Initializes a new instance of the class. - - The compound key. - - - - Assigns a prefix to the keyed properties of an interface. - - - - - Initializes a default instance of the class. - - - - - Initializes a new instance of the class. - - The prefix for the keyed properties of the interface. - - - - Gets the prefix key added to the properties of the interface. - - - - - Substitutes part of key with another string. - - - - - Initializes a new instance of the class. - - The old value. - The new value. - - - - Requests support for multi-level editing. - - - - - Contract for dictionary initialization. - - - - - Performs any initialization of the - - The dictionary adapter. - The dictionary behaviors. - - - - Generates a new GUID on demand. - - - - - Support for on-demand value resolution. - - - - - Suppress property change notifications. - - - - - Provides simple string formatting from existing properties. - - - - - Gets the string format. - - - - - Gets the format properties. - - - - - Identifies a property should be represented as a delimited string value. - - - - - Gets the separator. - - - - - Converts all properties to strings. - - - - - Gets or sets the format. - - The format. - - - - Suppress property change notifications. - - - - - Contract for property descriptor initialization. - - - - - Performs any initialization of the - - The property descriptor. - The property behaviors. - - - - Assigns a prefix to the keyed properties using the interface name. - - - - - Manages conversion between property values. - - - - - Initializes a new instance of the class. - - The converter. - - - - Gets the effective dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if return only existing. - The effective property value. - - - - - - - - - Contract for creating additional Dictionary adapters. - - - - - Contract for manipulating the Dictionary adapter. - - - - - Contract for editing the Dictionary adapter. - - - - - Contract for managing Dictionary adapter notifications. - - - - - Contract for validating Dictionary adapter. - - - - - Uses Reflection.Emit to expose the properties of a dictionary - through a dynamic implementation of a typed interface. - - - - - Defines the contract for building typed dictionary adapters. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - The property descriptor. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the namedValues. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the namedValues. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the xpath navigable. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the xpath navigable. - - The type represented by T must be an interface with properties. - - - - - Gets the associated with the type. - - The typed interface. - The adapter meta-data. - - - - Gets the associated with the type. - - The typed interface. - The property descriptor. - The adapter meta-data. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Describes a dictionary property. - - - - - Initializes an empty class. - - - - - Initializes a new instance of the class. - - The property. - The property behaviors. - - - - Gets the key. - - The dictionary adapter. - The key. - The descriptor. - - - - - Adds the key builder. - - The builder. - - - - Adds the key builders. - - The builders. - - - - Copies the key builders to the other - - - - - - - Copies the selected key builders to the other - - - - - - - - Gets the property value. - - The dictionary adapter. - The key. - The stored value. - The descriptor. - true if return only existing. - - - - - Adds the dictionary getter. - - The getter. - - - - Adds the dictionary getters. - - The getters. - - - - Copies the property getters to the other - - - - - - - Copies the selected property getters to the other - - - - - - - - Sets the property value. - - The dictionary adapter. - The key. - The value. - The descriptor. - - - - - Adds the dictionary setter. - - The setter. - - - - Adds the dictionary setters. - - The setters. - - - - Copies the property setters to the other - - - - - - - Copies the selected property setters to the other - - - - - - - - Adds the behaviors. - - - - - - - Adds the behaviors. - - - - - - - Copies the behaviors to the other - - - - - - - Copies the behaviors to the other - - - - - - - - - - - - - Gets the property name. - - - - - Gets the property type. - - - - - Gets the property. - - The property. - - - - Returns true if the property is dynamic. - - - - - Gets additional state. - - - - - Determines if property should be fetched. - - - - - Determines if notifications should occur. - - - - - Gets the property behaviors. - - - - - Gets the type converter. - - The type converter. - - - - Gets the key builders. - - The key builders. - - - - Gets the setter. - - The setter. - - - - Gets the getter. - - The getter. - - - - Adds the dictionary initializers. - - The initializers. - - - - Adds the dictionary initializers. - - The initializers. - - - - Copies the initializers to the other - - - - - - - Copies the filtered initializers to the other - - - - - - - - Adds the dictionary meta-data initializers. - - The meta-data initializers. - - - - Adds the dictionary meta-data initializers. - - The meta-data initializers. - - - - Copies the meta-initializers to the other - - - - - - - Copies the filtered meta-initializers to the other - - - - - - - - Gets the initializers. - - The initializers. - - - - Gets the meta-data initializers. - - The meta-data initializers. - - - - Contract for dictionary meta-data initialization. - - - - - Performs any initialization of the dictionary adapter meta-data. - - The dictionary adapter factory. - The dictionary adapter meta. - - - - - Contract for dictionary validation. - - - - - Determines if is valid. - - The dictionary adapter. - true if valid. - - - - Validates the . - - The dictionary adapter. - The error summary information. - - - - Validates the for a property. - - The dictionary adapter. - The property to validate. - The property summary information. - - - - Invalidates any results cached by the validator. - - The dictionary adapter. - - - - - - - - - Initializes a new instance of the class. - - The name values. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Adapts the specified name values. - - The name values. - - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets or sets the with the specified key. - - - - - - Helper class for retrieving attributes. - - - - - Gets the type attribute. - - The type. - The type attribute. - - - - Gets the attribute. - - The member. - The member attribute. - - - - Gets the type attributes. - - The type. - The type attributes. - - - - Gets the attributes. - - The member. - The member attributes. - - - - Gets the type converter. - - The member. - - - - - Contract for typed dynamic value resolution. - - - - - - Contract for dynamic value resolution. - - - - - Encapsulates an invocation of a proxied method. - - - - - Overrides the value of an argument at the given with the - new provided. - - - This method accepts an , however the value provided must be compatible - with the type of the argument defined on the method, otherwise an exception will be thrown. - - The index of the argument to override. - The new value for the argument. - - - - Gets the value of the argument at the specified . - - The index. - The value of the argument at the specified . - - - - Returns the concrete instantiation of the , with any generic - parameters bound to real types. - - - The concrete instantiation of the , or the if - not a generic method. - - Can be slower than calling . - - - - Returns the concrete instantiation of , with any - generic parameters bound to real types. - - The concrete instantiation of , or - if not a generic method. - Can be slower than calling . - - - - Proceeds the call to the next interceptor in line, and ultimately to the target method. - - - Since interface proxies without a target don't have the target implementation to proceed to, - it is important, that the last interceptor does not call this method, otherwise a - will be thrown. - - - - - Gets the proxy object on which the intercepted method is invoked. - - Proxy object on which the intercepted method is invoked. - - - - Gets the object on which the invocation is performed. This is different from proxy object - because most of the time this will be the proxy target object. - - - The invocation target. - - - - Gets the type of the target object for the intercepted method. - - The type of the target object. - - - - Gets the arguments that the has been invoked with. - - The arguments the method was invoked with. - - - - Gets the generic arguments of the method. - - The generic arguments, or null if not a generic method. - - - - Gets the representing the method being invoked. - - The representing the method being invoked. - - - - For interface proxies, this will point to the on the target class. - - The method invocation target. - - - - Gets or sets the return value of the method. - - The return value of the method. - - - - Used during the target type inspection process. Implementors have a chance to customize the - proxy generation process. - - - - - Invoked by the generation process to determine if the specified method should be proxied. - - The type which declares the given method. - The method to inspect. - True if the given method should be proxied; false otherwise. - - - - Invoked by the generation process to notify that a member was not marked as virtual. - - The type which declares the non-virtual member. - The non-virtual member. - - This method gives an opportunity to inspect any non-proxyable member of a type that has - been requested to be proxied, and if appropriate - throw an exception to notify the caller. - - - - - Invoked by the generation process to notify that the whole process has completed. - - - - - Interface describing elements composing generated type - - - - - Checks if the method is public or protected. - - - - - - - Performs some basic screening and invokes the - to select methods. - - - - - - - - - Provides functionality for disassembling instances of attributes to CustomAttributeBuilder form, during the process of emiting new types by Dynamic Proxy. - - - - - Disassembles given attribute instance back to corresponding CustomAttributeBuilder. - - An instance of attribute to disassemble - corresponding 1 to 1 to given attribute instance, or null reference. - - Implementers should return that corresponds to given attribute instance 1 to 1, - that is after calling specified constructor with specified arguments, and setting specified properties and fields with values specified - we should be able to get an attribute instance identical to the one passed in . Implementer can return null - if it wishes to opt out of replicating the attribute. Notice however, that for some cases, like attributes passed explicitly by the user - it is illegal to return null, and doing so will result in exception. - - - - - Handles error during disassembly process - - Type of the attribute being disassembled - Exception thrown during the process - usually null, or (re)throws the exception - - - - Here we try to match a constructor argument to its value. - Since we can't get the values from the assembly, we use some heuristics to get it. - a/ we first try to match all the properties on the attributes by name (case insensitive) to the argument - b/ if we fail we try to match them by property type, with some smarts about convertions (i,e: can use Guid for string). - - - - - We have the following rules here. - Try to find a matching type, failing that, if the parameter is string, get the first property (under the assumption that - we can convert it. - - - - - Attributes can only accept simple types, so we return null for null, - if the value is passed as string we call to string (should help with converting), - otherwise, we use the value as is (enums, integer, etc). - - - - - Applied to the assemblies saved by in order to persist the cache data included in the persisted assembly. - - - - - Base class that exposes the common functionalities - to proxy generation. - - - - - Generates a parameters constructor that initializes the proxy - state with just to make it non-null. - - This constructor is important to allow proxies to be XML serializable - - - - - - It is safe to add mapping (no mapping for the interface exists) - - - - - - - - Generates the constructor for the class that extends - - - - - - - - - Default implementation of interface producing in-memory proxy assemblies. - - - - - Abstracts the implementation of proxy type construction. - - - - - Creates a proxy type for given , using provided. - - The class type to proxy. - The proxy generation options. - The generated proxy type. - Thrown when is a generic type definition. - Thrown when is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given , implementing , using provided. - - The class type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified class and interfaces. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given , implementing , using provided. - - The class type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified class and interfaces. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type that proxies calls to members on , implementing , using provided. - - The interface type to proxy. - Additional interface types to proxy. - Type implementing on which calls to the interface members should be intercepted. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface that 'proceeds' executions to the specified target. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given that delegates all calls to the provided interceptors. - - The interface type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface and additional interfaces that delegate all executions to the specified interceptors. - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given and that delegates all calls to the provided interceptors and allows interceptors to switch the actual target of invocation. - - The interface type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface(s) that delegate all executions to the specified interceptors - and uses an instance of the interface as their targets (i.e. ), rather than a class. All classes should then implement interface, - to allow interceptors to switch invocation target with instance of another type implementing called interface. - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Gets or sets the that this logs to. - - - - - Gets the associated with this builder. - - The module scope associated with this builder. - - - - Initializes a new instance of the class with new . - - - - - Initializes a new instance of the class. - - The module scope for generated proxy types. - - - - Registers custom disassembler to handle disassembly of specified type of attributes. - - Type of attributes to handle - Disassembler converting existing instances of Attributes to CustomAttributeBuilders - - When disassembling an attribute Dynamic Proxy will first check if an custom disassembler has been registered to handle attributes of that type, - and if none is found, it'll use the . - - - - - Attributes should be replicated if they are non-inheritable, - but there are some special cases where the attributes means - something to the CLR, where they should be skipped. - - - - - Initializes a new instance of the class. - - Target element. This is either target type or target method for invocation types. - The type of the proxy. This is base type for invocation types. - The interfaces. - The options. - - - - Initializes a new instance of the class. - - Type of the target. - The interfaces. - The options. - - - - - - - - s - Provides appropriate Ldc.X opcode for the type of primitive value to be loaded. - - - - - Provides appropriate Ldind.X opcode for - the type of primitive value to be loaded indirectly. - - - - - Emits a load opcode of the appropriate kind for a constant string or - primitive value. - - - - - - - Emits a load opcode of the appropriate kind for the constant default value of a - type, such as 0 for value types and null for reference types. - - - - - Emits a load indirect opcode of the appropriate type for a value or object reference. - Pops a pointer off the evaluation stack, dereferences it and loads - a value of the specified type. - - - - - - - Emits a store indirectopcode of the appropriate type for a value or object reference. - Pops a value of the specified type and a pointer off the evaluation stack, and - stores the value. - - - - - - - Summary description for PropertiesCollection. - - - - - Wraps a reference that is passed - ByRef and provides indirect load/store support. - - - - - Summary description for NewArrayExpression. - - - - - - - - - - Provides appropriate Stind.X opcode - for the type of primitive value to be stored indirectly. - - - - - Returns list of all unique interfaces implemented given types, including their base interfaces. - - - - - - - Initializes a new instance of the class. - - The name. - Type declaring the original event being overriten, or null. - - The add method. - The remove method. - The attributes. - - - - Represents the scope of uniquenes of names for types and their members - - - - - Gets a unique name based on - - Name suggested by the caller - Unique name based on . - - Implementers should provide name as closely resembling as possible. - Generally if no collision occurs it is suggested to return suggested name, otherwise append sequential suffix. - Implementers must return deterministic names, that is when is called twice - with the same suggested name, the same returned name should be provided each time. Non-deterministic return - values, like appending random suffices will break serialization of proxies. - - - - - Returns new, disposable naming scope. It is responsibilty of the caller to make sure that no naming collision - with enclosing scope, or other subscopes is possible. - - New naming scope. - - - - - - - - - Returns the methods implemented by a type. Use this instead of Type.GetMethods() to work around a CLR issue - where duplicate MethodInfos are returned by Type.GetMethods() after a token of a generic type's method was loaded. - - - - - Determines whether this assembly has internals visible to dynamic proxy. - - The assembly to inspect. - - - - Determines whether the specified method is internal. - - The method. - - true if the specified method is internal; otherwise, false. - - - - - Because we need to cache the types based on the mixed in mixins, we do the following here: - - Get all the mixin interfaces - - Sort them by full name - - Return them by position - - The idea is to have reproducable behavior for the case that mixins are registered in different orders. - This method is here because it is required - - - - - Summary description for ModuleScope. - - - - - The default file name used when the assembly is saved using . - - - - - The default assembly (simple) name used for the assemblies generated by a instance. - - - - - Initializes a new instance of the class; assemblies created by this instance will not be saved. - - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved. - - If set to true saves the generated module. - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved and what simple names are to be assigned to them. - - If set to true saves the generated module. - The simple name of the strong-named assembly generated by this . - The path and file name of the manifest module of the strong-named assembly generated by this . - The simple name of the weak-named assembly generated by this . - The path and file name of the manifest module of the weak-named assembly generated by this . - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved and what simple names are to be assigned to them. - - If set to true saves the generated module. - Naming scope used to provide unique names to generated types and their members (usually via sub-scopes). - The simple name of the strong-named assembly generated by this . - The path and file name of the manifest module of the strong-named assembly generated by this . - The simple name of the weak-named assembly generated by this . - The path and file name of the manifest module of the weak-named assembly generated by this . - - - - Returns a type from this scope's type cache, or null if the key cannot be found. - - The key to be looked up in the cache. - The type from this scope's type cache matching the key, or null if the key cannot be found - - - - Registers a type in this scope's type cache. - - The key to be associated with the type. - The type to be stored in the cache. - - - - Gets the key pair used to sign the strong-named assembly generated by this . - - - - - - Gets the specified module generated by this scope, creating a new one if none has yet been generated. - - If set to true, a strong-named module is returned; otherwise, a weak-named module is returned. - A strong-named or weak-named module generated by this scope, as specified by the parameter. - - - - Gets the strong-named module generated by this scope, creating a new one if none has yet been generated. - - A strong-named module generated by this scope. - - - - Gets the weak-named module generated by this scope, creating a new one if none has yet been generated. - - A weak-named module generated by this scope. - - - - Saves the generated assembly with the name and directory information given when this instance was created (or with - the and current directory if none was given). - - - - This method stores the generated assembly in the directory passed as part of the module information specified when this instance was - constructed (if any, else the current directory is used). If both a strong-named and a weak-named assembly - have been generated, it will throw an exception; in this case, use the overload. - - - If this was created without indicating that the assembly should be saved, this method does nothing. - - Both a strong-named and a weak-named assembly have been generated. - The path of the generated assembly file, or null if no file has been generated. - - - - Saves the specified generated assembly with the name and directory information given when this instance was created - (or with the and current directory if none was given). - - True if the generated assembly with a strong name should be saved (see ); - false if the generated assembly without a strong name should be saved (see . - - - This method stores the specified generated assembly in the directory passed as part of the module information specified when this instance was - constructed (if any, else the current directory is used). - - - If this was created without indicating that the assembly should be saved, this method does nothing. - - - No assembly has been generated that matches the parameter. - - The path of the generated assembly file, or null if no file has been generated. - - - - Loads the generated types from the given assembly into this 's cache. - - The assembly to load types from. This assembly must have been saved via or - , or it must have the manually applied. - - This method can be used to load previously generated and persisted proxy types from disk into this scope's type cache, eg. in order - to avoid the performance hit associated with proxy generation. - - - - - Users of this should use this lock when accessing the cache. - - - - - Gets the strong-named module generated by this scope, or if none has yet been generated. - - The strong-named module generated by this scope, or if none has yet been generated. - - - - Gets the file name of the strongly named module generated by this scope. - - The file name of the strongly named module generated by this scope. - - - - Gets the directory where the strongly named module generated by this scope will be saved, or if the current directory - is used. - - The directory where the strongly named module generated by this scope will be saved when is called - (if this scope was created to save modules). - - - - Gets the weak-named module generated by this scope, or if none has yet been generated. - - The weak-named module generated by this scope, or if none has yet been generated. - - - - Gets the file name of the weakly named module generated by this scope. - - The file name of the weakly named module generated by this scope. - - - - Gets the directory where the weakly named module generated by this scope will be saved, or if the current directory - is used. - - The directory where the weakly named module generated by this scope will be saved when is called - (if this scope was created to save modules). - - - - ProxyBuilder that persists the generated type. - - - The saved assembly contains just the last generated type. - - - - - Initializes a new instance of the class. - - - - - Saves the generated assembly to a physical file. Note that this renders the unusable. - - The path of the generated assembly file, or null if no assembly has been generated. - This method does not support saving multiple files. If both a signed and an unsigned module have been generated, use the - respective methods of the . - - - - Initializes a new instance of the class. - - The hook. - - - - Initializes a new instance of the class. - - - - - Provides proxy objects for classes and interfaces. - - - - - Initializes a new instance of the class. - - Proxy types builder. - - - - Initializes a new instance of the class. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - Object proxying calls to members of on object. - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no parameterless constructor exists on type . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no parameterless constructor exists on type . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates the proxy type for class proxy with given class, implementing given and using provided . - - The base class for proxy type. - The interfaces that proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy with target for given interface, implementing given on given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - Actual type that the proxy type will encompass. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy with target interface for given interface, implementing given on given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy without target for given interface, implementing given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Gets or sets the that this log to. - - - - - Gets the proxy builder instance used to generate proxy types. - - The proxy builder. - - - - - - - - - - - - - - - For interface proxies, this will point to the - on the target class - - - - - Handles the deserialization of proxies. - - - - - Resets the used for deserialization to a new scope. - - This is useful for test cases. - - - - Resets the used for deserialization to a given . - - The scope to be used for deserialization. - By default, the deserialization process uses a different scope than the rest of the application, which can lead to multiple proxies - being generated for the same type. By explicitly setting the deserialization scope to the application's scope, this can be avoided. - - - - Gets the used for deserialization. - - As has no way of automatically determining the scope used by the application (and the application - might use more than one scope at the same time), uses a dedicated scope instance for deserializing proxy - types. This instance can be reset and set to a specific value via and . - - - - Holds objects representing methods of class. - - - - - Holds objects representing methods of class. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Provides an extension point that allows proxies to choose specific interceptors on - a per method basis. - - - - - Selects the interceptors that should intercept calls to the given . - - The type declaring the method to intercept. - The method that will be intercepted. - All interceptors registered with the proxy. - An array of interceptors to invoke upon calling the . - - This method is called only once per proxy instance, upon the first call to the - . Either an empty array or null are valid return values to indicate - that no interceptor should intercept calls to the method. Although it is not advised, it is - legal to return other implementations than these provided in - . - - - - - Creates a new lock. - - - - - - This interface should be implemented by classes - that are available in a bigger context, exposing - the container to different areas in the same application. - - For example, in Web application, the (global) HttpApplication - subclasses should implement this interface to expose - the configured container - - - - - - Exposes means to change target objects of proxies and invocations - - - - - Changes the target object () of current . - - The new value of target of invocation. - - Although the method takes the actual instance must be of type assignable to , otherwise an will be thrown. - Also while it's technically legal to pass null reference (Nothing in Visual Basic) as , for obvious reasons Dynamic Proxy will not be able to call the intercepted method on such target. - In this case last interceptor in the pipeline mustn't call or a will be throws. - Also while it's technically legal to pass proxy itself as , this would create stack overflow. - In this case last interceptor in the pipeline mustn't call or a will be throws. - - Thrown when is not assignable to the proxied type. - - - - Permanently changes the target object of the proxy. This does not affect target of the current invocation. - - The new value of target of the proxy. - - Although the method takes the actual instance must be of type assignable to proxy's target type, otherwise an will be thrown. - Also while it's technically legal to pass null reference (Nothing in Visual Basic) as , for obvious reasons Dynamic Proxy will not be able to call the intercepted method on such target. - In this case last interceptor in the pipeline mustn't call or a will be throws. - Also while it's technically legal to pass proxy itself as , this would create stack overflow. - In this case last interceptor in the pipeline mustn't call or a will be throws. - - Thrown when is not assignable to the proxied type. - - - - New interface that is going to be used by DynamicProxy 2 - - - - - Get the proxy target (note that null is a valid target!) - - - - - - Gets the interceptors for the proxy - - - - - - Defines that the implementation wants a - in order to - access other components. The creator must be aware - that the component might (or might not) implement - the interface. - - - Used by Castle Project components to, for example, - gather logging factories - - - - - Increments IServiceProvider with a generic service resolution operation. - - - - - Provides a factory that can produce either or - classes. - - - - - Manages the instantiation of s. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Gets the configuration file. - - i.e. log4net.config - - - - - Used to create the TraceLogger implementation of ILogger interface. See . - - - - - Gets the configuration file. - - i.e. log4net.config - - - - - Interface for Context Properties implementations - - - - This interface defines a basic property get set accessor. - - - Based on the ContextPropertiesBase of log4net, by Nicko Cadell. - - - - - - Gets or sets the value of a property - - - The value for the property with the specified key - - - - Gets or sets the value of a property - - - - - - NullLogFactory used when logging is turned off. - - - - - Creates an instance of ILogger with the specified name. - - Name. - - - - - Creates an instance of ILogger with the specified name and LoggerLevel. - - Name. - Level. - - - - - Creates outputing - to files. The name of the file is derived from the log name - plus the 'log' extension. - - - - - Provides an interface that supports and - allows the storage and retrieval of Contexts. These are supported in - both log4net and NLog. - - - - - Manages logging. - - - This is a facade for the different logging subsystems. - It offers a simplified interface that follows IOC patterns - and a simplified priority/level/severity abstraction. - - - - - Logs a debug message. - - The message to log - - - - Logs a debug message. - - The exception to log - The message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The message to log - - - - Logs an info message. - - The exception to log - The message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The message to log - - - - Logs a warn message. - - The exception to log - The message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The message to log - - - - Logs an error message. - - The exception to log - The message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The message to log - - - - Logs a fatal message. - - The exception to log - The message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal error message. - - The Message - - - - Logs a fatal error message. - - The Message - The Exception - - - - Logs a fatal error message. - - Message format - Array of objects to write using format - - - - Create a new child logger. - The name of the child logger is [current-loggers-name].[passed-in-name] - - The Subname of this logger. - The New ILogger instance. - If the name has an empty element name. - - - - Determines if messages of priority "debug" will be logged. - - True if "debug" messages will be logged. - - - - Determines if messages of priority "info" will be logged. - - True if "info" messages will be logged. - - - - Determines if messages of priority "warn" will be logged. - - True if "warn" messages will be logged. - - - - Determines if messages of priority "error" will be logged. - - True if "error" messages will be logged. - - - - Determines if messages of priority "fatal" will be logged. - - True if "fatal" messages will be logged. - - - - Determines if messages of priority "fatalError" will be logged. - - True if "fatalError" messages will be logged. - - - - Exposes the Global Context of the extended logger. - - - - - Exposes the Thread Context of the extended logger. - - - - - Exposes the Thread Stack of the extended logger. - - - - - Supporting Logger levels. - - - - - Logging will be off - - - - - Fatal logging level - - - - - Error logging level - - - - - Warn logging level - - - - - Info logging level - - - - - Debug logging level - - - - - The Logger sending everything to the standard output streams. - This is mainly for the cases when you have a utility that - does not have a logger to supply. - - - - - The Level Filtered Logger class. This is a base clase which - provides a LogLevel attribute and reroutes all functions into - one Log method. - - - - - Creates a new LevelFilteredLogger. - - - - - Keep the instance alive in a remoting scenario - - - - - - Logs a debug message. - - The message to log - - - - Logs a debug message. - - The exception to log - The message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - Message format - Array of objects to write using format - - - - Logs an info message. - - The message to log - - - - Logs an info message. - - The exception to log - The message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - Message format - Array of objects to write using format - - - - Logs a warn message. - - The message to log - - - - Logs a warn message. - - The exception to log - The message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - Message format - Array of objects to write using format - - - - Logs an error message. - - The message to log - - - - Logs an error message. - - The exception to log - The message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - Message format - Array of objects to write using format - - - - Logs a fatal message. - - The message to log - - - - Logs a fatal message. - - The exception to log - The message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - Message format - Array of objects to write using format - - - - Logs a fatal error message. - - The Message - - - - Logs a fatal error message. - - The Message - The Exception - - - - Logs a fatal error message. - - Message format - Array of objects to write using format - - - - Implementors output the log content by implementing this method only. - Note that exception can be null - - - - - - - - - The LoggerLevel that this logger - will be using. Defaults to LoggerLevel.Off - - - - - The name that this logger will be using. - Defaults to String.Empty - - - - - Determines if messages of priority "debug" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "info" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "warn" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "error" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "fatal" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "fatal" will be logged. - - true if log level flags include the bit - - - - Creates a new ConsoleLogger with the Level - set to LoggerLevel.Debug and the Name - set to String.Empty. - - - - - Creates a new ConsoleLogger with the Name - set to String.Empty. - - The logs Level. - - - - Creates a new ConsoleLogger with the Level - set to LoggerLevel.Debug. - - The logs Name. - - - - Creates a new ConsoleLogger. - - The logs Name. - The logs Level. - - - - A Common method to log. - - The level of logging - The name of the logger - The Message - The Exception - - - - Returns a new ConsoleLogger with the name - added after this loggers name, with a dot in between. - - The added hierarchical name. - A new ConsoleLogger. - - - - The Logger using standart Diagnostics namespace. - - - - - Creates a logger based on . - - - - - - Creates a logger based on . - - - - - - - Creates a logger based on . - - - - - - - - The Null Logger class. This is useful for implementations where you need - to provide a logger to a utility class, but do not want any output from it. - It also helps when you have a utility that does not have a logger to supply. - - - - - Creates a new NullLogger. - - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - Returns this NullLogger. - - Ignored - This ILogger instance. - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - Returns empty context properties. - - - - - Returns empty context properties. - - - - - Returns empty context stacks. - - - - - The Stream Logger class. This class can stream log information - to any stream, it is suitable for storing a log file to disk, - or to a MemoryStream for testing your components. - - - This logger is not thread safe. - - - - - Creates a new StreamLogger with default encoding - and buffer size. Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - - - Creates a new StreamLogger with default buffer size. - Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - The encoding that will be used for this stream. - - - - - - Creates a new StreamLogger. - Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - The encoding that will be used for this stream. - - - - The buffer size that will be used for this stream. - - - - - - Creates a new StreamLogger with - Debug as default Level. - - The name of the log. - The StreamWriter the log will write to. - - - - The TraceLogger sends all logging to the System.Diagnostics.TraceSource - built into the .net framework. - - - Logging can be configured in the system.diagnostics configuration - section. - - If logger doesn't find a source name with a full match it will - use source names which match the namespace partially. For example you can - configure from all castle components by adding a source name with the - name "Castle". - - If no portion of the namespace matches the source named "Default" will - be used. - - - - - Build a new trace logger based on the named TraceSource - - The name used to locate the best TraceSource. In most cases comes from the using type's fullname. - - - - Build a new trace logger based on the named TraceSource - - The name used to locate the best TraceSource. In most cases comes from the using type's fullname. - The default logging level at which this source should write messages. In almost all cases this - default value will be overridden in the config file. - - - - Create a new child logger. - The name of the child logger is [current-loggers-name].[passed-in-name] - - The Subname of this logger. - The New ILogger instance. - - - - The WebLogger sends everything to the HttpContext.Trace - - - Trace must be enabled on the Asp.Net configuration file (web.config or machine.config) - - - - - Creates a new WebLogger with the priority set to DEBUG. - - - - - Creates a new WebLogger. - - The Log level typecode. - - - - Creates a new WebLogger. - - The Log name. - - - - Creates a new WebLogger. - - The Log name. - The Log level typecode. - - - - A Common method to log. - - The level of logging - The Log name. - The Message - The Exception - - - - Just returns this logger (WebLogger is not hierarchical). - - Ignored - This ILogger instance. - - - - Tries to get the current http context's trace context. - - The current http context's trace context or null if none is - available - - - - This is an abstract implementation - that deals with methods that can be abstracted away - from underlying implementations. - - - AbstractConfiguration makes easier to implementers - to create a new version of - - - - - is a interface encapsulating a configuration node - used to retrieve configuration values. - - - - - Gets the value of the node and converts it - into specified . - - The - - The Default value returned if the convertion fails. - - The Value converted into the specified type. - - - - Gets the name of the node. - - - The Name of the node. - - - - - Gets the value of the node. - - - The Value of the node. - - - - - Gets an of - elements containing all node children. - - The Collection of child nodes. - - - - Gets an of the configuration attributes. - - - - - Gets the value of the node and converts it - into specified . - - The - - The Default value returned if the convertion fails. - - The Value converted into the specified type. - - - - Gets the name of the . - - - The Name of the . - - - - - Gets the value of . - - - The Value of the . - - - - - Gets all child nodes. - - The of child nodes. - - - - Gets node attributes. - - - All attributes of the node. - - - - - A collection of objects. - - - - - Creates a new instance of ConfigurationCollection. - - - - - Creates a new instance of ConfigurationCollection. - - - - - Summary description for MutableConfiguration. - - - - - Initializes a new instance of the class. - - The name. - - - - Gets the value of . - - - The Value of the . - - - - - Pendent - - - - - Deserializes the specified node into an abstract representation of configuration. - - The node. - - - - - If a config value is an empty string we return null, this is to keep - backward compability with old code - - - - - General purpose class to represent a standard pair of values. - - Type of the first value - Type of the second value - - - - Constructs a pair with its values - - - - - - - List of utility methods related to dynamic proxy operations - - - - - Determines whether the specified type is a proxy generated by - DynamicProxy (1 or 2). - - The type. - - true if it is a proxy; otherwise, false. - - - - - Pendent - - - - - Initializes a new instance of the class. - - The target. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - - is null. - - - - Adds an element with the provided key and value to the object. - - The to use as the key of the element to add. - The to use as the value of the element to add. - - is null. - An element with the same key already exists in the object. - The is read-only.-or- The has a fixed size. - - - - Removes all elements from the object. - - The object is read-only. - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - - is null. - The object is read-only.-or- The has a fixed size. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in at which copying begins. - - is null. - - is less than zero. - - 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 . - The type of the source cannot be cast automatically to the type of the destination . - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets or sets the with the specified key. - - - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Represents a 'streamable' resource. Can - be a file, a resource in an assembly. - - - - - Returns a reader for the stream - - - It's up to the caller to dispose the reader. - - - - - - Returns a reader for the stream - - - It's up to the caller to dispose the reader. - - - - - - - Returns an instance of - created according to the relativePath - using itself as the root. - - - - - - - - - - Only valid for resources that - can be obtained through relative paths - - - - - - - - - - This returns a new stream instance each time it is called. - It is the responsability of the caller to dispose of this stream - - - - - Depicts the contract for resource factories. - - - - - Used to check whether the resource factory - is able to deal with the given resource - identifier. - - - Implementors should return true - only if the given identificator is supported - by the resource factory - - - - - - - Creates an instance - for the given resource identifier - - - - - - - Creates an instance - for the given resource identifier - - - - - - - - - - - - - - - - - - Adapts a static string content as an - - - - - Enable access to files on network shares - - - - - Email sender abstraction. - - - - - Sends a mail message. - - From field - To field - E-mail's subject - message's body - - - - Sends a message. - - Message instance - - - - Sends multiple messages. - - List of messages - - - - Default implementation. - - - - - Initializes a new instance of the class based on the configuration provided in the application configuration file. - - - This constructor is based on the default configuration in the application configuration file. - - - - - This service implementation - requires a host name in order to work - - The smtp server name - - - - Sends a message. - - If any of the parameters is null - From field - To field - e-mail's subject - message's body - - - - Sends a message. - - If the message is null - Message instance - - - - Configures the sender - with port information and eventual credential - informed - - Message instance - - - - Gets or sets the port used to - access the SMTP server - - - - - Gets the hostname. - - The hostname. - - - - Gets or sets a value which is used to - configure if emails are going to be sent asyncrhonously or not. - - - - - Gets or sets a value that specifies - the amount of time after which a synchronous Send call times out. - - - - - Gets or sets a value indicating whether the email should be sent using - a secure communication channel. - - true if should use SSL; otherwise, false. - - - - Gets or sets the domain. - - The domain. - - - - Gets or sets the name of the user. - - The name of the user. - - - - Gets or sets the password. - - The password. - - - - Gets a value indicating whether credentials were informed. - - - if this instance has credentials; otherwise, . - - - - diff --git a/Libraries/FluentAssertions.dll b/Libraries/FluentAssertions.dll index 4b19b78bc..cd2ffbf5a 100644 Binary files a/Libraries/FluentAssertions.dll and b/Libraries/FluentAssertions.dll differ diff --git a/Libraries/FluentAssertions.xml b/Libraries/FluentAssertions.xml index 6ef4ac5f4..76cc4d4bb 100644 --- a/Libraries/FluentAssertions.xml +++ b/Libraries/FluentAssertions.xml @@ -4,136 +4,60 @@ FluentAssertions - - - Initializes a new instance of the class. - - - - - Contains extension methods for custom assertions in unit tests. - - - - - Invokes the specified action on an subject so that you can chain it with any of the ShouldThrow or ShouldNotThrow - overloads. - - - - - Provides methods for asserting the execution time of a method or property. - - The object that exposes the method or property. - A reference to the method or property to measure the execution time of. - - Returns an object for asserting that the execution time matches certain conditions. - - - + - Provides methods for asserting the execution time of a method or property. + Provides a fluent API for verifying an arbitrary condition. - The object that exposes the method or property. - A reference to the method or property to measure the execution time of. - - Returns an object for asserting that the execution time matches certain conditions. - - + - Asserts that the throws an exception. + Initializes a new instance of the class. - - The type of the exception it should throw. - - - Returns an object that allows asserting additional members of the thrown exception. - - + - Asserts that the throws an exception. + Gets the name or identifier of the current subject, or a default value if the subject is not known. - - The type of the exception it should throw. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - Returns an object that allows asserting additional members of the thrown exception. - - + - Asserts that the does not throw a particular exception. + Indicates that every argument passed into is displayed on a separate line. - - The type of the exception it should not throw. Any other exceptions are ignored and will satisfy the assertion. - - + - Asserts that the does not throw a particular exception. + Gets or sets the name of the subject for the next verification. - - The type of the exception it should not throw. Any other exceptions are ignored and will satisfy the assertion. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - + - Asserts that the does not throw any exception at all. + The amount of time that a should exceed compared to another . - + - Asserts that the does not throw any exception at all. + The amount of time that a should be equal or exceed compared to another . - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - + - Forces enumerating a collection. Should be used to assert that a method that uses the - yield keyword throws a particular exception. + The amount of time that a should differ exactly compared to another . - + - Forces enumerating a collection. Should be used to assert that a method that uses the - yield keyword throws a particular exception. + The maximum amount of time that a should differ compared to another . - + - Asserts that the properties of an object matches those of another object. + The amount of time that a should be within another . - + - Safely casts the specified object to the type specified through . + Gets the object which value is being asserted. - - Has been introduced to allow casting objects without breaking the fluent API. - - @@ -195,372 +119,340 @@ - Asserts that the number of items in the collection matches the supplied amount. + Asserts that the number of items in the collection matches the supplied amount. - Asserts that the number of items in the collection matches the supplied amount. + Asserts that the number of items in the collection matches the supplied amount. - Asserts that the number of items in the collection matches a condition stated by a predicate. + Asserts that the number of items in the collection matches a condition stated by a predicate. - Asserts that the number of items in the collection matches a condition stated by a predicate. + Asserts that the number of items in the collection matches a condition stated by a predicate. - Asserts that the collection does not contain any items. + Asserts that the collection does not contain any items. - Asserts that the collection does not contain any items. + Asserts that the collection does not contain any items. - Asserts that the collection contains at least 1 item. + Asserts that the collection contains at least 1 item. - Asserts that the collection contains at least 1 item. + Asserts that the collection contains at least 1 item. - Asserts that the collection does not contain any duplicate items. + Asserts that the collection does not contain any duplicate items. - Asserts that the collection does not contain any duplicate items. + Asserts that the collection does not contain any duplicate items. - Asserts that the collection does not contain any null items. + Asserts that the collection does not contain any null items. - Asserts that the collection does not contain any null items. + Asserts that the collection does not contain any null items. - Expects the current collection to contain all the same elements in the same order as the collection identified by - . Elements are compared using their . + Expects the current collection to contain all the same elements in the same order as the collection identified by + . Elements are compared using their . - Expects the current collection to contain all the same elements in the same order as the collection identified by - . Elements are compared using their . + Expects the current collection to contain all the same elements in the same order as the collection identified by + . Elements are compared using their . - Expects the current collection to contain all the same elements in the same order as the collection identified by - . Elements are compared using their . + Expects the current collection to contain all the same elements in the same order as the collection identified by + . Elements are compared using their . - Expects the current collection not to contain all the same elements in the same order as the collection identified by - . Elements are compared using their . + Expects the current collection not to contain all the same elements in the same order as the collection identified by + . Elements are compared using their . - Expects the current collection not to contain all the same elements in the same order as the collection identified by - . Elements are compared using their . + Expects the current collection not to contain all the same elements in the same order as the collection identified by + . Elements are compared using their . - Expects the current collection to contain all elements of the collection identified by , - regardless of the order. Elements are compared using their . + Expects the current collection to contain all elements of the collection identified by , + regardless of the order. Elements are compared using their . - Expects the current collection to contain all elements of the collection identified by , - regardless of the order. Elements are compared using their . + Expects the current collection to contain all elements of the collection identified by , + regardless of the order. Elements are compared using their . - Expects the current collection to contain all elements of the collection identified by , - regardless of the order. Elements are compared using their . + Expects the current collection to contain all elements of the collection identified by , + regardless of the order. Elements are compared using their . - Expects the current collection not to contain all elements of the collection identified by , - regardless of the order. Elements are compared using their . + Expects the current collection not to contain all elements of the collection identified by , + regardless of the order. Elements are compared using their . + + + + + Expects the current collection not to contain all elements of the collection identified by , + regardless of the order. Elements are compared using their . + + + + + Asserts that the current collection only contains items that are assignable to the type . - Expects the current collection to contain the specified elements in any order. Elements are compared - using their implementation. + Expects the current collection to contain the specified elements in any order. Elements are compared + using their implementation. - Expects the current collection to contain the specified elements in any order. Elements are compared - using their implementation. + Expects the current collection to contain the specified elements in any order. Elements are compared + using their implementation. - Expects the current collection to contain the specified elements in the exact same order. Elements are compared - using their implementation. + Expects the current collection to contain the specified elements in the exact same order. Elements are compared + using their implementation. - Expects the current collection to contain the specified elements in the exact same order. Elements are compared - using their implementation. + Expects the current collection to contain the specified elements in the exact same order. Elements are compared + using their implementation. - Asserts that the collection is a subset of the . + Asserts that the collection is a subset of the . - Asserts that the collection is a subset of the . + Asserts that the collection is a subset of the . + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + - Asserts that the collection is not a subset of the . + Asserts that the collection is not a subset of the . - Asserts that the collection is not a subset of the . + Asserts that the collection is not a subset of the . + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + - Assert that the current collection has the same number of elements as . + Assert that the current collection has the same number of elements as . - Assert that the current collection has the same number of elements as . + Assert that the current collection has the same number of elements as . - Asserts that the current collection has not been initialized yet with an actual collection. + Asserts that the current collection has not been initialized yet with an actual collection. - Asserts that the current collection has not been initialized yet with an actual collection. + Asserts that the current collection has not been initialized yet with an actual collection. - Asserts that the current collection has been initialized with an actual collection. + Asserts that the current collection has been initialized with an actual collection. - Asserts that the current collection has been initialized with an actual collection. + Asserts that the current collection has been initialized with an actual collection. - Asserts that the current collection has the supplied at the supplied . + Asserts that the current collection has the supplied at the supplied . - Asserts that the current collection has the supplied at the supplied . + Asserts that the current collection has the supplied at the supplied . - Asserts that the current collection only contains items that are assignable to the type . - - - - - Asserts that the current collection only contains items that are assignable to the type . - - - - - Expects the current collection not to contain all elements of the collection identified by , - regardless of the order. Elements are compared using their . + Asserts that the current collection only contains items that are assignable to the type . - Asserts that the current collection does not contain the supplied item. + Asserts that the current collection does not contain the supplied item. - Asserts that the current collection does not contain the supplied item. + Asserts that the current collection does not contain the supplied item. - + - The amount of time that a should exceed compared to another . + Asserts that the collection contains the specified item. - + - The amount of time that a should be equal or exceed compared to another . + Asserts that the collection contains the specified item. + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + - + - The amount of time that a should differ exactly compared to another . + Asserts that the collection contains some extra items in addition to the original items. - + - The maximum amount of time that a should differ compared to another . + Asserts that the collection contains at least one item that matches the predicate. - + - The amount of time that a should be within another . + Asserts that the collection contains at least one item that matches the predicate. + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + - + - Gets the object which value is being asserted. + Asserts that the collection only contains items that match a predicate. - + - Asserts that the thrown exception has a message matching the . + Asserts that the collection only contains items that match a predicate. - The expected message of the exception. + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + - + - Asserts that the thrown exception has a message matching the . + Asserts that the collection does not contain any items that match the predicate. - The expected message of the exception. - - The reason why the message of the exception should match the . - - The parameters used when formatting the . - + - Asserts that the thrown exception contains an inner exception of type . + Asserts that the collection does not contain any items that match the predicate. - The expected type of the inner exception. - An which can be used to chain assertions. + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + - + - Asserts that the thrown exception contains an inner exception of type . + Provides services for formatting an object being used in an assertion in a human readable format. - The expected type of the inner exception. - The reason why the inner exception should be of the supplied type. - The parameters used when formatting the . - An which can be used to chain assertions. - + - Asserts that the thrown exception contains an inner exception with the . + A list of objects responsible for formatting the objects represented by placeholders. - The expected message of the inner exception. - An which can be used to chain assertions. - + - Asserts that the thrown exception contains an inner exception with the . + Returns a human-readable representation of a particular object. - The expected message of the inner exception. - - The reason why the message of the inner exception should match . - - The parameters used when formatting the . - + - Asserts that the exception matches a particular condition. + Returns a human-readable representation of a particular object that starts on a new line. - - The condition that the exception must match. - - + - Asserts that the exception matches a particular condition. - - - The condition that the exception must match. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Gets the exception object of the exception thrown. - - - - - Provides methods for asserting that the execution time of an satifies certain conditions. - - - - - Asserts that the execution time of the operation does not exceed a specified amount of time. - - - The maximum allowed duration. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the execution time of the operation does not exceed a specified amount of time. - - - The maximum allowed duration. - - - - - Provides methods for asserting that the execution time of an object member satifies certain conditions. - - - - - - Asserts a floating point value approximates another value as close as possible. + Asserts a floating point value approximates another value as close as possible. The expected value to compare the actual value with. @@ -702,221 +594,407 @@ Zero or more objects to format using the placeholders in . - + - Asserts that the collection contains the specified item. + Records activity for a single event. - + - Asserts that the collection contains the specified item. + Records raised events for one event on one object - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - + - Asserts that the collection contains some extra items in addition to the original items. + Store information about a raised event + Parameters the event was raised with - + - Asserts that the collection contains at least one item that matches the predicate. + The object events are recorded from - + - Asserts that the collection contains at least one item that matches the predicate. + The name of the event that's recorded - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - + - Asserts that the collection only contains items that match a predicate. + The object events are recorded from + The name of the event that's recorded - + - Asserts that the collection only contains items that match a predicate. + Enumerate raised events - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - + - Asserts that the collection does not contain any items that match the predicate. + Enumerate raised events + - + - Asserts that the collection does not contain any items that match the predicate. + Called by the auto-generated IL, to record information about a raised event. - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - + - Asserts that a value is within a range. + The object events are recorded from - - Where the range is continuous or incremental depends on the actual type of the value. - - - The minimum valid value of the range. - - - The maximum valid value of the range. - - + - Asserts that a value is within a range. + The name of the event that's recorded - - Where the range is continuous or incremental depends on the actual type of the value. - - - The minimum valid value of the range. - - - The maximum valid value of the range. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - + - Asserts that a nullable numeric value is not null. + Helper class for verifying a condition and/or throwing a test harness specific exception representing an assertion failure. - + - Asserts that a nullable numeric value is not null. + Asserts that the supplied is met. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. + The condition to assert. + + The message that will be used in the exception. This should describe what was expected and why. This message + can contain the following three placeholders:
+ + {0} = the expected value + {1} = the actual value + {2} = a reason explaining the expectations +
+ Any additional placeholders are allowed and will be satisfied using the . + + + The expected value, or null if there is no explicit expected value. + + The actual value, or null if there is no explicit actual value. + Should describe the reason for the expectation. + Optional args for formatting placeholders in the . + + Optional arguments to satisfy any additional placeholders in the - - Zero or more objects to format using the placeholders in . -
- + - Asserts that a nullable numeric value is null. + Asserts that the supplied is met. + The condition to assert. + + The message that will be used in the exception. This should describe what was expected and why. This message + can contain the following three placeholders:
+ + {0} = the expected value + {1} = the actual value + {2} = a reason explaining the expectations +
+ Any additional placeholders are allowed and will be satisfied using the . + + + The expected value, or null if there is no explicit expected value. + + The actual value, or null if there is no explicit actual value. + Should describe the reason for the expectation. + Optional args for formatting placeholders in the . + + Optional arguments to satisfy any additional placeholders in the +
- + - Asserts that a nullable numeric value is null. + Handles an assertion failure. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. + + The message that will be used in the exception. This should describe what was expected and why. This message + can contain the following three placeholders:
+ + {0} = the expected value + {1} = the actual value + {2} = a reason explaining the expectations +
+ Any additional placeholders are allowed and will be satisfied using the . - - Zero or more objects to format using the placeholders in . - + + The expected value, or null if there is no explicit expected value. + + The actual value, or null if there is no explicit actual value. + Should describe the reason for the expectation. + Optional args for formatting placeholders in the . + + Optional arguments to satisfy any additional placeholders in the + +
+ + + Gets an object that wraps and executes a conditional or unconditional verification. + Gets the object which value is being asserted. - + - Asserts that the value of an object equals another object when using it's method. + Is responsible for validating the equality of one or more properties of a subject with another object. - + - Asserts that an object equals another object using its implementation. + Returns a based on a number of seconds. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - + + + + Returns a based on a number of seconds. + + + + + Returns a based on a number of minutes. + + + + + Returns a based on a number of hours. + + + + + Returns a based on a number of days. + + + + + Initializes a new instance of the class. + + + + + Static methods that aid in generic event subscription + + + + + Generates an eventhandler for an event of type eventSignature that calls RegisterEvent on recorder + when invoked. + + + + + Finds the Return Type of a Delegate. + + + + + Returns an Array of Types that make up a delegate's parameter signature. + + + + + Returns an array of types appended with an EventRecorder reference at the beginning. + + + + + Returns T/F Dependent on a Type Being a Delegate. + + + + + Returns the MethodInfo for the Delegate's "Invoke" Method. + + + + + Asserts that the value of an object equals another object when using it's method. + + + + + Asserts that an object equals another object using its implementation. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + - Asserts that an object does not equal another object using it's method. + Asserts that an object does not equal another object using it's method. - Asserts that an object does not equal another object using it's method. + Asserts that an object does not equal another object using it's method. - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. - Zero or more values to use for filling in any compatible placeholders. + Zero or more values to use for filling in any compatible placeholders. - Asserts that an object reference refers to the exact same object as another object reference. + Asserts that an object reference refers to the exact same object as another object reference. - Asserts that an object reference refers to the exact same object as another object reference. + Asserts that an object reference refers to the exact same object as another object reference. - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. - Zero or more values to use for filling in any compatible placeholders. + Zero or more values to use for filling in any compatible placeholders. - Asserts that an object reference refers to a different object than another object reference refers to. + Asserts that an object reference refers to a different object than another object reference refers to. - Asserts that an object reference refers to a different object than another object reference refers to. + Asserts that an object reference refers to a different object than another object reference refers to. - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. - Zero or more values to use for filling in any compatible placeholders. + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that an object can be serialized and deserialized using the binary serializer and that it stills retains + the values of all properties. + + + + + Asserts that an object can be serialized and deserialized using the binary serializer and that it stills retains + the values of all properties. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that an object can be serialized and deserialized using the XML serializer and that it stills retains + the values of all properties. + + + + + Asserts that an object can be serialized and deserialized using the XML serializer and that it stills retains + the values of all properties. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the thrown exception has a message matching the . + + The expected message of the exception. + + + + Asserts that the thrown exception has a message matching the . + + The expected message of the exception. + + The reason why the message of the exception should match the . + + The parameters used when formatting the . + + + + Asserts that the thrown exception contains an inner exception of type . + + The expected type of the inner exception. + An which can be used to chain assertions. + + + + Asserts that the thrown exception contains an inner exception of type . + + The expected type of the inner exception. + The reason why the inner exception should be of the supplied type. + The parameters used when formatting the . + An which can be used to chain assertions. + + + + Asserts that the thrown exception contains an inner exception with the . + + The expected message of the inner exception. + An which can be used to chain assertions. + + + + Asserts that the thrown exception contains an inner exception with the . + + The expected message of the inner exception. + + The reason why the message of the inner exception should match . + + The parameters used when formatting the . + + + + Asserts that the exception matches a particular condition. + + + The condition that the exception must match. + + + Asserts that the exception matches a particular condition. + + + The condition that the exception must match. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Gets the exception object of the exception thrown. + + Provides methods for selecting one or properties of an object and comparing them with another object. @@ -927,6 +1005,12 @@ Includes all properties of when comparing the subject with another object using . + + + Includes all properties of including those of the run-time type when comparing the subject + with another object using . + + Includes all properties of when comparing the subject with another object using , @@ -977,11 +1061,166 @@ Gets the object which value is being asserted. - + - Is responsible for validating the equality of one or more properties of a subject with another object. + Contains extension methods for custom assertions in unit tests. + + + + + Invokes the specified action on an subject so that you can chain it with any of the ShouldThrow or ShouldNotThrow + overloads. + + + + + Provides methods for asserting the execution time of a method or property. + + The object that exposes the method or property. + A reference to the method or property to measure the execution time of. + + Returns an object for asserting that the execution time matches certain conditions. + + + + + Provides methods for asserting the execution time of a method or property. + + The object that exposes the method or property. + A reference to the method or property to measure the execution time of. + + Returns an object for asserting that the execution time matches certain conditions. + + + + + Asserts that the throws an exception. + + + The type of the exception it should throw. + + + Returns an object that allows asserting additional members of the thrown exception. + + + + + Asserts that the throws an exception. + + + The type of the exception it should throw. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + Returns an object that allows asserting additional members of the thrown exception. + + + + + Asserts that the does not throw a particular exception. + + + The type of the exception it should not throw. Any other exceptions are ignored and will satisfy the assertion. + + + + + Asserts that the does not throw a particular exception. + + + The type of the exception it should not throw. Any other exceptions are ignored and will satisfy the assertion. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the does not throw any exception at all. + + + + + Asserts that the does not throw any exception at all. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Forces enumerating a collection. Should be used to assert that a method that uses the + yield keyword throws a particular exception. + + + + + Forces enumerating a collection. Should be used to assert that a method that uses the + yield keyword throws a particular exception. + + + + + Asserts that the properties of an object matches those of another object. + + + Safely casts the specified object to the type specified through . + + + Has been introduced to allow casting objects without breaking the fluent API. + + + + + + Provides methods for asserting that the execution time of an satifies certain conditions. + + + + + Asserts that the execution time of the operation does not exceed a specified amount of time. + + + The maximum allowed duration. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the execution time of the operation does not exceed a specified amount of time. + + + The maximum allowed duration. + + + + + Provides methods for asserting that the execution time of an object member satifies certain conditions. + + + Initializes a new instance of the class. @@ -1149,153 +1388,128 @@ Gets the object which value is being asserted. - - - Dedicated class for comparing two strings and generating consistent error messages. - - - - - Gets or sets a value indicating whether the comparison is case sensitive. - - - - - Provides methods for asserting that two objects differ in certain ways. - - - - - Asserts that a occurs a specified amount of time before another . - - - The to compare the subject with. - - - + - Asserts that a occurs a specified amount of time before another . + Asserts that a value is within a range. - - The to compare the subject with. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. + + Where the range is continuous or incremental depends on the actual type of the value. + + + The minimum valid value of the range. - - Zero or more values to use for filling in any compatible placeholders. + + The maximum valid value of the range. - + - Asserts that a occurs a specified amount of time after another . + Asserts that a value is within a range. - - The to compare the subject with. + + Where the range is continuous or incremental depends on the actual type of the value. + + + The minimum valid value of the range. - - - - Asserts that a occurs a specified amount of time after another . - - - The to compare the subject with. + + The maximum valid value of the range. - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. - - Zero or more values to use for filling in any compatible placeholders. + + Zero or more objects to format using the placeholders in . - - - Provides the logic and the display text for a . - - - - - Returns a based on a number of seconds. - - - - - Returns a based on a number of seconds. - - - - - Returns a based on a number of minutes. - - - - - Returns a based on a number of hours. - - - - - Returns a based on a number of days. - - - + - Finds the first index at which the does not match the - string anymore, including the exact casing. + Determines whether this instance can handle the specified value. + The value. + + true if this instance can handle the specified value; otherwise, false. + - + - Finds the first index at which the does not match the - string anymore, accounting for the specified . + Returns a that represents this instance. + The value. + + A that represents this instance. + - + - Gets the quoted three characters at the specified index of a string, including the index itself. + This class is used to store data about an intercepted event - + - Replaces all characters that might conflict with formatting placeholders and newlines with their escaped counterparts. + Default constructor stores the parameters the event was raised with - + - Static methods that aid in generic event subscription + Parameters for the event - + - Generates an eventhandler for an event of type eventSignature that calls RegisterEvent on recorder - when invoked. + Provides methods for asserting that two objects differ in certain ways. - + - Finds the Return Type of a Delegate. + Asserts that a occurs a specified amount of time before another . + + The to compare the subject with. + - + - Returns an Array of Types that make up a delegate's parameter signature. + Asserts that a occurs a specified amount of time before another . + + The to compare the subject with. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + - + - Returns an array of types appended with an EventRecorder reference at the beginning. + Asserts that a occurs a specified amount of time after another . + + The to compare the subject with. + - + - Returns T/F Dependent on a Type Being a Delegate. + Asserts that a occurs a specified amount of time after another . + + The to compare the subject with. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + - + - Returns the MethodInfo for the Delegate's "Invoke" Method. + Provides the logic and the display text for a . @@ -1431,62 +1645,14 @@ Asserts that at least one occurrence of the event had an object matching a predicate.
- - - Records activity for a single event. - - - - - Records raised events for one event on one object - - - - - Store information about a raised event - - Parameters the event was raised with - - - - The object events are recorded from - - - - - The name of the event that's recorded - - - - - - The object events are recorded from - The name of the event that's recorded - - - - Enumerate raised events - - - - - Enumerate raised events - - - - - - Called by the auto-generated IL, to record information about a raised event. - - - + - The object events are recorded from + Dedicated class for comparing two strings and generating consistent error messages. - + - The name of the event that's recorded + Gets or sets a value indicating whether the comparison is case sensitive. @@ -1495,167 +1661,61 @@ This should ensure the Garbage Collector can still clean-up the event source object. - - - This class is used to store data about an intercepted event - - - + - Default constructor stores the parameters the event was raised with + Finds the first index at which the does not match the + string anymore, including the exact casing. - + - Parameters for the event + Finds the first index at which the does not match the + string anymore, accounting for the specified . - + - Helper class for verifying a condition and/or throwing a test harness specific exception representing an assertion failure. + Gets the quoted three characters at the specified index of a string, including the index itself. - + - Asserts that the supplied is met. + Replaces all characters that might conflict with formatting placeholders and newlines with their escaped counterparts. - The condition to assert. - - The message that will be used in the exception. This should describe what was expected and why. This message - can contain the following three placeholders:
- - {0} = the expected value - {1} = the actual value - {2} = a reason explaining the expectations -
- Any additional placeholders are allowed and will be satisfied using the . - - - The expected value, or null if there is no explicit expected value. - - The actual value, or null if there is no explicit actual value. - Should describe the reason for the expectation. - Optional args for formatting placeholders in the . - - Optional arguments to satisfy any additional placeholders in the -
- + - Asserts that the supplied is met. + Asserts that a nullable numeric value is not null. - The condition to assert. - - The message that will be used in the exception. This should describe what was expected and why. This message - can contain the following three placeholders:
- - {0} = the expected value - {1} = the actual value - {2} = a reason explaining the expectations -
- Any additional placeholders are allowed and will be satisfied using the . - - - The expected value, or null if there is no explicit expected value. - - The actual value, or null if there is no explicit actual value. - Should describe the reason for the expectation. - Optional args for formatting placeholders in the . - - Optional arguments to satisfy any additional placeholders in the -
- + - Handles an assertion failure. + Asserts that a nullable numeric value is not null. - - The message that will be used in the exception. This should describe what was expected and why. This message - can contain the following three placeholders:
- - {0} = the expected value - {1} = the actual value - {2} = a reason explaining the expectations -
- Any additional placeholders are allowed and will be satisfied using the . - - - The expected value, or null if there is no explicit expected value. - - The actual value, or null if there is no explicit actual value. - Should describe the reason for the expectation. - Optional args for formatting placeholders in the . - - Optional arguments to satisfy any additional placeholders in the + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + Zero or more objects to format using the placeholders in . +
- - - Gets an object that wraps and executes a conditional or unconditional verification. - - - - - Determines whether this instance can handle the specified value. - - The value. - - true if this instance can handle the specified value; otherwise, false. - - - - - Returns a that represents this instance. - - The value. - - A that represents this instance. - - - - - Provides services for formatting an object being used in an assertion in a human readable format. - - - - - A list of objects responsible for formatting the objects represented by placeholders. - - - - - Returns a human-readable representation of a particular object. - - - - - Returns a human-readable representation of a particular object that starts on a new line. - - - - - Provides a fluent API for verifying an arbitrary condition. - - - - - Initializes a new instance of the class. - - - - - Gets the name or identifier of the current subject, or a default value if the subject is not known. - - - + - Indicates that every argument passed into is displayed on a separate line. + Asserts that a nullable numeric value is null. - + - Gets or sets the name of the subject for the next verification. + Asserts that a nullable numeric value is null. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . +
diff --git a/NzbDrone.Core.Test/App.config b/NzbDrone.Core.Test/App.config index 0d29e6625..6e63be8ce 100644 --- a/NzbDrone.Core.Test/App.config +++ b/NzbDrone.Core.Test/App.config @@ -19,11 +19,5 @@ - - - - - - \ No newline at end of file diff --git a/NzbDrone.Core.Test/DiskScanJobTest.cs b/NzbDrone.Core.Test/DiskScanJobTest.cs index bd1e82e44..f653e9624 100644 --- a/NzbDrone.Core.Test/DiskScanJobTest.cs +++ b/NzbDrone.Core.Test/DiskScanJobTest.cs @@ -22,7 +22,6 @@ namespace NzbDrone.Core.Test { var series = Builder.CreateNew() .With(s => s.SeriesId = 12) - .With(s => s.Episodes = Builder.CreateListOfSize(10).Build()) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -44,26 +43,6 @@ namespace NzbDrone.Core.Test } - [Test] - public void series_with_no_episodes_should_skip_scan() - { - var series = Builder.CreateNew() - .With(s => s.SeriesId = 12) - .With(s => s.Episodes = new List()) - .Build(); - - var mocker = new AutoMoqer(MockBehavior.Strict); - - mocker.GetMock() - .Setup(p => p.GetSeries(series.SeriesId)) - .Returns(series); - - //Act - mocker.Resolve().Start(new ProgressNotification("Test"), series.SeriesId); - - //Assert - mocker.VerifyAllMocks(); - } [Test] public void job_with_no_target_should_scan_all_series() @@ -71,7 +50,6 @@ namespace NzbDrone.Core.Test var series = Builder.CreateListOfSize(2) .WhereTheFirst(1).Has(s => s.SeriesId = 12) .AndTheNext(1).Has(s => s.SeriesId = 15) - .WhereAll().Have(s => s.Episodes = Builder.CreateListOfSize(10).Build()) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -100,7 +78,6 @@ namespace NzbDrone.Core.Test var series = Builder.CreateListOfSize(2) .WhereTheFirst(1).Has(s => s.SeriesId = 12) .AndTheNext(1).Has(s => s.SeriesId = 15) - .WhereAll().Have(s => s.Episodes = Builder.CreateListOfSize(10).Build()) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -129,9 +106,7 @@ namespace NzbDrone.Core.Test { var series = Builder.CreateListOfSize(2) .WhereTheFirst(1).Has(s => s.SeriesId = 12) - .And(s => s.Episodes = Builder.CreateListOfSize(10).Build()) .AndTheNext(1).Has(s => s.SeriesId = 15) - .And(s => s.Episodes = new List()) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -144,10 +119,16 @@ namespace NzbDrone.Core.Test .Setup(s => s.Scan(series[0])) .Returns(new List()); + mocker.GetMock() + .Setup(s => s.Scan(series[1])) + .Returns(new List()); + mocker.Resolve().Start(new ProgressNotification("Test"), 0); + mocker.VerifyAllMocks(); + mocker.GetMock().Verify(s => s.Scan(It.IsAny()), Times.Exactly(2)); } } diff --git a/NzbDrone.Core.Test/ImportNewSeriesJobTest.cs b/NzbDrone.Core.Test/ImportNewSeriesJobTest.cs index 30e96b40f..488a3a0c9 100644 --- a/NzbDrone.Core.Test/ImportNewSeriesJobTest.cs +++ b/NzbDrone.Core.Test/ImportNewSeriesJobTest.cs @@ -21,12 +21,13 @@ namespace NzbDrone.Core.Test public void import_new_series_succesfull() { var series = Builder.CreateListOfSize(2) - .WhereAll().Have(s => s.Episodes = Builder.CreateListOfSize(10).Build()) .WhereAll().Have(s => s.LastInfoSync = null) .WhereTheFirst(1).Has(s => s.SeriesId = 12) .AndTheNext(1).Has(s => s.SeriesId = 15) .Build(); + var episodes = Builder.CreateListOfSize(10).Build(); + var notification = new ProgressNotification("Test"); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -63,6 +64,12 @@ namespace NzbDrone.Core.Test .Setup(s => s.GetSeries(series[1].SeriesId)).Returns(series[1]); + mocker.GetMock() + .Setup(s => s.GetEpisodeBySeries(series[0].SeriesId)).Returns(episodes); + + mocker.GetMock() + .Setup(s => s.GetEpisodeBySeries(series[1].SeriesId)).Returns(episodes); + mocker.GetMock() .Setup(s => s.GetSeriesFiles(It.IsAny())).Returns(new List()); @@ -81,12 +88,13 @@ namespace NzbDrone.Core.Test public void failed_import_should_not_be_stuck_in_loop() { var series = Builder.CreateListOfSize(2) - .WhereAll().Have(s => s.Episodes = Builder.CreateListOfSize(10).Build()) .WhereAll().Have(s => s.LastInfoSync = null) .WhereTheFirst(1).Has(s => s.SeriesId = 12) .AndTheNext(1).Has(s => s.SeriesId = 15) .Build(); + var episodes = Builder.CreateListOfSize(10).Build(); + var notification = new ProgressNotification("Test"); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -117,6 +125,9 @@ namespace NzbDrone.Core.Test mocker.GetMock() .Setup(s => s.GetSeriesFiles(It.IsAny())).Returns(new List()); + mocker.GetMock() + .Setup(s => s.GetEpisodeBySeries(It.IsAny())).Returns(episodes); + //Act mocker.Resolve().Start(notification, 0); diff --git a/NzbDrone.Core.Test/MediaFileProviderTests.cs b/NzbDrone.Core.Test/MediaFileProviderTests.cs index 97af1d265..e784982ca 100644 --- a/NzbDrone.Core.Test/MediaFileProviderTests.cs +++ b/NzbDrone.Core.Test/MediaFileProviderTests.cs @@ -310,31 +310,17 @@ namespace NzbDrone.Core.Test mocker.GetMock() .Setup(c => c.UpdateSeries(It.Is(s => s.LastDiskSync != null))).Verifiable(); + mocker.GetMock() + .Setup(c => c.GetEpisodeBySeries(It.IsAny())) + .Returns(new List{new Episode()}); + mocker.Resolve().Scan(new Series()); mocker.VerifyAllMocks(); } - [Test] - public void scan_media_job_should_not_scan_new_series() - { - var mocker = new AutoMoqer(); - var fakeSeries = Builder.CreateListOfSize(2) - .WhereTheFirst(1).Has(c => c.Episodes = new List()) - .AndTheNext(1).Has(c => c.Episodes = Builder.CreateListOfSize(10).Build()) - .Build(); - mocker.GetMock() - .Setup(c => c.GetAllSeries()).Returns(fakeSeries); - - mocker.GetMock(MockBehavior.Strict) - .Setup(c => c.Scan(fakeSeries.ToList()[1])).Returns(new List()).Verifiable(); - - mocker.Resolve().Start(new ProgressNotification("test"), 0); - - mocker.VerifyAllMocks(); - } - + [Test] public void get_series_files() { @@ -390,7 +376,7 @@ namespace NzbDrone.Core.Test diskProvider.Setup(d => d.GetExtension(It.IsAny())).Returns(".avi"); var episodeProvider = mocker.GetMock(); - episodeProvider.Setup(e => e.GetEpisodes(It.IsAny())).Returns(new List {fakeEpisode}); + episodeProvider.Setup(e => e.GetEpisodes(It.IsAny())).Returns(new List { fakeEpisode }); episodeProvider.Setup(e => e.GetEpisode(fakeSeries.SeriesId, 1, 5)).Returns(fakeEpisode); var configProvider = mocker.GetMock(); @@ -436,7 +422,7 @@ namespace NzbDrone.Core.Test .With(e => e.SeriesId = fakeSeries.SeriesId) .With(e => e.EpisodeFileId = 1) .With(e => e.Quality = QualityTypes.SDTV) - .With(e => e.Episodes = new List{ fakeEpisode }) + .With(e => e.Episodes = new List { fakeEpisode }) .Build(); fakeEpisode.EpisodeFile = fakeEpisodeFile; @@ -477,5 +463,26 @@ namespace NzbDrone.Core.Test mocker.VerifyAllMocks(); Assert.AreEqual(1, result.Count); } + + + [Test] + public void Scan_series_should_skip_series_with_no_episodes() + { + var mocker = new AutoMoqer(MockBehavior.Strict); + mocker.GetMock() + .Setup(c => c.GetEpisodeBySeries(12)) + .Returns(new List()); + + var series = Builder.CreateNew() + .With(s => s.SeriesId = 12).Build(); + + //Act + mocker.Resolve().Scan(series); + + //Assert + mocker.VerifyAllMocks(); + + } + } } \ No newline at end of file diff --git a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index f6bb8d9da..2181f8ce7 100644 --- a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -36,9 +36,6 @@ True - - ..\packages\Castle.Core.2.5.2\lib\NET35\Castle.Core.dll - ..\packages\NBuilder.2.3.0.0\lib\FizzWare.NBuilder.dll @@ -59,9 +56,6 @@ ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - - ..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll - False ..\Libraries\NLog.dll diff --git a/NzbDrone.Core.Test/QualityProfileTest.cs b/NzbDrone.Core.Test/QualityProfileTest.cs index 292daedca..f1b04f53c 100644 --- a/NzbDrone.Core.Test/QualityProfileTest.cs +++ b/NzbDrone.Core.Test/QualityProfileTest.cs @@ -40,6 +40,29 @@ namespace NzbDrone.Core.Test Assert.AreEqual(testProfile.Allowed, fetch.Allowed); } + + [Test] + public void Test_Storage_no_allowed() + { + //Arrange + var database = MockLib.GetEmptyDatabase(); + var testProfile = new QualityProfile + { + Name = Guid.NewGuid().ToString(), + Cutoff = QualityTypes.SDTV + }; + + //Act + var id = Convert.ToInt32(database.Insert(testProfile)); + var fetch = database.SingleOrDefault(id); + + //Assert + Assert.AreEqual(id, fetch.QualityProfileId); + Assert.AreEqual(testProfile.Name, fetch.Name); + Assert.AreEqual(testProfile.Cutoff, fetch.Cutoff); + fetch.Allowed.Should().HaveCount(0); + } + [Test] public void Test_Series_Quality() { diff --git a/NzbDrone.Core.Test/SabProviderTest.cs b/NzbDrone.Core.Test/SabProviderTest.cs index 0f7601ad0..ced522f06 100644 --- a/NzbDrone.Core.Test/SabProviderTest.cs +++ b/NzbDrone.Core.Test/SabProviderTest.cs @@ -333,7 +333,7 @@ namespace NzbDrone.Core.Test //Act bool result = mocker.Resolve().AddByUrl( - "http://www.newzbin.com/browse/post/6107863/nzb", "This is an Nzb"); + "http://www.newzbin.com/browse/post/6107863/nzb", "Added by unit tests."); //Assert Assert.IsTrue(result); diff --git a/NzbDrone.Core.Test/SeriesProviderTest.cs b/NzbDrone.Core.Test/SeriesProviderTest.cs index 784ca2e17..1a24be68f 100644 Binary files a/NzbDrone.Core.Test/SeriesProviderTest.cs and b/NzbDrone.Core.Test/SeriesProviderTest.cs differ diff --git a/NzbDrone.Core.Test/packages.config b/NzbDrone.Core.Test/packages.config index 05e7c4fc9..60c6acd33 100644 --- a/NzbDrone.Core.Test/packages.config +++ b/NzbDrone.Core.Test/packages.config @@ -3,10 +3,7 @@ - - - \ No newline at end of file diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj index 391c1396d..2c886d4bc 100644 --- a/NzbDrone.Core/NzbDrone.Core.csproj +++ b/NzbDrone.Core/NzbDrone.Core.csproj @@ -121,10 +121,6 @@ - - False - ..\Libraries\Castle.Core.dll - False ..\Libraries\Exceptioneer.WindowsFormsClient.dll @@ -203,7 +199,6 @@ - @@ -298,9 +293,6 @@ - - - - - - - - - - - - - - - - - -For more info, visit the homepage at http://getGlimpse.com or follow #glimpse on Twitter. - - -Overview --------- -At its core Glimpse allows you to debug your web site right in the browser. Glimpse allows you to "Glimpse" into what's going on in your web server. In other words what Firebug is to debugging your client side code, Glimpse is to debugging your server within the client. - -Fundamentally Glimpse is made up of 3 different parts, all of which are extensible and customizable for any platform: - -* Glimpse Server Module -* Glimpse Client Side Viewer -* Glimpse Protocol - - -How it Works ------------- -On the Server: - -1. Server collects all server side information that will aid in debugging (i.e. application settings, routes, session variables, trace data, etc) -2. It does this by running through a pipeline of server side data providers that can be dynamically controlled and added to under our plugin architecture -3. Before the response is send, the server formats this data in accordance with the Glimpse Protocol and serializes it as JSON -4. Depending on whether it is an Ajax request or not, the server embeds the JSON in the content of the page - -On the Client: - -5. Depending on whether it is a Ajax request or not, the client picks up the JSON data and displays the it by executing a pipeline of client side data providers that can be dynamically controlled and added to under our plugin architecture -6. The client side module then dynamically renders a client side UI (similar to Firebug Lite) that lets you view this data - -Glimpse can be turned on or off by a series of different mechanisms, but at its core if the Glimpse cookie is present the server will provide the "debug" data - as a security measure, the request for debug data is "authenticated". - - -Server Implementations ----------------------- -Given the scope of the project and what it can do, the concept isn't restricted to any one platform. Hence, once mature, Glimpse Server Module will be available on all major web platforms. - -Platforms currently supported: - -* ASP.Net MVC - -Platforms target to be supported: - -* ASP.Net Web Forms -* PHP -* Ruby on Rails - -NOTE - If you would like help develop a Glimpse Server Module for a given platform please let us know. - - -Client Implementations ----------------------- -To start with the Glimpse Client Side Viewer is simply a light weight JavaScript "plugin" that understands the Glimpse Protocol and knows how to render the data. From a technology standpoint we currently use jQuery as the client side framework. - -Eventually, we would like to have actual browser plugins that provide richer functionality and experience, but the JavaScript version of the Glimpse Client Side Viewer is surprisingly well featured, intuitive and provides a high fidelity experience. We also hope to have a version for mobile ready soon which customizes the viewing/usage experience when using a mobile device. - -Protocol --------- -Details coming soon. - -Release Notes -------------- -05/08/2011 - 0.81 -- Changed plugin initialization so that SetupInit is only called once. -- Added list of loaded plugins to Glimpse/Config -- Added node to configuration to allow for blacklisting unwanted plugins. Configuration takes the form -- Updated Binding plugin to have acctual view data -- Fixed bugs with getting NotImplemented exceptions on trace tab -- Fixed bugs with users who were extending DefaultModelBinder -- Added ability to set glimpseState (cookie) to Hidden, which allows Glimpse to record and track remote client requests without rendering UI/Data to their response. (Useful for use with the remote tab) -- Added GlimpseTrace static facade to simplify tracing - -04/28/2011 - 0.80 -- Removed dependency on System.Drawing -- Fixed bugs related to projects that used custom ControllerActionInvokers -- Fixed bugs related to projects using custom FilterProviders -- Added MetaData tab which gives details of primary View Model and primary View Models properties (note this is not recursive at the moment) -- Environment tab now shows site trust level -- Performance improvments for supporting virtual directories -- Glimpse should now work in jQuery noConflict mode -- Added Glimpse Warnings tab, used to help debug Glimpse problems going forward - -04/20/2011 - 0.79 -- Client bug fixes for popout window -- Client bug fixes for virtual directories -- Various javascript fixes - -04/16/2011 - 0.78 -- Breaking change is you created custom plugins. Plugin interface moved from Glimpse.Protocol to Glimpse.Net.Extensibility namespace -- Fixed bug which threw ReflectionTypeLoadExceptions by using custom SafeDirectoryCatalog (Special thanks to Craig Wagner for helping us track this down!) -- Fixed pathing issues experienced by users hosting from virtual directories -- Added Request tab to show form, query string and cookies as the server saw them -- Added ViewData/ViewBag and TempData info to the details column of the Views tab -- Added Area support to Routes tab -- Added Glimpse Warnings tab, which will only appear when a MEF loading issue is thrown -- Added ability to open Glimpse in popup mode (alpha) -- Added symbols package to symbolsource.org for simplified debugging by the community - -04/14/2011 - 0.77 -- Fixed issues with most InvalidOperationException's/Circular references. Now if there is an issue, handle it more gracefully, and it only affects one tab. (More complete fix coming soon!) -- /Glimpse/Config is no longer case sensitive, and certain reports of 404’s to this page have been fixed. In addition, this page has been improved to be more understandable. -- As of right now, Glimpse only supports MVC3. We have identified the issues with MVC2, and are working to correct them. Special shout out to @rugvedvaidya for providing the (long!) workaround to get Glimpse running on MVC2. - -04/13/2011 - 0.76 -- Added "Time Elapsed" column to the Execution tab. -- Fixed 2 bugs with IE9 client rendering. -- Fixed bug with CSS text-alignment. -- Changed to Apache 2 license. - -Attribution ------------ -Some Icons are Copyright © Yusuke Kamiyamane. [http://p.yusukekamiyamane.com/] \ No newline at end of file diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index 3cf52ab63..e0908cf64 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -49,9 +49,6 @@ False ..\Libraries\Castle.Core.dll - - ..\packages\Glimpse.0.81\lib\net40\Glimpse.Net.dll - False ..\Libraries\MVC3\Microsoft.Web.Infrastructure.dll @@ -281,7 +278,6 @@ - diff --git a/NzbDrone.Web/Web.config b/NzbDrone.Web/Web.config index 72fc19d8b..96897e8de 100644 --- a/NzbDrone.Web/Web.config +++ b/NzbDrone.Web/Web.config @@ -1,8 +1,5 @@  - -
- @@ -11,7 +8,7 @@ - + @@ -64,8 +61,8 @@ - - + + @@ -75,15 +72,4 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/NzbDrone.Web/packages.config b/NzbDrone.Web/packages.config index 0f9d9b4b9..7d20791d9 100644 --- a/NzbDrone.Web/packages.config +++ b/NzbDrone.Web/packages.config @@ -2,7 +2,6 @@ - diff --git a/packages/Castle.Core.2.5.2/Castle.Core.2.5.2.nupkg b/packages/Castle.Core.2.5.2/Castle.Core.2.5.2.nupkg deleted file mode 100644 index 042efe808..000000000 Binary files a/packages/Castle.Core.2.5.2/Castle.Core.2.5.2.nupkg and /dev/null differ diff --git a/packages/Castle.Core.2.5.2/lib/ASL - Apache Software Foundation License.txt b/packages/Castle.Core.2.5.2/lib/ASL - Apache Software Foundation License.txt deleted file mode 100644 index e259b5841..000000000 --- a/packages/Castle.Core.2.5.2/lib/ASL - Apache Software Foundation License.txt +++ /dev/null @@ -1,57 +0,0 @@ -Apache License, Version 2.0 - -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - - 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and - - 2. You must cause any modified files to carry prominent notices stating that You changed the files; and - - 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - - 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/packages/Castle.Core.2.5.2/lib/BreakingChanges.txt b/packages/Castle.Core.2.5.2/lib/BreakingChanges.txt deleted file mode 100644 index ef719d13c..000000000 --- a/packages/Castle.Core.2.5.2/lib/BreakingChanges.txt +++ /dev/null @@ -1,55 +0,0 @@ -================================================================================================ -change - Removed WebLogger and WebLoggerFactory - -impact - low -fixability - medium -revision - - -description - To minimize management overhead the classes were removed so that only single - Client Profile version of Castle.Core can be distributed. - -fix - You can use NLog or Log4Net web logger integration, or reuse implementation of existing - web logger and use it as a custom logger. - -================================================================================================ -change - Removed obsolete overload of ProxyGenerator.CreateClassProxy - -impact - low -fixability - trivial -revision - - -description - Deprecated overload of ProxyGenerator.CreateClassProxy was removed to keep the - method consistent with other methods and to remove confusion - -fix - whenever removed overload was used, use one of the other overloads. - -================================================================================================ -change - IProxyGenerationHook.NonVirtualMemberNotification method was renamed - -impact - high -fixability - easy -revision - - -description - to accommodate class proxies with target method NonVirtualMemberNotification on - IProxyGenerationHook type was renamed to more accurate NonProxyableMemberNotification - since for class proxies with target not just methods but also fields and other member that - break the abstraction will be passed to this method. - -fix - whenever NonVirtualMemberNotification is used/implemented change the method name to - NonProxyableMemberNotification. Implementors should also accommodate possibility that not - only MethodInfos will be passed as method's second parameter. - -================================================================================================ -change - DynamicProxy will now allow to intercept members of System.Object - -impact - very low -fixability - easy -revision - - -description - to allow scenarios like mocking of System.Object members, DynamicProxy will not - disallow proxying of these methods anymore. AllMethodsHook (default IProxyGenerationHook) - will still filter them out though. - -fix - whenever custom IProxyGenerationHook is used, user should account for System.Object's - members being now passed to ShouldInterceptMethod and NonVirtualMemberNotification methods - and if neccessary update the code to handle them appropriately. \ No newline at end of file diff --git a/packages/Castle.Core.2.5.2/lib/Changes.txt b/packages/Castle.Core.2.5.2/lib/Changes.txt deleted file mode 100644 index 03d6a4873..000000000 --- a/packages/Castle.Core.2.5.2/lib/Changes.txt +++ /dev/null @@ -1,145 +0,0 @@ -2.5.2 (2010-11-15) -================== -- fixed DYNPROXY-150 - Finalizer should not be proxied -- implemented DYNPROXY-149 - Make AllMethodsHook members virtual so it can be used as a base class -- fixed DYNPROXY-147 - Can't crete class proxies with two non-public methods having same argument types but different return type -- fixed DYNPROXY-145 Unable to proxy System.Threading.SynchronizationContext (.NET 4.0) -- fixed DYNPROXY-144 - params argument not supported in constructor -- fixed DYNPROXY-143 - Permit call to reach "non-proxied" methods of inherited interfaces -- implemented DYNPROXY-139 - Better error message -- fixed DYNPROXY-133 - Debug assertion in ClassProxyInstanceContributor fails when proxying ISerializable with an explicit implementation of GetObjectData -- fixed CORE-32 - Determining if permission is granted via PermissionUtil does not work in .NET 4 -- applied patch by Alwin Meijs - ExtendedLog4netFactory can be configured with a stream from for example an embedded log4net xml config -- Upgraded NLog to 2.0 Beta 1 -- Added DefaultXmlSerializer to bridge XPathAdapter with standard Xml Serialization. -- XPathAdapter for DictionaryAdapter added IXPathSerializer to provide hooks for custom serialization. - -2.5.1 (2010-09-21) -================== -- Interface proxy with target Interface now accepts null as a valid target value (which can be replaced at a later stage). -- DictionaryAdapter behavior overrides are now ordered with all other behaviors -- BREAKING CHANGE: removed web logger so that by default Castle.Core works in .NET 4 client profile -- added paramter to ModuleScope disabling usage of signed modules. This is to workaround issue DYNPROXY-134. Also a descriptive exception message is being thrown now when the issue is detected. -- Added IDictionaryBehaviorBuilder to allow grouping behaviors -- Added GenericDictionaryAdapter to simplify generic value sources -- fixed issue DYNPROXY-138 - Error message missing space -- fixed false positive where DynamicProxy would not let you proxy interface with target interface when target object was a COM object. -- fixed ReflectionBasedDictionaryAdapter when using indexed properties - -2.5.0 (2010-08-21) -================== -- DynamicProxy will now not replicate non-public attribute types -- Applied patch from Kenneth Siewers Møller which adds parameterless constructor to DefaultSmtpSender implementation, to be able to configure the inner SmtpClient from the application configuration file (system.net.smtp). -- added support for .NET 4 and Silverlight 4, updated solution to VisualStudio 2010 -- Removed obsolete overload of CreateClassProxy -- Added class proxy with taget -- Added ability to intercept explicitly implemented generic interface methods on class proxy. -- DynamicProxy does not disallow intercepting members of System.Object anymore. AllMethodsHook will still filter them out though. -- Added ability to intercept explicitly implemented interface members on class proxy. Does not support generic members. -- Merged DynamicProxy into Core binary -- fixed DYNPROXY-ISSUE-132 - "MetaProperty equals implementation incorrect" -- Fixed bug in DiagnosticsLoggerTestCase, where when running as non-admin, the teardown will throw SecurityException (contributed by maxild) -- Split IoC specific classes into Castle.Windsor project -- Merged logging services solution -- Merged DynamicProxy project - -1.2.0 (2010-01-11) -================== - -- Added IEmailSender interface and its default implementation - -1.2.0 beta (2009-12-04) -================== - -- BREAKING CHANGE - added ChangeProxyTarget method to IChangeProxyTarget interface -- added docs to IChangeProxyTarget methods -- Fixed DYNPROXY-ISSUE-108 - Obtaining replicated custom attributes on proxy may fail when property setter throws exception on default value -- Moved custom attribute replication from CustomAttributeUtil to new interface - IAttributeDisassembler -- Exposed IAttributeDisassembler via ProxyGenerationOptions, so that users can plug their implementation for some convoluted scenarios. (for Silverlight) -- Moved IInterceptorSelector from Dynamic Proxy to Core (IOC-ISSUE-156) - -1.1.0 (2009-05-04) -================== - -- Applied Eric Hauser's patch fixing CORE-ISSUE-22 - "Support for environment variables in resource URI" - -- Applied Gauthier Segay's patch fixing CORE-ISSUE-20 - "Castle.Core.Tests won't build via nant because it use TraceContext without referencing System.Web.dll" - -- Added simple interface to ComponentModel to make optional properties required. - -- Applied Mark's -- -- patch that changes - the Core to support being compiled for Silverlight 2 - -- Applied Louis DeJardin's patch adding TraceLogger as a new logger implementation - -- Applied Chris Bilson's patch fixing CORE-15 - "WebLogger Throws When Logging Outside of an HttpContext" - -Release Candidate 3 -=================== - -- Added IServiceProviderEx which extends IServiceProvider - -- Added Pair class. - -- Applied Bill Pierce's patch fixing CORE-9 - "Allow CastleComponent Attribute to Specify Lifestyle in Constructor" - -- Added UseSingleInterfaceProxy to CompomentModel to control the proxying - behavior while maintaining backward compatibility. - Added the corresponding ComponentProxyBehaviorAttribute. - -- Made NullLogger and IExtnededLogger - -- Enabled a new format on ILogger interface, with 6 overloads for each method: - Debug(string) - Debug(string, Exception) - Debug(string, params object[]) - DebugFormat(string, params object[]) - DebugFormat(Exception, string, params object[]) - DebugFormat(IFormatProvider, string, params object[]) - DebugFormat(IFormatProvider, Exception, string, params object[]) - - The "FatalError" overloads where marked as [Obsolete], replaced by "Fatal" and "FatalFormat". - -0.0.1.0 -======= - -- Included IProxyTargetAccessor - -- Removed IMethodInterceptor and IMethodInvocation, that have been replaced - by IInterceptor and IInvocation - -- Added FindByPropertyInfo to PropertySetCollection - -- Made the DependencyModel.IsOptional property writable - -- Applied Curtis Schlak's patch fixing IOC-27 - "assembly resource format only works for resources where the assemblies name and default namespace are the same." - - Quoting: - - "I chose to preserve backwards compatibility by implementing the code in the - reverse order as suggested by the reporter. Given the following URI for a resource: - - assembly://my.cool.assembly/context/moo/file.xml - - It will initially look for an embedded resource with the manifest name of - "my.cool.assembly.context.moo.file.xml" in the loaded assembly my.cool.assembly.dll. - If it does not find it, then it looks for the embedded resource with the manifest name - of "context.moo.file.xml". - -- IServiceEnabledComponent Introduced to be used across the project as - a standard way to have access to common services, for example, logger factories - -- Added missing log factories - -- Refactor StreamLogger and DiagnosticLogger to be more consistent behavior-wise - -- Refactored WebLogger to extend LevelFilteredLogger (removed duplication) - -- Refactored LoggerLevel order - -- Project started diff --git a/packages/Castle.Core.2.5.2/lib/Committers.txt b/packages/Castle.Core.2.5.2/lib/Committers.txt deleted file mode 100644 index f9bf2dfce..000000000 --- a/packages/Castle.Core.2.5.2/lib/Committers.txt +++ /dev/null @@ -1,80 +0,0 @@ -This file names who's behind the Castle Team. You can find more about us at http://www.castleproject.org/community/team.html - -Committers -========== -(ordered by the date when joined the project) - -- hammett/Hamilton Verissimo -- Henry Conceição -- Kevin Williams -- Craig Neuwirt -- Gilles Bayon -- Andrew Hallock -- Jason Nelson -- Dru Sellers -- John Morales -- CobraLord -- Dan -- Tatham Oddie -- Fabio David Batista -- Chad Humphries -- Ayende Rahien -- G. Richard Bellamy -- Roelof Blom -- Ahmed Ghandour -- Josh Robb -- Ernst Naezer -- Marc-Andre Cournoyer -- Fabian Schmied -- Dave Godfrey -- Markus Zywitza -- Lee Henson -- Ken Egozi -- Chris Ortman -- Jonathon Rossi -- Tuna Toksöz -- Krzysztof Kozmic -- Mauricio Scheffer -- John Simons - -Managers -======== - - Patch Manager - ------------- - - - Josh Robb - - Documentation Manager - --------------------- - - - - - -PMC Members -=========== -(ordered by the date when joined the PMC) - -- hammett/Hamilton Verissimo (Chair) -- Henry Conceição -- Kevin Williams -- Craig Neuwirt -- Gilles Bayon -- Chad Humphries -- Ayende Rahien -- Fabio David Batista -- Roelof Blom -- Josh Robb -- Jonathon Rossi - -Emeritus -======== -(no longer active committers) - -- Gilles Bayon -- Dan -- Andrew Hallock -- John Morales -- CobraLord -- Tatham Oddie -- Ahmed Ghandour diff --git a/packages/Castle.Core.2.5.2/lib/NET35/Castle.Core.dll b/packages/Castle.Core.2.5.2/lib/NET35/Castle.Core.dll deleted file mode 100644 index 0207baeae..000000000 Binary files a/packages/Castle.Core.2.5.2/lib/NET35/Castle.Core.dll and /dev/null differ diff --git a/packages/Castle.Core.2.5.2/lib/NET35/Castle.Core.xml b/packages/Castle.Core.2.5.2/lib/NET35/Castle.Core.xml deleted file mode 100644 index 448fd69a0..000000000 --- a/packages/Castle.Core.2.5.2/lib/NET35/Castle.Core.xml +++ /dev/null @@ -1,4927 +0,0 @@ - - - - Castle.Core - - - - - Assignes a specific dictionary key. - - - - - Defines the contract for customizing dictionary access. - - - - - Determines relative order to apply related behaviors. - - - - - Determines relative order to apply related behaviors. - - - - - Defines the contract for updating dictionary values. - - - - - Sets the stored dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if the property should be stored. - - - - Defines the contract for building s. - - - - - Builds the dictionary behaviors. - - - - - - Abstract adapter for the support - needed by the - - - - - Adds an element with the provided key and value to the object. - - The to use as the key of the element to add. - The to use as the value of the element to add. - An element with the same key already exists in the object. - key is null. - The is read-only.-or- The has a fixed size. - - - - Removes all elements from the object. - - The object is read-only. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - key is null. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - The type of the source cannot be cast automatically to the type of the destination array. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - Gets or sets the with the specified key. - - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Constant to use when making assembly internals visible to Castle.Core - [assembly: InternalsVisibleTo(CoreInternalsVisible.ToCastleCore)] - - - - - Constant to use when making assembly internals visible to proxy types generated by DynamicProxy. Required when proxying internal types. - [assembly: InternalsVisibleTo(CoreInternalsVisible.ToDynamicProxyGenAssembly2)] - - - - - Abstract implementation of . - - - - - Conract for traversing a . - - - - - Identifies a property should be represented as a nested component. - - - - - Defines the contract for building typed dictionary keys. - - - - - Builds the specified key. - - The dictionary adapter. - The current key. - The property. - The updated key - - - - Defines the contract for retrieving dictionary values. - - - - - Gets the effective dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if return only existing. - The effective property value. - - - - Applies no prefix. - - - - - Gets or sets the prefix. - - The prefix. - - - - Identifies the dictionary adapter types. - - - - - Identifies an interface or property to be pre-feteched. - - - - - Instructs fetching to occur. - - - - - Instructs fetching according to - - - - - - Gets whether or not fetching should occur. - - - - - Assigns a property to a group. - - - - - Constructs a group assignment. - - The group name. - - - - Constructs a group assignment. - - The group name. - - - - Gets the group the property is assigned to. - - - - - Assigns a specific dictionary key. - - - - - Initializes a new instance of the class. - - The key. - - - - Initializes a new instance of the class. - - The compound key. - - - - Assigns a prefix to the keyed properties of an interface. - - - - - Initializes a default instance of the class. - - - - - Initializes a new instance of the class. - - The prefix for the keyed properties of the interface. - - - - Gets the prefix key added to the properties of the interface. - - - - - Substitutes part of key with another string. - - - - - Initializes a new instance of the class. - - The old value. - The new value. - - - - Requests support for multi-level editing. - - - - - Contract for dictionary initialization. - - - - - Performs any initialization of the - - The dictionary adapter. - The dictionary behaviors. - - - - Generates a new GUID on demand. - - - - - Support for on-demand value resolution. - - - - - Suppress property change notifications. - - - - - Provides simple string formatting from existing properties. - - - - - Gets the string format. - - - - - Gets the format properties. - - - - - Identifies a property should be represented as a delimited string value. - - - - - Gets the separator. - - - - - Converts all properties to strings. - - - - - Gets or sets the format. - - The format. - - - - Suppress property change notifications. - - - - - Contract for property descriptor initialization. - - - - - Performs any initialization of the - - The property descriptor. - The property behaviors. - - - - Assigns a prefix to the keyed properties using the interface name. - - - - - Manages conversion between property values. - - - - - Initializes a new instance of the class. - - The converter. - - - - Gets the effective dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if return only existing. - The effective property value. - - - - - - - - - Contract for creating additional Dictionary adapters. - - - - - Contract for manipulating the Dictionary adapter. - - - - - Contract for editing the Dictionary adapter. - - - - - Contract for managing Dictionary adapter notifications. - - - - - Contract for validating Dictionary adapter. - - - - - Uses Reflection.Emit to expose the properties of a dictionary - through a dynamic implementation of a typed interface. - - - - - Defines the contract for building typed dictionary adapters. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - The property descriptor. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the namedValues. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the namedValues. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the xpath navigable. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the xpath navigable. - - The type represented by T must be an interface with properties. - - - - - Gets the associated with the type. - - The typed interface. - The adapter meta-data. - - - - Gets the associated with the type. - - The typed interface. - The property descriptor. - The adapter meta-data. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Describes a dictionary property. - - - - - Initializes an empty class. - - - - - Initializes a new instance of the class. - - The property. - The property behaviors. - - - - Copies an existinginstance of the class. - - - - - - - Gets the key. - - The dictionary adapter. - The key. - The descriptor. - - - - - Adds the key builder. - - The builder. - - - - Adds the key builders. - - The builders. - - - - Copies the key builders to the other - - - - - - - Copies the selected key builders to the other - - - - - - - - Gets the property value. - - The dictionary adapter. - The key. - The stored value. - The descriptor. - true if return only existing. - - - - - Adds the dictionary getter. - - The getter. - - - - Adds the dictionary getters. - - The getters. - - - - Copies the property getters to the other - - - - - - - Copies the selected property getters to the other - - - - - - - - Sets the property value. - - The dictionary adapter. - The key. - The value. - The descriptor. - - - - - Adds the dictionary setter. - - The setter. - - - - Adds the dictionary setters. - - The setters. - - - - Copies the property setters to the other - - - - - - - Copies the selected property setters to the other - - - - - - - - Adds the behaviors. - - - - - - - Adds the behaviors. - - - - - - - Adds the behaviors from the builders. - - - - - - - Copies the behaviors to the other - - - - - - - Copies the behaviors to the other - - - - - - - - - - - - - Gets the property name. - - - - - Gets the property type. - - - - - Gets the property. - - The property. - - - - Returns true if the property is dynamic. - - - - - Gets additional state. - - - - - Determines if property should be fetched. - - - - - Determines if notifications should occur. - - - - - Gets the property behaviors. - - - - - Gets the type converter. - - The type converter. - - - - Gets the key builders. - - The key builders. - - - - Gets the setter. - - The setter. - - - - Gets the getter. - - The getter. - - - - Adds the dictionary initializers. - - The initializers. - - - - Adds the dictionary initializers. - - The initializers. - - - - Copies the initializers to the other - - - - - - - Copies the filtered initializers to the other - - - - - - - - Adds the dictionary meta-data initializers. - - The meta-data initializers. - - - - Adds the dictionary meta-data initializers. - - The meta-data initializers. - - - - Copies the meta-initializers to the other - - - - - - - Copies the filtered meta-initializers to the other - - - - - - - - Gets the initializers. - - The initializers. - - - - Gets the meta-data initializers. - - The meta-data initializers. - - - - Contract for dictionary meta-data initialization. - - - - - Performs any initialization of the dictionary adapter meta-data. - - The dictionary adapter factory. - The dictionary adapter meta. - - - - - Contract for dictionary validation. - - - - - Determines if is valid. - - The dictionary adapter. - true if valid. - - - - Validates the . - - The dictionary adapter. - The error summary information. - - - - Validates the for a property. - - The dictionary adapter. - The property to validate. - The property summary information. - - - - Invalidates any results cached by the validator. - - The dictionary adapter. - - - - - - - - - Initializes a new instance of the class. - - The name values. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Adapts the specified name values. - - The name values. - - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets or sets the with the specified key. - - - - - - Helper class for retrieving attributes. - - - - - Gets the attribute. - - The member. - The member attribute. - - - - Gets the attributes. Does not consider inherited attributes! - - The member. - The member attributes. - - - - Gets the type attribute. - - The type. - The type attribute. - - - - Gets the type attributes. - - The type. - The type attributes. - - - - Gets the type converter. - - The member. - - - - - Gets the attribute. - - The member. - The member attribute. - - - - Contract for typed dynamic value resolution. - - - - - - Contract for dynamic value resolution. - - - - - Encapsulates an invocation of a proxied method. - - - - - Overrides the value of an argument at the given with the - new provided. - - - This method accepts an , however the value provided must be compatible - with the type of the argument defined on the method, otherwise an exception will be thrown. - - The index of the argument to override. - The new value for the argument. - - - - Gets the value of the argument at the specified . - - The index. - The value of the argument at the specified . - - - - Returns the concrete instantiation of the on the proxy, with any generic - parameters bound to real types. - - - The concrete instantiation of the on the proxy, or the if - not a generic method. - - Can be slower than calling . - - - - Returns the concrete instantiation of , with any - generic parameters bound to real types. - For interface proxies, this will point to the on the target class. - - The concrete instantiation of , or - if not a generic method. - In debug builds this can be slower than calling . - - - - Proceeds the call to the next interceptor in line, and ultimately to the target method. - - - Since interface proxies without a target don't have the target implementation to proceed to, - it is important, that the last interceptor does not call this method, otherwise a - will be thrown. - - - - - Gets the proxy object on which the intercepted method is invoked. - - Proxy object on which the intercepted method is invoked. - - - - Gets the object on which the invocation is performed. This is different from proxy object - because most of the time this will be the proxy target object. - - - The invocation target. - - - - Gets the type of the target object for the intercepted method. - - The type of the target object. - - - - Gets the arguments that the has been invoked with. - - The arguments the method was invoked with. - - - - Gets the generic arguments of the method. - - The generic arguments, or null if not a generic method. - - - - Gets the representing the method being invoked on the proxy. - - The representing the method being invoked. - - - - For interface proxies, this will point to the on the target class. - - The method invocation target. - - - - Gets or sets the return value of the method. - - The return value of the method. - - - - Used during the target type inspection process. Implementors have a chance to customize the - proxy generation process. - - - - - Invoked by the generation process to determine if the specified method should be proxied. - - The type which declares the given method. - The method to inspect. - True if the given method should be proxied; false otherwise. - - - - Invoked by the generation process to notify that a member was not marked as virtual. - - The type which declares the non-virtual member. - The non-virtual member. - - This method gives an opportunity to inspect any non-proxyable member of a type that has - been requested to be proxied, and if appropriate - throw an exception to notify the caller. - - - - - Invoked by the generation process to notify that the whole process has completed. - - - - - Interface describing elements composing generated type - - - - - Checks if the method is public or protected. - - - - - - - Performs some basic screening and invokes the - to select methods. - - - - - - - - - Provides functionality for disassembling instances of attributes to CustomAttributeBuilder form, during the process of emiting new types by Dynamic Proxy. - - - - - Disassembles given attribute instance back to corresponding CustomAttributeBuilder. - - An instance of attribute to disassemble - corresponding 1 to 1 to given attribute instance, or null reference. - - Implementers should return that corresponds to given attribute instance 1 to 1, - that is after calling specified constructor with specified arguments, and setting specified properties and fields with values specified - we should be able to get an attribute instance identical to the one passed in . Implementer can return null - if it wishes to opt out of replicating the attribute. Notice however, that for some cases, like attributes passed explicitly by the user - it is illegal to return null, and doing so will result in exception. - - - - - Handles error during disassembly process - - Type of the attribute being disassembled - Exception thrown during the process - usually null, or (re)throws the exception - - - - Here we try to match a constructor argument to its value. - Since we can't get the values from the assembly, we use some heuristics to get it. - a/ we first try to match all the properties on the attributes by name (case insensitive) to the argument - b/ if we fail we try to match them by property type, with some smarts about convertions (i,e: can use Guid for string). - - - - - We have the following rules here. - Try to find a matching type, failing that, if the parameter is string, get the first property (under the assumption that - we can convert it. - - - - - Attributes can only accept simple types, so we return null for null, - if the value is passed as string we call to string (should help with converting), - otherwise, we use the value as is (enums, integer, etc). - - - - - Applied to the assemblies saved by in order to persist the cache data included in the persisted assembly. - - - - - Base class that exposes the common functionalities - to proxy generation. - - - - - Generates a parameters constructor that initializes the proxy - state with just to make it non-null. - - This constructor is important to allow proxies to be XML serializable - - - - - - It is safe to add mapping (no mapping for the interface exists) - - - - - - - - Generates the constructor for the class that extends - - - - - - - - - Default implementation of interface producing in-memory proxy assemblies. - - - - - Abstracts the implementation of proxy type construction. - - - - - Creates a proxy type for given , using provided. - - The class type to proxy. - The proxy generation options. - The generated proxy type. - Thrown when is a generic type definition. - Thrown when is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given , implementing , using provided. - - The class type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified class and interfaces. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given , implementing , using provided. - - The class type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified class and interfaces. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type that proxies calls to members on , implementing , using provided. - - The interface type to proxy. - Additional interface types to proxy. - Type implementing on which calls to the interface members should be intercepted. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface that 'proceeds' executions to the specified target. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given that delegates all calls to the provided interceptors. - - The interface type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface and additional interfaces that delegate all executions to the specified interceptors. - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given and that delegates all calls to the provided interceptors and allows interceptors to switch the actual target of invocation. - - The interface type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface(s) that delegate all executions to the specified interceptors - and uses an instance of the interface as their targets (i.e. ), rather than a class. All classes should then implement interface, - to allow interceptors to switch invocation target with instance of another type implementing called interface. - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Gets or sets the that this logs to. - - - - - Gets the associated with this builder. - - The module scope associated with this builder. - - - - Initializes a new instance of the class with new . - - - - - Initializes a new instance of the class. - - The module scope for generated proxy types. - - - - Registers custom disassembler to handle disassembly of specified type of attributes. - - Type of attributes to handle - Disassembler converting existing instances of Attributes to CustomAttributeBuilders - - When disassembling an attribute Dynamic Proxy will first check if an custom disassembler has been registered to handle attributes of that type, - and if none is found, it'll use the . - - - - - Attributes should be replicated if they are non-inheritable, - but there are some special cases where the attributes means - something to the CLR, where they should be skipped. - - - - - Initializes a new instance of the class. - - Target element. This is either target type or target method for invocation types. - The type of the proxy. This is base type for invocation types. - The interfaces. - The options. - - - - Initializes a new instance of the class. - - Type of the target. - The interfaces. - The options. - - - s - Provides appropriate Ldc.X opcode for the type of primitive value to be loaded. - - - - - Provides appropriate Ldind.X opcode for - the type of primitive value to be loaded indirectly. - - - - - Emits a load opcode of the appropriate kind for a constant string or - primitive value. - - - - - - - Emits a load opcode of the appropriate kind for the constant default value of a - type, such as 0 for value types and null for reference types. - - - - - Emits a load indirect opcode of the appropriate type for a value or object reference. - Pops a pointer off the evaluation stack, dereferences it and loads - a value of the specified type. - - - - - - - Emits a store indirectopcode of the appropriate type for a value or object reference. - Pops a value of the specified type and a pointer off the evaluation stack, and - stores the value. - - - - - - - Summary description for PropertiesCollection. - - - - - Wraps a reference that is passed - ByRef and provides indirect load/store support. - - - - - Summary description for NewArrayExpression. - - - - - - - - - - Provides appropriate Stind.X opcode - for the type of primitive value to be stored indirectly. - - - - - Returns list of all unique interfaces implemented given types, including their base interfaces. - - - - - - - Initializes a new instance of the class. - - The name. - Type declaring the original event being overriten, or null. - - The add method. - The remove method. - The attributes. - - - - Represents the scope of uniquenes of names for types and their members - - - - - Gets a unique name based on - - Name suggested by the caller - Unique name based on . - - Implementers should provide name as closely resembling as possible. - Generally if no collision occurs it is suggested to return suggested name, otherwise append sequential suffix. - Implementers must return deterministic names, that is when is called twice - with the same suggested name, the same returned name should be provided each time. Non-deterministic return - values, like appending random suffices will break serialization of proxies. - - - - - Returns new, disposable naming scope. It is responsibilty of the caller to make sure that no naming collision - with enclosing scope, or other subscopes is possible. - - New naming scope. - - - - Returns the methods implemented by a type. Use this instead of Type.GetMethods() to work around a CLR issue - where duplicate MethodInfos are returned by Type.GetMethods() after a token of a generic type's method was loaded. - - - - - Determines whether this assembly has internals visible to dynamic proxy. - - The assembly to inspect. - - - - Determines whether the specified method is internal. - - The method. - - true if the specified method is internal; otherwise, false. - - - - - Because we need to cache the types based on the mixed in mixins, we do the following here: - - Get all the mixin interfaces - - Sort them by full name - - Return them by position - - The idea is to have reproducable behavior for the case that mixins are registered in different orders. - This method is here because it is required - - - - - Summary description for ModuleScope. - - - - - The default file name used when the assembly is saved using . - - - - - The default assembly (simple) name used for the assemblies generated by a instance. - - - - - Initializes a new instance of the class; assemblies created by this instance will not be saved. - - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved. - - If set to true saves the generated module. - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved. - - If set to true saves the generated module. - If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions. - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved and what simple names are to be assigned to them. - - If set to true saves the generated module. - If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions. - The simple name of the strong-named assembly generated by this . - The path and file name of the manifest module of the strong-named assembly generated by this . - The simple name of the weak-named assembly generated by this . - The path and file name of the manifest module of the weak-named assembly generated by this . - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved and what simple names are to be assigned to them. - - If set to true saves the generated module. - If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions. - Naming scope used to provide unique names to generated types and their members (usually via sub-scopes). - The simple name of the strong-named assembly generated by this . - The path and file name of the manifest module of the strong-named assembly generated by this . - The simple name of the weak-named assembly generated by this . - The path and file name of the manifest module of the weak-named assembly generated by this . - - - - Returns a type from this scope's type cache, or null if the key cannot be found. - - The key to be looked up in the cache. - The type from this scope's type cache matching the key, or null if the key cannot be found - - - - Registers a type in this scope's type cache. - - The key to be associated with the type. - The type to be stored in the cache. - - - - Gets the key pair used to sign the strong-named assembly generated by this . - - - - - - Gets the specified module generated by this scope, creating a new one if none has yet been generated. - - If set to true, a strong-named module is returned; otherwise, a weak-named module is returned. - A strong-named or weak-named module generated by this scope, as specified by the parameter. - - - - Gets the strong-named module generated by this scope, creating a new one if none has yet been generated. - - A strong-named module generated by this scope. - - - - Gets the weak-named module generated by this scope, creating a new one if none has yet been generated. - - A weak-named module generated by this scope. - - - - Saves the generated assembly with the name and directory information given when this instance was created (or with - the and current directory if none was given). - - - - This method stores the generated assembly in the directory passed as part of the module information specified when this instance was - constructed (if any, else the current directory is used). If both a strong-named and a weak-named assembly - have been generated, it will throw an exception; in this case, use the overload. - - - If this was created without indicating that the assembly should be saved, this method does nothing. - - Both a strong-named and a weak-named assembly have been generated. - The path of the generated assembly file, or null if no file has been generated. - - - - Saves the specified generated assembly with the name and directory information given when this instance was created - (or with the and current directory if none was given). - - True if the generated assembly with a strong name should be saved (see ); - false if the generated assembly without a strong name should be saved (see . - - - This method stores the specified generated assembly in the directory passed as part of the module information specified when this instance was - constructed (if any, else the current directory is used). - - - If this was created without indicating that the assembly should be saved, this method does nothing. - - - No assembly has been generated that matches the parameter. - - The path of the generated assembly file, or null if no file has been generated. - - - - Loads the generated types from the given assembly into this 's cache. - - The assembly to load types from. This assembly must have been saved via or - , or it must have the manually applied. - - This method can be used to load previously generated and persisted proxy types from disk into this scope's type cache, eg. in order - to avoid the performance hit associated with proxy generation. - - - - - Users of this should use this lock when accessing the cache. - - - - - Gets the strong-named module generated by this scope, or if none has yet been generated. - - The strong-named module generated by this scope, or if none has yet been generated. - - - - Gets the file name of the strongly named module generated by this scope. - - The file name of the strongly named module generated by this scope. - - - - Gets the directory where the strongly named module generated by this scope will be saved, or if the current directory - is used. - - The directory where the strongly named module generated by this scope will be saved when is called - (if this scope was created to save modules). - - - - Gets the weak-named module generated by this scope, or if none has yet been generated. - - The weak-named module generated by this scope, or if none has yet been generated. - - - - Gets the file name of the weakly named module generated by this scope. - - The file name of the weakly named module generated by this scope. - - - - Gets the directory where the weakly named module generated by this scope will be saved, or if the current directory - is used. - - The directory where the weakly named module generated by this scope will be saved when is called - (if this scope was created to save modules). - - - - ProxyBuilder that persists the generated type. - - - The saved assembly contains just the last generated type. - - - - - Initializes a new instance of the class. - - - - - Saves the generated assembly to a physical file. Note that this renders the unusable. - - The path of the generated assembly file, or null if no assembly has been generated. - This method does not support saving multiple files. If both a signed and an unsigned module have been generated, use the - respective methods of the . - - - - Initializes a new instance of the class. - - The hook. - - - - Initializes a new instance of the class. - - - - - Provides proxy objects for classes and interfaces. - - - - - Initializes a new instance of the class. - - Proxy types builder. - - - - Initializes a new instance of the class. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - Object proxying calls to members of on object. - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no parameterless constructor exists on type . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no parameterless constructor exists on type . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates the proxy type for class proxy with given class, implementing given and using provided . - - The base class for proxy type. - The interfaces that proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy with target for given interface, implementing given on given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - Actual type that the proxy type will encompass. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy with target interface for given interface, implementing given on given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy without target for given interface, implementing given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Gets or sets the that this log to. - - - - - Gets the proxy builder instance used to generate proxy types. - - The proxy builder. - - - - - - - - - - - - - - - For interface proxies, this will point to the - on the target class - - - - - Handles the deserialization of proxies. - - - - - Resets the used for deserialization to a new scope. - - This is useful for test cases. - - - - Resets the used for deserialization to a given . - - The scope to be used for deserialization. - By default, the deserialization process uses a different scope than the rest of the application, which can lead to multiple proxies - being generated for the same type. By explicitly setting the deserialization scope to the application's scope, this can be avoided. - - - - Gets the used for deserialization. - - As has no way of automatically determining the scope used by the application (and the application - might use more than one scope at the same time), uses a dedicated scope instance for deserializing proxy - types. This instance can be reset and set to a specific value via and . - - - - Holds objects representing methods of class. - - - - - Holds objects representing methods of class. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Provides an extension point that allows proxies to choose specific interceptors on - a per method basis. - - - - - Selects the interceptors that should intercept calls to the given . - - The type declaring the method to intercept. - The method that will be intercepted. - All interceptors registered with the proxy. - An array of interceptors to invoke upon calling the . - - This method is called only once per proxy instance, upon the first call to the - . Either an empty array or null are valid return values to indicate - that no interceptor should intercept calls to the method. Although it is not advised, it is - legal to return other implementations than these provided in - . - - - - - Creates a new lock. - - - - - - This interface should be implemented by classes - that are available in a bigger context, exposing - the container to different areas in the same application. - - For example, in Web application, the (global) HttpApplication - subclasses should implement this interface to expose - the configured container - - - - - - Exposes means to change target objects of proxies and invocations - - - - - Changes the target object () of current . - - The new value of target of invocation. - - Although the method takes the actual instance must be of type assignable to , otherwise an will be thrown. - Also while it's technically legal to pass null reference (Nothing in Visual Basic) as , for obvious reasons Dynamic Proxy will not be able to call the intercepted method on such target. - In this case last interceptor in the pipeline mustn't call or a will be throws. - Also while it's technically legal to pass proxy itself as , this would create stack overflow. - In this case last interceptor in the pipeline mustn't call or a will be throws. - - Thrown when is not assignable to the proxied type. - - - - Permanently changes the target object of the proxy. This does not affect target of the current invocation. - - The new value of target of the proxy. - - Although the method takes the actual instance must be of type assignable to proxy's target type, otherwise an will be thrown. - Also while it's technically legal to pass null reference (Nothing in Visual Basic) as , for obvious reasons Dynamic Proxy will not be able to call the intercepted method on such target. - In this case last interceptor in the pipeline mustn't call or a will be throws. - Also while it's technically legal to pass proxy itself as , this would create stack overflow. - In this case last interceptor in the pipeline mustn't call or a will be throws. - - Thrown when is not assignable to the proxied type. - - - - New interface that is going to be used by DynamicProxy 2 - - - - - Get the proxy target (note that null is a valid target!) - - - - - - Gets the interceptors for the proxy - - - - - - Defines that the implementation wants a - in order to - access other components. The creator must be aware - that the component might (or might not) implement - the interface. - - - Used by Castle Project components to, for example, - gather logging factories - - - - - Increments IServiceProvider with a generic service resolution operation. - - - - - Provides a factory that can produce either or - classes. - - - - - Manages the instantiation of s. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Gets the configuration file. - - i.e. log4net.config - - - - - Used to create the TraceLogger implementation of ILogger interface. See . - - - - - Gets the configuration file. - - i.e. log4net.config - - - - - Interface for Context Properties implementations - - - - This interface defines a basic property get set accessor. - - - Based on the ContextPropertiesBase of log4net, by Nicko Cadell. - - - - - - Gets or sets the value of a property - - - The value for the property with the specified key - - - - Gets or sets the value of a property - - - - - - NullLogFactory used when logging is turned off. - - - - - Creates an instance of ILogger with the specified name. - - Name. - - - - - Creates an instance of ILogger with the specified name and LoggerLevel. - - Name. - Level. - - - - - Creates outputing - to files. The name of the file is derived from the log name - plus the 'log' extension. - - - - - Provides an interface that supports and - allows the storage and retrieval of Contexts. These are supported in - both log4net and NLog. - - - - - Manages logging. - - - This is a facade for the different logging subsystems. - It offers a simplified interface that follows IOC patterns - and a simplified priority/level/severity abstraction. - - - - - Logs a debug message. - - The message to log - - - - Logs a debug message. - - The exception to log - The message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The message to log - - - - Logs an info message. - - The exception to log - The message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The message to log - - - - Logs a warn message. - - The exception to log - The message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The message to log - - - - Logs an error message. - - The exception to log - The message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The message to log - - - - Logs a fatal message. - - The exception to log - The message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal error message. - - The Message - - - - Logs a fatal error message. - - The Message - The Exception - - - - Logs a fatal error message. - - Message format - Array of objects to write using format - - - - Create a new child logger. - The name of the child logger is [current-loggers-name].[passed-in-name] - - The Subname of this logger. - The New ILogger instance. - If the name has an empty element name. - - - - Determines if messages of priority "debug" will be logged. - - True if "debug" messages will be logged. - - - - Determines if messages of priority "info" will be logged. - - True if "info" messages will be logged. - - - - Determines if messages of priority "warn" will be logged. - - True if "warn" messages will be logged. - - - - Determines if messages of priority "error" will be logged. - - True if "error" messages will be logged. - - - - Determines if messages of priority "fatal" will be logged. - - True if "fatal" messages will be logged. - - - - Determines if messages of priority "fatalError" will be logged. - - True if "fatalError" messages will be logged. - - - - Exposes the Global Context of the extended logger. - - - - - Exposes the Thread Context of the extended logger. - - - - - Exposes the Thread Stack of the extended logger. - - - - - Supporting Logger levels. - - - - - Logging will be off - - - - - Fatal logging level - - - - - Error logging level - - - - - Warn logging level - - - - - Info logging level - - - - - Debug logging level - - - - - The Logger sending everything to the standard output streams. - This is mainly for the cases when you have a utility that - does not have a logger to supply. - - - - - The Level Filtered Logger class. This is a base clase which - provides a LogLevel attribute and reroutes all functions into - one Log method. - - - - - Creates a new LevelFilteredLogger. - - - - - Keep the instance alive in a remoting scenario - - - - - - Logs a debug message. - - The message to log - - - - Logs a debug message. - - The exception to log - The message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - Message format - Array of objects to write using format - - - - Logs an info message. - - The message to log - - - - Logs an info message. - - The exception to log - The message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - Message format - Array of objects to write using format - - - - Logs a warn message. - - The message to log - - - - Logs a warn message. - - The exception to log - The message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - Message format - Array of objects to write using format - - - - Logs an error message. - - The message to log - - - - Logs an error message. - - The exception to log - The message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - Message format - Array of objects to write using format - - - - Logs a fatal message. - - The message to log - - - - Logs a fatal message. - - The exception to log - The message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - Message format - Array of objects to write using format - - - - Logs a fatal error message. - - The Message - - - - Logs a fatal error message. - - The Message - The Exception - - - - Logs a fatal error message. - - Message format - Array of objects to write using format - - - - Implementors output the log content by implementing this method only. - Note that exception can be null - - - - - - - - - The LoggerLevel that this logger - will be using. Defaults to LoggerLevel.Off - - - - - The name that this logger will be using. - Defaults to String.Empty - - - - - Determines if messages of priority "debug" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "info" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "warn" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "error" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "fatal" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "fatal" will be logged. - - true if log level flags include the bit - - - - Creates a new ConsoleLogger with the Level - set to LoggerLevel.Debug and the Name - set to String.Empty. - - - - - Creates a new ConsoleLogger with the Name - set to String.Empty. - - The logs Level. - - - - Creates a new ConsoleLogger with the Level - set to LoggerLevel.Debug. - - The logs Name. - - - - Creates a new ConsoleLogger. - - The logs Name. - The logs Level. - - - - A Common method to log. - - The level of logging - The name of the logger - The Message - The Exception - - - - Returns a new ConsoleLogger with the name - added after this loggers name, with a dot in between. - - The added hierarchical name. - A new ConsoleLogger. - - - - The Logger using standart Diagnostics namespace. - - - - - Creates a logger based on . - - - - - - Creates a logger based on . - - - - - - - Creates a logger based on . - - - - - - - - The Null Logger class. This is useful for implementations where you need - to provide a logger to a utility class, but do not want any output from it. - It also helps when you have a utility that does not have a logger to supply. - - - - - Creates a new NullLogger. - - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - Returns this NullLogger. - - Ignored - This ILogger instance. - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - Returns empty context properties. - - - - - Returns empty context properties. - - - - - Returns empty context stacks. - - - - - The Stream Logger class. This class can stream log information - to any stream, it is suitable for storing a log file to disk, - or to a MemoryStream for testing your components. - - - This logger is not thread safe. - - - - - Creates a new StreamLogger with default encoding - and buffer size. Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - - - Creates a new StreamLogger with default buffer size. - Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - The encoding that will be used for this stream. - - - - - - Creates a new StreamLogger. - Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - The encoding that will be used for this stream. - - - - The buffer size that will be used for this stream. - - - - - - Creates a new StreamLogger with - Debug as default Level. - - The name of the log. - The StreamWriter the log will write to. - - - - The TraceLogger sends all logging to the System.Diagnostics.TraceSource - built into the .net framework. - - - Logging can be configured in the system.diagnostics configuration - section. - - If logger doesn't find a source name with a full match it will - use source names which match the namespace partially. For example you can - configure from all castle components by adding a source name with the - name "Castle". - - If no portion of the namespace matches the source named "Default" will - be used. - - - - - Build a new trace logger based on the named TraceSource - - The name used to locate the best TraceSource. In most cases comes from the using type's fullname. - - - - Build a new trace logger based on the named TraceSource - - The name used to locate the best TraceSource. In most cases comes from the using type's fullname. - The default logging level at which this source should write messages. In almost all cases this - default value will be overridden in the config file. - - - - Create a new child logger. - The name of the child logger is [current-loggers-name].[passed-in-name] - - The Subname of this logger. - The New ILogger instance. - - - - This is an abstract implementation - that deals with methods that can be abstracted away - from underlying implementations. - - - AbstractConfiguration makes easier to implementers - to create a new version of - - - - - is a interface encapsulating a configuration node - used to retrieve configuration values. - - - - - Gets the value of the node and converts it - into specified . - - The - - The Default value returned if the conversion fails. - - The Value converted into the specified type. - - - - Gets the name of the node. - - - The Name of the node. - - - - - Gets the value of the node. - - - The Value of the node. - - - - - Gets an of - elements containing all node children. - - The Collection of child nodes. - - - - Gets an of the configuration attributes. - - - - - Gets the value of the node and converts it - into specified . - - The - - The Default value returned if the convertion fails. - - The Value converted into the specified type. - - - - Gets the name of the . - - - The Name of the . - - - - - Gets the value of . - - - The Value of the . - - - - - Gets all child nodes. - - The of child nodes. - - - - Gets node attributes. - - - All attributes of the node. - - - - - A collection of objects. - - - - - Creates a new instance of ConfigurationCollection. - - - - - Creates a new instance of ConfigurationCollection. - - - - - Summary description for MutableConfiguration. - - - - - Initializes a new instance of the class. - - The name. - - - - Gets the value of . - - - The Value of the . - - - - - Pendent - - - - - Deserializes the specified node into an abstract representation of configuration. - - The node. - - - - - If a config value is an empty string we return null, this is to keep - backward compability with old code - - - - - General purpose class to represent a standard pair of values. - - Type of the first value - Type of the second value - - - - Constructs a pair with its values - - - - - - - List of utility methods related to dynamic proxy operations - - - - - Determines whether the specified type is a proxy generated by - DynamicProxy (1 or 2). - - The type. - - true if it is a proxy; otherwise, false. - - - - - Pendent - - - - - Initializes a new instance of the class. - - The target. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - - is null. - - - - Adds an element with the provided key and value to the object. - - The to use as the key of the element to add. - The to use as the value of the element to add. - - is null. - An element with the same key already exists in the object. - The is read-only.-or- The has a fixed size. - - - - Removes all elements from the object. - - The object is read-only. - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - - is null. - The object is read-only.-or- The has a fixed size. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in at which copying begins. - - is null. - - is less than zero. - - 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 . - The type of the source cannot be cast automatically to the type of the destination . - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets or sets the with the specified key. - - - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Represents a 'streamable' resource. Can - be a file, a resource in an assembly. - - - - - Returns a reader for the stream - - - It's up to the caller to dispose the reader. - - - - - - Returns a reader for the stream - - - It's up to the caller to dispose the reader. - - - - - - - Returns an instance of - created according to the relativePath - using itself as the root. - - - - - - - - - - Only valid for resources that - can be obtained through relative paths - - - - - - - - - - This returns a new stream instance each time it is called. - It is the responsability of the caller to dispose of this stream - - - - - Depicts the contract for resource factories. - - - - - Used to check whether the resource factory - is able to deal with the given resource - identifier. - - - Implementors should return true - only if the given identifier is supported - by the resource factory - - - - - - - Creates an instance - for the given resource identifier - - - - - - - Creates an instance - for the given resource identifier - - - - - - - - - - - - - - - - - - Adapts a static string content as an - - - - - Enable access to files on network shares - - - - - Email sender abstraction. - - - - - Sends a mail message. - - From field - To field - E-mail's subject - message's body - - - - Sends a message. - - Message instance - - - - Sends multiple messages. - - List of messages - - - - Default implementation. - - - - - Initializes a new instance of the class based on the configuration provided in the application configuration file. - - - This constructor is based on the default configuration in the application configuration file. - - - - - This service implementation - requires a host name in order to work - - The smtp server name - - - - Sends a message. - - If any of the parameters is null - From field - To field - e-mail's subject - message's body - - - - Sends a message. - - If the message is null - Message instance - - - - Configures the sender - with port information and eventual credential - informed - - Message instance - - - - Gets or sets the port used to - access the SMTP server - - - - - Gets the hostname. - - The hostname. - - - - Gets or sets a value which is used to - configure if emails are going to be sent asyncrhonously or not. - - - - - Gets or sets a value that specifies - the amount of time after which a synchronous Send call times out. - - - - - Gets or sets a value indicating whether the email should be sent using - a secure communication channel. - - true if should use SSL; otherwise, false. - - - - Gets or sets the domain. - - The domain. - - - - Gets or sets the name of the user. - - The name of the user. - - - - Gets or sets the password. - - The password. - - - - Gets a value indicating whether credentials were informed. - - - if this instance has credentials; otherwise, . - - - - diff --git a/packages/Castle.Core.2.5.2/lib/NET40ClientProfile/Castle.Core.dll b/packages/Castle.Core.2.5.2/lib/NET40ClientProfile/Castle.Core.dll deleted file mode 100644 index 2c8811072..000000000 Binary files a/packages/Castle.Core.2.5.2/lib/NET40ClientProfile/Castle.Core.dll and /dev/null differ diff --git a/packages/Castle.Core.2.5.2/lib/NET40ClientProfile/Castle.Core.xml b/packages/Castle.Core.2.5.2/lib/NET40ClientProfile/Castle.Core.xml deleted file mode 100644 index 448fd69a0..000000000 --- a/packages/Castle.Core.2.5.2/lib/NET40ClientProfile/Castle.Core.xml +++ /dev/null @@ -1,4927 +0,0 @@ - - - - Castle.Core - - - - - Assignes a specific dictionary key. - - - - - Defines the contract for customizing dictionary access. - - - - - Determines relative order to apply related behaviors. - - - - - Determines relative order to apply related behaviors. - - - - - Defines the contract for updating dictionary values. - - - - - Sets the stored dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if the property should be stored. - - - - Defines the contract for building s. - - - - - Builds the dictionary behaviors. - - - - - - Abstract adapter for the support - needed by the - - - - - Adds an element with the provided key and value to the object. - - The to use as the key of the element to add. - The to use as the value of the element to add. - An element with the same key already exists in the object. - key is null. - The is read-only.-or- The has a fixed size. - - - - Removes all elements from the object. - - The object is read-only. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - key is null. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - The type of the source cannot be cast automatically to the type of the destination array. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - Gets or sets the with the specified key. - - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Constant to use when making assembly internals visible to Castle.Core - [assembly: InternalsVisibleTo(CoreInternalsVisible.ToCastleCore)] - - - - - Constant to use when making assembly internals visible to proxy types generated by DynamicProxy. Required when proxying internal types. - [assembly: InternalsVisibleTo(CoreInternalsVisible.ToDynamicProxyGenAssembly2)] - - - - - Abstract implementation of . - - - - - Conract for traversing a . - - - - - Identifies a property should be represented as a nested component. - - - - - Defines the contract for building typed dictionary keys. - - - - - Builds the specified key. - - The dictionary adapter. - The current key. - The property. - The updated key - - - - Defines the contract for retrieving dictionary values. - - - - - Gets the effective dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if return only existing. - The effective property value. - - - - Applies no prefix. - - - - - Gets or sets the prefix. - - The prefix. - - - - Identifies the dictionary adapter types. - - - - - Identifies an interface or property to be pre-feteched. - - - - - Instructs fetching to occur. - - - - - Instructs fetching according to - - - - - - Gets whether or not fetching should occur. - - - - - Assigns a property to a group. - - - - - Constructs a group assignment. - - The group name. - - - - Constructs a group assignment. - - The group name. - - - - Gets the group the property is assigned to. - - - - - Assigns a specific dictionary key. - - - - - Initializes a new instance of the class. - - The key. - - - - Initializes a new instance of the class. - - The compound key. - - - - Assigns a prefix to the keyed properties of an interface. - - - - - Initializes a default instance of the class. - - - - - Initializes a new instance of the class. - - The prefix for the keyed properties of the interface. - - - - Gets the prefix key added to the properties of the interface. - - - - - Substitutes part of key with another string. - - - - - Initializes a new instance of the class. - - The old value. - The new value. - - - - Requests support for multi-level editing. - - - - - Contract for dictionary initialization. - - - - - Performs any initialization of the - - The dictionary adapter. - The dictionary behaviors. - - - - Generates a new GUID on demand. - - - - - Support for on-demand value resolution. - - - - - Suppress property change notifications. - - - - - Provides simple string formatting from existing properties. - - - - - Gets the string format. - - - - - Gets the format properties. - - - - - Identifies a property should be represented as a delimited string value. - - - - - Gets the separator. - - - - - Converts all properties to strings. - - - - - Gets or sets the format. - - The format. - - - - Suppress property change notifications. - - - - - Contract for property descriptor initialization. - - - - - Performs any initialization of the - - The property descriptor. - The property behaviors. - - - - Assigns a prefix to the keyed properties using the interface name. - - - - - Manages conversion between property values. - - - - - Initializes a new instance of the class. - - The converter. - - - - Gets the effective dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if return only existing. - The effective property value. - - - - - - - - - Contract for creating additional Dictionary adapters. - - - - - Contract for manipulating the Dictionary adapter. - - - - - Contract for editing the Dictionary adapter. - - - - - Contract for managing Dictionary adapter notifications. - - - - - Contract for validating Dictionary adapter. - - - - - Uses Reflection.Emit to expose the properties of a dictionary - through a dynamic implementation of a typed interface. - - - - - Defines the contract for building typed dictionary adapters. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - The property descriptor. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the namedValues. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the namedValues. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the xpath navigable. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the xpath navigable. - - The type represented by T must be an interface with properties. - - - - - Gets the associated with the type. - - The typed interface. - The adapter meta-data. - - - - Gets the associated with the type. - - The typed interface. - The property descriptor. - The adapter meta-data. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Describes a dictionary property. - - - - - Initializes an empty class. - - - - - Initializes a new instance of the class. - - The property. - The property behaviors. - - - - Copies an existinginstance of the class. - - - - - - - Gets the key. - - The dictionary adapter. - The key. - The descriptor. - - - - - Adds the key builder. - - The builder. - - - - Adds the key builders. - - The builders. - - - - Copies the key builders to the other - - - - - - - Copies the selected key builders to the other - - - - - - - - Gets the property value. - - The dictionary adapter. - The key. - The stored value. - The descriptor. - true if return only existing. - - - - - Adds the dictionary getter. - - The getter. - - - - Adds the dictionary getters. - - The getters. - - - - Copies the property getters to the other - - - - - - - Copies the selected property getters to the other - - - - - - - - Sets the property value. - - The dictionary adapter. - The key. - The value. - The descriptor. - - - - - Adds the dictionary setter. - - The setter. - - - - Adds the dictionary setters. - - The setters. - - - - Copies the property setters to the other - - - - - - - Copies the selected property setters to the other - - - - - - - - Adds the behaviors. - - - - - - - Adds the behaviors. - - - - - - - Adds the behaviors from the builders. - - - - - - - Copies the behaviors to the other - - - - - - - Copies the behaviors to the other - - - - - - - - - - - - - Gets the property name. - - - - - Gets the property type. - - - - - Gets the property. - - The property. - - - - Returns true if the property is dynamic. - - - - - Gets additional state. - - - - - Determines if property should be fetched. - - - - - Determines if notifications should occur. - - - - - Gets the property behaviors. - - - - - Gets the type converter. - - The type converter. - - - - Gets the key builders. - - The key builders. - - - - Gets the setter. - - The setter. - - - - Gets the getter. - - The getter. - - - - Adds the dictionary initializers. - - The initializers. - - - - Adds the dictionary initializers. - - The initializers. - - - - Copies the initializers to the other - - - - - - - Copies the filtered initializers to the other - - - - - - - - Adds the dictionary meta-data initializers. - - The meta-data initializers. - - - - Adds the dictionary meta-data initializers. - - The meta-data initializers. - - - - Copies the meta-initializers to the other - - - - - - - Copies the filtered meta-initializers to the other - - - - - - - - Gets the initializers. - - The initializers. - - - - Gets the meta-data initializers. - - The meta-data initializers. - - - - Contract for dictionary meta-data initialization. - - - - - Performs any initialization of the dictionary adapter meta-data. - - The dictionary adapter factory. - The dictionary adapter meta. - - - - - Contract for dictionary validation. - - - - - Determines if is valid. - - The dictionary adapter. - true if valid. - - - - Validates the . - - The dictionary adapter. - The error summary information. - - - - Validates the for a property. - - The dictionary adapter. - The property to validate. - The property summary information. - - - - Invalidates any results cached by the validator. - - The dictionary adapter. - - - - - - - - - Initializes a new instance of the class. - - The name values. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Adapts the specified name values. - - The name values. - - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets or sets the with the specified key. - - - - - - Helper class for retrieving attributes. - - - - - Gets the attribute. - - The member. - The member attribute. - - - - Gets the attributes. Does not consider inherited attributes! - - The member. - The member attributes. - - - - Gets the type attribute. - - The type. - The type attribute. - - - - Gets the type attributes. - - The type. - The type attributes. - - - - Gets the type converter. - - The member. - - - - - Gets the attribute. - - The member. - The member attribute. - - - - Contract for typed dynamic value resolution. - - - - - - Contract for dynamic value resolution. - - - - - Encapsulates an invocation of a proxied method. - - - - - Overrides the value of an argument at the given with the - new provided. - - - This method accepts an , however the value provided must be compatible - with the type of the argument defined on the method, otherwise an exception will be thrown. - - The index of the argument to override. - The new value for the argument. - - - - Gets the value of the argument at the specified . - - The index. - The value of the argument at the specified . - - - - Returns the concrete instantiation of the on the proxy, with any generic - parameters bound to real types. - - - The concrete instantiation of the on the proxy, or the if - not a generic method. - - Can be slower than calling . - - - - Returns the concrete instantiation of , with any - generic parameters bound to real types. - For interface proxies, this will point to the on the target class. - - The concrete instantiation of , or - if not a generic method. - In debug builds this can be slower than calling . - - - - Proceeds the call to the next interceptor in line, and ultimately to the target method. - - - Since interface proxies without a target don't have the target implementation to proceed to, - it is important, that the last interceptor does not call this method, otherwise a - will be thrown. - - - - - Gets the proxy object on which the intercepted method is invoked. - - Proxy object on which the intercepted method is invoked. - - - - Gets the object on which the invocation is performed. This is different from proxy object - because most of the time this will be the proxy target object. - - - The invocation target. - - - - Gets the type of the target object for the intercepted method. - - The type of the target object. - - - - Gets the arguments that the has been invoked with. - - The arguments the method was invoked with. - - - - Gets the generic arguments of the method. - - The generic arguments, or null if not a generic method. - - - - Gets the representing the method being invoked on the proxy. - - The representing the method being invoked. - - - - For interface proxies, this will point to the on the target class. - - The method invocation target. - - - - Gets or sets the return value of the method. - - The return value of the method. - - - - Used during the target type inspection process. Implementors have a chance to customize the - proxy generation process. - - - - - Invoked by the generation process to determine if the specified method should be proxied. - - The type which declares the given method. - The method to inspect. - True if the given method should be proxied; false otherwise. - - - - Invoked by the generation process to notify that a member was not marked as virtual. - - The type which declares the non-virtual member. - The non-virtual member. - - This method gives an opportunity to inspect any non-proxyable member of a type that has - been requested to be proxied, and if appropriate - throw an exception to notify the caller. - - - - - Invoked by the generation process to notify that the whole process has completed. - - - - - Interface describing elements composing generated type - - - - - Checks if the method is public or protected. - - - - - - - Performs some basic screening and invokes the - to select methods. - - - - - - - - - Provides functionality for disassembling instances of attributes to CustomAttributeBuilder form, during the process of emiting new types by Dynamic Proxy. - - - - - Disassembles given attribute instance back to corresponding CustomAttributeBuilder. - - An instance of attribute to disassemble - corresponding 1 to 1 to given attribute instance, or null reference. - - Implementers should return that corresponds to given attribute instance 1 to 1, - that is after calling specified constructor with specified arguments, and setting specified properties and fields with values specified - we should be able to get an attribute instance identical to the one passed in . Implementer can return null - if it wishes to opt out of replicating the attribute. Notice however, that for some cases, like attributes passed explicitly by the user - it is illegal to return null, and doing so will result in exception. - - - - - Handles error during disassembly process - - Type of the attribute being disassembled - Exception thrown during the process - usually null, or (re)throws the exception - - - - Here we try to match a constructor argument to its value. - Since we can't get the values from the assembly, we use some heuristics to get it. - a/ we first try to match all the properties on the attributes by name (case insensitive) to the argument - b/ if we fail we try to match them by property type, with some smarts about convertions (i,e: can use Guid for string). - - - - - We have the following rules here. - Try to find a matching type, failing that, if the parameter is string, get the first property (under the assumption that - we can convert it. - - - - - Attributes can only accept simple types, so we return null for null, - if the value is passed as string we call to string (should help with converting), - otherwise, we use the value as is (enums, integer, etc). - - - - - Applied to the assemblies saved by in order to persist the cache data included in the persisted assembly. - - - - - Base class that exposes the common functionalities - to proxy generation. - - - - - Generates a parameters constructor that initializes the proxy - state with just to make it non-null. - - This constructor is important to allow proxies to be XML serializable - - - - - - It is safe to add mapping (no mapping for the interface exists) - - - - - - - - Generates the constructor for the class that extends - - - - - - - - - Default implementation of interface producing in-memory proxy assemblies. - - - - - Abstracts the implementation of proxy type construction. - - - - - Creates a proxy type for given , using provided. - - The class type to proxy. - The proxy generation options. - The generated proxy type. - Thrown when is a generic type definition. - Thrown when is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given , implementing , using provided. - - The class type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified class and interfaces. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given , implementing , using provided. - - The class type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified class and interfaces. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type that proxies calls to members on , implementing , using provided. - - The interface type to proxy. - Additional interface types to proxy. - Type implementing on which calls to the interface members should be intercepted. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface that 'proceeds' executions to the specified target. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given that delegates all calls to the provided interceptors. - - The interface type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface and additional interfaces that delegate all executions to the specified interceptors. - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given and that delegates all calls to the provided interceptors and allows interceptors to switch the actual target of invocation. - - The interface type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface(s) that delegate all executions to the specified interceptors - and uses an instance of the interface as their targets (i.e. ), rather than a class. All classes should then implement interface, - to allow interceptors to switch invocation target with instance of another type implementing called interface. - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Gets or sets the that this logs to. - - - - - Gets the associated with this builder. - - The module scope associated with this builder. - - - - Initializes a new instance of the class with new . - - - - - Initializes a new instance of the class. - - The module scope for generated proxy types. - - - - Registers custom disassembler to handle disassembly of specified type of attributes. - - Type of attributes to handle - Disassembler converting existing instances of Attributes to CustomAttributeBuilders - - When disassembling an attribute Dynamic Proxy will first check if an custom disassembler has been registered to handle attributes of that type, - and if none is found, it'll use the . - - - - - Attributes should be replicated if they are non-inheritable, - but there are some special cases where the attributes means - something to the CLR, where they should be skipped. - - - - - Initializes a new instance of the class. - - Target element. This is either target type or target method for invocation types. - The type of the proxy. This is base type for invocation types. - The interfaces. - The options. - - - - Initializes a new instance of the class. - - Type of the target. - The interfaces. - The options. - - - s - Provides appropriate Ldc.X opcode for the type of primitive value to be loaded. - - - - - Provides appropriate Ldind.X opcode for - the type of primitive value to be loaded indirectly. - - - - - Emits a load opcode of the appropriate kind for a constant string or - primitive value. - - - - - - - Emits a load opcode of the appropriate kind for the constant default value of a - type, such as 0 for value types and null for reference types. - - - - - Emits a load indirect opcode of the appropriate type for a value or object reference. - Pops a pointer off the evaluation stack, dereferences it and loads - a value of the specified type. - - - - - - - Emits a store indirectopcode of the appropriate type for a value or object reference. - Pops a value of the specified type and a pointer off the evaluation stack, and - stores the value. - - - - - - - Summary description for PropertiesCollection. - - - - - Wraps a reference that is passed - ByRef and provides indirect load/store support. - - - - - Summary description for NewArrayExpression. - - - - - - - - - - Provides appropriate Stind.X opcode - for the type of primitive value to be stored indirectly. - - - - - Returns list of all unique interfaces implemented given types, including their base interfaces. - - - - - - - Initializes a new instance of the class. - - The name. - Type declaring the original event being overriten, or null. - - The add method. - The remove method. - The attributes. - - - - Represents the scope of uniquenes of names for types and their members - - - - - Gets a unique name based on - - Name suggested by the caller - Unique name based on . - - Implementers should provide name as closely resembling as possible. - Generally if no collision occurs it is suggested to return suggested name, otherwise append sequential suffix. - Implementers must return deterministic names, that is when is called twice - with the same suggested name, the same returned name should be provided each time. Non-deterministic return - values, like appending random suffices will break serialization of proxies. - - - - - Returns new, disposable naming scope. It is responsibilty of the caller to make sure that no naming collision - with enclosing scope, or other subscopes is possible. - - New naming scope. - - - - Returns the methods implemented by a type. Use this instead of Type.GetMethods() to work around a CLR issue - where duplicate MethodInfos are returned by Type.GetMethods() after a token of a generic type's method was loaded. - - - - - Determines whether this assembly has internals visible to dynamic proxy. - - The assembly to inspect. - - - - Determines whether the specified method is internal. - - The method. - - true if the specified method is internal; otherwise, false. - - - - - Because we need to cache the types based on the mixed in mixins, we do the following here: - - Get all the mixin interfaces - - Sort them by full name - - Return them by position - - The idea is to have reproducable behavior for the case that mixins are registered in different orders. - This method is here because it is required - - - - - Summary description for ModuleScope. - - - - - The default file name used when the assembly is saved using . - - - - - The default assembly (simple) name used for the assemblies generated by a instance. - - - - - Initializes a new instance of the class; assemblies created by this instance will not be saved. - - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved. - - If set to true saves the generated module. - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved. - - If set to true saves the generated module. - If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions. - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved and what simple names are to be assigned to them. - - If set to true saves the generated module. - If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions. - The simple name of the strong-named assembly generated by this . - The path and file name of the manifest module of the strong-named assembly generated by this . - The simple name of the weak-named assembly generated by this . - The path and file name of the manifest module of the weak-named assembly generated by this . - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved and what simple names are to be assigned to them. - - If set to true saves the generated module. - If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions. - Naming scope used to provide unique names to generated types and their members (usually via sub-scopes). - The simple name of the strong-named assembly generated by this . - The path and file name of the manifest module of the strong-named assembly generated by this . - The simple name of the weak-named assembly generated by this . - The path and file name of the manifest module of the weak-named assembly generated by this . - - - - Returns a type from this scope's type cache, or null if the key cannot be found. - - The key to be looked up in the cache. - The type from this scope's type cache matching the key, or null if the key cannot be found - - - - Registers a type in this scope's type cache. - - The key to be associated with the type. - The type to be stored in the cache. - - - - Gets the key pair used to sign the strong-named assembly generated by this . - - - - - - Gets the specified module generated by this scope, creating a new one if none has yet been generated. - - If set to true, a strong-named module is returned; otherwise, a weak-named module is returned. - A strong-named or weak-named module generated by this scope, as specified by the parameter. - - - - Gets the strong-named module generated by this scope, creating a new one if none has yet been generated. - - A strong-named module generated by this scope. - - - - Gets the weak-named module generated by this scope, creating a new one if none has yet been generated. - - A weak-named module generated by this scope. - - - - Saves the generated assembly with the name and directory information given when this instance was created (or with - the and current directory if none was given). - - - - This method stores the generated assembly in the directory passed as part of the module information specified when this instance was - constructed (if any, else the current directory is used). If both a strong-named and a weak-named assembly - have been generated, it will throw an exception; in this case, use the overload. - - - If this was created without indicating that the assembly should be saved, this method does nothing. - - Both a strong-named and a weak-named assembly have been generated. - The path of the generated assembly file, or null if no file has been generated. - - - - Saves the specified generated assembly with the name and directory information given when this instance was created - (or with the and current directory if none was given). - - True if the generated assembly with a strong name should be saved (see ); - false if the generated assembly without a strong name should be saved (see . - - - This method stores the specified generated assembly in the directory passed as part of the module information specified when this instance was - constructed (if any, else the current directory is used). - - - If this was created without indicating that the assembly should be saved, this method does nothing. - - - No assembly has been generated that matches the parameter. - - The path of the generated assembly file, or null if no file has been generated. - - - - Loads the generated types from the given assembly into this 's cache. - - The assembly to load types from. This assembly must have been saved via or - , or it must have the manually applied. - - This method can be used to load previously generated and persisted proxy types from disk into this scope's type cache, eg. in order - to avoid the performance hit associated with proxy generation. - - - - - Users of this should use this lock when accessing the cache. - - - - - Gets the strong-named module generated by this scope, or if none has yet been generated. - - The strong-named module generated by this scope, or if none has yet been generated. - - - - Gets the file name of the strongly named module generated by this scope. - - The file name of the strongly named module generated by this scope. - - - - Gets the directory where the strongly named module generated by this scope will be saved, or if the current directory - is used. - - The directory where the strongly named module generated by this scope will be saved when is called - (if this scope was created to save modules). - - - - Gets the weak-named module generated by this scope, or if none has yet been generated. - - The weak-named module generated by this scope, or if none has yet been generated. - - - - Gets the file name of the weakly named module generated by this scope. - - The file name of the weakly named module generated by this scope. - - - - Gets the directory where the weakly named module generated by this scope will be saved, or if the current directory - is used. - - The directory where the weakly named module generated by this scope will be saved when is called - (if this scope was created to save modules). - - - - ProxyBuilder that persists the generated type. - - - The saved assembly contains just the last generated type. - - - - - Initializes a new instance of the class. - - - - - Saves the generated assembly to a physical file. Note that this renders the unusable. - - The path of the generated assembly file, or null if no assembly has been generated. - This method does not support saving multiple files. If both a signed and an unsigned module have been generated, use the - respective methods of the . - - - - Initializes a new instance of the class. - - The hook. - - - - Initializes a new instance of the class. - - - - - Provides proxy objects for classes and interfaces. - - - - - Initializes a new instance of the class. - - Proxy types builder. - - - - Initializes a new instance of the class. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - Object proxying calls to members of on object. - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no parameterless constructor exists on type . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no parameterless constructor exists on type . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates the proxy type for class proxy with given class, implementing given and using provided . - - The base class for proxy type. - The interfaces that proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy with target for given interface, implementing given on given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - Actual type that the proxy type will encompass. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy with target interface for given interface, implementing given on given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy without target for given interface, implementing given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Gets or sets the that this log to. - - - - - Gets the proxy builder instance used to generate proxy types. - - The proxy builder. - - - - - - - - - - - - - - - For interface proxies, this will point to the - on the target class - - - - - Handles the deserialization of proxies. - - - - - Resets the used for deserialization to a new scope. - - This is useful for test cases. - - - - Resets the used for deserialization to a given . - - The scope to be used for deserialization. - By default, the deserialization process uses a different scope than the rest of the application, which can lead to multiple proxies - being generated for the same type. By explicitly setting the deserialization scope to the application's scope, this can be avoided. - - - - Gets the used for deserialization. - - As has no way of automatically determining the scope used by the application (and the application - might use more than one scope at the same time), uses a dedicated scope instance for deserializing proxy - types. This instance can be reset and set to a specific value via and . - - - - Holds objects representing methods of class. - - - - - Holds objects representing methods of class. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Provides an extension point that allows proxies to choose specific interceptors on - a per method basis. - - - - - Selects the interceptors that should intercept calls to the given . - - The type declaring the method to intercept. - The method that will be intercepted. - All interceptors registered with the proxy. - An array of interceptors to invoke upon calling the . - - This method is called only once per proxy instance, upon the first call to the - . Either an empty array or null are valid return values to indicate - that no interceptor should intercept calls to the method. Although it is not advised, it is - legal to return other implementations than these provided in - . - - - - - Creates a new lock. - - - - - - This interface should be implemented by classes - that are available in a bigger context, exposing - the container to different areas in the same application. - - For example, in Web application, the (global) HttpApplication - subclasses should implement this interface to expose - the configured container - - - - - - Exposes means to change target objects of proxies and invocations - - - - - Changes the target object () of current . - - The new value of target of invocation. - - Although the method takes the actual instance must be of type assignable to , otherwise an will be thrown. - Also while it's technically legal to pass null reference (Nothing in Visual Basic) as , for obvious reasons Dynamic Proxy will not be able to call the intercepted method on such target. - In this case last interceptor in the pipeline mustn't call or a will be throws. - Also while it's technically legal to pass proxy itself as , this would create stack overflow. - In this case last interceptor in the pipeline mustn't call or a will be throws. - - Thrown when is not assignable to the proxied type. - - - - Permanently changes the target object of the proxy. This does not affect target of the current invocation. - - The new value of target of the proxy. - - Although the method takes the actual instance must be of type assignable to proxy's target type, otherwise an will be thrown. - Also while it's technically legal to pass null reference (Nothing in Visual Basic) as , for obvious reasons Dynamic Proxy will not be able to call the intercepted method on such target. - In this case last interceptor in the pipeline mustn't call or a will be throws. - Also while it's technically legal to pass proxy itself as , this would create stack overflow. - In this case last interceptor in the pipeline mustn't call or a will be throws. - - Thrown when is not assignable to the proxied type. - - - - New interface that is going to be used by DynamicProxy 2 - - - - - Get the proxy target (note that null is a valid target!) - - - - - - Gets the interceptors for the proxy - - - - - - Defines that the implementation wants a - in order to - access other components. The creator must be aware - that the component might (or might not) implement - the interface. - - - Used by Castle Project components to, for example, - gather logging factories - - - - - Increments IServiceProvider with a generic service resolution operation. - - - - - Provides a factory that can produce either or - classes. - - - - - Manages the instantiation of s. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Gets the configuration file. - - i.e. log4net.config - - - - - Used to create the TraceLogger implementation of ILogger interface. See . - - - - - Gets the configuration file. - - i.e. log4net.config - - - - - Interface for Context Properties implementations - - - - This interface defines a basic property get set accessor. - - - Based on the ContextPropertiesBase of log4net, by Nicko Cadell. - - - - - - Gets or sets the value of a property - - - The value for the property with the specified key - - - - Gets or sets the value of a property - - - - - - NullLogFactory used when logging is turned off. - - - - - Creates an instance of ILogger with the specified name. - - Name. - - - - - Creates an instance of ILogger with the specified name and LoggerLevel. - - Name. - Level. - - - - - Creates outputing - to files. The name of the file is derived from the log name - plus the 'log' extension. - - - - - Provides an interface that supports and - allows the storage and retrieval of Contexts. These are supported in - both log4net and NLog. - - - - - Manages logging. - - - This is a facade for the different logging subsystems. - It offers a simplified interface that follows IOC patterns - and a simplified priority/level/severity abstraction. - - - - - Logs a debug message. - - The message to log - - - - Logs a debug message. - - The exception to log - The message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The message to log - - - - Logs an info message. - - The exception to log - The message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The message to log - - - - Logs a warn message. - - The exception to log - The message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The message to log - - - - Logs an error message. - - The exception to log - The message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The message to log - - - - Logs a fatal message. - - The exception to log - The message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal error message. - - The Message - - - - Logs a fatal error message. - - The Message - The Exception - - - - Logs a fatal error message. - - Message format - Array of objects to write using format - - - - Create a new child logger. - The name of the child logger is [current-loggers-name].[passed-in-name] - - The Subname of this logger. - The New ILogger instance. - If the name has an empty element name. - - - - Determines if messages of priority "debug" will be logged. - - True if "debug" messages will be logged. - - - - Determines if messages of priority "info" will be logged. - - True if "info" messages will be logged. - - - - Determines if messages of priority "warn" will be logged. - - True if "warn" messages will be logged. - - - - Determines if messages of priority "error" will be logged. - - True if "error" messages will be logged. - - - - Determines if messages of priority "fatal" will be logged. - - True if "fatal" messages will be logged. - - - - Determines if messages of priority "fatalError" will be logged. - - True if "fatalError" messages will be logged. - - - - Exposes the Global Context of the extended logger. - - - - - Exposes the Thread Context of the extended logger. - - - - - Exposes the Thread Stack of the extended logger. - - - - - Supporting Logger levels. - - - - - Logging will be off - - - - - Fatal logging level - - - - - Error logging level - - - - - Warn logging level - - - - - Info logging level - - - - - Debug logging level - - - - - The Logger sending everything to the standard output streams. - This is mainly for the cases when you have a utility that - does not have a logger to supply. - - - - - The Level Filtered Logger class. This is a base clase which - provides a LogLevel attribute and reroutes all functions into - one Log method. - - - - - Creates a new LevelFilteredLogger. - - - - - Keep the instance alive in a remoting scenario - - - - - - Logs a debug message. - - The message to log - - - - Logs a debug message. - - The exception to log - The message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - Message format - Array of objects to write using format - - - - Logs an info message. - - The message to log - - - - Logs an info message. - - The exception to log - The message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - Message format - Array of objects to write using format - - - - Logs a warn message. - - The message to log - - - - Logs a warn message. - - The exception to log - The message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - Message format - Array of objects to write using format - - - - Logs an error message. - - The message to log - - - - Logs an error message. - - The exception to log - The message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - Message format - Array of objects to write using format - - - - Logs a fatal message. - - The message to log - - - - Logs a fatal message. - - The exception to log - The message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - Message format - Array of objects to write using format - - - - Logs a fatal error message. - - The Message - - - - Logs a fatal error message. - - The Message - The Exception - - - - Logs a fatal error message. - - Message format - Array of objects to write using format - - - - Implementors output the log content by implementing this method only. - Note that exception can be null - - - - - - - - - The LoggerLevel that this logger - will be using. Defaults to LoggerLevel.Off - - - - - The name that this logger will be using. - Defaults to String.Empty - - - - - Determines if messages of priority "debug" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "info" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "warn" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "error" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "fatal" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "fatal" will be logged. - - true if log level flags include the bit - - - - Creates a new ConsoleLogger with the Level - set to LoggerLevel.Debug and the Name - set to String.Empty. - - - - - Creates a new ConsoleLogger with the Name - set to String.Empty. - - The logs Level. - - - - Creates a new ConsoleLogger with the Level - set to LoggerLevel.Debug. - - The logs Name. - - - - Creates a new ConsoleLogger. - - The logs Name. - The logs Level. - - - - A Common method to log. - - The level of logging - The name of the logger - The Message - The Exception - - - - Returns a new ConsoleLogger with the name - added after this loggers name, with a dot in between. - - The added hierarchical name. - A new ConsoleLogger. - - - - The Logger using standart Diagnostics namespace. - - - - - Creates a logger based on . - - - - - - Creates a logger based on . - - - - - - - Creates a logger based on . - - - - - - - - The Null Logger class. This is useful for implementations where you need - to provide a logger to a utility class, but do not want any output from it. - It also helps when you have a utility that does not have a logger to supply. - - - - - Creates a new NullLogger. - - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - Returns this NullLogger. - - Ignored - This ILogger instance. - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - Returns empty context properties. - - - - - Returns empty context properties. - - - - - Returns empty context stacks. - - - - - The Stream Logger class. This class can stream log information - to any stream, it is suitable for storing a log file to disk, - or to a MemoryStream for testing your components. - - - This logger is not thread safe. - - - - - Creates a new StreamLogger with default encoding - and buffer size. Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - - - Creates a new StreamLogger with default buffer size. - Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - The encoding that will be used for this stream. - - - - - - Creates a new StreamLogger. - Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - The encoding that will be used for this stream. - - - - The buffer size that will be used for this stream. - - - - - - Creates a new StreamLogger with - Debug as default Level. - - The name of the log. - The StreamWriter the log will write to. - - - - The TraceLogger sends all logging to the System.Diagnostics.TraceSource - built into the .net framework. - - - Logging can be configured in the system.diagnostics configuration - section. - - If logger doesn't find a source name with a full match it will - use source names which match the namespace partially. For example you can - configure from all castle components by adding a source name with the - name "Castle". - - If no portion of the namespace matches the source named "Default" will - be used. - - - - - Build a new trace logger based on the named TraceSource - - The name used to locate the best TraceSource. In most cases comes from the using type's fullname. - - - - Build a new trace logger based on the named TraceSource - - The name used to locate the best TraceSource. In most cases comes from the using type's fullname. - The default logging level at which this source should write messages. In almost all cases this - default value will be overridden in the config file. - - - - Create a new child logger. - The name of the child logger is [current-loggers-name].[passed-in-name] - - The Subname of this logger. - The New ILogger instance. - - - - This is an abstract implementation - that deals with methods that can be abstracted away - from underlying implementations. - - - AbstractConfiguration makes easier to implementers - to create a new version of - - - - - is a interface encapsulating a configuration node - used to retrieve configuration values. - - - - - Gets the value of the node and converts it - into specified . - - The - - The Default value returned if the conversion fails. - - The Value converted into the specified type. - - - - Gets the name of the node. - - - The Name of the node. - - - - - Gets the value of the node. - - - The Value of the node. - - - - - Gets an of - elements containing all node children. - - The Collection of child nodes. - - - - Gets an of the configuration attributes. - - - - - Gets the value of the node and converts it - into specified . - - The - - The Default value returned if the convertion fails. - - The Value converted into the specified type. - - - - Gets the name of the . - - - The Name of the . - - - - - Gets the value of . - - - The Value of the . - - - - - Gets all child nodes. - - The of child nodes. - - - - Gets node attributes. - - - All attributes of the node. - - - - - A collection of objects. - - - - - Creates a new instance of ConfigurationCollection. - - - - - Creates a new instance of ConfigurationCollection. - - - - - Summary description for MutableConfiguration. - - - - - Initializes a new instance of the class. - - The name. - - - - Gets the value of . - - - The Value of the . - - - - - Pendent - - - - - Deserializes the specified node into an abstract representation of configuration. - - The node. - - - - - If a config value is an empty string we return null, this is to keep - backward compability with old code - - - - - General purpose class to represent a standard pair of values. - - Type of the first value - Type of the second value - - - - Constructs a pair with its values - - - - - - - List of utility methods related to dynamic proxy operations - - - - - Determines whether the specified type is a proxy generated by - DynamicProxy (1 or 2). - - The type. - - true if it is a proxy; otherwise, false. - - - - - Pendent - - - - - Initializes a new instance of the class. - - The target. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - - is null. - - - - Adds an element with the provided key and value to the object. - - The to use as the key of the element to add. - The to use as the value of the element to add. - - is null. - An element with the same key already exists in the object. - The is read-only.-or- The has a fixed size. - - - - Removes all elements from the object. - - The object is read-only. - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - - is null. - The object is read-only.-or- The has a fixed size. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in at which copying begins. - - is null. - - is less than zero. - - 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 . - The type of the source cannot be cast automatically to the type of the destination . - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets or sets the with the specified key. - - - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Represents a 'streamable' resource. Can - be a file, a resource in an assembly. - - - - - Returns a reader for the stream - - - It's up to the caller to dispose the reader. - - - - - - Returns a reader for the stream - - - It's up to the caller to dispose the reader. - - - - - - - Returns an instance of - created according to the relativePath - using itself as the root. - - - - - - - - - - Only valid for resources that - can be obtained through relative paths - - - - - - - - - - This returns a new stream instance each time it is called. - It is the responsability of the caller to dispose of this stream - - - - - Depicts the contract for resource factories. - - - - - Used to check whether the resource factory - is able to deal with the given resource - identifier. - - - Implementors should return true - only if the given identifier is supported - by the resource factory - - - - - - - Creates an instance - for the given resource identifier - - - - - - - Creates an instance - for the given resource identifier - - - - - - - - - - - - - - - - - - Adapts a static string content as an - - - - - Enable access to files on network shares - - - - - Email sender abstraction. - - - - - Sends a mail message. - - From field - To field - E-mail's subject - message's body - - - - Sends a message. - - Message instance - - - - Sends multiple messages. - - List of messages - - - - Default implementation. - - - - - Initializes a new instance of the class based on the configuration provided in the application configuration file. - - - This constructor is based on the default configuration in the application configuration file. - - - - - This service implementation - requires a host name in order to work - - The smtp server name - - - - Sends a message. - - If any of the parameters is null - From field - To field - e-mail's subject - message's body - - - - Sends a message. - - If the message is null - Message instance - - - - Configures the sender - with port information and eventual credential - informed - - Message instance - - - - Gets or sets the port used to - access the SMTP server - - - - - Gets the hostname. - - The hostname. - - - - Gets or sets a value which is used to - configure if emails are going to be sent asyncrhonously or not. - - - - - Gets or sets a value that specifies - the amount of time after which a synchronous Send call times out. - - - - - Gets or sets a value indicating whether the email should be sent using - a secure communication channel. - - true if should use SSL; otherwise, false. - - - - Gets or sets the domain. - - The domain. - - - - Gets or sets the name of the user. - - The name of the user. - - - - Gets or sets the password. - - The password. - - - - Gets a value indicating whether credentials were informed. - - - if this instance has credentials; otherwise, . - - - - diff --git a/packages/Castle.Core.2.5.2/lib/SL3/Castle.Core.dll b/packages/Castle.Core.2.5.2/lib/SL3/Castle.Core.dll deleted file mode 100644 index 37fa6d3fd..000000000 Binary files a/packages/Castle.Core.2.5.2/lib/SL3/Castle.Core.dll and /dev/null differ diff --git a/packages/Castle.Core.2.5.2/lib/SL3/Castle.Core.xml b/packages/Castle.Core.2.5.2/lib/SL3/Castle.Core.xml deleted file mode 100644 index a44f335f3..000000000 --- a/packages/Castle.Core.2.5.2/lib/SL3/Castle.Core.xml +++ /dev/null @@ -1,4443 +0,0 @@ - - - - Castle.Core - - - - - Assignes a specific dictionary key. - - - - - Defines the contract for customizing dictionary access. - - - - - Determines relative order to apply related behaviors. - - - - - Determines relative order to apply related behaviors. - - - - - Defines the contract for updating dictionary values. - - - - - Sets the stored dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if the property should be stored. - - - - Defines the contract for building s. - - - - - Builds the dictionary behaviors. - - - - - - Abstract adapter for the support - needed by the - - - - - Adds an element with the provided key and value to the object. - - The to use as the key of the element to add. - The to use as the value of the element to add. - An element with the same key already exists in the object. - key is null. - The is read-only.-or- The has a fixed size. - - - - Removes all elements from the object. - - The object is read-only. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - key is null. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - The type of the source cannot be cast automatically to the type of the destination array. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - Gets or sets the with the specified key. - - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Constant to use when making assembly internals visible to Castle.Core - [assembly: InternalsVisibleTo(CoreInternalsVisible.ToCastleCore)] - - - - - Constant to use when making assembly internals visible to proxy types generated by DynamicProxy. Required when proxying internal types. - [assembly: InternalsVisibleTo(CoreInternalsVisible.ToDynamicProxyGenAssembly2)] - - - - - Abstract implementation of . - - - - - Conract for traversing a . - - - - - Identifies a property should be represented as a nested component. - - - - - Defines the contract for building typed dictionary keys. - - - - - Builds the specified key. - - The dictionary adapter. - The current key. - The property. - The updated key - - - - Defines the contract for retrieving dictionary values. - - - - - Gets the effective dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if return only existing. - The effective property value. - - - - Applies no prefix. - - - - - Gets or sets the prefix. - - The prefix. - - - - Identifies the dictionary adapter types. - - - - - Identifies an interface or property to be pre-feteched. - - - - - Instructs fetching to occur. - - - - - Instructs fetching according to - - - - - - Gets whether or not fetching should occur. - - - - - Assigns a property to a group. - - - - - Constructs a group assignment. - - The group name. - - - - Constructs a group assignment. - - The group name. - - - - Gets the group the property is assigned to. - - - - - Assigns a specific dictionary key. - - - - - Initializes a new instance of the class. - - The key. - - - - Initializes a new instance of the class. - - The compound key. - - - - Assigns a prefix to the keyed properties of an interface. - - - - - Initializes a default instance of the class. - - - - - Initializes a new instance of the class. - - The prefix for the keyed properties of the interface. - - - - Gets the prefix key added to the properties of the interface. - - - - - Substitutes part of key with another string. - - - - - Initializes a new instance of the class. - - The old value. - The new value. - - - - Requests support for multi-level editing. - - - - - Contract for dictionary initialization. - - - - - Performs any initialization of the - - The dictionary adapter. - The dictionary behaviors. - - - - Generates a new GUID on demand. - - - - - Support for on-demand value resolution. - - - - - Suppress property change notifications. - - - - - Provides simple string formatting from existing properties. - - - - - Gets the string format. - - - - - Gets the format properties. - - - - - Identifies a property should be represented as a delimited string value. - - - - - Gets the separator. - - - - - Converts all properties to strings. - - - - - Gets or sets the format. - - The format. - - - - Suppress property change notifications. - - - - - Contract for property descriptor initialization. - - - - - Performs any initialization of the - - The property descriptor. - The property behaviors. - - - - Assigns a prefix to the keyed properties using the interface name. - - - - - Manages conversion between property values. - - - - - Initializes a new instance of the class. - - The converter. - - - - Gets the effective dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if return only existing. - The effective property value. - - - - - - - - - Contract for creating additional Dictionary adapters. - - - - - Contract for manipulating the Dictionary adapter. - - - - - Contract for editing the Dictionary adapter. - - - - - Contract for managing Dictionary adapter notifications. - - - - - Contract for validating Dictionary adapter. - - - - - Uses Reflection.Emit to expose the properties of a dictionary - through a dynamic implementation of a typed interface. - - - - - Defines the contract for building typed dictionary adapters. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - The property descriptor. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets the associated with the type. - - The typed interface. - The adapter meta-data. - - - - Gets the associated with the type. - - The typed interface. - The property descriptor. - The adapter meta-data. - - - - - - - - - - - - - - - - - - - - - - - - - Describes a dictionary property. - - - - - Initializes an empty class. - - - - - Initializes a new instance of the class. - - The property. - The property behaviors. - - - - Copies an existinginstance of the class. - - - - - - - Gets the key. - - The dictionary adapter. - The key. - The descriptor. - - - - - Adds the key builder. - - The builder. - - - - Adds the key builders. - - The builders. - - - - Copies the key builders to the other - - - - - - - Copies the selected key builders to the other - - - - - - - - Gets the property value. - - The dictionary adapter. - The key. - The stored value. - The descriptor. - true if return only existing. - - - - - Adds the dictionary getter. - - The getter. - - - - Adds the dictionary getters. - - The getters. - - - - Copies the property getters to the other - - - - - - - Copies the selected property getters to the other - - - - - - - - Sets the property value. - - The dictionary adapter. - The key. - The value. - The descriptor. - - - - - Adds the dictionary setter. - - The setter. - - - - Adds the dictionary setters. - - The setters. - - - - Copies the property setters to the other - - - - - - - Copies the selected property setters to the other - - - - - - - - Adds the behaviors. - - - - - - - Adds the behaviors. - - - - - - - Adds the behaviors from the builders. - - - - - - - Copies the behaviors to the other - - - - - - - Copies the behaviors to the other - - - - - - - - - - - - - Gets the property name. - - - - - Gets the property type. - - - - - Gets the property. - - The property. - - - - Returns true if the property is dynamic. - - - - - Gets additional state. - - - - - Determines if property should be fetched. - - - - - Determines if notifications should occur. - - - - - Gets the property behaviors. - - - - - Gets the type converter. - - The type converter. - - - - Gets the key builders. - - The key builders. - - - - Gets the setter. - - The setter. - - - - Gets the getter. - - The getter. - - - - Adds the dictionary initializers. - - The initializers. - - - - Adds the dictionary initializers. - - The initializers. - - - - Copies the initializers to the other - - - - - - - Copies the filtered initializers to the other - - - - - - - - Adds the dictionary meta-data initializers. - - The meta-data initializers. - - - - Adds the dictionary meta-data initializers. - - The meta-data initializers. - - - - Copies the meta-initializers to the other - - - - - - - Copies the filtered meta-initializers to the other - - - - - - - - Gets the initializers. - - The initializers. - - - - Gets the meta-data initializers. - - The meta-data initializers. - - - - Contract for dictionary meta-data initialization. - - - - - Performs any initialization of the dictionary adapter meta-data. - - The dictionary adapter factory. - The dictionary adapter meta. - - - - - Contract for dictionary validation. - - - - - Determines if is valid. - - The dictionary adapter. - true if valid. - - - - Validates the . - - The dictionary adapter. - The error summary information. - - - - Validates the for a property. - - The dictionary adapter. - The property to validate. - The property summary information. - - - - Invalidates any results cached by the validator. - - The dictionary adapter. - - - - Helper class for retrieving attributes. - - - - - Gets the attribute. - - The member. - The member attribute. - - - - Gets the attributes. Does not consider inherited attributes! - - The member. - The member attributes. - - - - Gets the type attribute. - - The type. - The type attribute. - - - - Gets the type attributes. - - The type. - The type attributes. - - - - Gets the type converter. - - The member. - - - - - Gets the attribute. - - The member. - The member attribute. - - - - Contract for typed dynamic value resolution. - - - - - - Contract for dynamic value resolution. - - - - - Encapsulates an invocation of a proxied method. - - - - - Overrides the value of an argument at the given with the - new provided. - - - This method accepts an , however the value provided must be compatible - with the type of the argument defined on the method, otherwise an exception will be thrown. - - The index of the argument to override. - The new value for the argument. - - - - Gets the value of the argument at the specified . - - The index. - The value of the argument at the specified . - - - - Returns the concrete instantiation of the on the proxy, with any generic - parameters bound to real types. - - - The concrete instantiation of the on the proxy, or the if - not a generic method. - - Can be slower than calling . - - - - Returns the concrete instantiation of , with any - generic parameters bound to real types. - For interface proxies, this will point to the on the target class. - - The concrete instantiation of , or - if not a generic method. - In debug builds this can be slower than calling . - - - - Proceeds the call to the next interceptor in line, and ultimately to the target method. - - - Since interface proxies without a target don't have the target implementation to proceed to, - it is important, that the last interceptor does not call this method, otherwise a - will be thrown. - - - - - Gets the proxy object on which the intercepted method is invoked. - - Proxy object on which the intercepted method is invoked. - - - - Gets the object on which the invocation is performed. This is different from proxy object - because most of the time this will be the proxy target object. - - - The invocation target. - - - - Gets the type of the target object for the intercepted method. - - The type of the target object. - - - - Gets the arguments that the has been invoked with. - - The arguments the method was invoked with. - - - - Gets the generic arguments of the method. - - The generic arguments, or null if not a generic method. - - - - Gets the representing the method being invoked on the proxy. - - The representing the method being invoked. - - - - For interface proxies, this will point to the on the target class. - - The method invocation target. - - - - Gets or sets the return value of the method. - - The return value of the method. - - - - Used during the target type inspection process. Implementors have a chance to customize the - proxy generation process. - - - - - Invoked by the generation process to determine if the specified method should be proxied. - - The type which declares the given method. - The method to inspect. - True if the given method should be proxied; false otherwise. - - - - Invoked by the generation process to notify that a member was not marked as virtual. - - The type which declares the non-virtual member. - The non-virtual member. - - This method gives an opportunity to inspect any non-proxyable member of a type that has - been requested to be proxied, and if appropriate - throw an exception to notify the caller. - - - - - Invoked by the generation process to notify that the whole process has completed. - - - - - Interface describing elements composing generated type - - - - - Checks if the method is public or protected. - - - - - - - Performs some basic screening and invokes the - to select methods. - - - - - - - - - Provides functionality for disassembling instances of attributes to CustomAttributeBuilder form, during the process of emiting new types by Dynamic Proxy. - - - - - Disassembles given attribute instance back to corresponding CustomAttributeBuilder. - - An instance of attribute to disassemble - corresponding 1 to 1 to given attribute instance, or null reference. - - Implementers should return that corresponds to given attribute instance 1 to 1, - that is after calling specified constructor with specified arguments, and setting specified properties and fields with values specified - we should be able to get an attribute instance identical to the one passed in . Implementer can return null - if it wishes to opt out of replicating the attribute. Notice however, that for some cases, like attributes passed explicitly by the user - it is illegal to return null, and doing so will result in exception. - - - - - Handles error during disassembly process - - Type of the attribute being disassembled - Exception thrown during the process - usually null, or (re)throws the exception - - - - Here we try to match a constructor argument to its value. - Since we can't get the values from the assembly, we use some heuristics to get it. - a/ we first try to match all the properties on the attributes by name (case insensitive) to the argument - b/ if we fail we try to match them by property type, with some smarts about convertions (i,e: can use Guid for string). - - - - - We have the following rules here. - Try to find a matching type, failing that, if the parameter is string, get the first property (under the assumption that - we can convert it. - - - - - Attributes can only accept simple types, so we return null for null, - if the value is passed as string we call to string (should help with converting), - otherwise, we use the value as is (enums, integer, etc). - - - - - Base class that exposes the common functionalities - to proxy generation. - - - - - Generates a parameters constructor that initializes the proxy - state with just to make it non-null. - - This constructor is important to allow proxies to be XML serializable - - - - - - It is safe to add mapping (no mapping for the interface exists) - - - - - - - - Generates the constructor for the class that extends - - - - - - - - - Default implementation of interface producing in-memory proxy assemblies. - - - - - Abstracts the implementation of proxy type construction. - - - - - Creates a proxy type for given , using provided. - - The class type to proxy. - The proxy generation options. - The generated proxy type. - Thrown when is a generic type definition. - Thrown when is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given , implementing , using provided. - - The class type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified class and interfaces. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given , implementing , using provided. - - The class type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified class and interfaces. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type that proxies calls to members on , implementing , using provided. - - The interface type to proxy. - Additional interface types to proxy. - Type implementing on which calls to the interface members should be intercepted. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface that 'proceeds' executions to the specified target. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given that delegates all calls to the provided interceptors. - - The interface type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface and additional interfaces that delegate all executions to the specified interceptors. - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given and that delegates all calls to the provided interceptors and allows interceptors to switch the actual target of invocation. - - The interface type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface(s) that delegate all executions to the specified interceptors - and uses an instance of the interface as their targets (i.e. ), rather than a class. All classes should then implement interface, - to allow interceptors to switch invocation target with instance of another type implementing called interface. - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Gets or sets the that this logs to. - - - - - Gets the associated with this builder. - - The module scope associated with this builder. - - - - Initializes a new instance of the class with new . - - - - - Initializes a new instance of the class. - - The module scope for generated proxy types. - - - - Registers custom disassembler to handle disassembly of specified type of attributes. - - Type of attributes to handle - Disassembler converting existing instances of Attributes to CustomAttributeBuilders - - When disassembling an attribute Dynamic Proxy will first check if an custom disassembler has been registered to handle attributes of that type, - and if none is found, it'll use the . - - - - - Attributes should be replicated if they are non-inheritable, - but there are some special cases where the attributes means - something to the CLR, where they should be skipped. - - - - - Initializes a new instance of the class. - - Target element. This is either target type or target method for invocation types. - The type of the proxy. This is base type for invocation types. - The interfaces. - The options. - - - - Initializes a new instance of the class. - - Type of the target. - The interfaces. - The options. - - - s - Provides appropriate Ldc.X opcode for the type of primitive value to be loaded. - - - - - Provides appropriate Ldind.X opcode for - the type of primitive value to be loaded indirectly. - - - - - Emits a load opcode of the appropriate kind for a constant string or - primitive value. - - - - - - - Emits a load opcode of the appropriate kind for the constant default value of a - type, such as 0 for value types and null for reference types. - - - - - Emits a load indirect opcode of the appropriate type for a value or object reference. - Pops a pointer off the evaluation stack, dereferences it and loads - a value of the specified type. - - - - - - - Emits a store indirectopcode of the appropriate type for a value or object reference. - Pops a value of the specified type and a pointer off the evaluation stack, and - stores the value. - - - - - - - Summary description for PropertiesCollection. - - - - - Wraps a reference that is passed - ByRef and provides indirect load/store support. - - - - - Summary description for NewArrayExpression. - - - - - - - - - - Provides appropriate Stind.X opcode - for the type of primitive value to be stored indirectly. - - - - - Returns list of all unique interfaces implemented given types, including their base interfaces. - - - - - - - Initializes a new instance of the class. - - The name. - Type declaring the original event being overriten, or null. - - The add method. - The remove method. - The attributes. - - - - Represents the scope of uniquenes of names for types and their members - - - - - Gets a unique name based on - - Name suggested by the caller - Unique name based on . - - Implementers should provide name as closely resembling as possible. - Generally if no collision occurs it is suggested to return suggested name, otherwise append sequential suffix. - Implementers must return deterministic names, that is when is called twice - with the same suggested name, the same returned name should be provided each time. Non-deterministic return - values, like appending random suffices will break serialization of proxies. - - - - - Returns new, disposable naming scope. It is responsibilty of the caller to make sure that no naming collision - with enclosing scope, or other subscopes is possible. - - New naming scope. - - - - Returns the methods implemented by a type. Use this instead of Type.GetMethods() to work around a CLR issue - where duplicate MethodInfos are returned by Type.GetMethods() after a token of a generic type's method was loaded. - - - - - Determines whether this assembly has internals visible to dynamic proxy. - - The assembly to inspect. - - - - Determines whether the specified method is internal. - - The method. - - true if the specified method is internal; otherwise, false. - - - - - Because we need to cache the types based on the mixed in mixins, we do the following here: - - Get all the mixin interfaces - - Sort them by full name - - Return them by position - - The idea is to have reproducable behavior for the case that mixins are registered in different orders. - This method is here because it is required - - - - - Summary description for ModuleScope. - - - - - The default file name used when the assembly is saved using . - - - - - The default assembly (simple) name used for the assemblies generated by a instance. - - - - - Initializes a new instance of the class; assemblies created by this instance will not be saved. - - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved. - - If set to true saves the generated module. - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved. - - If set to true saves the generated module. - If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions. - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved and what simple names are to be assigned to them. - - If set to true saves the generated module. - If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions. - The simple name of the strong-named assembly generated by this . - The path and file name of the manifest module of the strong-named assembly generated by this . - The simple name of the weak-named assembly generated by this . - The path and file name of the manifest module of the weak-named assembly generated by this . - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved and what simple names are to be assigned to them. - - If set to true saves the generated module. - If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions. - Naming scope used to provide unique names to generated types and their members (usually via sub-scopes). - The simple name of the strong-named assembly generated by this . - The path and file name of the manifest module of the strong-named assembly generated by this . - The simple name of the weak-named assembly generated by this . - The path and file name of the manifest module of the weak-named assembly generated by this . - - - - Returns a type from this scope's type cache, or null if the key cannot be found. - - The key to be looked up in the cache. - The type from this scope's type cache matching the key, or null if the key cannot be found - - - - Registers a type in this scope's type cache. - - The key to be associated with the type. - The type to be stored in the cache. - - - - Gets the key pair used to sign the strong-named assembly generated by this . - - - - - - Gets the specified module generated by this scope, creating a new one if none has yet been generated. - - If set to true, a strong-named module is returned; otherwise, a weak-named module is returned. - A strong-named or weak-named module generated by this scope, as specified by the parameter. - - - - Gets the strong-named module generated by this scope, creating a new one if none has yet been generated. - - A strong-named module generated by this scope. - - - - Gets the weak-named module generated by this scope, creating a new one if none has yet been generated. - - A weak-named module generated by this scope. - - - - Users of this should use this lock when accessing the cache. - - - - - Gets the strong-named module generated by this scope, or if none has yet been generated. - - The strong-named module generated by this scope, or if none has yet been generated. - - - - Gets the file name of the strongly named module generated by this scope. - - The file name of the strongly named module generated by this scope. - - - - Gets the weak-named module generated by this scope, or if none has yet been generated. - - The weak-named module generated by this scope, or if none has yet been generated. - - - - Gets the file name of the weakly named module generated by this scope. - - The file name of the weakly named module generated by this scope. - - - - Initializes a new instance of the class. - - The hook. - - - - Initializes a new instance of the class. - - - - - Provides proxy objects for classes and interfaces. - - - - - Initializes a new instance of the class. - - Proxy types builder. - - - - Initializes a new instance of the class. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - Object proxying calls to members of on object. - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no parameterless constructor exists on type . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no parameterless constructor exists on type . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates the proxy type for class proxy with given class, implementing given and using provided . - - The base class for proxy type. - The interfaces that proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy with target for given interface, implementing given on given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - Actual type that the proxy type will encompass. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy with target interface for given interface, implementing given on given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy without target for given interface, implementing given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Gets or sets the that this log to. - - - - - Gets the proxy builder instance used to generate proxy types. - - The proxy builder. - - - - The silverlight System.Type is missing the IsNested property so this exposes similar functionality. - - - - - - - http://www.dolittle.com/blogs/einar/archive/2008/01/13/missing-enum-getvalues-when-doing-silverlight-for-instance.aspx - - - - - Holds objects representing methods of class. - - - - - Provides an extension point that allows proxies to choose specific interceptors on - a per method basis. - - - - - Selects the interceptors that should intercept calls to the given . - - The type declaring the method to intercept. - The method that will be intercepted. - All interceptors registered with the proxy. - An array of interceptors to invoke upon calling the . - - This method is called only once per proxy instance, upon the first call to the - . Either an empty array or null are valid return values to indicate - that no interceptor should intercept calls to the method. Although it is not advised, it is - legal to return other implementations than these provided in - . - - - - - Creates a new lock. - - - - - - This interface should be implemented by classes - that are available in a bigger context, exposing - the container to different areas in the same application. - - For example, in Web application, the (global) HttpApplication - subclasses should implement this interface to expose - the configured container - - - - - - Exposes means to change target objects of proxies and invocations - - - - - Changes the target object () of current . - - The new value of target of invocation. - - Although the method takes the actual instance must be of type assignable to , otherwise an will be thrown. - Also while it's technically legal to pass null reference (Nothing in Visual Basic) as , for obvious reasons Dynamic Proxy will not be able to call the intercepted method on such target. - In this case last interceptor in the pipeline mustn't call or a will be throws. - Also while it's technically legal to pass proxy itself as , this would create stack overflow. - In this case last interceptor in the pipeline mustn't call or a will be throws. - - Thrown when is not assignable to the proxied type. - - - - Permanently changes the target object of the proxy. This does not affect target of the current invocation. - - The new value of target of the proxy. - - Although the method takes the actual instance must be of type assignable to proxy's target type, otherwise an will be thrown. - Also while it's technically legal to pass null reference (Nothing in Visual Basic) as , for obvious reasons Dynamic Proxy will not be able to call the intercepted method on such target. - In this case last interceptor in the pipeline mustn't call or a will be throws. - Also while it's technically legal to pass proxy itself as , this would create stack overflow. - In this case last interceptor in the pipeline mustn't call or a will be throws. - - Thrown when is not assignable to the proxied type. - - - - New interface that is going to be used by DynamicProxy 2 - - - - - Get the proxy target (note that null is a valid target!) - - - - - - Gets the interceptors for the proxy - - - - - - Defines that the implementation wants a - in order to - access other components. The creator must be aware - that the component might (or might not) implement - the interface. - - - Used by Castle Project components to, for example, - gather logging factories - - - - - Increments IServiceProvider with a generic service resolution operation. - - - - - Provides a factory that can produce either or - classes. - - - - - Manages the instantiation of s. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Gets the configuration file. - - i.e. log4net.config - - - - - Interface for Context Properties implementations - - - - This interface defines a basic property get set accessor. - - - Based on the ContextPropertiesBase of log4net, by Nicko Cadell. - - - - - - Gets or sets the value of a property - - - The value for the property with the specified key - - - - Gets or sets the value of a property - - - - - - Gets the configuration file. - - i.e. log4net.config - - - - - NullLogFactory used when logging is turned off. - - - - - Creates an instance of ILogger with the specified name. - - Name. - - - - - Creates an instance of ILogger with the specified name and LoggerLevel. - - Name. - Level. - - - - - Provides an interface that supports and - allows the storage and retrieval of Contexts. These are supported in - both log4net and NLog. - - - - - Manages logging. - - - This is a facade for the different logging subsystems. - It offers a simplified interface that follows IOC patterns - and a simplified priority/level/severity abstraction. - - - - - Logs a debug message. - - The message to log - - - - Logs a debug message. - - The exception to log - The message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The message to log - - - - Logs an info message. - - The exception to log - The message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The message to log - - - - Logs a warn message. - - The exception to log - The message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The message to log - - - - Logs an error message. - - The exception to log - The message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The message to log - - - - Logs a fatal message. - - The exception to log - The message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal error message. - - The Message - - - - Logs a fatal error message. - - The Message - The Exception - - - - Logs a fatal error message. - - Message format - Array of objects to write using format - - - - Create a new child logger. - The name of the child logger is [current-loggers-name].[passed-in-name] - - The Subname of this logger. - The New ILogger instance. - If the name has an empty element name. - - - - Determines if messages of priority "debug" will be logged. - - True if "debug" messages will be logged. - - - - Determines if messages of priority "info" will be logged. - - True if "info" messages will be logged. - - - - Determines if messages of priority "warn" will be logged. - - True if "warn" messages will be logged. - - - - Determines if messages of priority "error" will be logged. - - True if "error" messages will be logged. - - - - Determines if messages of priority "fatal" will be logged. - - True if "fatal" messages will be logged. - - - - Determines if messages of priority "fatalError" will be logged. - - True if "fatalError" messages will be logged. - - - - Exposes the Global Context of the extended logger. - - - - - Exposes the Thread Context of the extended logger. - - - - - Exposes the Thread Stack of the extended logger. - - - - - Supporting Logger levels. - - - - - Logging will be off - - - - - Fatal logging level - - - - - Error logging level - - - - - Warn logging level - - - - - Info logging level - - - - - Debug logging level - - - - - The Logger sending everything to the standard output streams. - This is mainly for the cases when you have a utility that - does not have a logger to supply. - - - - - The Level Filtered Logger class. This is a base clase which - provides a LogLevel attribute and reroutes all functions into - one Log method. - - - - - Creates a new LevelFilteredLogger. - - - - - Logs a debug message. - - The message to log - - - - Logs a debug message. - - The exception to log - The message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - Message format - Array of objects to write using format - - - - Logs an info message. - - The message to log - - - - Logs an info message. - - The exception to log - The message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - Message format - Array of objects to write using format - - - - Logs a warn message. - - The message to log - - - - Logs a warn message. - - The exception to log - The message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - Message format - Array of objects to write using format - - - - Logs an error message. - - The message to log - - - - Logs an error message. - - The exception to log - The message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - Message format - Array of objects to write using format - - - - Logs a fatal message. - - The message to log - - - - Logs a fatal message. - - The exception to log - The message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - Message format - Array of objects to write using format - - - - Logs a fatal error message. - - The Message - - - - Logs a fatal error message. - - The Message - The Exception - - - - Logs a fatal error message. - - Message format - Array of objects to write using format - - - - Implementors output the log content by implementing this method only. - Note that exception can be null - - - - - - - - - The LoggerLevel that this logger - will be using. Defaults to LoggerLevel.Off - - - - - The name that this logger will be using. - Defaults to String.Empty - - - - - Determines if messages of priority "debug" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "info" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "warn" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "error" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "fatal" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "fatal" will be logged. - - true if log level flags include the bit - - - - Creates a new ConsoleLogger with the Level - set to LoggerLevel.Debug and the Name - set to String.Empty. - - - - - Creates a new ConsoleLogger with the Name - set to String.Empty. - - The logs Level. - - - - Creates a new ConsoleLogger with the Level - set to LoggerLevel.Debug. - - The logs Name. - - - - Creates a new ConsoleLogger. - - The logs Name. - The logs Level. - - - - A Common method to log. - - The level of logging - The name of the logger - The Message - The Exception - - - - Returns a new ConsoleLogger with the name - added after this loggers name, with a dot in between. - - The added hierarchical name. - A new ConsoleLogger. - - - - The Null Logger class. This is useful for implementations where you need - to provide a logger to a utility class, but do not want any output from it. - It also helps when you have a utility that does not have a logger to supply. - - - - - Creates a new NullLogger. - - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - Returns this NullLogger. - - Ignored - This ILogger instance. - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - Returns empty context properties. - - - - - Returns empty context properties. - - - - - Returns empty context stacks. - - - - - The Stream Logger class. This class can stream log information - to any stream, it is suitable for storing a log file to disk, - or to a MemoryStream for testing your components. - - - This logger is not thread safe. - - - - - Creates a new StreamLogger with default encoding - and buffer size. Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - - - Creates a new StreamLogger with default buffer size. - Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - The encoding that will be used for this stream. - - - - - - Creates a new StreamLogger. - Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - The encoding that will be used for this stream. - - - - The buffer size that will be used for this stream. - - - - - - Creates a new StreamLogger with - Debug as default Level. - - The name of the log. - The StreamWriter the log will write to. - - - - This is an abstract implementation - that deals with methods that can be abstracted away - from underlying implementations. - - - AbstractConfiguration makes easier to implementers - to create a new version of - - - - - is a interface encapsulating a configuration node - used to retrieve configuration values. - - - - - Gets the value of the node and converts it - into specified . - - The - - The Default value returned if the conversion fails. - - The Value converted into the specified type. - - - - Gets the name of the node. - - - The Name of the node. - - - - - Gets the value of the node. - - - The Value of the node. - - - - - Gets an of - elements containing all node children. - - The Collection of child nodes. - - - - Gets an of the configuration attributes. - - - - - Gets the value of the node and converts it - into specified . - - The - - The Default value returned if the convertion fails. - - The Value converted into the specified type. - - - - Gets the name of the . - - - The Name of the . - - - - - Gets the value of . - - - The Value of the . - - - - - Gets all child nodes. - - The of child nodes. - - - - Gets node attributes. - - - All attributes of the node. - - - - - A collection of objects. - - - - - Creates a new instance of ConfigurationCollection. - - - - - Creates a new instance of ConfigurationCollection. - - - - - Summary description for MutableConfiguration. - - - - - Initializes a new instance of the class. - - The name. - - - - Gets the value of . - - - The Value of the . - - - - - General purpose class to represent a standard pair of values. - - Type of the first value - Type of the second value - - - - Constructs a pair with its values - - - - - - - List of utility methods related to dynamic proxy operations - - - - - Determines whether the specified type is a proxy generated by - DynamicProxy (1 or 2). - - The type. - - true if it is a proxy; otherwise, false. - - - - - Pendent - - - - - Initializes a new instance of the class. - - The target. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - - is null. - - - - Adds an element with the provided key and value to the object. - - The to use as the key of the element to add. - The to use as the value of the element to add. - - is null. - An element with the same key already exists in the object. - The is read-only.-or- The has a fixed size. - - - - Removes all elements from the object. - - The object is read-only. - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - - is null. - The object is read-only.-or- The has a fixed size. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in at which copying begins. - - is null. - - is less than zero. - - 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 . - The type of the source cannot be cast automatically to the type of the destination . - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets or sets the with the specified key. - - - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Represents a 'streamable' resource. Can - be a file, a resource in an assembly. - - - - - Returns a reader for the stream - - - It's up to the caller to dispose the reader. - - - - - - Returns a reader for the stream - - - It's up to the caller to dispose the reader. - - - - - - - Returns an instance of - created according to the relativePath - using itself as the root. - - - - - - - - - - Only valid for resources that - can be obtained through relative paths - - - - - - - - - - This returns a new stream instance each time it is called. - It is the responsability of the caller to dispose of this stream - - - - - Depicts the contract for resource factories. - - - - - Used to check whether the resource factory - is able to deal with the given resource - identifier. - - - Implementors should return true - only if the given identifier is supported - by the resource factory - - - - - - - Creates an instance - for the given resource identifier - - - - - - - Creates an instance - for the given resource identifier - - - - - - - - - - - - - Adapts a static string content as an - - - - - Enable access to files on network shares - - - - diff --git a/packages/Castle.Core.2.5.2/lib/SL4/Castle.Core.dll b/packages/Castle.Core.2.5.2/lib/SL4/Castle.Core.dll deleted file mode 100644 index c9a4060b7..000000000 Binary files a/packages/Castle.Core.2.5.2/lib/SL4/Castle.Core.dll and /dev/null differ diff --git a/packages/Castle.Core.2.5.2/lib/SL4/Castle.Core.xml b/packages/Castle.Core.2.5.2/lib/SL4/Castle.Core.xml deleted file mode 100644 index a44f335f3..000000000 --- a/packages/Castle.Core.2.5.2/lib/SL4/Castle.Core.xml +++ /dev/null @@ -1,4443 +0,0 @@ - - - - Castle.Core - - - - - Assignes a specific dictionary key. - - - - - Defines the contract for customizing dictionary access. - - - - - Determines relative order to apply related behaviors. - - - - - Determines relative order to apply related behaviors. - - - - - Defines the contract for updating dictionary values. - - - - - Sets the stored dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if the property should be stored. - - - - Defines the contract for building s. - - - - - Builds the dictionary behaviors. - - - - - - Abstract adapter for the support - needed by the - - - - - Adds an element with the provided key and value to the object. - - The to use as the key of the element to add. - The to use as the value of the element to add. - An element with the same key already exists in the object. - key is null. - The is read-only.-or- The has a fixed size. - - - - Removes all elements from the object. - - The object is read-only. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - key is null. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - The type of the source cannot be cast automatically to the type of the destination array. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - Gets or sets the with the specified key. - - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Constant to use when making assembly internals visible to Castle.Core - [assembly: InternalsVisibleTo(CoreInternalsVisible.ToCastleCore)] - - - - - Constant to use when making assembly internals visible to proxy types generated by DynamicProxy. Required when proxying internal types. - [assembly: InternalsVisibleTo(CoreInternalsVisible.ToDynamicProxyGenAssembly2)] - - - - - Abstract implementation of . - - - - - Conract for traversing a . - - - - - Identifies a property should be represented as a nested component. - - - - - Defines the contract for building typed dictionary keys. - - - - - Builds the specified key. - - The dictionary adapter. - The current key. - The property. - The updated key - - - - Defines the contract for retrieving dictionary values. - - - - - Gets the effective dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if return only existing. - The effective property value. - - - - Applies no prefix. - - - - - Gets or sets the prefix. - - The prefix. - - - - Identifies the dictionary adapter types. - - - - - Identifies an interface or property to be pre-feteched. - - - - - Instructs fetching to occur. - - - - - Instructs fetching according to - - - - - - Gets whether or not fetching should occur. - - - - - Assigns a property to a group. - - - - - Constructs a group assignment. - - The group name. - - - - Constructs a group assignment. - - The group name. - - - - Gets the group the property is assigned to. - - - - - Assigns a specific dictionary key. - - - - - Initializes a new instance of the class. - - The key. - - - - Initializes a new instance of the class. - - The compound key. - - - - Assigns a prefix to the keyed properties of an interface. - - - - - Initializes a default instance of the class. - - - - - Initializes a new instance of the class. - - The prefix for the keyed properties of the interface. - - - - Gets the prefix key added to the properties of the interface. - - - - - Substitutes part of key with another string. - - - - - Initializes a new instance of the class. - - The old value. - The new value. - - - - Requests support for multi-level editing. - - - - - Contract for dictionary initialization. - - - - - Performs any initialization of the - - The dictionary adapter. - The dictionary behaviors. - - - - Generates a new GUID on demand. - - - - - Support for on-demand value resolution. - - - - - Suppress property change notifications. - - - - - Provides simple string formatting from existing properties. - - - - - Gets the string format. - - - - - Gets the format properties. - - - - - Identifies a property should be represented as a delimited string value. - - - - - Gets the separator. - - - - - Converts all properties to strings. - - - - - Gets or sets the format. - - The format. - - - - Suppress property change notifications. - - - - - Contract for property descriptor initialization. - - - - - Performs any initialization of the - - The property descriptor. - The property behaviors. - - - - Assigns a prefix to the keyed properties using the interface name. - - - - - Manages conversion between property values. - - - - - Initializes a new instance of the class. - - The converter. - - - - Gets the effective dictionary value. - - The dictionary adapter. - The key. - The stored value. - The property. - true if return only existing. - The effective property value. - - - - - - - - - Contract for creating additional Dictionary adapters. - - - - - Contract for manipulating the Dictionary adapter. - - - - - Contract for editing the Dictionary adapter. - - - - - Contract for managing Dictionary adapter notifications. - - - - - Contract for validating Dictionary adapter. - - - - - Uses Reflection.Emit to expose the properties of a dictionary - through a dynamic implementation of a typed interface. - - - - - Defines the contract for building typed dictionary adapters. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets a typed adapter bound to the . - - The typed interface. - The underlying source of properties. - The property descriptor. - An implementation of the typed interface bound to the dictionary. - - The type represented by T must be an interface with properties. - - - - - Gets the associated with the type. - - The typed interface. - The adapter meta-data. - - - - Gets the associated with the type. - - The typed interface. - The property descriptor. - The adapter meta-data. - - - - - - - - - - - - - - - - - - - - - - - - - Describes a dictionary property. - - - - - Initializes an empty class. - - - - - Initializes a new instance of the class. - - The property. - The property behaviors. - - - - Copies an existinginstance of the class. - - - - - - - Gets the key. - - The dictionary adapter. - The key. - The descriptor. - - - - - Adds the key builder. - - The builder. - - - - Adds the key builders. - - The builders. - - - - Copies the key builders to the other - - - - - - - Copies the selected key builders to the other - - - - - - - - Gets the property value. - - The dictionary adapter. - The key. - The stored value. - The descriptor. - true if return only existing. - - - - - Adds the dictionary getter. - - The getter. - - - - Adds the dictionary getters. - - The getters. - - - - Copies the property getters to the other - - - - - - - Copies the selected property getters to the other - - - - - - - - Sets the property value. - - The dictionary adapter. - The key. - The value. - The descriptor. - - - - - Adds the dictionary setter. - - The setter. - - - - Adds the dictionary setters. - - The setters. - - - - Copies the property setters to the other - - - - - - - Copies the selected property setters to the other - - - - - - - - Adds the behaviors. - - - - - - - Adds the behaviors. - - - - - - - Adds the behaviors from the builders. - - - - - - - Copies the behaviors to the other - - - - - - - Copies the behaviors to the other - - - - - - - - - - - - - Gets the property name. - - - - - Gets the property type. - - - - - Gets the property. - - The property. - - - - Returns true if the property is dynamic. - - - - - Gets additional state. - - - - - Determines if property should be fetched. - - - - - Determines if notifications should occur. - - - - - Gets the property behaviors. - - - - - Gets the type converter. - - The type converter. - - - - Gets the key builders. - - The key builders. - - - - Gets the setter. - - The setter. - - - - Gets the getter. - - The getter. - - - - Adds the dictionary initializers. - - The initializers. - - - - Adds the dictionary initializers. - - The initializers. - - - - Copies the initializers to the other - - - - - - - Copies the filtered initializers to the other - - - - - - - - Adds the dictionary meta-data initializers. - - The meta-data initializers. - - - - Adds the dictionary meta-data initializers. - - The meta-data initializers. - - - - Copies the meta-initializers to the other - - - - - - - Copies the filtered meta-initializers to the other - - - - - - - - Gets the initializers. - - The initializers. - - - - Gets the meta-data initializers. - - The meta-data initializers. - - - - Contract for dictionary meta-data initialization. - - - - - Performs any initialization of the dictionary adapter meta-data. - - The dictionary adapter factory. - The dictionary adapter meta. - - - - - Contract for dictionary validation. - - - - - Determines if is valid. - - The dictionary adapter. - true if valid. - - - - Validates the . - - The dictionary adapter. - The error summary information. - - - - Validates the for a property. - - The dictionary adapter. - The property to validate. - The property summary information. - - - - Invalidates any results cached by the validator. - - The dictionary adapter. - - - - Helper class for retrieving attributes. - - - - - Gets the attribute. - - The member. - The member attribute. - - - - Gets the attributes. Does not consider inherited attributes! - - The member. - The member attributes. - - - - Gets the type attribute. - - The type. - The type attribute. - - - - Gets the type attributes. - - The type. - The type attributes. - - - - Gets the type converter. - - The member. - - - - - Gets the attribute. - - The member. - The member attribute. - - - - Contract for typed dynamic value resolution. - - - - - - Contract for dynamic value resolution. - - - - - Encapsulates an invocation of a proxied method. - - - - - Overrides the value of an argument at the given with the - new provided. - - - This method accepts an , however the value provided must be compatible - with the type of the argument defined on the method, otherwise an exception will be thrown. - - The index of the argument to override. - The new value for the argument. - - - - Gets the value of the argument at the specified . - - The index. - The value of the argument at the specified . - - - - Returns the concrete instantiation of the on the proxy, with any generic - parameters bound to real types. - - - The concrete instantiation of the on the proxy, or the if - not a generic method. - - Can be slower than calling . - - - - Returns the concrete instantiation of , with any - generic parameters bound to real types. - For interface proxies, this will point to the on the target class. - - The concrete instantiation of , or - if not a generic method. - In debug builds this can be slower than calling . - - - - Proceeds the call to the next interceptor in line, and ultimately to the target method. - - - Since interface proxies without a target don't have the target implementation to proceed to, - it is important, that the last interceptor does not call this method, otherwise a - will be thrown. - - - - - Gets the proxy object on which the intercepted method is invoked. - - Proxy object on which the intercepted method is invoked. - - - - Gets the object on which the invocation is performed. This is different from proxy object - because most of the time this will be the proxy target object. - - - The invocation target. - - - - Gets the type of the target object for the intercepted method. - - The type of the target object. - - - - Gets the arguments that the has been invoked with. - - The arguments the method was invoked with. - - - - Gets the generic arguments of the method. - - The generic arguments, or null if not a generic method. - - - - Gets the representing the method being invoked on the proxy. - - The representing the method being invoked. - - - - For interface proxies, this will point to the on the target class. - - The method invocation target. - - - - Gets or sets the return value of the method. - - The return value of the method. - - - - Used during the target type inspection process. Implementors have a chance to customize the - proxy generation process. - - - - - Invoked by the generation process to determine if the specified method should be proxied. - - The type which declares the given method. - The method to inspect. - True if the given method should be proxied; false otherwise. - - - - Invoked by the generation process to notify that a member was not marked as virtual. - - The type which declares the non-virtual member. - The non-virtual member. - - This method gives an opportunity to inspect any non-proxyable member of a type that has - been requested to be proxied, and if appropriate - throw an exception to notify the caller. - - - - - Invoked by the generation process to notify that the whole process has completed. - - - - - Interface describing elements composing generated type - - - - - Checks if the method is public or protected. - - - - - - - Performs some basic screening and invokes the - to select methods. - - - - - - - - - Provides functionality for disassembling instances of attributes to CustomAttributeBuilder form, during the process of emiting new types by Dynamic Proxy. - - - - - Disassembles given attribute instance back to corresponding CustomAttributeBuilder. - - An instance of attribute to disassemble - corresponding 1 to 1 to given attribute instance, or null reference. - - Implementers should return that corresponds to given attribute instance 1 to 1, - that is after calling specified constructor with specified arguments, and setting specified properties and fields with values specified - we should be able to get an attribute instance identical to the one passed in . Implementer can return null - if it wishes to opt out of replicating the attribute. Notice however, that for some cases, like attributes passed explicitly by the user - it is illegal to return null, and doing so will result in exception. - - - - - Handles error during disassembly process - - Type of the attribute being disassembled - Exception thrown during the process - usually null, or (re)throws the exception - - - - Here we try to match a constructor argument to its value. - Since we can't get the values from the assembly, we use some heuristics to get it. - a/ we first try to match all the properties on the attributes by name (case insensitive) to the argument - b/ if we fail we try to match them by property type, with some smarts about convertions (i,e: can use Guid for string). - - - - - We have the following rules here. - Try to find a matching type, failing that, if the parameter is string, get the first property (under the assumption that - we can convert it. - - - - - Attributes can only accept simple types, so we return null for null, - if the value is passed as string we call to string (should help with converting), - otherwise, we use the value as is (enums, integer, etc). - - - - - Base class that exposes the common functionalities - to proxy generation. - - - - - Generates a parameters constructor that initializes the proxy - state with just to make it non-null. - - This constructor is important to allow proxies to be XML serializable - - - - - - It is safe to add mapping (no mapping for the interface exists) - - - - - - - - Generates the constructor for the class that extends - - - - - - - - - Default implementation of interface producing in-memory proxy assemblies. - - - - - Abstracts the implementation of proxy type construction. - - - - - Creates a proxy type for given , using provided. - - The class type to proxy. - The proxy generation options. - The generated proxy type. - Thrown when is a generic type definition. - Thrown when is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given , implementing , using provided. - - The class type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified class and interfaces. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given , implementing , using provided. - - The class type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified class and interfaces. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type that proxies calls to members on , implementing , using provided. - - The interface type to proxy. - Additional interface types to proxy. - Type implementing on which calls to the interface members should be intercepted. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface that 'proceeds' executions to the specified target. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given that delegates all calls to the provided interceptors. - - The interface type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface and additional interfaces that delegate all executions to the specified interceptors. - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given and that delegates all calls to the provided interceptors and allows interceptors to switch the actual target of invocation. - - The interface type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface(s) that delegate all executions to the specified interceptors - and uses an instance of the interface as their targets (i.e. ), rather than a class. All classes should then implement interface, - to allow interceptors to switch invocation target with instance of another type implementing called interface. - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Gets or sets the that this logs to. - - - - - Gets the associated with this builder. - - The module scope associated with this builder. - - - - Initializes a new instance of the class with new . - - - - - Initializes a new instance of the class. - - The module scope for generated proxy types. - - - - Registers custom disassembler to handle disassembly of specified type of attributes. - - Type of attributes to handle - Disassembler converting existing instances of Attributes to CustomAttributeBuilders - - When disassembling an attribute Dynamic Proxy will first check if an custom disassembler has been registered to handle attributes of that type, - and if none is found, it'll use the . - - - - - Attributes should be replicated if they are non-inheritable, - but there are some special cases where the attributes means - something to the CLR, where they should be skipped. - - - - - Initializes a new instance of the class. - - Target element. This is either target type or target method for invocation types. - The type of the proxy. This is base type for invocation types. - The interfaces. - The options. - - - - Initializes a new instance of the class. - - Type of the target. - The interfaces. - The options. - - - s - Provides appropriate Ldc.X opcode for the type of primitive value to be loaded. - - - - - Provides appropriate Ldind.X opcode for - the type of primitive value to be loaded indirectly. - - - - - Emits a load opcode of the appropriate kind for a constant string or - primitive value. - - - - - - - Emits a load opcode of the appropriate kind for the constant default value of a - type, such as 0 for value types and null for reference types. - - - - - Emits a load indirect opcode of the appropriate type for a value or object reference. - Pops a pointer off the evaluation stack, dereferences it and loads - a value of the specified type. - - - - - - - Emits a store indirectopcode of the appropriate type for a value or object reference. - Pops a value of the specified type and a pointer off the evaluation stack, and - stores the value. - - - - - - - Summary description for PropertiesCollection. - - - - - Wraps a reference that is passed - ByRef and provides indirect load/store support. - - - - - Summary description for NewArrayExpression. - - - - - - - - - - Provides appropriate Stind.X opcode - for the type of primitive value to be stored indirectly. - - - - - Returns list of all unique interfaces implemented given types, including their base interfaces. - - - - - - - Initializes a new instance of the class. - - The name. - Type declaring the original event being overriten, or null. - - The add method. - The remove method. - The attributes. - - - - Represents the scope of uniquenes of names for types and their members - - - - - Gets a unique name based on - - Name suggested by the caller - Unique name based on . - - Implementers should provide name as closely resembling as possible. - Generally if no collision occurs it is suggested to return suggested name, otherwise append sequential suffix. - Implementers must return deterministic names, that is when is called twice - with the same suggested name, the same returned name should be provided each time. Non-deterministic return - values, like appending random suffices will break serialization of proxies. - - - - - Returns new, disposable naming scope. It is responsibilty of the caller to make sure that no naming collision - with enclosing scope, or other subscopes is possible. - - New naming scope. - - - - Returns the methods implemented by a type. Use this instead of Type.GetMethods() to work around a CLR issue - where duplicate MethodInfos are returned by Type.GetMethods() after a token of a generic type's method was loaded. - - - - - Determines whether this assembly has internals visible to dynamic proxy. - - The assembly to inspect. - - - - Determines whether the specified method is internal. - - The method. - - true if the specified method is internal; otherwise, false. - - - - - Because we need to cache the types based on the mixed in mixins, we do the following here: - - Get all the mixin interfaces - - Sort them by full name - - Return them by position - - The idea is to have reproducable behavior for the case that mixins are registered in different orders. - This method is here because it is required - - - - - Summary description for ModuleScope. - - - - - The default file name used when the assembly is saved using . - - - - - The default assembly (simple) name used for the assemblies generated by a instance. - - - - - Initializes a new instance of the class; assemblies created by this instance will not be saved. - - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved. - - If set to true saves the generated module. - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved. - - If set to true saves the generated module. - If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions. - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved and what simple names are to be assigned to them. - - If set to true saves the generated module. - If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions. - The simple name of the strong-named assembly generated by this . - The path and file name of the manifest module of the strong-named assembly generated by this . - The simple name of the weak-named assembly generated by this . - The path and file name of the manifest module of the weak-named assembly generated by this . - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved and what simple names are to be assigned to them. - - If set to true saves the generated module. - If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions. - Naming scope used to provide unique names to generated types and their members (usually via sub-scopes). - The simple name of the strong-named assembly generated by this . - The path and file name of the manifest module of the strong-named assembly generated by this . - The simple name of the weak-named assembly generated by this . - The path and file name of the manifest module of the weak-named assembly generated by this . - - - - Returns a type from this scope's type cache, or null if the key cannot be found. - - The key to be looked up in the cache. - The type from this scope's type cache matching the key, or null if the key cannot be found - - - - Registers a type in this scope's type cache. - - The key to be associated with the type. - The type to be stored in the cache. - - - - Gets the key pair used to sign the strong-named assembly generated by this . - - - - - - Gets the specified module generated by this scope, creating a new one if none has yet been generated. - - If set to true, a strong-named module is returned; otherwise, a weak-named module is returned. - A strong-named or weak-named module generated by this scope, as specified by the parameter. - - - - Gets the strong-named module generated by this scope, creating a new one if none has yet been generated. - - A strong-named module generated by this scope. - - - - Gets the weak-named module generated by this scope, creating a new one if none has yet been generated. - - A weak-named module generated by this scope. - - - - Users of this should use this lock when accessing the cache. - - - - - Gets the strong-named module generated by this scope, or if none has yet been generated. - - The strong-named module generated by this scope, or if none has yet been generated. - - - - Gets the file name of the strongly named module generated by this scope. - - The file name of the strongly named module generated by this scope. - - - - Gets the weak-named module generated by this scope, or if none has yet been generated. - - The weak-named module generated by this scope, or if none has yet been generated. - - - - Gets the file name of the weakly named module generated by this scope. - - The file name of the weakly named module generated by this scope. - - - - Initializes a new instance of the class. - - The hook. - - - - Initializes a new instance of the class. - - - - - Provides proxy objects for classes and interfaces. - - - - - Initializes a new instance of the class. - - Proxy types builder. - - - - Initializes a new instance of the class. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - Object proxying calls to members of on object. - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method generates new proxy type for each type of , which affects performance. If you don't want to proxy types differently depending on the type of the target - use method. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no parameterless constructor exists on type . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no parameterless constructor exists on type . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates the proxy type for class proxy with given class, implementing given and using provided . - - The base class for proxy type. - The interfaces that proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy with target for given interface, implementing given on given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - Actual type that the proxy type will encompass. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy with target interface for given interface, implementing given on given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy without target for given interface, implementing given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Gets or sets the that this log to. - - - - - Gets the proxy builder instance used to generate proxy types. - - The proxy builder. - - - - The silverlight System.Type is missing the IsNested property so this exposes similar functionality. - - - - - - - http://www.dolittle.com/blogs/einar/archive/2008/01/13/missing-enum-getvalues-when-doing-silverlight-for-instance.aspx - - - - - Holds objects representing methods of class. - - - - - Provides an extension point that allows proxies to choose specific interceptors on - a per method basis. - - - - - Selects the interceptors that should intercept calls to the given . - - The type declaring the method to intercept. - The method that will be intercepted. - All interceptors registered with the proxy. - An array of interceptors to invoke upon calling the . - - This method is called only once per proxy instance, upon the first call to the - . Either an empty array or null are valid return values to indicate - that no interceptor should intercept calls to the method. Although it is not advised, it is - legal to return other implementations than these provided in - . - - - - - Creates a new lock. - - - - - - This interface should be implemented by classes - that are available in a bigger context, exposing - the container to different areas in the same application. - - For example, in Web application, the (global) HttpApplication - subclasses should implement this interface to expose - the configured container - - - - - - Exposes means to change target objects of proxies and invocations - - - - - Changes the target object () of current . - - The new value of target of invocation. - - Although the method takes the actual instance must be of type assignable to , otherwise an will be thrown. - Also while it's technically legal to pass null reference (Nothing in Visual Basic) as , for obvious reasons Dynamic Proxy will not be able to call the intercepted method on such target. - In this case last interceptor in the pipeline mustn't call or a will be throws. - Also while it's technically legal to pass proxy itself as , this would create stack overflow. - In this case last interceptor in the pipeline mustn't call or a will be throws. - - Thrown when is not assignable to the proxied type. - - - - Permanently changes the target object of the proxy. This does not affect target of the current invocation. - - The new value of target of the proxy. - - Although the method takes the actual instance must be of type assignable to proxy's target type, otherwise an will be thrown. - Also while it's technically legal to pass null reference (Nothing in Visual Basic) as , for obvious reasons Dynamic Proxy will not be able to call the intercepted method on such target. - In this case last interceptor in the pipeline mustn't call or a will be throws. - Also while it's technically legal to pass proxy itself as , this would create stack overflow. - In this case last interceptor in the pipeline mustn't call or a will be throws. - - Thrown when is not assignable to the proxied type. - - - - New interface that is going to be used by DynamicProxy 2 - - - - - Get the proxy target (note that null is a valid target!) - - - - - - Gets the interceptors for the proxy - - - - - - Defines that the implementation wants a - in order to - access other components. The creator must be aware - that the component might (or might not) implement - the interface. - - - Used by Castle Project components to, for example, - gather logging factories - - - - - Increments IServiceProvider with a generic service resolution operation. - - - - - Provides a factory that can produce either or - classes. - - - - - Manages the instantiation of s. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Gets the configuration file. - - i.e. log4net.config - - - - - Interface for Context Properties implementations - - - - This interface defines a basic property get set accessor. - - - Based on the ContextPropertiesBase of log4net, by Nicko Cadell. - - - - - - Gets or sets the value of a property - - - The value for the property with the specified key - - - - Gets or sets the value of a property - - - - - - Gets the configuration file. - - i.e. log4net.config - - - - - NullLogFactory used when logging is turned off. - - - - - Creates an instance of ILogger with the specified name. - - Name. - - - - - Creates an instance of ILogger with the specified name and LoggerLevel. - - Name. - Level. - - - - - Provides an interface that supports and - allows the storage and retrieval of Contexts. These are supported in - both log4net and NLog. - - - - - Manages logging. - - - This is a facade for the different logging subsystems. - It offers a simplified interface that follows IOC patterns - and a simplified priority/level/severity abstraction. - - - - - Logs a debug message. - - The message to log - - - - Logs a debug message. - - The exception to log - The message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The message to log - - - - Logs an info message. - - The exception to log - The message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The message to log - - - - Logs a warn message. - - The exception to log - The message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The message to log - - - - Logs an error message. - - The exception to log - The message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The message to log - - - - Logs a fatal message. - - The exception to log - The message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal error message. - - The Message - - - - Logs a fatal error message. - - The Message - The Exception - - - - Logs a fatal error message. - - Message format - Array of objects to write using format - - - - Create a new child logger. - The name of the child logger is [current-loggers-name].[passed-in-name] - - The Subname of this logger. - The New ILogger instance. - If the name has an empty element name. - - - - Determines if messages of priority "debug" will be logged. - - True if "debug" messages will be logged. - - - - Determines if messages of priority "info" will be logged. - - True if "info" messages will be logged. - - - - Determines if messages of priority "warn" will be logged. - - True if "warn" messages will be logged. - - - - Determines if messages of priority "error" will be logged. - - True if "error" messages will be logged. - - - - Determines if messages of priority "fatal" will be logged. - - True if "fatal" messages will be logged. - - - - Determines if messages of priority "fatalError" will be logged. - - True if "fatalError" messages will be logged. - - - - Exposes the Global Context of the extended logger. - - - - - Exposes the Thread Context of the extended logger. - - - - - Exposes the Thread Stack of the extended logger. - - - - - Supporting Logger levels. - - - - - Logging will be off - - - - - Fatal logging level - - - - - Error logging level - - - - - Warn logging level - - - - - Info logging level - - - - - Debug logging level - - - - - The Logger sending everything to the standard output streams. - This is mainly for the cases when you have a utility that - does not have a logger to supply. - - - - - The Level Filtered Logger class. This is a base clase which - provides a LogLevel attribute and reroutes all functions into - one Log method. - - - - - Creates a new LevelFilteredLogger. - - - - - Logs a debug message. - - The message to log - - - - Logs a debug message. - - The exception to log - The message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - Message format - Array of objects to write using format - - - - Logs an info message. - - The message to log - - - - Logs an info message. - - The exception to log - The message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - Message format - Array of objects to write using format - - - - Logs a warn message. - - The message to log - - - - Logs a warn message. - - The exception to log - The message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - Message format - Array of objects to write using format - - - - Logs an error message. - - The message to log - - - - Logs an error message. - - The exception to log - The message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - Message format - Array of objects to write using format - - - - Logs a fatal message. - - The message to log - - - - Logs a fatal message. - - The exception to log - The message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - Message format - Array of objects to write using format - - - - Logs a fatal error message. - - The Message - - - - Logs a fatal error message. - - The Message - The Exception - - - - Logs a fatal error message. - - Message format - Array of objects to write using format - - - - Implementors output the log content by implementing this method only. - Note that exception can be null - - - - - - - - - The LoggerLevel that this logger - will be using. Defaults to LoggerLevel.Off - - - - - The name that this logger will be using. - Defaults to String.Empty - - - - - Determines if messages of priority "debug" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "info" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "warn" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "error" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "fatal" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "fatal" will be logged. - - true if log level flags include the bit - - - - Creates a new ConsoleLogger with the Level - set to LoggerLevel.Debug and the Name - set to String.Empty. - - - - - Creates a new ConsoleLogger with the Name - set to String.Empty. - - The logs Level. - - - - Creates a new ConsoleLogger with the Level - set to LoggerLevel.Debug. - - The logs Name. - - - - Creates a new ConsoleLogger. - - The logs Name. - The logs Level. - - - - A Common method to log. - - The level of logging - The name of the logger - The Message - The Exception - - - - Returns a new ConsoleLogger with the name - added after this loggers name, with a dot in between. - - The added hierarchical name. - A new ConsoleLogger. - - - - The Null Logger class. This is useful for implementations where you need - to provide a logger to a utility class, but do not want any output from it. - It also helps when you have a utility that does not have a logger to supply. - - - - - Creates a new NullLogger. - - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - Returns this NullLogger. - - Ignored - This ILogger instance. - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - Returns empty context properties. - - - - - Returns empty context properties. - - - - - Returns empty context stacks. - - - - - The Stream Logger class. This class can stream log information - to any stream, it is suitable for storing a log file to disk, - or to a MemoryStream for testing your components. - - - This logger is not thread safe. - - - - - Creates a new StreamLogger with default encoding - and buffer size. Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - - - Creates a new StreamLogger with default buffer size. - Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - The encoding that will be used for this stream. - - - - - - Creates a new StreamLogger. - Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - The encoding that will be used for this stream. - - - - The buffer size that will be used for this stream. - - - - - - Creates a new StreamLogger with - Debug as default Level. - - The name of the log. - The StreamWriter the log will write to. - - - - This is an abstract implementation - that deals with methods that can be abstracted away - from underlying implementations. - - - AbstractConfiguration makes easier to implementers - to create a new version of - - - - - is a interface encapsulating a configuration node - used to retrieve configuration values. - - - - - Gets the value of the node and converts it - into specified . - - The - - The Default value returned if the conversion fails. - - The Value converted into the specified type. - - - - Gets the name of the node. - - - The Name of the node. - - - - - Gets the value of the node. - - - The Value of the node. - - - - - Gets an of - elements containing all node children. - - The Collection of child nodes. - - - - Gets an of the configuration attributes. - - - - - Gets the value of the node and converts it - into specified . - - The - - The Default value returned if the convertion fails. - - The Value converted into the specified type. - - - - Gets the name of the . - - - The Name of the . - - - - - Gets the value of . - - - The Value of the . - - - - - Gets all child nodes. - - The of child nodes. - - - - Gets node attributes. - - - All attributes of the node. - - - - - A collection of objects. - - - - - Creates a new instance of ConfigurationCollection. - - - - - Creates a new instance of ConfigurationCollection. - - - - - Summary description for MutableConfiguration. - - - - - Initializes a new instance of the class. - - The name. - - - - Gets the value of . - - - The Value of the . - - - - - General purpose class to represent a standard pair of values. - - Type of the first value - Type of the second value - - - - Constructs a pair with its values - - - - - - - List of utility methods related to dynamic proxy operations - - - - - Determines whether the specified type is a proxy generated by - DynamicProxy (1 or 2). - - The type. - - true if it is a proxy; otherwise, false. - - - - - Pendent - - - - - Initializes a new instance of the class. - - The target. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - - is null. - - - - Adds an element with the provided key and value to the object. - - The to use as the key of the element to add. - The to use as the value of the element to add. - - is null. - An element with the same key already exists in the object. - The is read-only.-or- The has a fixed size. - - - - Removes all elements from the object. - - The object is read-only. - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - - is null. - The object is read-only.-or- The has a fixed size. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in at which copying begins. - - is null. - - is less than zero. - - 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 . - The type of the source cannot be cast automatically to the type of the destination . - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets or sets the with the specified key. - - - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Represents a 'streamable' resource. Can - be a file, a resource in an assembly. - - - - - Returns a reader for the stream - - - It's up to the caller to dispose the reader. - - - - - - Returns a reader for the stream - - - It's up to the caller to dispose the reader. - - - - - - - Returns an instance of - created according to the relativePath - using itself as the root. - - - - - - - - - - Only valid for resources that - can be obtained through relative paths - - - - - - - - - - This returns a new stream instance each time it is called. - It is the responsability of the caller to dispose of this stream - - - - - Depicts the contract for resource factories. - - - - - Used to check whether the resource factory - is able to deal with the given resource - identifier. - - - Implementors should return true - only if the given identifier is supported - by the resource factory - - - - - - - Creates an instance - for the given resource identifier - - - - - - - Creates an instance - for the given resource identifier - - - - - - - - - - - - - Adapts a static string content as an - - - - - Enable access to files on network shares - - - - diff --git a/packages/Castle.Core.2.5.2/lib/releaseNotes.txt b/packages/Castle.Core.2.5.2/lib/releaseNotes.txt deleted file mode 100644 index 30485eebb..000000000 --- a/packages/Castle.Core.2.5.2/lib/releaseNotes.txt +++ /dev/null @@ -1,8 +0,0 @@ -You can find full list of changes in changes.txt, list of breaking changes in breakingchanges.txt (there are no known breaking changes between 2.5.1 and 2.5.2 release). - -Issue tracker: - http://issues.castleproject.org/dashboard -Documentation (work in progress): -Dictionary Adapter - http://stw.castleproject.org/Tools.Castle-DictionaryAdapter.ashx -DynamicProxy - http://stw.castleproject.org/Tools.DynamicProxy.ashx -Discusssion group: - http://groups.google.com/group/castle-project-users -StackOverflow tags: - castle-dynamicproxy, castle-dictionaryadapter, castle \ No newline at end of file diff --git a/packages/Glimpse.0.81/Content/App_Readme/glimpse.readme.txt b/packages/Glimpse.0.81/Content/App_Readme/glimpse.readme.txt deleted file mode 100644 index bcbb782ce..000000000 --- a/packages/Glimpse.0.81/Content/App_Readme/glimpse.readme.txt +++ /dev/null @@ -1,140 +0,0 @@ -Release notes moved to bottom of file! --------------------------------------- - -Using Glimpse -------------- -Thank you for NuGetting Glimpse, A client side Glimpse into whats going on in your server. - -Glimpse is currently in Beta. - -If you experience any issues, or have feature requests, please report them to https://github.com/Glimpse/Glimpse/issues - -To get started with Glimpse, visit [http://yoursite.com]/Glimpse/Config/ This page hosts the Glimpse bookmarklets, useful for quickly turning on Glimpse. - -The following configuration values are allowed for Glimpse in your web.config: - - - - - - - - - - - - - - - - -For more info, visit the homepage at http://getGlimpse.com or follow #glimpse on Twitter. - - -Overview --------- -At its core Glimpse allows you to debug your web site right in the browser. Glimpse allows you to "Glimpse" into what's going on in your web server. In other words what Firebug is to debugging your client side code, Glimpse is to debugging your server within the client. - -Fundamentally Glimpse is made up of 3 different parts, all of which are extensible and customizable for any platform: - -* Glimpse Server Module -* Glimpse Client Side Viewer -* Glimpse Protocol - - -How it Works ------------- -On the Server: - -1. Server collects all server side information that will aid in debugging (i.e. application settings, routes, session variables, trace data, etc) -2. It does this by running through a pipeline of server side data providers that can be dynamically controlled and added to under our plugin architecture -3. Before the response is send, the server formats this data in accordance with the Glimpse Protocol and serializes it as JSON -4. Depending on whether it is an Ajax request or not, the server embeds the JSON in the content of the page - -On the Client: - -5. Depending on whether it is a Ajax request or not, the client picks up the JSON data and displays the it by executing a pipeline of client side data providers that can be dynamically controlled and added to under our plugin architecture -6. The client side module then dynamically renders a client side UI (similar to Firebug Lite) that lets you view this data - -Glimpse can be turned on or off by a series of different mechanisms, but at its core if the Glimpse cookie is present the server will provide the "debug" data - as a security measure, the request for debug data is "authenticated". - - -Server Implementations ----------------------- -Given the scope of the project and what it can do, the concept isn't restricted to any one platform. Hence, once mature, Glimpse Server Module will be available on all major web platforms. - -Platforms currently supported: - -* ASP.Net MVC - -Platforms target to be supported: - -* ASP.Net Web Forms -* PHP -* Ruby on Rails - -NOTE - If you would like help develop a Glimpse Server Module for a given platform please let us know. - - -Client Implementations ----------------------- -To start with the Glimpse Client Side Viewer is simply a light weight JavaScript "plugin" that understands the Glimpse Protocol and knows how to render the data. From a technology standpoint we currently use jQuery as the client side framework. - -Eventually, we would like to have actual browser plugins that provide richer functionality and experience, but the JavaScript version of the Glimpse Client Side Viewer is surprisingly well featured, intuitive and provides a high fidelity experience. We also hope to have a version for mobile ready soon which customizes the viewing/usage experience when using a mobile device. - -Protocol --------- -Details coming soon. - -Release Notes -------------- -05/08/2011 - 0.81 -- Changed plugin initialization so that SetupInit is only called once. -- Added list of loaded plugins to Glimpse/Config -- Added node to configuration to allow for blacklisting unwanted plugins. Configuration takes the form -- Updated Binding plugin to have acctual view data -- Fixed bugs with getting NotImplemented exceptions on trace tab -- Fixed bugs with users who were extending DefaultModelBinder -- Added ability to set glimpseState (cookie) to Hidden, which allows Glimpse to record and track remote client requests without rendering UI/Data to their response. (Useful for use with the remote tab) -- Added GlimpseTrace static facade to simplify tracing - -04/28/2011 - 0.80 -- Removed dependency on System.Drawing -- Fixed bugs related to projects that used custom ControllerActionInvokers -- Fixed bugs related to projects using custom FilterProviders -- Added MetaData tab which gives details of primary View Model and primary View Models properties (note this is not recursive at the moment) -- Environment tab now shows site trust level -- Performance improvments for supporting virtual directories -- Glimpse should now work in jQuery noConflict mode -- Added Glimpse Warnings tab, used to help debug Glimpse problems going forward - -04/20/2011 - 0.79 -- Client bug fixes for popout window -- Client bug fixes for virtual directories -- Various javascript fixes - -04/16/2011 - 0.78 -- Breaking change is you created custom plugins. Plugin interface moved from Glimpse.Protocol to Glimpse.Net.Extensibility namespace -- Fixed bug which threw ReflectionTypeLoadExceptions by using custom SafeDirectoryCatalog (Special thanks to Craig Wagner for helping us track this down!) -- Fixed pathing issues experienced by users hosting from virtual directories -- Added Request tab to show form, query string and cookies as the server saw them -- Added ViewData/ViewBag and TempData info to the details column of the Views tab -- Added Area support to Routes tab -- Added Glimpse Warnings tab, which will only appear when a MEF loading issue is thrown -- Added ability to open Glimpse in popup mode (alpha) -- Added symbols package to symbolsource.org for simplified debugging by the community - -04/14/2011 - 0.77 -- Fixed issues with most InvalidOperationException's/Circular references. Now if there is an issue, handle it more gracefully, and it only affects one tab. (More complete fix coming soon!) -- /Glimpse/Config is no longer case sensitive, and certain reports of 404’s to this page have been fixed. In addition, this page has been improved to be more understandable. -- As of right now, Glimpse only supports MVC3. We have identified the issues with MVC2, and are working to correct them. Special shout out to @rugvedvaidya for providing the (long!) workaround to get Glimpse running on MVC2. - -04/13/2011 - 0.76 -- Added "Time Elapsed" column to the Execution tab. -- Fixed 2 bugs with IE9 client rendering. -- Fixed bug with CSS text-alignment. -- Changed to Apache 2 license. - -Attribution ------------ -Some Icons are Copyright © Yusuke Kamiyamane. [http://p.yusukekamiyamane.com/] \ No newline at end of file diff --git a/packages/Glimpse.0.81/Content/web.config.transform b/packages/Glimpse.0.81/Content/web.config.transform deleted file mode 100644 index e309f2dd4..000000000 --- a/packages/Glimpse.0.81/Content/web.config.transform +++ /dev/null @@ -1,14 +0,0 @@ - - -
- - - - - - - - - - - \ No newline at end of file diff --git a/packages/Glimpse.0.81/Glimpse.0.81.nupkg b/packages/Glimpse.0.81/Glimpse.0.81.nupkg deleted file mode 100644 index 286ac8486..000000000 Binary files a/packages/Glimpse.0.81/Glimpse.0.81.nupkg and /dev/null differ diff --git a/packages/PetaPoco.4.0.2/Content/Models/Generated/Database.tt b/packages/PetaPoco.4.0.2/Content/Models/Generated/Database.tt deleted file mode 100644 index 464641a44..000000000 --- a/packages/PetaPoco.4.0.2/Content/Models/Generated/Database.tt +++ /dev/null @@ -1,32 +0,0 @@ -<#@ include file="PetaPoco.Core.ttinclude" #> -<# - // Settings - ConnectionStringName = ""; // Uses last connection string in config if not specified - Namespace = ""; - RepoName = ""; - GenerateOperations = true; - GeneratePocos = true; - GenerateCommon = true; - ClassPrefix = ""; - ClassSuffix = ""; - - // Read schema - var tables = LoadTables(); - - -/* - // Tweak Schema - tables["tablename"].Ignore = true; // To ignore a table - tables["tablename"].ClassName = "newname"; // To change the class name of a table - tables["tablename"]["columnname"].Ignore = true; // To ignore a column - tables["tablename"]["columnname"].PropertyName="newname"; // To change the property name of a column - tables["tablename"]["columnname"].PropertyType="bool"; // To change the property type of a column -*/ - - // Generate output - if (tables.Count>0) - { -#> -<#@ include file="PetaPoco.Generator.ttinclude" #> -<# } #> - diff --git a/packages/PetaPoco.4.0.2/Content/Models/Generated/PetaPoco.Core.ttinclude b/packages/PetaPoco.4.0.2/Content/Models/Generated/PetaPoco.Core.ttinclude deleted file mode 100644 index e50730354..000000000 --- a/packages/PetaPoco.4.0.2/Content/Models/Generated/PetaPoco.Core.ttinclude +++ /dev/null @@ -1,1615 +0,0 @@ -<#@ template language="C#v3.5" hostspecific="True" #> -<#@ assembly name="EnvDTE" #> -<#@ assembly name="System.Core.dll" #> -<#@ assembly name="System.Data" #> -<#@ assembly name="System.Xml" #> -<#@ assembly name="System.Configuration" #> -<#@ assembly name="System.Windows.Forms" #> -<#@ import namespace="System.Collections.Generic" #> -<#@ import namespace="System.Data" #> -<#@ import namespace="System.Data.SqlClient" #> -<#@ import namespace="System.Data.Common" #> -<#@ import namespace="System.Diagnostics" #> -<#@ import namespace="System.Globalization" #> -<#@ import namespace="System.IO" #> -<#@ import namespace="System.Linq" #> -<#@ import namespace="System.Text" #> -<#@ import namespace="System.Text.RegularExpressions" #> -<#@ import namespace="System.Configuration" #> -<#@ import namespace="System.Windows.Forms" #> -<#+ - -/* - This code is part of the PetaPoco project (http://www.toptensoftware.com/petapoco). - It is based on the SubSonic T4 templates but has been considerably re-organized and reduced - - ----------------------------------------------------------------------------------------- - - This template can read minimal schema information from the following databases: - - * SQL Server - * SQL Server CE - * MySQL - * PostGreSQL - * Oracle - - For connection and provider settings the template will look for the web.config or app.config file of the - containing Visual Studio project. It will not however read DbProvider settings from this file. - - In order to work, the appropriate driver must be registered in the system machine.config file. If you're - using Visual Studio 2010 the file you want is here: - - C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config - - After making changes to machine.config you will also need to restart Visual Studio. - - Here's a typical set of entries that might help if you're stuck: - - - - - - - - - - - - - - Also, the providers and their dependencies need to be installed to GAC. - - Eg; this is how I installed the drivers for PostgreSQL - - gacutil /i Npgsql.dll - gacutil /i Mono.Security.dll - - ----------------------------------------------------------------------------------------- - - SubSonic - http://subsonicproject.com - - The contents of this file are subject to the New BSD - License (the "License"); you may not use this file - except in compliance with the License. You may obtain a copy of - the License at http://www.opensource.org/licenses/bsd-license.php - - Software distributed under the License is distributed on an - "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - implied. See the License for the specific language governing - rights and limitations under the License. -*/ - -string ConnectionStringName = ""; -string Namespace = ""; -string RepoName = ""; -string ClassPrefix = ""; -string ClassSuffix = ""; -string SchemaName = null; -bool IncludeViews = false; -bool GenerateOperations = false; -bool GenerateCommon = true; -bool GeneratePocos = true; - - - -public class Table -{ - public List Columns; - public string Name; - public string Schema; - public bool IsView; - public string CleanName; - public string ClassName; - public string SequenceName; - public bool Ignore; - - public Column PK - { - get - { - return this.Columns.SingleOrDefault(x=>x.IsPK); - } - } - - public Column GetColumn(string columnName) - { - return Columns.Single(x=>string.Compare(x.Name, columnName, true)==0); - } - - public Column this[string columnName] - { - get - { - return GetColumn(columnName); - } - } - -} - -public class Column -{ - public string Name; - public string PropertyName; - public string PropertyType; - public bool IsPK; - public bool IsNullable; - public bool IsAutoIncrement; - public bool Ignore; -} - -public class Tables : List -{ - public Tables() - { - } - - public Table GetTable(string tableName) - { - return this.Single(x=>string.Compare(x.Name, tableName, true)==0); - } - - public Table this[string tableName] - { - get - { - return GetTable(tableName); - } - } - -} - - -static Regex rxCleanUp = new Regex(@"[^\w\d_]", RegexOptions.Compiled); - -static Func CleanUp = (str) => -{ - str = rxCleanUp.Replace(str, "_"); - if (char.IsDigit(str[0])) str = "_" + str; - - return str; -}; - -string CheckNullable(Column col) -{ - string result=""; - if(col.IsNullable && - col.PropertyType !="byte[]" && - col.PropertyType !="string" && - col.PropertyType !="Microsoft.SqlServer.Types.SqlGeography" && - col.PropertyType !="Microsoft.SqlServer.Types.SqlGeometry" - ) - result="?"; - return result; -} - -string GetConnectionString(ref string connectionStringName, out string providerName) -{ - var _CurrentProject = GetCurrentProject(); - - providerName=null; - - string result=""; - ExeConfigurationFileMap configFile = new ExeConfigurationFileMap(); - configFile.ExeConfigFilename = GetConfigPath(); - - if (string.IsNullOrEmpty(configFile.ExeConfigFilename)) - throw new ArgumentNullException("The project does not contain App.config or Web.config file."); - - - var config = System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(configFile, ConfigurationUserLevel.None); - var connSection=config.ConnectionStrings; - - //if the connectionString is empty - which is the defauls - //look for count-1 - this is the last connection string - //and takes into account AppServices and LocalSqlServer - if(string.IsNullOrEmpty(connectionStringName)) - { - if(connSection.ConnectionStrings.Count>1) - { - connectionStringName = connSection.ConnectionStrings[connSection.ConnectionStrings.Count-1].Name; - result=connSection.ConnectionStrings[connSection.ConnectionStrings.Count-1].ConnectionString; - providerName=connSection.ConnectionStrings[connSection.ConnectionStrings.Count-1].ProviderName; - } - } - else - { - try - { - result=connSection.ConnectionStrings[connectionStringName].ConnectionString; - providerName=connSection.ConnectionStrings[connectionStringName].ProviderName; - } - catch - { - result="There is no connection string name called '"+connectionStringName+"'"; - } - } - -// if (String.IsNullOrEmpty(providerName)) -// providerName="System.Data.SqlClient"; - - return result; -} - -string _connectionString=""; -string _providerName=""; - -void InitConnectionString() -{ - if(String.IsNullOrEmpty(_connectionString)) - { - _connectionString=GetConnectionString(ref ConnectionStringName, out _providerName); - - if(_connectionString.Contains("|DataDirectory|")) - { - //have to replace it - string dataFilePath=GetDataDirectory(); - _connectionString=_connectionString.Replace("|DataDirectory|",dataFilePath); - } - } -} - -public string ConnectionString -{ - get - { - InitConnectionString(); - return _connectionString; - } -} - -public string ProviderName -{ - get - { - InitConnectionString(); - return _providerName; - } -} - -public EnvDTE.Project GetCurrentProject() { - - IServiceProvider _ServiceProvider = (IServiceProvider)Host; - if (_ServiceProvider == null) - throw new Exception("Host property returned unexpected value (null)"); - - EnvDTE.DTE dte = (EnvDTE.DTE)_ServiceProvider.GetService(typeof(EnvDTE.DTE)); - if (dte == null) - throw new Exception("Unable to retrieve EnvDTE.DTE"); - - Array activeSolutionProjects = (Array)dte.ActiveSolutionProjects; - if (activeSolutionProjects == null) - throw new Exception("DTE.ActiveSolutionProjects returned null"); - - EnvDTE.Project dteProject = (EnvDTE.Project)activeSolutionProjects.GetValue(0); - if (dteProject == null) - throw new Exception("DTE.ActiveSolutionProjects[0] returned null"); - - return dteProject; - -} - -private string GetProjectPath() -{ - EnvDTE.Project project = GetCurrentProject(); - System.IO.FileInfo info = new System.IO.FileInfo(project.FullName); - return info.Directory.FullName; -} - -private string GetConfigPath() -{ - EnvDTE.Project project = GetCurrentProject(); - foreach (EnvDTE.ProjectItem item in project.ProjectItems) - { - // if it is the app.config file, then open it up - if (item.Name.Equals("App.config",StringComparison.InvariantCultureIgnoreCase) || item.Name.Equals("Web.config",StringComparison.InvariantCultureIgnoreCase)) - return GetProjectPath() + "\\" + item.Name; - } - return String.Empty; -} - -public string GetDataDirectory() -{ - EnvDTE.Project project=GetCurrentProject(); - return System.IO.Path.GetDirectoryName(project.FileName)+"\\App_Data\\"; -} - -static string zap_password(string connectionString) -{ - var rx = new Regex("password=.*;", RegexOptions.Singleline | RegexOptions.Multiline | RegexOptions.IgnoreCase); - return rx.Replace(connectionString, "password=**zapped**;"); -} - - - -Tables LoadTables() -{ - InitConnectionString(); - - WriteLine("// This file was automatically generated by the PetaPoco T4 Template"); - WriteLine("// Do not make changes directly to this file - edit the template instead"); - WriteLine("// "); - WriteLine("// The following connection settings were used to generate this file"); - WriteLine("// "); - WriteLine("// Connection String Name: `{0}`", ConnectionStringName); - WriteLine("// Provider: `{0}`", ProviderName); - WriteLine("// Connection String: `{0}`", zap_password(ConnectionString)); - WriteLine("// Schema: `{0}`", SchemaName); - WriteLine("// Include Views: `{0}`", IncludeViews); - WriteLine(""); - - DbProviderFactory _factory; - try - { - _factory = DbProviderFactories.GetFactory(ProviderName); - } - catch (Exception x) - { - var error=x.Message.Replace("\r\n", "\n").Replace("\n", " "); - Warning(string.Format("Failed to load provider `{0}` - {1}", ProviderName, error)); - WriteLine(""); - WriteLine("// -----------------------------------------------------------------------------------------"); - WriteLine("// Failed to load provider `{0}` - {1}", ProviderName, error); - WriteLine("// -----------------------------------------------------------------------------------------"); - WriteLine(""); - return new Tables(); - } - - try - { - Tables result; - using(var conn=_factory.CreateConnection()) - { - conn.ConnectionString=ConnectionString; - conn.Open(); - - SchemaReader reader=null; - - if (_factory.GetType().Name == "MySqlClientFactory") - { - // MySql - reader=new MySqlSchemaReader(); - } - else if (_factory.GetType().Name == "SqlCeProviderFactory") - { - // SQL CE - reader=new SqlServerCeSchemaReader(); - } - else if (_factory.GetType().Name == "NpgsqlFactory") - { - // PostgreSQL - reader=new PostGreSqlSchemaReader(); - } - else if (_factory.GetType().Name == "OracleClientFactory") - { - // Oracle - reader=new OracleSchemaReader(); - } - else - { - // Assume SQL Server - reader=new SqlServerSchemaReader(); - } - - reader.outer=this; - result=reader.ReadSchema(conn, _factory); - - // Remove unrequired tables/views - for (int i=result.Count-1; i>=0; i--) - { - if (SchemaName!=null && string.Compare(result[i].Schema, SchemaName, true)!=0) - { - result.RemoveAt(i); - continue; - } - if (!IncludeViews && result[i].IsView) - { - result.RemoveAt(i); - continue; - } - } - - conn.Close(); - - - var rxClean = new Regex("^(Equals|GetHashCode|GetType|ToString|repo|Save|IsNew|Insert|Update|Delete|Exists|SingleOrDefault|Single|First|FirstOrDefault|Fetch|Page|Query)$"); - foreach (var t in result) - { - t.ClassName = ClassPrefix + t.ClassName + ClassSuffix; - foreach (var c in t.Columns) - { - c.PropertyName = rxClean.Replace(c.PropertyName, "_$1"); - - // Make sure property name doesn't clash with class name - if (c.PropertyName == t.ClassName) - c.PropertyName = "_" + c.PropertyName; - } - } - - return result; - } - } - catch (Exception x) - { - var error=x.Message.Replace("\r\n", "\n").Replace("\n", " "); - Warning(string.Format("Failed to read database schema - {0}", error)); - WriteLine(""); - WriteLine("// -----------------------------------------------------------------------------------------"); - WriteLine("// Failed to read database schema - {0}", error); - WriteLine("// -----------------------------------------------------------------------------------------"); - WriteLine(""); - return new Tables(); - } - - -} - -abstract class SchemaReader -{ - public abstract Tables ReadSchema(DbConnection connection, DbProviderFactory factory); - public GeneratedTextTransformation outer; - public void WriteLine(string o) - { - outer.WriteLine(o); - } - -} - -class SqlServerSchemaReader : SchemaReader -{ - // SchemaReader.ReadSchema - public override Tables ReadSchema(DbConnection connection, DbProviderFactory factory) - { - var result=new Tables(); - - _connection=connection; - _factory=factory; - - var cmd=_factory.CreateCommand(); - cmd.Connection=connection; - cmd.CommandText=TABLE_SQL; - - //pull the tables in a reader - using(cmd) - { - - using (var rdr=cmd.ExecuteReader()) - { - while(rdr.Read()) - { - Table tbl=new Table(); - tbl.Name=rdr["TABLE_NAME"].ToString(); - tbl.Schema=rdr["TABLE_SCHEMA"].ToString(); - tbl.IsView=string.Compare(rdr["TABLE_TYPE"].ToString(), "View", true)==0; - tbl.CleanName=CleanUp(tbl.Name); - tbl.ClassName=Inflector.MakeSingular(tbl.CleanName); - - result.Add(tbl); - } - } - } - - foreach (var tbl in result) - { - tbl.Columns=LoadColumns(tbl); - - // Mark the primary key - string PrimaryKey=GetPK(tbl.Name); - var pkColumn=tbl.Columns.SingleOrDefault(x=>x.Name.ToLower().Trim()==PrimaryKey.ToLower().Trim()); - if(pkColumn!=null) - { - pkColumn.IsPK=true; - } - } - - - return result; - } - - DbConnection _connection; - DbProviderFactory _factory; - - - List LoadColumns(Table tbl) - { - - using (var cmd=_factory.CreateCommand()) - { - cmd.Connection=_connection; - cmd.CommandText=COLUMN_SQL; - - var p = cmd.CreateParameter(); - p.ParameterName = "@tableName"; - p.Value=tbl.Name; - cmd.Parameters.Add(p); - - p = cmd.CreateParameter(); - p.ParameterName = "@schemaName"; - p.Value=tbl.Schema; - cmd.Parameters.Add(p); - - var result=new List(); - using (IDataReader rdr=cmd.ExecuteReader()) - { - while(rdr.Read()) - { - Column col=new Column(); - col.Name=rdr["ColumnName"].ToString(); - col.PropertyName=CleanUp(col.Name); - col.PropertyType=GetPropertyType(rdr["DataType"].ToString()); - col.IsNullable=rdr["IsNullable"].ToString()=="YES"; - col.IsAutoIncrement=((int)rdr["IsIdentity"])==1; - result.Add(col); - } - } - - return result; - } - } - - string GetPK(string table){ - - string sql=@"SELECT c.name AS ColumnName - FROM sys.indexes AS i - INNER JOIN sys.index_columns AS ic ON i.object_id = ic.object_id AND i.index_id = ic.index_id - INNER JOIN sys.objects AS o ON i.object_id = o.object_id - LEFT OUTER JOIN sys.columns AS c ON ic.object_id = c.object_id AND c.column_id = ic.column_id - WHERE (i.type = 1) AND (o.name = @tableName)"; - - using (var cmd=_factory.CreateCommand()) - { - cmd.Connection=_connection; - cmd.CommandText=sql; - - var p = cmd.CreateParameter(); - p.ParameterName = "@tableName"; - p.Value=table; - cmd.Parameters.Add(p); - - var result=cmd.ExecuteScalar(); - - if(result!=null) - return result.ToString(); - } - - return ""; - } - - string GetPropertyType(string sqlType) - { - string sysType="string"; - switch (sqlType) - { - case "bigint": - sysType = "long"; - break; - case "smallint": - sysType= "short"; - break; - case "int": - sysType= "int"; - break; - case "uniqueidentifier": - sysType= "Guid"; - break; - case "smalldatetime": - case "datetime": - case "date": - case "time": - sysType= "DateTime"; - break; - case "float": - sysType="double"; - break; - case "real": - sysType="float"; - break; - case "numeric": - case "smallmoney": - case "decimal": - case "money": - sysType= "decimal"; - break; - case "tinyint": - sysType = "byte"; - break; - case "bit": - sysType= "bool"; - break; - case "image": - case "binary": - case "varbinary": - case "timestamp": - sysType= "byte[]"; - break; - case "geography": - sysType = "Microsoft.SqlServer.Types.SqlGeography"; - break; - case "geometry": - sysType = "Microsoft.SqlServer.Types.SqlGeometry"; - break; - } - return sysType; - } - - - - const string TABLE_SQL=@"SELECT * - FROM INFORMATION_SCHEMA.TABLES - WHERE TABLE_TYPE='BASE TABLE' OR TABLE_TYPE='VIEW'"; - - const string COLUMN_SQL=@"SELECT - TABLE_CATALOG AS [Database], - TABLE_SCHEMA AS Owner, - TABLE_NAME AS TableName, - COLUMN_NAME AS ColumnName, - ORDINAL_POSITION AS OrdinalPosition, - COLUMN_DEFAULT AS DefaultSetting, - IS_NULLABLE AS IsNullable, DATA_TYPE AS DataType, - CHARACTER_MAXIMUM_LENGTH AS MaxLength, - DATETIME_PRECISION AS DatePrecision, - COLUMNPROPERTY(object_id('[' + TABLE_SCHEMA + '].[' + TABLE_NAME + ']'), COLUMN_NAME, 'IsIdentity') AS IsIdentity, - COLUMNPROPERTY(object_id('[' + TABLE_SCHEMA + '].[' + TABLE_NAME + ']'), COLUMN_NAME, 'IsComputed') as IsComputed - FROM INFORMATION_SCHEMA.COLUMNS - WHERE TABLE_NAME=@tableName AND TABLE_SCHEMA=@schemaName - ORDER BY OrdinalPosition ASC"; - -} - -class SqlServerCeSchemaReader : SchemaReader -{ - // SchemaReader.ReadSchema - public override Tables ReadSchema(DbConnection connection, DbProviderFactory factory) - { - var result=new Tables(); - - _connection=connection; - _factory=factory; - - var cmd=_factory.CreateCommand(); - cmd.Connection=connection; - cmd.CommandText=TABLE_SQL; - - //pull the tables in a reader - using(cmd) - { - using (var rdr=cmd.ExecuteReader()) - { - while(rdr.Read()) - { - Table tbl=new Table(); - tbl.Name=rdr["TABLE_NAME"].ToString(); - tbl.CleanName=CleanUp(tbl.Name); - tbl.ClassName=Inflector.MakeSingular(tbl.CleanName); - tbl.Schema=null; - tbl.IsView=false; - result.Add(tbl); - } - } - } - - foreach (var tbl in result) - { - tbl.Columns=LoadColumns(tbl); - - // Mark the primary key - string PrimaryKey=GetPK(tbl.Name); - var pkColumn=tbl.Columns.SingleOrDefault(x=>x.Name.ToLower().Trim()==PrimaryKey.ToLower().Trim()); - if(pkColumn!=null) - pkColumn.IsPK=true; - } - - - return result; - } - - DbConnection _connection; - DbProviderFactory _factory; - - - List LoadColumns(Table tbl) - { - - using (var cmd=_factory.CreateCommand()) - { - cmd.Connection=_connection; - cmd.CommandText=COLUMN_SQL; - - var p = cmd.CreateParameter(); - p.ParameterName = "@tableName"; - p.Value=tbl.Name; - cmd.Parameters.Add(p); - - var result=new List(); - using (IDataReader rdr=cmd.ExecuteReader()) - { - while(rdr.Read()) - { - Column col=new Column(); - col.Name=rdr["ColumnName"].ToString(); - col.PropertyName=CleanUp(col.Name); - col.PropertyType=GetPropertyType(rdr["DataType"].ToString()); - col.IsNullable=rdr["IsNullable"].ToString()=="YES"; - col.IsAutoIncrement=rdr["AUTOINC_INCREMENT"]!=DBNull.Value; - result.Add(col); - } - } - - return result; - } - } - - string GetPK(string table){ - - string sql=@"SELECT KCU.COLUMN_NAME - FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE KCU - JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS TC - ON KCU.CONSTRAINT_NAME=TC.CONSTRAINT_NAME - WHERE TC.CONSTRAINT_TYPE='PRIMARY KEY' - AND KCU.TABLE_NAME=@tableName"; - - using (var cmd=_factory.CreateCommand()) - { - cmd.Connection=_connection; - cmd.CommandText=sql; - - var p = cmd.CreateParameter(); - p.ParameterName = "@tableName"; - p.Value=table; - cmd.Parameters.Add(p); - - var result=cmd.ExecuteScalar(); - - if(result!=null) - return result.ToString(); - } - - return ""; - } - - string GetPropertyType(string sqlType) - { - string sysType="string"; - switch (sqlType) - { - case "bigint": - sysType = "long"; - break; - case "smallint": - sysType= "short"; - break; - case "int": - sysType= "int"; - break; - case "uniqueidentifier": - sysType= "Guid"; - break; - case "smalldatetime": - case "datetime": - case "date": - case "time": - sysType= "DateTime"; - break; - case "float": - sysType="double"; - break; - case "real": - sysType="float"; - break; - case "numeric": - case "smallmoney": - case "decimal": - case "money": - sysType= "decimal"; - break; - case "tinyint": - sysType = "byte"; - break; - case "bit": - sysType= "bool"; - break; - case "image": - case "binary": - case "varbinary": - case "timestamp": - sysType= "byte[]"; - break; - } - return sysType; - } - - - - const string TABLE_SQL=@"SELECT * - FROM INFORMATION_SCHEMA.TABLES - WHERE TABLE_TYPE='TABLE'"; - - const string COLUMN_SQL=@"SELECT - TABLE_CATALOG AS [Database], - TABLE_SCHEMA AS Owner, - TABLE_NAME AS TableName, - COLUMN_NAME AS ColumnName, - ORDINAL_POSITION AS OrdinalPosition, - COLUMN_DEFAULT AS DefaultSetting, - IS_NULLABLE AS IsNullable, DATA_TYPE AS DataType, - AUTOINC_INCREMENT, - CHARACTER_MAXIMUM_LENGTH AS MaxLength, - DATETIME_PRECISION AS DatePrecision - FROM INFORMATION_SCHEMA.COLUMNS - WHERE TABLE_NAME=@tableName - ORDER BY OrdinalPosition ASC"; - -} - - -class PostGreSqlSchemaReader : SchemaReader -{ - // SchemaReader.ReadSchema - public override Tables ReadSchema(DbConnection connection, DbProviderFactory factory) - { - var result=new Tables(); - - _connection=connection; - _factory=factory; - - var cmd=_factory.CreateCommand(); - cmd.Connection=connection; - cmd.CommandText=TABLE_SQL; - - //pull the tables in a reader - using(cmd) - { - using (var rdr=cmd.ExecuteReader()) - { - while(rdr.Read()) - { - Table tbl=new Table(); - tbl.Name=rdr["table_name"].ToString(); - tbl.Schema=rdr["table_schema"].ToString(); - tbl.IsView=string.Compare(rdr["TABLE_TYPE"].ToString(), "View", true)==0; - tbl.CleanName=CleanUp(tbl.Name); - tbl.ClassName=Inflector.MakeSingular(tbl.CleanName); - result.Add(tbl); - } - } - } - - foreach (var tbl in result) - { - tbl.Columns=LoadColumns(tbl); - - // Mark the primary key - string PrimaryKey=GetPK(tbl.Name); - var pkColumn=tbl.Columns.SingleOrDefault(x=>x.Name.ToLower().Trim()==PrimaryKey.ToLower().Trim()); - if(pkColumn!=null) - pkColumn.IsPK=true; - } - - - return result; - } - - DbConnection _connection; - DbProviderFactory _factory; - - - List LoadColumns(Table tbl) - { - - using (var cmd=_factory.CreateCommand()) - { - cmd.Connection=_connection; - cmd.CommandText=COLUMN_SQL; - - var p = cmd.CreateParameter(); - p.ParameterName = "@tableName"; - p.Value=tbl.Name; - cmd.Parameters.Add(p); - - var result=new List(); - using (IDataReader rdr=cmd.ExecuteReader()) - { - while(rdr.Read()) - { - Column col=new Column(); - col.Name=rdr["column_name"].ToString(); - col.PropertyName=CleanUp(col.Name); - col.PropertyType=GetPropertyType(rdr["udt_name"].ToString()); - col.IsNullable=rdr["is_nullable"].ToString()=="YES"; - col.IsAutoIncrement = rdr["column_default"].ToString().StartsWith("nextval("); - result.Add(col); - } - } - - return result; - } - } - - string GetPK(string table){ - - string sql=@"SELECT kcu.column_name - FROM information_schema.key_column_usage kcu - JOIN information_schema.table_constraints tc - ON kcu.constraint_name=tc.constraint_name - WHERE lower(tc.constraint_type)='primary key' - AND kcu.table_name=@tablename"; - - using (var cmd=_factory.CreateCommand()) - { - cmd.Connection=_connection; - cmd.CommandText=sql; - - var p = cmd.CreateParameter(); - p.ParameterName = "@tableName"; - p.Value=table; - cmd.Parameters.Add(p); - - var result=cmd.ExecuteScalar(); - - if(result!=null) - return result.ToString(); - } - - return ""; - } - - string GetPropertyType(string sqlType) - { - switch (sqlType) - { - case "int8": - case "serial8": - return "long"; - - case "bool": - return "bool"; - - case "bytea ": - return "byte[]"; - - case "float8": - return "double"; - - case "int4": - case "serial4": - return "int"; - - case "money ": - return "decimal"; - - case "numeric": - return "decimal"; - - case "float4": - return "float"; - - case "int2": - return "short"; - - case "time": - case "timetz": - case "timestamp": - case "timestamptz": - case "date": - return "DateTime"; - - default: - return "string"; - } - } - - - - const string TABLE_SQL=@" - SELECT table_name - FROM information_schema.tables - WHERE (table_type='BASE TABLE' OR table_type='VIEW') - AND table_schema NOT IN ('pg_catalog', 'information_schema'); - "; - - const string COLUMN_SQL=@" - SELECT column_name, is_nullable, udt_name, column_default - FROM information_schema.columns - WHERE table_name=@tableName; - "; - -} - -class MySqlSchemaReader : SchemaReader -{ - // SchemaReader.ReadSchema - public override Tables ReadSchema(DbConnection connection, DbProviderFactory factory) - { - var result=new Tables(); - - - var cmd=factory.CreateCommand(); - cmd.Connection=connection; - cmd.CommandText=TABLE_SQL; - - //pull the tables in a reader - using(cmd) - { - using (var rdr=cmd.ExecuteReader()) - { - while(rdr.Read()) - { - Table tbl=new Table(); - tbl.Name=rdr["TABLE_NAME"].ToString(); - tbl.Schema=rdr["TABLE_SCHEMA"].ToString(); - tbl.IsView=string.Compare(rdr["TABLE_TYPE"].ToString(), "View", true)==0; - tbl.CleanName=CleanUp(tbl.Name); - tbl.ClassName=Inflector.MakeSingular(tbl.CleanName); - result.Add(tbl); - } - } - } - - - //this will return everything for the DB - var schema = connection.GetSchema("COLUMNS"); - - //loop again - but this time pull by table name - foreach (var item in result) - { - item.Columns=new List(); - - //pull the columns from the schema - var columns = schema.Select("TABLE_NAME='" + item.Name + "'"); - foreach (var row in columns) - { - Column col=new Column(); - col.Name=row["COLUMN_NAME"].ToString(); - col.PropertyName=CleanUp(col.Name); - col.PropertyType=GetPropertyType(row); - col.IsNullable=row["IS_NULLABLE"].ToString()=="YES"; - col.IsPK=row["COLUMN_KEY"].ToString()=="PRI"; - col.IsAutoIncrement=row["extra"].ToString().ToLower().IndexOf("auto_increment")>=0; - - item.Columns.Add(col); - } - } - - return result; - - } - - static string GetPropertyType(DataRow row) - { - bool bUnsigned = row["COLUMN_TYPE"].ToString().IndexOf("unsigned")>=0; - string propType="string"; - switch (row["DATA_TYPE"].ToString()) - { - case "bigint": - propType= bUnsigned ? "ulong" : "long"; - break; - case "int": - propType= bUnsigned ? "uint" : "int"; - break; - case "smallint": - propType= bUnsigned ? "ushort" : "short"; - break; - case "guid": - propType= "Guid"; - break; - case "smalldatetime": - case "date": - case "datetime": - case "timestamp": - propType= "DateTime"; - break; - case "float": - propType="float"; - break; - case "double": - propType="double"; - break; - case "numeric": - case "smallmoney": - case "decimal": - case "money": - propType= "decimal"; - break; - case "bit": - case "bool": - case "boolean": - case "tinyint": - propType= "bool"; - break; - case "image": - case "binary": - case "blob": - case "mediumblob": - case "longblob": - case "varbinary": - propType= "byte[]"; - break; - - } - return propType; - } - - const string TABLE_SQL=@" - SELECT * - FROM information_schema.tables - WHERE (table_type='BASE TABLE' OR table_type='VIEW') - "; - -} - -class OracleSchemaReader : SchemaReader -{ - // SchemaReader.ReadSchema - public override Tables ReadSchema(DbConnection connection, DbProviderFactory factory) - { - var result=new Tables(); - - _connection=connection; - _factory=factory; - - var cmd=_factory.CreateCommand(); - cmd.Connection=connection; - cmd.CommandText=TABLE_SQL; - cmd.GetType().GetProperty("BindByName").SetValue(cmd, true, null); - - //pull the tables in a reader - using(cmd) - { - - using (var rdr=cmd.ExecuteReader()) - { - while(rdr.Read()) - { - Table tbl=new Table(); - tbl.Name=rdr["TABLE_NAME"].ToString(); - tbl.Schema = rdr["TABLE_SCHEMA"].ToString(); - tbl.IsView=string.Compare(rdr["TABLE_TYPE"].ToString(), "View", true)==0; - tbl.CleanName=CleanUp(tbl.Name); - tbl.ClassName=Inflector.MakeSingular(tbl.CleanName); - result.Add(tbl); - } - } - } - - foreach (var tbl in result) - { - tbl.Columns=LoadColumns(tbl); - - // Mark the primary key - string PrimaryKey=GetPK(tbl.Name); - var pkColumn=tbl.Columns.SingleOrDefault(x=>x.Name.ToLower().Trim()==PrimaryKey.ToLower().Trim()); - if(pkColumn!=null) - pkColumn.IsPK=true; - } - - - return result; - } - - DbConnection _connection; - DbProviderFactory _factory; - - - List LoadColumns(Table tbl) - { - - using (var cmd=_factory.CreateCommand()) - { - cmd.Connection=_connection; - cmd.CommandText=COLUMN_SQL; - cmd.GetType().GetProperty("BindByName").SetValue(cmd, true, null); - - var p = cmd.CreateParameter(); - p.ParameterName = ":tableName"; - p.Value=tbl.Name; - cmd.Parameters.Add(p); - - var result=new List(); - using (IDataReader rdr=cmd.ExecuteReader()) - { - while(rdr.Read()) - { - Column col=new Column(); - col.Name=rdr["ColumnName"].ToString(); - col.PropertyName=CleanUp(col.Name); - col.PropertyType=GetPropertyType(rdr["DataType"].ToString(), (rdr["DataType"] == DBNull.Value ? null : rdr["DataType"].ToString())); - col.IsNullable=rdr["IsNullable"].ToString()=="YES"; - col.IsAutoIncrement=true; - result.Add(col); - } - } - - return result; - } - } - - string GetPK(string table){ - - string sql=@"select column_name from USER_CONSTRAINTS uc - inner join USER_CONS_COLUMNS ucc on uc.constraint_name = ucc.constraint_name -where uc.constraint_type = 'P' -and uc.table_name = upper(:tableName) -and ucc.position = 1"; - - using (var cmd=_factory.CreateCommand()) - { - cmd.Connection=_connection; - cmd.CommandText=sql; - cmd.GetType().GetProperty("BindByName").SetValue(cmd, true, null); - - var p = cmd.CreateParameter(); - p.ParameterName = ":tableName"; - p.Value=table; - cmd.Parameters.Add(p); - - var result=cmd.ExecuteScalar(); - - if(result!=null) - return result.ToString(); - } - - return ""; - } - - string GetPropertyType(string sqlType, string dataScale) - { - string sysType="string"; - switch (sqlType.ToLower()) - { - case "bigint": - sysType = "long"; - break; - case "smallint": - sysType= "short"; - break; - case "int": - sysType= "int"; - break; - case "uniqueidentifier": - sysType= "Guid"; - break; - case "smalldatetime": - case "datetime": - case "date": - sysType= "DateTime"; - break; - case "float": - sysType="double"; - break; - case "real": - case "numeric": - case "smallmoney": - case "decimal": - case "money": - case "number": - sysType= "decimal"; - break; - case "tinyint": - sysType = "byte"; - break; - case "bit": - sysType= "bool"; - break; - case "image": - case "binary": - case "varbinary": - case "timestamp": - sysType= "byte[]"; - break; - } - - if (sqlType == "number" && dataScale == "0") - return "long"; - - return sysType; - } - - - - const string TABLE_SQL=@"select TABLE_NAME from USER_TABLES"; - - const string COLUMN_SQL=@"select table_name TableName, - column_name ColumnName, - data_type DataType, - data_scale DataScale, - nullable IsNullable - from USER_TAB_COLS utc - where table_name = upper(:tableName) - order by column_id"; - -} - - - - -/// -/// Summary for the Inflector class -/// -public static class Inflector { - private static readonly List _plurals = new List(); - private static readonly List _singulars = new List(); - private static readonly List _uncountables = new List(); - - /// - /// Initializes the class. - /// - static Inflector() { - AddPluralRule("$", "s"); - AddPluralRule("s$", "s"); - AddPluralRule("(ax|test)is$", "$1es"); - AddPluralRule("(octop|vir)us$", "$1i"); - AddPluralRule("(alias|status)$", "$1es"); - AddPluralRule("(bu)s$", "$1ses"); - AddPluralRule("(buffal|tomat)o$", "$1oes"); - AddPluralRule("([ti])um$", "$1a"); - AddPluralRule("sis$", "ses"); - AddPluralRule("(?:([^f])fe|([lr])f)$", "$1$2ves"); - AddPluralRule("(hive)$", "$1s"); - AddPluralRule("([^aeiouy]|qu)y$", "$1ies"); - AddPluralRule("(x|ch|ss|sh)$", "$1es"); - AddPluralRule("(matr|vert|ind)ix|ex$", "$1ices"); - AddPluralRule("([m|l])ouse$", "$1ice"); - AddPluralRule("^(ox)$", "$1en"); - AddPluralRule("(quiz)$", "$1zes"); - - AddSingularRule("s$", String.Empty); - AddSingularRule("ss$", "ss"); - AddSingularRule("(n)ews$", "$1ews"); - AddSingularRule("([ti])a$", "$1um"); - AddSingularRule("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$", "$1$2sis"); - AddSingularRule("(^analy)ses$", "$1sis"); - AddSingularRule("([^f])ves$", "$1fe"); - AddSingularRule("(hive)s$", "$1"); - AddSingularRule("(tive)s$", "$1"); - AddSingularRule("([lr])ves$", "$1f"); - AddSingularRule("([^aeiouy]|qu)ies$", "$1y"); - AddSingularRule("(s)eries$", "$1eries"); - AddSingularRule("(m)ovies$", "$1ovie"); - AddSingularRule("(x|ch|ss|sh)es$", "$1"); - AddSingularRule("([m|l])ice$", "$1ouse"); - AddSingularRule("(bus)es$", "$1"); - AddSingularRule("(o)es$", "$1"); - AddSingularRule("(shoe)s$", "$1"); - AddSingularRule("(cris|ax|test)es$", "$1is"); - AddSingularRule("(octop|vir)i$", "$1us"); - AddSingularRule("(alias|status)$", "$1"); - AddSingularRule("(alias|status)es$", "$1"); - AddSingularRule("^(ox)en", "$1"); - AddSingularRule("(vert|ind)ices$", "$1ex"); - AddSingularRule("(matr)ices$", "$1ix"); - AddSingularRule("(quiz)zes$", "$1"); - - AddIrregularRule("person", "people"); - AddIrregularRule("man", "men"); - AddIrregularRule("child", "children"); - AddIrregularRule("sex", "sexes"); - AddIrregularRule("tax", "taxes"); - AddIrregularRule("move", "moves"); - - AddUnknownCountRule("equipment"); - AddUnknownCountRule("information"); - AddUnknownCountRule("rice"); - AddUnknownCountRule("money"); - AddUnknownCountRule("species"); - AddUnknownCountRule("series"); - AddUnknownCountRule("fish"); - AddUnknownCountRule("sheep"); - } - - /// - /// Adds the irregular rule. - /// - /// The singular. - /// The plural. - private static void AddIrregularRule(string singular, string plural) { - AddPluralRule(String.Concat("(", singular[0], ")", singular.Substring(1), "$"), String.Concat("$1", plural.Substring(1))); - AddSingularRule(String.Concat("(", plural[0], ")", plural.Substring(1), "$"), String.Concat("$1", singular.Substring(1))); - } - - /// - /// Adds the unknown count rule. - /// - /// The word. - private static void AddUnknownCountRule(string word) { - _uncountables.Add(word.ToLower()); - } - - /// - /// Adds the plural rule. - /// - /// The rule. - /// The replacement. - private static void AddPluralRule(string rule, string replacement) { - _plurals.Add(new InflectorRule(rule, replacement)); - } - - /// - /// Adds the singular rule. - /// - /// The rule. - /// The replacement. - private static void AddSingularRule(string rule, string replacement) { - _singulars.Add(new InflectorRule(rule, replacement)); - } - - /// - /// Makes the plural. - /// - /// The word. - /// - public static string MakePlural(string word) { - return ApplyRules(_plurals, word); - } - - /// - /// Makes the singular. - /// - /// The word. - /// - public static string MakeSingular(string word) { - return ApplyRules(_singulars, word); - } - - /// - /// Applies the rules. - /// - /// The rules. - /// The word. - /// - private static string ApplyRules(IList rules, string word) { - string result = word; - if (!_uncountables.Contains(word.ToLower())) { - for (int i = rules.Count - 1; i >= 0; i--) { - string currentPass = rules[i].Apply(word); - if (currentPass != null) { - result = currentPass; - break; - } - } - } - return result; - } - - /// - /// Converts the string to title case. - /// - /// The word. - /// - public static string ToTitleCase(string word) { - return Regex.Replace(ToHumanCase(AddUnderscores(word)), @"\b([a-z])", - delegate(Match match) { return match.Captures[0].Value.ToUpper(); }); - } - - /// - /// Converts the string to human case. - /// - /// The lowercase and underscored word. - /// - public static string ToHumanCase(string lowercaseAndUnderscoredWord) { - return MakeInitialCaps(Regex.Replace(lowercaseAndUnderscoredWord, @"_", " ")); - } - - - /// - /// Adds the underscores. - /// - /// The pascal cased word. - /// - public static string AddUnderscores(string pascalCasedWord) { - return Regex.Replace(Regex.Replace(Regex.Replace(pascalCasedWord, @"([A-Z]+)([A-Z][a-z])", "$1_$2"), @"([a-z\d])([A-Z])", "$1_$2"), @"[-\s]", "_").ToLower(); - } - - /// - /// Makes the initial caps. - /// - /// The word. - /// - public static string MakeInitialCaps(string word) { - return String.Concat(word.Substring(0, 1).ToUpper(), word.Substring(1).ToLower()); - } - - /// - /// Makes the initial lower case. - /// - /// The word. - /// - public static string MakeInitialLowerCase(string word) { - return String.Concat(word.Substring(0, 1).ToLower(), word.Substring(1)); - } - - - /// - /// Determine whether the passed string is numeric, by attempting to parse it to a double - /// - /// The string to evaluated for numeric conversion - /// - /// true if the string can be converted to a number; otherwise, false. - /// - public static bool IsStringNumeric(string str) { - double result; - return (double.TryParse(str, NumberStyles.Float, NumberFormatInfo.CurrentInfo, out result)); - } - - /// - /// Adds the ordinal suffix. - /// - /// The number. - /// - public static string AddOrdinalSuffix(string number) { - if (IsStringNumeric(number)) { - int n = int.Parse(number); - int nMod100 = n % 100; - - if (nMod100 >= 11 && nMod100 <= 13) - return String.Concat(number, "th"); - - switch (n % 10) { - case 1: - return String.Concat(number, "st"); - case 2: - return String.Concat(number, "nd"); - case 3: - return String.Concat(number, "rd"); - default: - return String.Concat(number, "th"); - } - } - return number; - } - - /// - /// Converts the underscores to dashes. - /// - /// The underscored word. - /// - public static string ConvertUnderscoresToDashes(string underscoredWord) { - return underscoredWord.Replace('_', '-'); - } - - - #region Nested type: InflectorRule - - /// - /// Summary for the InflectorRule class - /// - private class InflectorRule { - /// - /// - /// - public readonly Regex regex; - - /// - /// - /// - public readonly string replacement; - - /// - /// Initializes a new instance of the class. - /// - /// The regex pattern. - /// The replacement text. - public InflectorRule(string regexPattern, string replacementText) { - regex = new Regex(regexPattern, RegexOptions.IgnoreCase); - replacement = replacementText; - } - - /// - /// Applies the specified word. - /// - /// The word. - /// - public string Apply(string word) { - if (!regex.IsMatch(word)) - return null; - - string replace = regex.Replace(word, replacement); - if (word == word.ToUpper()) - replace = replace.ToUpper(); - - return replace; - } - } - - #endregion -} - -#> \ No newline at end of file diff --git a/packages/PetaPoco.4.0.2/Content/Models/Generated/PetaPoco.Generator.ttinclude b/packages/PetaPoco.4.0.2/Content/Models/Generated/PetaPoco.Generator.ttinclude deleted file mode 100644 index 8bb6b8756..000000000 --- a/packages/PetaPoco.4.0.2/Content/Models/Generated/PetaPoco.Generator.ttinclude +++ /dev/null @@ -1,136 +0,0 @@ -<# -if (string.IsNullOrEmpty(Namespace)) Namespace=ConnectionStringName; -if (string.IsNullOrEmpty(RepoName) && !string.IsNullOrEmpty(ConnectionStringName)) RepoName=ConnectionStringName + "DB"; -if (string.IsNullOrEmpty(Namespace)) Namespace="PetaPoco"; -if (string.IsNullOrEmpty(RepoName)) RepoName="PetaPocoDB"; -#> -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using PetaPoco; - -namespace <#=Namespace #> -{ -<# if (GenerateCommon) { #> - public partial class <#=RepoName#> : Database - { - public <#=RepoName#>() - : base("<#=ConnectionStringName#>") - { - CommonConstruct(); - } - - public <#=RepoName#>(string connectionStringName) - : base(connectionStringName) - { - CommonConstruct(); - } - - partial void CommonConstruct(); - - public interface IFactory - { - <#=RepoName#> GetInstance(); - } - - public static IFactory Factory { get; set; } - public static <#=RepoName#> GetInstance() - { - if (_instance!=null) - return _instance; - - if (Factory!=null) - return Factory.GetInstance(); - else - return new <#=RepoName#>(); - } - - [ThreadStatic] static <#=RepoName#> _instance; - - public override void OnBeginTransaction() - { - if (_instance==null) - _instance=this; - } - - public override void OnEndTransaction() - { - if (_instance==this) - _instance=null; - } - -<# if (GenerateOperations) { #> - public class Record where T:new() - { - public static <#=RepoName#> repo { get { return <#=RepoName#>.GetInstance(); } } - public bool IsNew() { return repo.IsNew(this); } - public void Save() { repo.Save(this); } - public object Insert() { return repo.Insert(this); } - public int Update() { return repo.Update(this); } - public int Delete() { return repo.Delete(this); } - public static int Update(string sql, params object[] args) { return repo.Update(sql, args); } - public static int Update(Sql sql) { return repo.Update(sql); } - public static int Delete(string sql, params object[] args) { return repo.Delete(sql, args); } - public static int Delete(Sql sql) { return repo.Delete(sql); } - public static int Delete(object primaryKey) { return repo.Delete(primaryKey); } - public static bool Exists(object primaryKey) { return repo.Exists(primaryKey); } - public static T SingleOrDefault(object primaryKey) { return repo.SingleOrDefault(primaryKey); } - public static T SingleOrDefault(string sql, params object[] args) { return repo.SingleOrDefault(sql, args); } - public static T SingleOrDefault(Sql sql) { return repo.SingleOrDefault(sql); } - public static T FirstOrDefault(string sql, params object[] args) { return repo.FirstOrDefault(sql, args); } - public static T FirstOrDefault(Sql sql) { return repo.FirstOrDefault(sql); } - public static T Single(object primaryKey) { return repo.Single(primaryKey); } - public static T Single(string sql, params object[] args) { return repo.Single(sql, args); } - public static T Single(Sql sql) { return repo.Single(sql); } - public static T First(string sql, params object[] args) { return repo.First(sql, args); } - public static T First(Sql sql) { return repo.First(sql); } - public static List Fetch(string sql, params object[] args) { return repo.Fetch(sql, args); } - public static List Fetch(Sql sql) { return repo.Fetch(sql); } - public static List Fetch(long page, long itemsPerPage, string sql, params object[] args) { return repo.Fetch(page, itemsPerPage, sql, args); } - public static List Fetch(long page, long itemsPerPage, Sql sql) { return repo.Fetch(page, itemsPerPage, sql); } - public static Page Page(long page, long itemsPerPage, string sql, params object[] args) { return repo.Page(page, itemsPerPage, sql, args); } - public static Page Page(long page, long itemsPerPage, Sql sql) { return repo.Page(page, itemsPerPage, sql); } - public static IEnumerable Query(string sql, params object[] args) { return repo.Query(sql, args); } - public static IEnumerable Query(Sql sql) { return repo.Query(sql); } - } -<# } #> - } -<# } #> - -<# if (GeneratePocos) { #> -<# -foreach(Table tbl in from t in tables where !t.Ignore select t) -{ -#> - - [TableName("<#=tbl.Name#>")] -<# if (tbl.PK!=null && tbl.PK.IsAutoIncrement) { #> -<# if (tbl.SequenceName==null) { #> - [PrimaryKey("<#=tbl.PK.Name#>")] -<# } else { #> - [PrimaryKey("<#=tbl.PK.Name#>", sequenceName="<#=tbl.SequenceName#>")] -<# } #> -<# } #> -<# if (tbl.PK!=null && !tbl.PK.IsAutoIncrement) { #> - [PrimaryKey("<#=tbl.PK.Name#>", autoIncrement=false)] -<# } #> - [ExplicitColumns] - public partial class <#=tbl.ClassName#> <# if (GenerateOperations) { #>: <#=RepoName#>.Record<<#=tbl.ClassName#>> <# } #> - { -<# -foreach(Column col in from c in tbl.Columns where !c.Ignore select c) -{ - // Column bindings -#> -<# if (col.Name!=col.PropertyName) { #> - [Column("<#=col.Name#>")] public <#=col.PropertyType #><#=CheckNullable(col)#> <#=col.PropertyName #> { get; set; } -<# } else { #> - [Column] public <#=col.PropertyType #><#=CheckNullable(col)#> <#=col.PropertyName #> { get; set; } -<# } #> -<# } #> - } - -<# } #> -<# } #> -} diff --git a/packages/PetaPoco.4.0.2/Content/Models/PetaPoco.cs b/packages/PetaPoco.4.0.2/Content/Models/PetaPoco.cs deleted file mode 100644 index 751aef848..000000000 --- a/packages/PetaPoco.4.0.2/Content/Models/PetaPoco.cs +++ /dev/null @@ -1,2186 +0,0 @@ -/* PetaPoco v4.0.2 - A Tiny ORMish thing for your POCO's. - * Copyright © 2011 Topten Software. All Rights Reserved. - * - * Apache License 2.0 - http://www.toptensoftware.com/petapoco/license - * - * Special thanks to Rob Conery (@robconery) for original inspiration (ie:Massive) and for - * use of Subsonic's T4 templates, Rob Sullivan (@DataChomp) for hard core DBA advice - * and Adam Schroder (@schotime) for lots of suggestions, improvements and Oracle support - */ - -// Define PETAPOCO_NO_DYNAMIC in your project settings on .NET 3.5 - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Configuration; -using System.Data.Common; -using System.Data; -using System.Text.RegularExpressions; -using System.Reflection; -using System.Reflection.Emit; -using System.Linq.Expressions; - - -namespace PetaPoco -{ - // Poco's marked [Explicit] require all column properties to be marked - [AttributeUsage(AttributeTargets.Class)] - public class ExplicitColumnsAttribute : Attribute - { - } - // For non-explicit pocos, causes a property to be ignored - [AttributeUsage(AttributeTargets.Property)] - public class IgnoreAttribute : Attribute - { - } - - // For explicit pocos, marks property as a column and optionally supplies column name - [AttributeUsage(AttributeTargets.Property)] - public class ColumnAttribute : Attribute - { - public ColumnAttribute() { } - public ColumnAttribute(string name) { Name = name; } - public string Name { get; set; } - } - - // For explicit pocos, marks property as a result column and optionally supplies column name - [AttributeUsage(AttributeTargets.Property)] - public class ResultColumnAttribute : ColumnAttribute - { - public ResultColumnAttribute() { } - public ResultColumnAttribute(string name) : base(name) { } - } - - // Specify the table name of a poco - [AttributeUsage(AttributeTargets.Class)] - public class TableNameAttribute : Attribute - { - public TableNameAttribute(string tableName) - { - Value = tableName; - } - public string Value { get; private set; } - } - - // Specific the primary key of a poco class (and optional sequence name for Oracle) - [AttributeUsage(AttributeTargets.Class)] - public class PrimaryKeyAttribute : Attribute - { - public PrimaryKeyAttribute(string primaryKey) - { - Value = primaryKey; - autoIncrement = true; - } - - public string Value { get; private set; } - public string sequenceName { get; set; } - public bool autoIncrement { get; set; } - } - - [AttributeUsage(AttributeTargets.Property)] - public class AutoJoinAttribute : Attribute - { - public AutoJoinAttribute() { } - } - - // Results from paged request - public class Page - { - public long CurrentPage { get; set; } - public long TotalPages { get; set; } - public long TotalItems { get; set; } - public long ItemsPerPage { get; set; } - public List Items { get; set; } - public object Context { get; set; } - } - - // Pass as parameter value to force to DBType.AnsiString - public class AnsiString - { - public AnsiString(string str) - { - Value = str; - } - public string Value { get; private set; } - } - - // Used by IMapper to override table bindings for an object - public class TableInfo - { - public string TableName { get; set; } - public string PrimaryKey { get; set; } - public bool AutoIncrement { get; set; } - public string SequenceName { get; set; } - } - - // Optionally provide and implementation of this to Database.Mapper - public interface IMapper - { - void GetTableInfo(Type t, TableInfo ti); - bool MapPropertyToColumn(PropertyInfo pi, ref string columnName, ref bool resultColumn); - Func GetFromDbConverter(PropertyInfo pi, Type SourceType); - Func GetToDbConverter(Type SourceType); - } - - // Database class ... this is where most of the action happens - public class Database : IDisposable - { - public Database(IDbConnection connection) - { - _sharedConnection = connection; - _connectionString = connection.ConnectionString; - _sharedConnectionDepth = 2; // Prevent closing external connection - CommonConstruct(); - } - - public Database(string connectionString, string providerName) - { - _connectionString = connectionString; - _providerName = providerName; - CommonConstruct(); - } - - public Database(string connectionString, DbProviderFactory provider) - { - _connectionString = connectionString; - _factory = provider; - CommonConstruct(); - } - - public Database(string connectionStringName) - { - // Use first? - if (connectionStringName == "") - connectionStringName = ConfigurationManager.ConnectionStrings[0].Name; - - // Work out connection string and provider name - var providerName = "System.Data.SqlClient"; - if (ConfigurationManager.ConnectionStrings[connectionStringName] != null) - { - if (!string.IsNullOrEmpty(ConfigurationManager.ConnectionStrings[connectionStringName].ProviderName)) - providerName = ConfigurationManager.ConnectionStrings[connectionStringName].ProviderName; - } - else - { - throw new InvalidOperationException("Can't find a connection string with the name '" + connectionStringName + "'"); - } - - // Store factory and connection string - _connectionString = ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString; - _providerName = providerName; - CommonConstruct(); - } - - enum DBType - { - SqlServer, - SqlServerCE, - MySql, - PostgreSQL, - Oracle, - } - DBType _dbType = DBType.SqlServer; - - // Common initialization - private void CommonConstruct() - { - _transactionDepth = 0; - EnableAutoSelect = true; - EnableNamedParams = true; - ForceDateTimesToUtc = true; - - if (_providerName != null) - _factory = DbProviderFactories.GetFactory(_providerName); - - string dbtype = (_factory == null ? _sharedConnection.GetType() : _factory.GetType()).Name; - if (dbtype.StartsWith("MySql")) _dbType = DBType.MySql; - else if (dbtype.StartsWith("SqlCe")) _dbType = DBType.SqlServerCE; - else if (dbtype.StartsWith("Npgsql")) _dbType = DBType.PostgreSQL; - else if (dbtype.StartsWith("Oracle")) _dbType = DBType.Oracle; - - if (_dbType == DBType.MySql && _connectionString != null && _connectionString.IndexOf("Allow User Variables=true") >= 0) - _paramPrefix = "?"; - if (_dbType == DBType.Oracle) - _paramPrefix = ":"; - } - - // Automatically close one open shared connection - public void Dispose() - { - // Automatically close one open connection reference - // (Works with KeepConnectionAlive and manually opening a shared connection) - CloseSharedConnection(); - } - - // Set to true to keep the first opened connection alive until this object is disposed - public bool KeepConnectionAlive { get; set; } - - // Open a connection (can be nested) - public void OpenSharedConnection() - { - if (_sharedConnectionDepth == 0) - { - _sharedConnection = _factory.CreateConnection(); - _sharedConnection.ConnectionString = _connectionString; - _sharedConnection.Open(); - - if (KeepConnectionAlive) - _sharedConnectionDepth++; // Make sure you call Dispose - } - _sharedConnectionDepth++; - } - - // Close a previously opened connection - public void CloseSharedConnection() - { - if (_sharedConnectionDepth > 0) - { - _sharedConnectionDepth--; - if (_sharedConnectionDepth == 0) - { - _sharedConnection.Dispose(); - _sharedConnection = null; - } - } - } - - // Access to our shared connection - public IDbConnection Connection - { - get { return _sharedConnection; } - } - - // Helper to create a transaction scope - public Transaction GetTransaction() - { - return new Transaction(this); - } - - // Use by derived repo generated by T4 templates - public virtual void OnBeginTransaction() { } - public virtual void OnEndTransaction() { } - - // Start a new transaction, can be nested, every call must be - // matched by a call to AbortTransaction or CompleteTransaction - // Use `using (var scope=db.Transaction) { scope.Complete(); }` to ensure correct semantics - public void BeginTransaction() - { - _transactionDepth++; - - if (_transactionDepth == 1) - { - OpenSharedConnection(); - _transaction = _sharedConnection.BeginTransaction(); - _transactionCancelled = false; - OnBeginTransaction(); - } - - } - - // Internal helper to cleanup transaction stuff - void CleanupTransaction() - { - OnEndTransaction(); - - if (_transactionCancelled) - _transaction.Rollback(); - else - _transaction.Commit(); - - _transaction.Dispose(); - _transaction = null; - - CloseSharedConnection(); - } - - // Abort the entire outer most transaction scope - public void AbortTransaction() - { - _transactionCancelled = true; - if ((--_transactionDepth) == 0) - CleanupTransaction(); - } - - // Complete the transaction - public void CompleteTransaction() - { - if ((--_transactionDepth) == 0) - CleanupTransaction(); - } - - // Helper to handle named parameters from object properties - static Regex rxParams = new Regex(@"(? args_dest) - { - return rxParams.Replace(_sql, m => - { - string param = m.Value.Substring(1); - - object arg_val; - - int paramIndex; - if (int.TryParse(param, out paramIndex)) - { - // Numbered parameter - if (paramIndex < 0 || paramIndex >= args_src.Length) - throw new ArgumentOutOfRangeException(string.Format("Parameter '@{0}' specified but only {1} parameters supplied (in `{2}`)", paramIndex, args_src.Length, _sql)); - arg_val = args_src[paramIndex]; - } - else - { - // Look for a property on one of the arguments with this name - bool found = false; - arg_val = null; - foreach (var o in args_src) - { - var pi = o.GetType().GetProperty(param); - if (pi != null) - { - arg_val = pi.GetValue(o, null); - found = true; - break; - } - } - - if (!found) - throw new ArgumentException(string.Format("Parameter '@{0}' specified but none of the passed arguments have a property with this name (in '{1}')", param, _sql)); - } - - // Expand collections to parameter lists - if ((arg_val as System.Collections.IEnumerable) != null && - (arg_val as string) == null && - (arg_val as byte[]) == null) - { - var sb = new StringBuilder(); - foreach (var i in arg_val as System.Collections.IEnumerable) - { - sb.Append((sb.Length == 0 ? "@" : ",@") + args_dest.Count.ToString()); - args_dest.Add(i); - } - return sb.ToString(); - } - else - { - args_dest.Add(arg_val); - return "@" + (args_dest.Count - 1).ToString(); - } - } - ); - } - - // Add a parameter to a DB command - void AddParam(IDbCommand cmd, object item, string ParameterPrefix) - { - // Convert value to from poco type to db type - if (Database.Mapper != null && item!=null) - { - var fn = Database.Mapper.GetToDbConverter(item.GetType()); - if (fn!=null) - item = fn(item); - } - - // Support passed in parameters - var idbParam = item as IDbDataParameter; - if (idbParam != null) - { - idbParam.ParameterName = string.Format("{0}{1}", ParameterPrefix, cmd.Parameters.Count); - cmd.Parameters.Add(idbParam); - return; - } - - var p = cmd.CreateParameter(); - p.ParameterName = string.Format("{0}{1}", ParameterPrefix, cmd.Parameters.Count); - if (item == null) - { - p.Value = DBNull.Value; - } - else - { - var t = item.GetType(); - if (t.IsEnum) // PostgreSQL .NET driver wont cast enum to int - { - p.Value = (int)item; - } - else if (t == typeof(Guid)) - { - p.Value = item.ToString(); - p.DbType = DbType.String; - p.Size = 40; - } - else if (t == typeof(string)) - { - p.Size = Math.Max((item as string).Length + 1, 4000); // Help query plan caching by using common size - p.Value = item; - } - else if (t == typeof(AnsiString)) - { - // Thanks @DataChomp for pointing out the SQL Server indexing performance hit of using wrong string type on varchar - p.Size = Math.Max((item as AnsiString).Value.Length + 1, 4000); - p.Value = (item as AnsiString).Value; - p.DbType = DbType.AnsiString; - } - else if (t == typeof(bool) && _dbType != DBType.PostgreSQL) - { - p.Value = ((bool)item) ? 1 : 0; - } - else if (item.GetType().Name == "SqlGeography") //SqlGeography is a CLR Type - { - p.GetType().GetProperty("UdtTypeName").SetValue(p, "geography", null); //geography is the equivalent SQL Server Type - p.Value = item; - } - - else if (item.GetType().Name == "SqlGeometry") //SqlGeometry is a CLR Type - { - p.GetType().GetProperty("UdtTypeName").SetValue(p, "geometry", null); //geography is the equivalent SQL Server Type - p.Value = item; - } - else - { - p.Value = item; - } - } - - cmd.Parameters.Add(p); - } - - // Create a command - static Regex rxParamsPrefix = new Regex(@"(?(); - sql = ProcessParams(sql, args, new_args); - args = new_args.ToArray(); - } - - // Perform parameter prefix replacements - if (_paramPrefix != "@") - sql = rxParamsPrefix.Replace(sql, m => _paramPrefix + m.Value.Substring(1)); - sql = sql.Replace("@@", "@"); // <- double @@ escapes a single @ - - // Create the command and add parameters - IDbCommand cmd = _factory == null ? connection.CreateCommand() : _factory.CreateCommand(); - cmd.Connection = connection; - cmd.CommandText = sql; - cmd.Transaction = _transaction; - foreach (var item in args) - { - AddParam(cmd, item, _paramPrefix); - } - - if (_dbType == DBType.Oracle) - { - cmd.GetType().GetProperty("BindByName").SetValue(cmd, true, null); - } - - if (!String.IsNullOrEmpty(sql)) - DoPreExecute(cmd); - - return cmd; - } - - // Override this to log/capture exceptions - public virtual void OnException(Exception x) - { - System.Diagnostics.Debug.WriteLine(x.ToString()); - System.Diagnostics.Debug.WriteLine(LastCommand); - } - - // Override this to log commands, or modify command before execution - public virtual void OnExecutingCommand(IDbCommand cmd) { } - public virtual void OnExecutedCommand(IDbCommand cmd) { } - - // Execute a non-query command - public int Execute(string sql, params object[] args) - { - try - { - OpenSharedConnection(); - try - { - using (var cmd = CreateCommand(_sharedConnection, sql, args)) - { - var retv=cmd.ExecuteNonQuery(); - OnExecutedCommand(cmd); - return retv; - } - } - finally - { - CloseSharedConnection(); - } - } - catch (Exception x) - { - OnException(x); - throw; - } - } - - public int Execute(Sql sql) - { - return Execute(sql.SQL, sql.Arguments); - } - - // Execute and cast a scalar property - public T ExecuteScalar(string sql, params object[] args) - { - try - { - OpenSharedConnection(); - try - { - using (var cmd = CreateCommand(_sharedConnection, sql, args)) - { - object val = cmd.ExecuteScalar(); - OnExecutedCommand(cmd); - return (T)Convert.ChangeType(val, typeof(T)); - } - } - finally - { - CloseSharedConnection(); - } - } - catch (Exception x) - { - OnException(x); - throw; - } - } - - public T ExecuteScalar(Sql sql) - { - return ExecuteScalar(sql.SQL, sql.Arguments); - } - - Regex rxSelect = new Regex(@"\A\s*(SELECT|EXECUTE|CALL)\s", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Multiline); - Regex rxFrom = new Regex(@"\A\s*FROM\s", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Multiline); - string AddSelectClause(string sql) - { - if (sql.StartsWith(";")) - return sql.Substring(1); - - if (!rxSelect.IsMatch(sql)) - { - var pd = PocoData.ForType(typeof(T)); - var tableName = EscapeTableName(pd.TableInfo.TableName); - string cols = string.Join(", ", (from c in pd.QueryColumns select tableName + "." + EscapeSqlIdentifier(c)).ToArray()); - if (!rxFrom.IsMatch(sql)) - sql = string.Format("SELECT {0} FROM {1} {2}", cols, tableName, sql); - else - sql = string.Format("SELECT {0} {1}", cols, sql); - } - return sql; - } - - public bool EnableAutoSelect { get; set; } - public bool EnableNamedParams { get; set; } - public bool ForceDateTimesToUtc { get; set; } - - // Return a typed list of pocos - public List Fetch(string sql, params object[] args) - { - return Query(sql, args).ToList(); - } - - public List Fetch(Sql sql) - { - return Fetch(sql.SQL, sql.Arguments); - } - - static Regex rxColumns = new Regex(@"\A\s*SELECT\s+((?:\((?>\((?)|\)(?<-depth>)|.?)*(?(depth)(?!))\)|.)*?)(?\((?)|\)(?<-depth>)|.?)*(?(depth)(?!))\)|[\w\(\)\.])+(?:\s+(?:ASC|DESC))?(?:\s*,\s*(?:\((?>\((?)|\)(?<-depth>)|.?)*(?(depth)(?!))\)|[\w\(\)\.])+(?:\s+(?:ASC|DESC))?)*", RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.Compiled); - public static bool SplitSqlForPaging(string sql, out string sqlCount, out string sqlSelectRemoved, out string sqlOrderBy) - { - sqlSelectRemoved = null; - sqlCount = null; - sqlOrderBy = null; - - // Extract the columns from "SELECT FROM" - var m = rxColumns.Match(sql); - if (!m.Success) - return false; - - // Save column list and replace with COUNT(*) - Group g = m.Groups[1]; - sqlCount = sql.Substring(0, g.Index) + "COUNT(*) " + sql.Substring(g.Index + g.Length); - sqlSelectRemoved = sql.Substring(g.Index); - - // Look for an "ORDER BY " clause - m = rxOrderBy.Match(sqlCount); - if (!m.Success) - return false; - - g = m.Groups[0]; - sqlOrderBy = g.ToString(); - sqlCount = sqlCount.Substring(0, g.Index) + sqlCount.Substring(g.Index + g.Length); - - return true; - } - - public void BuildPageQueries(long page, long itemsPerPage, string sql, ref object[] args, out string sqlCount, out string sqlPage) - { - // Add auto select clause - if (EnableAutoSelect) - sql = AddSelectClause(sql); - - // Split the SQL into the bits we need - string sqlSelectRemoved, sqlOrderBy; - if (!SplitSqlForPaging(sql, out sqlCount, out sqlSelectRemoved, out sqlOrderBy)) - throw new Exception("Unable to parse SQL statement for paged query"); - if (_dbType == DBType.Oracle && sqlSelectRemoved.StartsWith("*")) - throw new Exception("Query must alias '*' when performing a paged query.\neg. select t.* from table t order by t.id"); - - // Build the SQL for the actual final result - if (_dbType == DBType.SqlServer || _dbType == DBType.Oracle) - { - sqlSelectRemoved = rxOrderBy.Replace(sqlSelectRemoved, ""); - sqlPage = string.Format("SELECT * FROM (SELECT ROW_NUMBER() OVER ({0}) peta_rn, {1}) peta_paged WHERE peta_rn>@{2} AND peta_rn<=@{3}", - sqlOrderBy, sqlSelectRemoved, args.Length, args.Length + 1); - args = args.Concat(new object[] { (page - 1) * itemsPerPage, page * itemsPerPage }).ToArray(); - } - else if (_dbType == DBType.SqlServerCE) - { - sqlPage = string.Format("{0}\nOFFSET @{1} ROWS FETCH NEXT @{2} ROWS ONLY", sql, args.Length, args.Length + 1); - args = args.Concat(new object[] { (page - 1) * itemsPerPage, itemsPerPage }).ToArray(); - } - else - { - sqlPage = string.Format("{0}\nLIMIT @{1} OFFSET @{2}", sql, args.Length, args.Length + 1); - args = args.Concat(new object[] { itemsPerPage, (page - 1) * itemsPerPage }).ToArray(); - } - - } - - // Fetch a page - public Page Page(long page, long itemsPerPage, string sql, params object[] args) - { - string sqlCount, sqlPage; - BuildPageQueries(page, itemsPerPage, sql, ref args, out sqlCount, out sqlPage); - - // Save the one-time command time out and use it for both queries - int saveTimeout = OneTimeCommandTimeout; - - // Setup the paged result - var result = new Page(); - result.CurrentPage = page; - result.ItemsPerPage = itemsPerPage; - result.TotalItems = ExecuteScalar(sqlCount, args); - result.TotalPages = result.TotalItems / itemsPerPage; - if ((result.TotalItems % itemsPerPage) != 0) - result.TotalPages++; - - OneTimeCommandTimeout = saveTimeout; - - // Get the records - result.Items = Fetch(sqlPage, args); - - // Done - return result; - } - - public Page Page(long page, long itemsPerPage, Sql sql) - { - return Page(page, itemsPerPage, sql.SQL, sql.Arguments); - } - - - public List Fetch(long page, long itemsPerPage, string sql, params object[] args) - { - string sqlCount, sqlPage; - BuildPageQueries(page, itemsPerPage, sql, ref args, out sqlCount, out sqlPage); - return Fetch(sqlPage, args); - } - - public List Fetch(long page, long itemsPerPage, Sql sql) - { - return Fetch(page, itemsPerPage, sql.SQL, sql.Arguments); - } - - // Return an enumerable collection of pocos - public IEnumerable Query(string sql, params object[] args) - { - if (EnableAutoSelect) - sql = AddSelectClause(sql); - - OpenSharedConnection(); - try - { - using (var cmd = CreateCommand(_sharedConnection, sql, args)) - { - IDataReader r; - var pd = PocoData.ForType(typeof(T)); - try - { - r = cmd.ExecuteReader(); - OnExecutedCommand(cmd); - } - catch (Exception x) - { - OnException(x); - throw; - } - var factory = pd.GetFactory(cmd.CommandText, _sharedConnection.ConnectionString, ForceDateTimesToUtc, 0, r.FieldCount, r) as Func; - using (r) - { - while (true) - { - T poco; - try - { - if (!r.Read()) - yield break; - poco = factory(r); - } - catch (Exception x) - { - OnException(x); - throw; - } - - yield return poco; - } - } - } - } - finally - { - CloseSharedConnection(); - } - } - - // Multi Fetch - public List Fetch(Func cb, string sql, params object[] args) { return Query(cb, sql, args).ToList(); } - public List Fetch(Func cb, string sql, params object[] args) { return Query(cb, sql, args).ToList(); } - public List Fetch(Func cb, string sql, params object[] args) { return Query(cb, sql, args).ToList(); } - - // Multi Query - public IEnumerable Query(Func cb, string sql, params object[] args) { return Query(new Type[] { typeof(T1), typeof(T2) }, cb, sql, args); } - public IEnumerable Query(Func cb, string sql, params object[] args) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3)}, cb, sql, args); } - public IEnumerable Query(Func cb, string sql, params object[] args) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4)}, cb, sql, args); } - - // Multi Fetch (SQL builder) - public List Fetch(Func cb, Sql sql) { return Query(cb, sql.SQL, sql.Arguments).ToList(); } - public List Fetch(Func cb, Sql sql) { return Query(cb, sql.SQL, sql.Arguments).ToList(); } - public List Fetch(Func cb, Sql sql) { return Query(cb, sql.SQL, sql.Arguments).ToList(); } - - // Multi Query (SQL builder) - public IEnumerable Query(Func cb, Sql sql) { return Query(new Type[] { typeof(T1), typeof(T2) }, cb, sql.SQL, sql.Arguments); } - public IEnumerable Query(Func cb, Sql sql) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3) }, cb, sql.SQL, sql.Arguments); } - public IEnumerable Query(Func cb, Sql sql) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4) }, cb, sql.SQL, sql.Arguments); } - - // Multi Fetch (Simple) - public List Fetch(string sql, params object[] args) { return Query(sql, args).ToList(); } - public List Fetch(string sql, params object[] args) { return Query(sql, args).ToList(); } - public List Fetch(string sql, params object[] args) { return Query(sql, args).ToList(); } - - // Multi Query (Simple) - public IEnumerable Query(string sql, params object[] args) { return Query(new Type[] { typeof(T1), typeof(T2) }, null, sql, args); } - public IEnumerable Query(string sql, params object[] args) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3) }, null, sql, args); } - public IEnumerable Query(string sql, params object[] args) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4) }, null, sql, args); } - - // Multi Fetch (Simple) (SQL builder) - public List Fetch(Sql sql) { return Query(sql.SQL, sql.Arguments).ToList(); } - public List Fetch(Sql sql) { return Query(sql.SQL, sql.Arguments).ToList(); } - public List Fetch(Sql sql) { return Query(sql.SQL, sql.Arguments).ToList(); } - - // Multi Query (Simple) (SQL builder) - public IEnumerable Query(Sql sql) { return Query(new Type[] { typeof(T1), typeof(T2) }, null, sql.SQL, sql.Arguments); } - public IEnumerable Query(Sql sql) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3) }, null, sql.SQL, sql.Arguments); } - public IEnumerable Query(Sql sql) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4) }, null, sql.SQL, sql.Arguments); } - - // Automagically guess the property relationships between various POCOs and create a delegate that will set them up - object GetAutoMapper(Type[] types) - { - // Build a key - var kb = new StringBuilder(); - foreach (var t in types) - { - kb.Append(t.ToString()); - kb.Append(":"); - } - var key = kb.ToString(); - - // Check cache - RWLock.EnterReadLock(); - try - { - object mapper; - if (AutoMappers.TryGetValue(key, out mapper)) - return mapper; - } - finally - { - RWLock.ExitReadLock(); - } - - // Create it - RWLock.EnterWriteLock(); - try - { - // Try again - object mapper; - if (AutoMappers.TryGetValue(key, out mapper)) - return mapper; - - // Create a method - var m = new DynamicMethod("petapoco_automapper", types[0], types, true); - var il = m.GetILGenerator(); - - for (int i = 1; i < types.Length; i++) - { - bool handled = false; - for (int j = i - 1; j >= 0; j--) - { - // Find the property - var candidates = from p in types[j].GetProperties() where p.PropertyType == types[i] select p; - if (candidates.Count() == 0) - continue; - if (candidates.Count() > 1) - throw new InvalidOperationException(string.Format("Can't auto join {0} as {1} has more than one property of type {0}", types[i], types[j])); - - // Generate code - il.Emit(OpCodes.Ldarg_S, j); - il.Emit(OpCodes.Ldarg_S, i); - il.Emit(OpCodes.Callvirt, candidates.First().GetSetMethod(true)); - handled = true; - } - - if (!handled) - throw new InvalidOperationException(string.Format("Can't auto join {0}", types[i])); - } - - il.Emit(OpCodes.Ldarg_0); - il.Emit(OpCodes.Ret); - - // Cache it - var del = m.CreateDelegate(Expression.GetFuncType(types.Concat(types.Take(1)).ToArray())); - AutoMappers.Add(key, del); - return del; - } - finally - { - RWLock.ExitWriteLock(); - } - } - - // Find the split point in a result set for two different pocos and return the poco factory for the first - Delegate FindSplitPoint(Type typeThis, Type typeNext, string sql, IDataReader r, ref int pos) - { - // Last? - if (typeNext == null) - return PocoData.ForType(typeThis).GetFactory(sql, _sharedConnection.ConnectionString, ForceDateTimesToUtc, pos, r.FieldCount - pos, r); - - // Get PocoData for the two types - PocoData pdThis = PocoData.ForType(typeThis); - PocoData pdNext = PocoData.ForType(typeNext); - - // Find split point - int firstColumn = pos; - var usedColumns = new Dictionary(); - for (; pos < r.FieldCount; pos++) - { - // Split if field name has already been used, or if the field doesn't exist in current poco but does in the next - string fieldName = r.GetName(pos); - if (usedColumns.ContainsKey(fieldName) || (!pdThis.Columns.ContainsKey(fieldName) && pdNext.Columns.ContainsKey(fieldName))) - { - return pdThis.GetFactory(sql, _sharedConnection.ConnectionString, ForceDateTimesToUtc, firstColumn, pos - firstColumn, r); - } - usedColumns.Add(fieldName, true); - } - - throw new InvalidOperationException(string.Format("Couldn't find split point between {0} and {1}", typeThis, typeNext)); - } - - // Instance data used by the Multipoco factory delegate - essentially a list of the nested poco factories to call - class MultiPocoFactory - { - public List m_Delegates; - public Delegate GetItem(int index) { return m_Delegates[index]; } - } - - // Create a multi-poco factory - Func CreateMultiPocoFactory(Type[] types, string sql, IDataReader r) - { - var m = new DynamicMethod("petapoco_multipoco_factory", typeof(TRet), new Type[] { typeof(MultiPocoFactory), typeof(IDataReader), typeof(object) }, typeof(MultiPocoFactory)); - var il = m.GetILGenerator(); - - // Load the callback - il.Emit(OpCodes.Ldarg_2); - - // Call each delegate - var dels = new List(); - int pos = 0; - for (int i=0; i)m.CreateDelegate(typeof(Func), new MultiPocoFactory() { m_Delegates = dels }); - } - - // Various cached stuff - static Dictionary MultiPocoFactories = new Dictionary(); - static Dictionary AutoMappers = new Dictionary(); - static System.Threading.ReaderWriterLockSlim RWLock = new System.Threading.ReaderWriterLockSlim(); - - // Get (or create) the multi-poco factory for a query - Func GetMultiPocoFactory(Type[] types, string sql, IDataReader r) - { - // Build a key string (this is crap, should address this at some point) - var kb = new StringBuilder(); - kb.Append(typeof(TRet).ToString()); - kb.Append(":"); - foreach (var t in types) - { - kb.Append(":"); - kb.Append(t.ToString()); - } - kb.Append(":"); kb.Append(_sharedConnection.ConnectionString); - kb.Append(":"); kb.Append(ForceDateTimesToUtc); - kb.Append(":"); kb.Append(sql); - string key = kb.ToString(); - - // Check cache - RWLock.EnterReadLock(); - try - { - object oFactory; - if (MultiPocoFactories.TryGetValue(key, out oFactory)) - return (Func)oFactory; - } - finally - { - RWLock.ExitReadLock(); - } - - // Cache it - RWLock.EnterWriteLock(); - try - { - // Check again - object oFactory; - if (MultiPocoFactories.TryGetValue(key, out oFactory)) - return (Func)oFactory; - - // Create the factory - var Factory = CreateMultiPocoFactory(types, sql, r); - - MultiPocoFactories.Add(key, Factory); - return Factory; - } - finally - { - RWLock.ExitWriteLock(); - } - - } - - // Actual implementation of the multi-poco query - public IEnumerable Query(Type[] types, object cb, string sql, params object[] args) - { - OpenSharedConnection(); - try - { - using (var cmd = CreateCommand(_sharedConnection, sql, args)) - { - IDataReader r; - try - { - r = cmd.ExecuteReader(); - OnExecutedCommand(cmd); - } - catch (Exception x) - { - OnException(x); - throw; - } - var factory = GetMultiPocoFactory(types, sql, r); - if (cb == null) - cb = GetAutoMapper(types.ToArray()); - bool bNeedTerminator=false; - using (r) - { - while (true) - { - TRet poco; - try - { - if (!r.Read()) - break; - poco = factory(r, cb); - } - catch (Exception x) - { - OnException(x); - throw; - } - - if (poco != null) - yield return poco; - else - bNeedTerminator = true; - } - if (bNeedTerminator) - { - var poco = (TRet)(cb as Delegate).DynamicInvoke(new object[types.Length]); - if (poco != null) - yield return poco; - else - yield break; - } - } - } - } - finally - { - CloseSharedConnection(); - } - } - - - public IEnumerable Query(Sql sql) - { - return Query(sql.SQL, sql.Arguments); - } - - public bool Exists(object primaryKey) - { - return FirstOrDefault(string.Format("WHERE {0}=@0", EscapeSqlIdentifier(PocoData.ForType(typeof(T)).TableInfo.PrimaryKey)), primaryKey) != null; - } - public T Single(object primaryKey) - { - return Single(string.Format("WHERE {0}=@0", EscapeSqlIdentifier(PocoData.ForType(typeof(T)).TableInfo.PrimaryKey)), primaryKey); - } - public T SingleOrDefault(object primaryKey) - { - return SingleOrDefault(string.Format("WHERE {0}=@0", EscapeSqlIdentifier(PocoData.ForType(typeof(T)).TableInfo.PrimaryKey)), primaryKey); - } - public T Single(string sql, params object[] args) - { - return Query(sql, args).Single(); - } - public T SingleOrDefault(string sql, params object[] args) - { - return Query(sql, args).SingleOrDefault(); - } - public T First(string sql, params object[] args) - { - return Query(sql, args).First(); - } - public T FirstOrDefault(string sql, params object[] args) - { - return Query(sql, args).FirstOrDefault(); - } - - public T Single(Sql sql) - { - return Query(sql).Single(); - } - public T SingleOrDefault(Sql sql) - { - return Query(sql).SingleOrDefault(); - } - public T First(Sql sql) - { - return Query(sql).First(); - } - public T FirstOrDefault(Sql sql) - { - return Query(sql).FirstOrDefault(); - } - - public string EscapeTableName(string str) - { - // Assume table names with "dot", or opening sq is already escaped - return str.IndexOf('.') >= 0 ? str : EscapeSqlIdentifier(str); - } - public string EscapeSqlIdentifier(string str) - { - switch (_dbType) - { - case DBType.MySql: - return string.Format("`{0}`", str); - - case DBType.PostgreSQL: - case DBType.Oracle: - return string.Format("\"{0}\"", str); - - default: - return string.Format("[{0}]", str); - } - } - - public object Insert(string tableName, string primaryKeyName, object poco) - { - return Insert(tableName, primaryKeyName, true, poco); - } - - // Insert a poco into a table. If the poco has a property with the same name - // as the primary key the id of the new record is assigned to it. Either way, - // the new id is returned. - public object Insert(string tableName, string primaryKeyName, bool autoIncrement, object poco) - { - try - { - OpenSharedConnection(); - try - { - using (var cmd = CreateCommand(_sharedConnection, "")) - { - var pd = PocoData.ForObject(poco, primaryKeyName); - var names = new List(); - var values = new List(); - var index = 0; - foreach (var i in pd.Columns) - { - // Don't insert result columns - if (i.Value.ResultColumn) - continue; - - // Don't insert the primary key (except under oracle where we need bring in the next sequence value) - if (autoIncrement && primaryKeyName != null && string.Compare(i.Key, primaryKeyName, true)==0) - { - if (_dbType == DBType.Oracle && !string.IsNullOrEmpty(pd.TableInfo.SequenceName)) - { - names.Add(i.Key); - values.Add(string.Format("{0}.nextval", pd.TableInfo.SequenceName)); - } - continue; - } - - names.Add(EscapeSqlIdentifier(i.Key)); - values.Add(string.Format("{0}{1}", _paramPrefix, index++)); - AddParam(cmd, i.Value.GetValue(poco), _paramPrefix); - } - - cmd.CommandText = string.Format("INSERT INTO {0} ({1}) VALUES ({2})", - EscapeTableName(tableName), - string.Join(",", names.ToArray()), - string.Join(",", values.ToArray()) - ); - - if (!autoIncrement) - { - DoPreExecute(cmd); - cmd.ExecuteNonQuery(); - OnExecutedCommand(cmd); - return true; - } - - - object id; - switch (_dbType) - { - case DBType.SqlServerCE: - DoPreExecute(cmd); - cmd.ExecuteNonQuery(); - OnExecutedCommand(cmd); - id = ExecuteScalar("SELECT @@@IDENTITY AS NewID;"); - break; - case DBType.SqlServer: - cmd.CommandText += ";\nSELECT SCOPE_IDENTITY() AS NewID;"; - DoPreExecute(cmd); - id = cmd.ExecuteScalar(); - OnExecutedCommand(cmd); - break; - case DBType.PostgreSQL: - if (primaryKeyName != null) - { - cmd.CommandText += string.Format("returning {0} as NewID", EscapeSqlIdentifier(primaryKeyName)); - DoPreExecute(cmd); - id = cmd.ExecuteScalar(); - } - else - { - id = -1; - DoPreExecute(cmd); - cmd.ExecuteNonQuery(); - } - OnExecutedCommand(cmd); - break; - case DBType.Oracle: - if (primaryKeyName != null) - { - cmd.CommandText += string.Format(" returning {0} into :newid", EscapeSqlIdentifier(primaryKeyName)); - var param = cmd.CreateParameter(); - param.ParameterName = ":newid"; - param.Value = DBNull.Value; - param.Direction = ParameterDirection.ReturnValue; - param.DbType = DbType.Int64; - cmd.Parameters.Add(param); - DoPreExecute(cmd); - cmd.ExecuteNonQuery(); - id = param.Value; - } - else - { - id = -1; - DoPreExecute(cmd); - cmd.ExecuteNonQuery(); - } - OnExecutedCommand(cmd); - break; - default: - cmd.CommandText += ";\nSELECT @@IDENTITY AS NewID;"; - DoPreExecute(cmd); - id = cmd.ExecuteScalar(); - OnExecutedCommand(cmd); - break; - } - - - // Assign the ID back to the primary key property - if (primaryKeyName != null) - { - PocoColumn pc; - if (pd.Columns.TryGetValue(primaryKeyName, out pc)) - { - pc.SetValue(poco, pc.ChangeType(id)); - } - } - - return id; - } - } - finally - { - CloseSharedConnection(); - } - } - catch (Exception x) - { - OnException(x); - throw; - } - } - - // Insert an annotated poco object - public object Insert(object poco) - { - var pd = PocoData.ForType(poco.GetType()); - return Insert(pd.TableInfo.TableName, pd.TableInfo.PrimaryKey, pd.TableInfo.AutoIncrement, poco); - } - - // Update a record with values from a poco. primary key value can be either supplied or read from the poco - public int Update(string tableName, string primaryKeyName, object poco, object primaryKeyValue) - { - try - { - OpenSharedConnection(); - try - { - using (var cmd = CreateCommand(_sharedConnection, "")) - { - var sb = new StringBuilder(); - var index = 0; - var pd = PocoData.ForObject(poco,primaryKeyName); - foreach (var i in pd.Columns) - { - // Don't update the primary key, but grab the value if we don't have it - if (string.Compare(i.Key, primaryKeyName, true)==0) - { - if (primaryKeyValue == null) - primaryKeyValue = i.Value.GetValue(poco); - continue; - } - - // Dont update result only columns - if (i.Value.ResultColumn) - continue; - - // Build the sql - if (index > 0) - sb.Append(", "); - sb.AppendFormat("{0} = {1}{2}", EscapeSqlIdentifier(i.Key), _paramPrefix, index++); - - // Store the parameter in the command - AddParam(cmd, i.Value.GetValue(poco), _paramPrefix); - } - - cmd.CommandText = string.Format("UPDATE {0} SET {1} WHERE {2} = {3}{4}", - EscapeTableName(tableName), sb.ToString(), EscapeSqlIdentifier(primaryKeyName), _paramPrefix, index++); - AddParam(cmd, primaryKeyValue, _paramPrefix); - - DoPreExecute(cmd); - - // Do it - var retv=cmd.ExecuteNonQuery(); - OnExecutedCommand(cmd); - return retv; - } - } - finally - { - CloseSharedConnection(); - } - } - catch (Exception x) - { - OnException(x); - throw; - } - } - - public int Update(string tableName, string primaryKeyName, object poco) - { - return Update(tableName, primaryKeyName, poco, null); - } - - public int Update(object poco) - { - return Update(poco, null); - } - - public int Update(object poco, object primaryKeyValue) - { - var pd = PocoData.ForType(poco.GetType()); - return Update(pd.TableInfo.TableName, pd.TableInfo.PrimaryKey, poco, primaryKeyValue); - } - - public int Update(string sql, params object[] args) - { - var pd = PocoData.ForType(typeof(T)); - return Execute(string.Format("UPDATE {0} {1}", EscapeTableName(pd.TableInfo.TableName), sql), args); - } - - public int Update(Sql sql) - { - var pd = PocoData.ForType(typeof(T)); - return Execute(new Sql(string.Format("UPDATE {0}", EscapeTableName(pd.TableInfo.TableName))).Append(sql)); - } - - public int Delete(string tableName, string primaryKeyName, object poco) - { - return Delete(tableName, primaryKeyName, poco, null); - } - - public int Delete(string tableName, string primaryKeyName, object poco, object primaryKeyValue) - { - // If primary key value not specified, pick it up from the object - if (primaryKeyValue == null) - { - var pd = PocoData.ForObject(poco,primaryKeyName); - PocoColumn pc; - if (pd.Columns.TryGetValue(primaryKeyName, out pc)) - { - primaryKeyValue = pc.GetValue(poco); - } - } - - // Do it - var sql = string.Format("DELETE FROM {0} WHERE {1}=@0", EscapeTableName(tableName), EscapeSqlIdentifier(primaryKeyName)); - return Execute(sql, primaryKeyValue); - } - - public int Delete(object poco) - { - var pd = PocoData.ForType(poco.GetType()); - return Delete(pd.TableInfo.TableName, pd.TableInfo.PrimaryKey, poco); - } - - public int Delete(object pocoOrPrimaryKey) - { - if (pocoOrPrimaryKey.GetType() == typeof(T)) - return Delete(pocoOrPrimaryKey); - var pd = PocoData.ForType(typeof(T)); - return Delete(pd.TableInfo.TableName, pd.TableInfo.PrimaryKey, null, pocoOrPrimaryKey); - } - - public int Delete(string sql, params object[] args) - { - var pd = PocoData.ForType(typeof(T)); - return Execute(string.Format("DELETE FROM {0} {1}", EscapeTableName(pd.TableInfo.TableName), sql), args); - } - - public int Delete(Sql sql) - { - var pd = PocoData.ForType(typeof(T)); - return Execute(new Sql(string.Format("DELETE FROM {0}", EscapeTableName(pd.TableInfo.TableName))).Append(sql)); - } - - // Check if a poco represents a new record - public bool IsNew(string primaryKeyName, object poco) - { - var pd = PocoData.ForObject(poco, primaryKeyName); - object pk; - PocoColumn pc; - if (pd.Columns.TryGetValue(primaryKeyName, out pc)) - { - pk = pc.GetValue(poco); - } -#if !PETAPOCO_NO_DYNAMIC - else if (poco.GetType() == typeof(System.Dynamic.ExpandoObject)) - { - return true; - } -#endif - else - { - var pi = poco.GetType().GetProperty(primaryKeyName); - if (pi == null) - throw new ArgumentException(string.Format("The object doesn't have a property matching the primary key column name '{0}'", primaryKeyName)); - pk = pi.GetValue(poco, null); - } - - if (pk == null) - return true; - - var type = pk.GetType(); - - if (type.IsValueType) - { - // Common primary key types - if (type == typeof(long)) - return (long)pk == 0; - else if (type == typeof(ulong)) - return (ulong)pk == 0; - else if (type == typeof(int)) - return (int)pk == 0; - else if (type == typeof(uint)) - return (uint)pk == 0; - - // Create a default instance and compare - return pk == Activator.CreateInstance(pk.GetType()); - } - else - { - return pk == null; - } - } - - public bool IsNew(object poco) - { - var pd = PocoData.ForType(poco.GetType()); - if (!pd.TableInfo.AutoIncrement) - throw new InvalidOperationException("IsNew() and Save() are only supported on tables with auto-increment/identity primary key columns"); - return IsNew(pd.TableInfo.PrimaryKey, poco); - } - - // Insert new record or Update existing record - public void Save(string tableName, string primaryKeyName, object poco) - { - if (IsNew(primaryKeyName, poco)) - { - Insert(tableName, primaryKeyName, true, poco); - } - else - { - Update(tableName, primaryKeyName, poco); - } - } - - public void Save(object poco) - { - var pd = PocoData.ForType(poco.GetType()); - Save(pd.TableInfo.TableName, pd.TableInfo.PrimaryKey, poco); - } - - public int CommandTimeout { get; set; } - public int OneTimeCommandTimeout { get; set; } - - void DoPreExecute(IDbCommand cmd) - { - // Setup command timeout - if (OneTimeCommandTimeout != 0) - { - cmd.CommandTimeout = OneTimeCommandTimeout; - OneTimeCommandTimeout = 0; - } - else if (CommandTimeout!=0) - { - cmd.CommandTimeout = CommandTimeout; - } - - // Call hook - OnExecutingCommand(cmd); - - // Save it - _lastSql = cmd.CommandText; - _lastArgs = (from IDataParameter parameter in cmd.Parameters select parameter.Value).ToArray(); - } - - public string LastSQL { get { return _lastSql; } } - public object[] LastArgs { get { return _lastArgs; } } - public string LastCommand - { - get { return FormatCommand(_lastSql, _lastArgs); } - } - - public string FormatCommand(IDbCommand cmd) - { - return FormatCommand(cmd.CommandText, (from IDataParameter parameter in cmd.Parameters select parameter.Value).ToArray()); - } - - public string FormatCommand(string sql, object[] args) - { - var sb = new StringBuilder(); - if (sql == null) - return ""; - sb.Append(sql); - if (args != null && args.Length > 0) - { - sb.Append("\n"); - for (int i = 0; i < args.Length; i++) - { - sb.AppendFormat("\t -> {0}{1} [{2}] = \"{3}\"\n", _paramPrefix, i, args[i].GetType().Name, args[i]); - } - sb.Remove(sb.Length - 1, 1); - } - return sb.ToString(); - } - - - public static IMapper Mapper - { - get; - set; - } - - internal class PocoColumn - { - public string ColumnName; - public PropertyInfo PropertyInfo; - public bool ResultColumn; - public virtual void SetValue(object target, object val) { PropertyInfo.SetValue(target, val, null); } - public virtual object GetValue(object target) { return PropertyInfo.GetValue(target, null); } - public virtual object ChangeType(object val) { return Convert.ChangeType(val, PropertyInfo.PropertyType); } - } - internal class ExpandoColumn : PocoColumn - { - public override void SetValue(object target, object val) { (target as IDictionary)[ColumnName]=val; } - public override object GetValue(object target) - { - object val=null; - (target as IDictionary).TryGetValue(ColumnName, out val); - return val; - } - public override object ChangeType(object val) { return val; } - } - internal class PocoData - { - public static PocoData ForObject(object o, string primaryKeyName) - { - var t = o.GetType(); -#if !PETAPOCO_NO_DYNAMIC - if (t == typeof(System.Dynamic.ExpandoObject)) - { - var pd = new PocoData(); - pd.TableInfo = new TableInfo(); - pd.Columns = new Dictionary(StringComparer.OrdinalIgnoreCase); - pd.Columns.Add(primaryKeyName, new ExpandoColumn() { ColumnName = primaryKeyName }); - pd.TableInfo.PrimaryKey = primaryKeyName; - pd.TableInfo.AutoIncrement = true; - foreach (var col in (o as IDictionary).Keys) - { - if (col!=primaryKeyName) - pd.Columns.Add(col, new ExpandoColumn() { ColumnName = col }); - } - return pd; - } - else -#endif - return ForType(t); - } - static System.Threading.ReaderWriterLockSlim RWLock = new System.Threading.ReaderWriterLockSlim(); - public static PocoData ForType(Type t) - { -#if !PETAPOCO_NO_DYNAMIC - if (t == typeof(System.Dynamic.ExpandoObject)) - throw new InvalidOperationException("Can't use dynamic types with this method"); -#endif - // Check cache - RWLock.EnterReadLock(); - PocoData pd; - try - { - if (m_PocoDatas.TryGetValue(t, out pd)) - return pd; - } - finally - { - RWLock.ExitReadLock(); - } - - - // Cache it - RWLock.EnterWriteLock(); - try - { - // Check again - if (m_PocoDatas.TryGetValue(t, out pd)) - return pd; - - // Create it - pd = new PocoData(t); - - m_PocoDatas.Add(t, pd); - } - finally - { - RWLock.ExitWriteLock(); - } - - return pd; - } - - public PocoData() - { - } - - public PocoData(Type t) - { - type = t; - TableInfo=new TableInfo(); - - // Get the table name - var a = t.GetCustomAttributes(typeof(TableNameAttribute), true); - TableInfo.TableName = a.Length == 0 ? t.Name : (a[0] as TableNameAttribute).Value; - - // Get the primary key - a = t.GetCustomAttributes(typeof(PrimaryKeyAttribute), true); - TableInfo.PrimaryKey = a.Length == 0 ? "ID" : (a[0] as PrimaryKeyAttribute).Value; - TableInfo.SequenceName = a.Length == 0 ? null : (a[0] as PrimaryKeyAttribute).sequenceName; - TableInfo.AutoIncrement = a.Length == 0 ? false : (a[0] as PrimaryKeyAttribute).autoIncrement; - - // Call column mapper - if (Database.Mapper != null) - Database.Mapper.GetTableInfo(t, TableInfo); - - // Work out bound properties - bool ExplicitColumns = t.GetCustomAttributes(typeof(ExplicitColumnsAttribute), true).Length > 0; - Columns = new Dictionary(StringComparer.OrdinalIgnoreCase); - foreach (var pi in t.GetProperties()) - { - // Work out if properties is to be included - var ColAttrs = pi.GetCustomAttributes(typeof(ColumnAttribute), true); - if (ExplicitColumns) - { - if (ColAttrs.Length == 0) - continue; - } - else - { - if (pi.GetCustomAttributes(typeof(IgnoreAttribute), true).Length != 0) - continue; - } - - var pc = new PocoColumn(); - pc.PropertyInfo = pi; - - // Work out the DB column name - if (ColAttrs.Length > 0) - { - var colattr = (ColumnAttribute)ColAttrs[0]; - pc.ColumnName = colattr.Name; - if ((colattr as ResultColumnAttribute) != null) - pc.ResultColumn = true; - } - if (pc.ColumnName == null) - { - pc.ColumnName = pi.Name; - if (Database.Mapper != null && !Database.Mapper.MapPropertyToColumn(pi, ref pc.ColumnName, ref pc.ResultColumn)) - continue; - } - - // Store it - Columns.Add(pc.ColumnName, pc); - } - - // Build column list for automatic select - QueryColumns = (from c in Columns where !c.Value.ResultColumn select c.Key).ToArray(); - - } - - bool IsIntegralType(Type t) - { - var tc=Type.GetTypeCode(t); - return tc >= TypeCode.SByte && tc <= TypeCode.UInt64; - } - - // Create factory function that can convert a IDataReader record into a POCO - public Delegate GetFactory(string sql, string connString, bool ForceDateTimesToUtc, int firstColumn, int countColumns, IDataReader r) - { - // Check cache - var key = string.Format("{0}:{1}:{2}:{3}:{4}", sql, connString, ForceDateTimesToUtc, firstColumn, countColumns); - RWLock.EnterReadLock(); - try - { - // Have we already created it? - Delegate factory; - if (PocoFactories.TryGetValue(key, out factory)) - return factory; - } - finally - { - RWLock.ExitReadLock(); - } - - // Take the writer lock - RWLock.EnterWriteLock(); - - try - { - // Check again, just in case - Delegate factory; - if (PocoFactories.TryGetValue(key, out factory)) - return factory; - - // Create the method - var m = new DynamicMethod("petapoco_factory_" + PocoFactories.Count.ToString(), type, new Type[] { typeof(IDataReader) }, true); - var il = m.GetILGenerator(); - -#if !PETAPOCO_NO_DYNAMIC - if (type == typeof(object)) - { - // var poco=new T() - il.Emit(OpCodes.Newobj, typeof(System.Dynamic.ExpandoObject).GetConstructor(Type.EmptyTypes)); // obj - - MethodInfo fnAdd = typeof(IDictionary).GetMethod("Add"); - - // Enumerate all fields generating a set assignment for the column - for (int i = firstColumn; i < firstColumn + countColumns; i++) - { - var srcType = r.GetFieldType(i); - - il.Emit(OpCodes.Dup); // obj, obj - il.Emit(OpCodes.Ldstr, r.GetName(i)); // obj, obj, fieldname - - // Get the converter - Func converter = null; - if (Database.Mapper != null) - converter = Database.Mapper.GetFromDbConverter(null, srcType); - if (ForceDateTimesToUtc && converter == null && srcType == typeof(DateTime)) - converter = delegate(object src) { return new DateTime(((DateTime)src).Ticks, DateTimeKind.Utc); }; - - // Setup stack for call to converter - int converterIndex = -1; - if (converter != null) - { - // Add the converter - converterIndex = m_Converters.Count; - m_Converters.Add(converter); - - // Generate IL to push the converter onto the stack - il.Emit(OpCodes.Ldsfld, fldConverters); - il.Emit(OpCodes.Ldc_I4, converterIndex); - il.Emit(OpCodes.Callvirt, fnListGetItem); // obj, obj, fieldname, Converter - } - - - // r[i] - il.Emit(OpCodes.Ldarg_0); // obj, obj, fieldname, converter?, rdr - il.Emit(OpCodes.Ldc_I4, i); // obj, obj, fieldname, converter?, rdr,i - il.Emit(OpCodes.Callvirt, fnGetValue); // obj, obj, fieldname, converter?, value - - // Convert DBNull to null - il.Emit(OpCodes.Dup); // obj, obj, fieldname, converter?, value, value - il.Emit(OpCodes.Isinst, typeof(DBNull)); // obj, obj, fieldname, converter?, value, (value or null) - var lblNotNull = il.DefineLabel(); - il.Emit(OpCodes.Brfalse_S, lblNotNull); // obj, obj, fieldname, converter?, value - il.Emit(OpCodes.Pop); // obj, obj, fieldname, converter? - if (converter != null) - il.Emit(OpCodes.Pop); // obj, obj, fieldname, - il.Emit(OpCodes.Ldnull); // obj, obj, fieldname, null - if (converter != null) - { - var lblReady = il.DefineLabel(); - il.Emit(OpCodes.Br_S, lblReady); - il.MarkLabel(lblNotNull); - il.Emit(OpCodes.Callvirt, fnInvoke); - il.MarkLabel(lblReady); - } - else - { - il.MarkLabel(lblNotNull); - } - - il.Emit(OpCodes.Callvirt, fnAdd); - } - } - else -#endif - if (type.IsValueType) - { - il.Emit(OpCodes.Ldarg_0); // rdr - il.Emit(OpCodes.Ldc_I4_0); // rdr,0 - il.Emit(OpCodes.Callvirt, fnGetValue); // value - il.Emit(OpCodes.Unbox_Any, type); // value converted - } - else if (type == typeof(string) || type == typeof(byte[])) - { - // "if (!rdr.IsDBNull(i))" - il.Emit(OpCodes.Ldarg_0); // rdr - il.Emit(OpCodes.Ldc_I4_0); // rdr,0 - il.Emit(OpCodes.Callvirt, fnIsDBNull); // bool - var lblCont = il.DefineLabel(); - il.Emit(OpCodes.Brfalse_S, lblCont); - il.Emit(OpCodes.Ldnull); // null - var lblFin = il.DefineLabel(); - il.Emit(OpCodes.Br_S, lblFin); - - il.MarkLabel(lblCont); - il.Emit(OpCodes.Ldarg_0); // rdr - il.Emit(OpCodes.Ldc_I4_0); // rdr,0 - il.Emit(OpCodes.Callvirt, fnGetValue); // value - - il.Emit(OpCodes.Unbox_Any, type); // value converted - - il.MarkLabel(lblFin); - } - else - { - // var poco=new T() - il.Emit(OpCodes.Newobj, type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, new Type[0], null)); - - // Enumerate all fields generating a set assignment for the column - for (int i = firstColumn; i < firstColumn + countColumns; i++) - { - // Get the PocoColumn for this db column, ignore if not known - PocoColumn pc; - if (!Columns.TryGetValue(r.GetName(i), out pc)) - continue; - - // Get the source type for this column - var srcType = r.GetFieldType(i); - var dstType = pc.PropertyInfo.PropertyType; - - // "if (!rdr.IsDBNull(i))" - il.Emit(OpCodes.Ldarg_0); // poco,rdr - il.Emit(OpCodes.Ldc_I4, i); // poco,rdr,i - il.Emit(OpCodes.Callvirt, fnIsDBNull); // poco,bool - var lblNext = il.DefineLabel(); - il.Emit(OpCodes.Brtrue_S, lblNext); // poco - - il.Emit(OpCodes.Dup); // poco,poco - - // Do we need to install a converter? - Func converter = null; - - // Get converter from the mapper - if (Database.Mapper != null) - { - converter = Database.Mapper.GetFromDbConverter(pc.PropertyInfo, srcType); - } - - // Standard DateTime->Utc mapper - if (ForceDateTimesToUtc && converter == null && srcType == typeof(DateTime) && (dstType == typeof(DateTime) || dstType == typeof(DateTime?))) - { - converter = delegate(object src) { return new DateTime(((DateTime)src).Ticks, DateTimeKind.Utc); }; - } - - // Forced type conversion including integral types -> enum - if (converter == null) - { - if (dstType.IsEnum && IsIntegralType(srcType)) - { - if (srcType != typeof(int)) - { - converter = delegate(object src) { return Convert.ChangeType(src, typeof(int), null); }; - } - } - else if (!dstType.IsAssignableFrom(srcType)) - { - converter = delegate(object src) { return Convert.ChangeType(src, dstType, null); }; - } - } - - // Fast - bool Handled = false; - if (converter == null) - { - var valuegetter = typeof(IDataRecord).GetMethod("Get" + srcType.Name, new Type[] { typeof(int) }); - if (valuegetter != null - && valuegetter.ReturnType == srcType - && (valuegetter.ReturnType == dstType || valuegetter.ReturnType == Nullable.GetUnderlyingType(dstType))) - { - il.Emit(OpCodes.Ldarg_0); // *,rdr - il.Emit(OpCodes.Ldc_I4, i); // *,rdr,i - il.Emit(OpCodes.Callvirt, valuegetter); // *,value - - // Convert to Nullable - if (Nullable.GetUnderlyingType(dstType) != null) - { - il.Emit(OpCodes.Newobj, dstType.GetConstructor(new Type[] { Nullable.GetUnderlyingType(dstType) })); - } - - il.Emit(OpCodes.Callvirt, pc.PropertyInfo.GetSetMethod(true)); // poco - Handled = true; - } - } - - // Not so fast - if (!Handled) - { - // Setup stack for call to converter - int converterIndex = -1; - if (converter != null) - { - // Add the converter - converterIndex = m_Converters.Count; - m_Converters.Add(converter); - - // Generate IL to push the converter onto the stack - il.Emit(OpCodes.Ldsfld, fldConverters); - il.Emit(OpCodes.Ldc_I4, converterIndex); - il.Emit(OpCodes.Callvirt, fnListGetItem); // Converter - } - - // "value = rdr.GetValue(i)" - il.Emit(OpCodes.Ldarg_0); // *,rdr - il.Emit(OpCodes.Ldc_I4, i); // *,rdr,i - il.Emit(OpCodes.Callvirt, fnGetValue); // *,value - - // Call the converter - if (converter != null) - il.Emit(OpCodes.Callvirt, fnInvoke); - - // Assign it - il.Emit(OpCodes.Unbox_Any, pc.PropertyInfo.PropertyType); // poco,poco,value - il.Emit(OpCodes.Callvirt, pc.PropertyInfo.GetSetMethod(true)); // poco - } - - il.MarkLabel(lblNext); - } - } - - il.Emit(OpCodes.Ret); - - // Cache it, return it - var del = m.CreateDelegate(Expression.GetFuncType(typeof(IDataReader), type)); - PocoFactories.Add(key, del); - return del; - } - finally - { - RWLock.ExitWriteLock(); - } - } - - - static Dictionary m_PocoDatas = new Dictionary(); - static List> m_Converters = new List>(); - static MethodInfo fnGetValue = typeof(IDataRecord).GetMethod("GetValue", new Type[] { typeof(int) }); - static MethodInfo fnIsDBNull = typeof(IDataRecord).GetMethod("IsDBNull"); - static FieldInfo fldConverters = typeof(PocoData).GetField("m_Converters", BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic); - static MethodInfo fnListGetItem = typeof(List>).GetProperty("Item").GetGetMethod(); - static MethodInfo fnInvoke = typeof(Func).GetMethod("Invoke"); - public Type type; - public string[] QueryColumns { get; private set; } - public TableInfo TableInfo { get; private set; } - public Dictionary Columns { get; private set; } - Dictionary PocoFactories = new Dictionary(); - } - - - // Member variables - string _connectionString; - string _providerName; - DbProviderFactory _factory; - IDbConnection _sharedConnection; - IDbTransaction _transaction; - int _sharedConnectionDepth; - int _transactionDepth; - bool _transactionCancelled; - string _lastSql; - object[] _lastArgs; - string _paramPrefix = "@"; - } - - // Transaction object helps maintain transaction depth counts - public class Transaction : IDisposable - { - public Transaction(Database db) - { - _db = db; - _db.BeginTransaction(); - } - - public void Complete() - { - _db.CompleteTransaction(); - _db = null; - } - - public void Dispose() - { - if (_db != null) - _db.AbortTransaction(); - } - - Database _db; - } - - // Simple helper class for building SQL statments - public class Sql - { - public Sql() - { - } - - public Sql(string sql, params object[] args) - { - _sql = sql; - _args = args; - } - - public static Sql Builder - { - get { return new Sql(); } - } - - string _sql; - object[] _args; - Sql _rhs; - string _sqlFinal; - object[] _argsFinal; - - private void Build() - { - // already built? - if (_sqlFinal != null) - return; - - // Build it - var sb = new StringBuilder(); - var args = new List(); - Build(sb, args, null); - _sqlFinal = sb.ToString(); - _argsFinal = args.ToArray(); - } - - public string SQL - { - get - { - Build(); - return _sqlFinal; - } - } - - public object[] Arguments - { - get - { - Build(); - return _argsFinal; - } - } - - public Sql Append(Sql sql) - { - if (_rhs != null) - _rhs.Append(sql); - else - _rhs = sql; - - return this; - } - - public Sql Append(string sql, params object[] args) - { - return Append(new Sql(sql, args)); - } - - static bool Is(Sql sql, string sqltype) - { - return sql != null && sql._sql != null && sql._sql.StartsWith(sqltype, StringComparison.InvariantCultureIgnoreCase); - } - - private void Build(StringBuilder sb, List args, Sql lhs) - { - if (!String.IsNullOrEmpty(_sql)) - { - // Add SQL to the string - if (sb.Length > 0) - { - sb.Append("\n"); - } - - var sql = Database.ProcessParams(_sql, _args, args); - - if (Is(lhs, "WHERE ") && Is(this, "WHERE ")) - sql = "AND " + sql.Substring(6); - if (Is(lhs, "ORDER BY ") && Is(this, "ORDER BY ")) - sql = ", " + sql.Substring(9); - - sb.Append(sql); - } - - // Now do rhs - if (_rhs != null) - _rhs.Build(sb, args, this); - } - - public Sql Where(string sql, params object[] args) - { - return Append(new Sql("WHERE (" + sql + ")", args)); - } - - public Sql OrderBy(params object[] columns) - { - return Append(new Sql("ORDER BY " + String.Join(", ", (from x in columns select x.ToString()).ToArray()))); - } - - public Sql Select(params object[] columns) - { - return Append(new Sql("SELECT " + String.Join(", ", (from x in columns select x.ToString()).ToArray()))); - } - - public Sql From(params object[] tables) - { - return Append(new Sql("FROM " + String.Join(", ", (from x in tables select x.ToString()).ToArray()))); - } - - public Sql GroupBy(params object[] columns) - { - return Append(new Sql("GROUP BY " + String.Join(", ", (from x in columns select x.ToString()).ToArray()))); - } - - private SqlJoinClause Join(string JoinType, string table) - { - return new SqlJoinClause(Append(new Sql(JoinType + table))); - } - - public SqlJoinClause InnerJoin(string table) { return Join("INNER JOIN ", table); } - public SqlJoinClause LeftJoin(string table) { return Join("LEFT JOIN ", table); } - - public class SqlJoinClause - { - private readonly Sql _sql; - - public SqlJoinClause(Sql sql) - { - _sql = sql; - } - - public Sql On(string onClause, params object[] args) - { - return _sql.Append("ON " + onClause, args); - } - } - } - -} diff --git a/packages/PetaPoco.4.0.2/PetaPoco.4.0.2.nupkg b/packages/PetaPoco.4.0.2/PetaPoco.4.0.2.nupkg deleted file mode 100644 index 893d03ef6..000000000 Binary files a/packages/PetaPoco.4.0.2/PetaPoco.4.0.2.nupkg and /dev/null differ diff --git a/packages/PetaPoco.Core.4.0.2/Content/Models/PetaPoco.cs b/packages/PetaPoco.Core.4.0.2/Content/Models/PetaPoco.cs deleted file mode 100644 index 751aef848..000000000 --- a/packages/PetaPoco.Core.4.0.2/Content/Models/PetaPoco.cs +++ /dev/null @@ -1,2186 +0,0 @@ -/* PetaPoco v4.0.2 - A Tiny ORMish thing for your POCO's. - * Copyright © 2011 Topten Software. All Rights Reserved. - * - * Apache License 2.0 - http://www.toptensoftware.com/petapoco/license - * - * Special thanks to Rob Conery (@robconery) for original inspiration (ie:Massive) and for - * use of Subsonic's T4 templates, Rob Sullivan (@DataChomp) for hard core DBA advice - * and Adam Schroder (@schotime) for lots of suggestions, improvements and Oracle support - */ - -// Define PETAPOCO_NO_DYNAMIC in your project settings on .NET 3.5 - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Configuration; -using System.Data.Common; -using System.Data; -using System.Text.RegularExpressions; -using System.Reflection; -using System.Reflection.Emit; -using System.Linq.Expressions; - - -namespace PetaPoco -{ - // Poco's marked [Explicit] require all column properties to be marked - [AttributeUsage(AttributeTargets.Class)] - public class ExplicitColumnsAttribute : Attribute - { - } - // For non-explicit pocos, causes a property to be ignored - [AttributeUsage(AttributeTargets.Property)] - public class IgnoreAttribute : Attribute - { - } - - // For explicit pocos, marks property as a column and optionally supplies column name - [AttributeUsage(AttributeTargets.Property)] - public class ColumnAttribute : Attribute - { - public ColumnAttribute() { } - public ColumnAttribute(string name) { Name = name; } - public string Name { get; set; } - } - - // For explicit pocos, marks property as a result column and optionally supplies column name - [AttributeUsage(AttributeTargets.Property)] - public class ResultColumnAttribute : ColumnAttribute - { - public ResultColumnAttribute() { } - public ResultColumnAttribute(string name) : base(name) { } - } - - // Specify the table name of a poco - [AttributeUsage(AttributeTargets.Class)] - public class TableNameAttribute : Attribute - { - public TableNameAttribute(string tableName) - { - Value = tableName; - } - public string Value { get; private set; } - } - - // Specific the primary key of a poco class (and optional sequence name for Oracle) - [AttributeUsage(AttributeTargets.Class)] - public class PrimaryKeyAttribute : Attribute - { - public PrimaryKeyAttribute(string primaryKey) - { - Value = primaryKey; - autoIncrement = true; - } - - public string Value { get; private set; } - public string sequenceName { get; set; } - public bool autoIncrement { get; set; } - } - - [AttributeUsage(AttributeTargets.Property)] - public class AutoJoinAttribute : Attribute - { - public AutoJoinAttribute() { } - } - - // Results from paged request - public class Page - { - public long CurrentPage { get; set; } - public long TotalPages { get; set; } - public long TotalItems { get; set; } - public long ItemsPerPage { get; set; } - public List Items { get; set; } - public object Context { get; set; } - } - - // Pass as parameter value to force to DBType.AnsiString - public class AnsiString - { - public AnsiString(string str) - { - Value = str; - } - public string Value { get; private set; } - } - - // Used by IMapper to override table bindings for an object - public class TableInfo - { - public string TableName { get; set; } - public string PrimaryKey { get; set; } - public bool AutoIncrement { get; set; } - public string SequenceName { get; set; } - } - - // Optionally provide and implementation of this to Database.Mapper - public interface IMapper - { - void GetTableInfo(Type t, TableInfo ti); - bool MapPropertyToColumn(PropertyInfo pi, ref string columnName, ref bool resultColumn); - Func GetFromDbConverter(PropertyInfo pi, Type SourceType); - Func GetToDbConverter(Type SourceType); - } - - // Database class ... this is where most of the action happens - public class Database : IDisposable - { - public Database(IDbConnection connection) - { - _sharedConnection = connection; - _connectionString = connection.ConnectionString; - _sharedConnectionDepth = 2; // Prevent closing external connection - CommonConstruct(); - } - - public Database(string connectionString, string providerName) - { - _connectionString = connectionString; - _providerName = providerName; - CommonConstruct(); - } - - public Database(string connectionString, DbProviderFactory provider) - { - _connectionString = connectionString; - _factory = provider; - CommonConstruct(); - } - - public Database(string connectionStringName) - { - // Use first? - if (connectionStringName == "") - connectionStringName = ConfigurationManager.ConnectionStrings[0].Name; - - // Work out connection string and provider name - var providerName = "System.Data.SqlClient"; - if (ConfigurationManager.ConnectionStrings[connectionStringName] != null) - { - if (!string.IsNullOrEmpty(ConfigurationManager.ConnectionStrings[connectionStringName].ProviderName)) - providerName = ConfigurationManager.ConnectionStrings[connectionStringName].ProviderName; - } - else - { - throw new InvalidOperationException("Can't find a connection string with the name '" + connectionStringName + "'"); - } - - // Store factory and connection string - _connectionString = ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString; - _providerName = providerName; - CommonConstruct(); - } - - enum DBType - { - SqlServer, - SqlServerCE, - MySql, - PostgreSQL, - Oracle, - } - DBType _dbType = DBType.SqlServer; - - // Common initialization - private void CommonConstruct() - { - _transactionDepth = 0; - EnableAutoSelect = true; - EnableNamedParams = true; - ForceDateTimesToUtc = true; - - if (_providerName != null) - _factory = DbProviderFactories.GetFactory(_providerName); - - string dbtype = (_factory == null ? _sharedConnection.GetType() : _factory.GetType()).Name; - if (dbtype.StartsWith("MySql")) _dbType = DBType.MySql; - else if (dbtype.StartsWith("SqlCe")) _dbType = DBType.SqlServerCE; - else if (dbtype.StartsWith("Npgsql")) _dbType = DBType.PostgreSQL; - else if (dbtype.StartsWith("Oracle")) _dbType = DBType.Oracle; - - if (_dbType == DBType.MySql && _connectionString != null && _connectionString.IndexOf("Allow User Variables=true") >= 0) - _paramPrefix = "?"; - if (_dbType == DBType.Oracle) - _paramPrefix = ":"; - } - - // Automatically close one open shared connection - public void Dispose() - { - // Automatically close one open connection reference - // (Works with KeepConnectionAlive and manually opening a shared connection) - CloseSharedConnection(); - } - - // Set to true to keep the first opened connection alive until this object is disposed - public bool KeepConnectionAlive { get; set; } - - // Open a connection (can be nested) - public void OpenSharedConnection() - { - if (_sharedConnectionDepth == 0) - { - _sharedConnection = _factory.CreateConnection(); - _sharedConnection.ConnectionString = _connectionString; - _sharedConnection.Open(); - - if (KeepConnectionAlive) - _sharedConnectionDepth++; // Make sure you call Dispose - } - _sharedConnectionDepth++; - } - - // Close a previously opened connection - public void CloseSharedConnection() - { - if (_sharedConnectionDepth > 0) - { - _sharedConnectionDepth--; - if (_sharedConnectionDepth == 0) - { - _sharedConnection.Dispose(); - _sharedConnection = null; - } - } - } - - // Access to our shared connection - public IDbConnection Connection - { - get { return _sharedConnection; } - } - - // Helper to create a transaction scope - public Transaction GetTransaction() - { - return new Transaction(this); - } - - // Use by derived repo generated by T4 templates - public virtual void OnBeginTransaction() { } - public virtual void OnEndTransaction() { } - - // Start a new transaction, can be nested, every call must be - // matched by a call to AbortTransaction or CompleteTransaction - // Use `using (var scope=db.Transaction) { scope.Complete(); }` to ensure correct semantics - public void BeginTransaction() - { - _transactionDepth++; - - if (_transactionDepth == 1) - { - OpenSharedConnection(); - _transaction = _sharedConnection.BeginTransaction(); - _transactionCancelled = false; - OnBeginTransaction(); - } - - } - - // Internal helper to cleanup transaction stuff - void CleanupTransaction() - { - OnEndTransaction(); - - if (_transactionCancelled) - _transaction.Rollback(); - else - _transaction.Commit(); - - _transaction.Dispose(); - _transaction = null; - - CloseSharedConnection(); - } - - // Abort the entire outer most transaction scope - public void AbortTransaction() - { - _transactionCancelled = true; - if ((--_transactionDepth) == 0) - CleanupTransaction(); - } - - // Complete the transaction - public void CompleteTransaction() - { - if ((--_transactionDepth) == 0) - CleanupTransaction(); - } - - // Helper to handle named parameters from object properties - static Regex rxParams = new Regex(@"(? args_dest) - { - return rxParams.Replace(_sql, m => - { - string param = m.Value.Substring(1); - - object arg_val; - - int paramIndex; - if (int.TryParse(param, out paramIndex)) - { - // Numbered parameter - if (paramIndex < 0 || paramIndex >= args_src.Length) - throw new ArgumentOutOfRangeException(string.Format("Parameter '@{0}' specified but only {1} parameters supplied (in `{2}`)", paramIndex, args_src.Length, _sql)); - arg_val = args_src[paramIndex]; - } - else - { - // Look for a property on one of the arguments with this name - bool found = false; - arg_val = null; - foreach (var o in args_src) - { - var pi = o.GetType().GetProperty(param); - if (pi != null) - { - arg_val = pi.GetValue(o, null); - found = true; - break; - } - } - - if (!found) - throw new ArgumentException(string.Format("Parameter '@{0}' specified but none of the passed arguments have a property with this name (in '{1}')", param, _sql)); - } - - // Expand collections to parameter lists - if ((arg_val as System.Collections.IEnumerable) != null && - (arg_val as string) == null && - (arg_val as byte[]) == null) - { - var sb = new StringBuilder(); - foreach (var i in arg_val as System.Collections.IEnumerable) - { - sb.Append((sb.Length == 0 ? "@" : ",@") + args_dest.Count.ToString()); - args_dest.Add(i); - } - return sb.ToString(); - } - else - { - args_dest.Add(arg_val); - return "@" + (args_dest.Count - 1).ToString(); - } - } - ); - } - - // Add a parameter to a DB command - void AddParam(IDbCommand cmd, object item, string ParameterPrefix) - { - // Convert value to from poco type to db type - if (Database.Mapper != null && item!=null) - { - var fn = Database.Mapper.GetToDbConverter(item.GetType()); - if (fn!=null) - item = fn(item); - } - - // Support passed in parameters - var idbParam = item as IDbDataParameter; - if (idbParam != null) - { - idbParam.ParameterName = string.Format("{0}{1}", ParameterPrefix, cmd.Parameters.Count); - cmd.Parameters.Add(idbParam); - return; - } - - var p = cmd.CreateParameter(); - p.ParameterName = string.Format("{0}{1}", ParameterPrefix, cmd.Parameters.Count); - if (item == null) - { - p.Value = DBNull.Value; - } - else - { - var t = item.GetType(); - if (t.IsEnum) // PostgreSQL .NET driver wont cast enum to int - { - p.Value = (int)item; - } - else if (t == typeof(Guid)) - { - p.Value = item.ToString(); - p.DbType = DbType.String; - p.Size = 40; - } - else if (t == typeof(string)) - { - p.Size = Math.Max((item as string).Length + 1, 4000); // Help query plan caching by using common size - p.Value = item; - } - else if (t == typeof(AnsiString)) - { - // Thanks @DataChomp for pointing out the SQL Server indexing performance hit of using wrong string type on varchar - p.Size = Math.Max((item as AnsiString).Value.Length + 1, 4000); - p.Value = (item as AnsiString).Value; - p.DbType = DbType.AnsiString; - } - else if (t == typeof(bool) && _dbType != DBType.PostgreSQL) - { - p.Value = ((bool)item) ? 1 : 0; - } - else if (item.GetType().Name == "SqlGeography") //SqlGeography is a CLR Type - { - p.GetType().GetProperty("UdtTypeName").SetValue(p, "geography", null); //geography is the equivalent SQL Server Type - p.Value = item; - } - - else if (item.GetType().Name == "SqlGeometry") //SqlGeometry is a CLR Type - { - p.GetType().GetProperty("UdtTypeName").SetValue(p, "geometry", null); //geography is the equivalent SQL Server Type - p.Value = item; - } - else - { - p.Value = item; - } - } - - cmd.Parameters.Add(p); - } - - // Create a command - static Regex rxParamsPrefix = new Regex(@"(?(); - sql = ProcessParams(sql, args, new_args); - args = new_args.ToArray(); - } - - // Perform parameter prefix replacements - if (_paramPrefix != "@") - sql = rxParamsPrefix.Replace(sql, m => _paramPrefix + m.Value.Substring(1)); - sql = sql.Replace("@@", "@"); // <- double @@ escapes a single @ - - // Create the command and add parameters - IDbCommand cmd = _factory == null ? connection.CreateCommand() : _factory.CreateCommand(); - cmd.Connection = connection; - cmd.CommandText = sql; - cmd.Transaction = _transaction; - foreach (var item in args) - { - AddParam(cmd, item, _paramPrefix); - } - - if (_dbType == DBType.Oracle) - { - cmd.GetType().GetProperty("BindByName").SetValue(cmd, true, null); - } - - if (!String.IsNullOrEmpty(sql)) - DoPreExecute(cmd); - - return cmd; - } - - // Override this to log/capture exceptions - public virtual void OnException(Exception x) - { - System.Diagnostics.Debug.WriteLine(x.ToString()); - System.Diagnostics.Debug.WriteLine(LastCommand); - } - - // Override this to log commands, or modify command before execution - public virtual void OnExecutingCommand(IDbCommand cmd) { } - public virtual void OnExecutedCommand(IDbCommand cmd) { } - - // Execute a non-query command - public int Execute(string sql, params object[] args) - { - try - { - OpenSharedConnection(); - try - { - using (var cmd = CreateCommand(_sharedConnection, sql, args)) - { - var retv=cmd.ExecuteNonQuery(); - OnExecutedCommand(cmd); - return retv; - } - } - finally - { - CloseSharedConnection(); - } - } - catch (Exception x) - { - OnException(x); - throw; - } - } - - public int Execute(Sql sql) - { - return Execute(sql.SQL, sql.Arguments); - } - - // Execute and cast a scalar property - public T ExecuteScalar(string sql, params object[] args) - { - try - { - OpenSharedConnection(); - try - { - using (var cmd = CreateCommand(_sharedConnection, sql, args)) - { - object val = cmd.ExecuteScalar(); - OnExecutedCommand(cmd); - return (T)Convert.ChangeType(val, typeof(T)); - } - } - finally - { - CloseSharedConnection(); - } - } - catch (Exception x) - { - OnException(x); - throw; - } - } - - public T ExecuteScalar(Sql sql) - { - return ExecuteScalar(sql.SQL, sql.Arguments); - } - - Regex rxSelect = new Regex(@"\A\s*(SELECT|EXECUTE|CALL)\s", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Multiline); - Regex rxFrom = new Regex(@"\A\s*FROM\s", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Multiline); - string AddSelectClause(string sql) - { - if (sql.StartsWith(";")) - return sql.Substring(1); - - if (!rxSelect.IsMatch(sql)) - { - var pd = PocoData.ForType(typeof(T)); - var tableName = EscapeTableName(pd.TableInfo.TableName); - string cols = string.Join(", ", (from c in pd.QueryColumns select tableName + "." + EscapeSqlIdentifier(c)).ToArray()); - if (!rxFrom.IsMatch(sql)) - sql = string.Format("SELECT {0} FROM {1} {2}", cols, tableName, sql); - else - sql = string.Format("SELECT {0} {1}", cols, sql); - } - return sql; - } - - public bool EnableAutoSelect { get; set; } - public bool EnableNamedParams { get; set; } - public bool ForceDateTimesToUtc { get; set; } - - // Return a typed list of pocos - public List Fetch(string sql, params object[] args) - { - return Query(sql, args).ToList(); - } - - public List Fetch(Sql sql) - { - return Fetch(sql.SQL, sql.Arguments); - } - - static Regex rxColumns = new Regex(@"\A\s*SELECT\s+((?:\((?>\((?)|\)(?<-depth>)|.?)*(?(depth)(?!))\)|.)*?)(?\((?)|\)(?<-depth>)|.?)*(?(depth)(?!))\)|[\w\(\)\.])+(?:\s+(?:ASC|DESC))?(?:\s*,\s*(?:\((?>\((?)|\)(?<-depth>)|.?)*(?(depth)(?!))\)|[\w\(\)\.])+(?:\s+(?:ASC|DESC))?)*", RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.Compiled); - public static bool SplitSqlForPaging(string sql, out string sqlCount, out string sqlSelectRemoved, out string sqlOrderBy) - { - sqlSelectRemoved = null; - sqlCount = null; - sqlOrderBy = null; - - // Extract the columns from "SELECT FROM" - var m = rxColumns.Match(sql); - if (!m.Success) - return false; - - // Save column list and replace with COUNT(*) - Group g = m.Groups[1]; - sqlCount = sql.Substring(0, g.Index) + "COUNT(*) " + sql.Substring(g.Index + g.Length); - sqlSelectRemoved = sql.Substring(g.Index); - - // Look for an "ORDER BY " clause - m = rxOrderBy.Match(sqlCount); - if (!m.Success) - return false; - - g = m.Groups[0]; - sqlOrderBy = g.ToString(); - sqlCount = sqlCount.Substring(0, g.Index) + sqlCount.Substring(g.Index + g.Length); - - return true; - } - - public void BuildPageQueries(long page, long itemsPerPage, string sql, ref object[] args, out string sqlCount, out string sqlPage) - { - // Add auto select clause - if (EnableAutoSelect) - sql = AddSelectClause(sql); - - // Split the SQL into the bits we need - string sqlSelectRemoved, sqlOrderBy; - if (!SplitSqlForPaging(sql, out sqlCount, out sqlSelectRemoved, out sqlOrderBy)) - throw new Exception("Unable to parse SQL statement for paged query"); - if (_dbType == DBType.Oracle && sqlSelectRemoved.StartsWith("*")) - throw new Exception("Query must alias '*' when performing a paged query.\neg. select t.* from table t order by t.id"); - - // Build the SQL for the actual final result - if (_dbType == DBType.SqlServer || _dbType == DBType.Oracle) - { - sqlSelectRemoved = rxOrderBy.Replace(sqlSelectRemoved, ""); - sqlPage = string.Format("SELECT * FROM (SELECT ROW_NUMBER() OVER ({0}) peta_rn, {1}) peta_paged WHERE peta_rn>@{2} AND peta_rn<=@{3}", - sqlOrderBy, sqlSelectRemoved, args.Length, args.Length + 1); - args = args.Concat(new object[] { (page - 1) * itemsPerPage, page * itemsPerPage }).ToArray(); - } - else if (_dbType == DBType.SqlServerCE) - { - sqlPage = string.Format("{0}\nOFFSET @{1} ROWS FETCH NEXT @{2} ROWS ONLY", sql, args.Length, args.Length + 1); - args = args.Concat(new object[] { (page - 1) * itemsPerPage, itemsPerPage }).ToArray(); - } - else - { - sqlPage = string.Format("{0}\nLIMIT @{1} OFFSET @{2}", sql, args.Length, args.Length + 1); - args = args.Concat(new object[] { itemsPerPage, (page - 1) * itemsPerPage }).ToArray(); - } - - } - - // Fetch a page - public Page Page(long page, long itemsPerPage, string sql, params object[] args) - { - string sqlCount, sqlPage; - BuildPageQueries(page, itemsPerPage, sql, ref args, out sqlCount, out sqlPage); - - // Save the one-time command time out and use it for both queries - int saveTimeout = OneTimeCommandTimeout; - - // Setup the paged result - var result = new Page(); - result.CurrentPage = page; - result.ItemsPerPage = itemsPerPage; - result.TotalItems = ExecuteScalar(sqlCount, args); - result.TotalPages = result.TotalItems / itemsPerPage; - if ((result.TotalItems % itemsPerPage) != 0) - result.TotalPages++; - - OneTimeCommandTimeout = saveTimeout; - - // Get the records - result.Items = Fetch(sqlPage, args); - - // Done - return result; - } - - public Page Page(long page, long itemsPerPage, Sql sql) - { - return Page(page, itemsPerPage, sql.SQL, sql.Arguments); - } - - - public List Fetch(long page, long itemsPerPage, string sql, params object[] args) - { - string sqlCount, sqlPage; - BuildPageQueries(page, itemsPerPage, sql, ref args, out sqlCount, out sqlPage); - return Fetch(sqlPage, args); - } - - public List Fetch(long page, long itemsPerPage, Sql sql) - { - return Fetch(page, itemsPerPage, sql.SQL, sql.Arguments); - } - - // Return an enumerable collection of pocos - public IEnumerable Query(string sql, params object[] args) - { - if (EnableAutoSelect) - sql = AddSelectClause(sql); - - OpenSharedConnection(); - try - { - using (var cmd = CreateCommand(_sharedConnection, sql, args)) - { - IDataReader r; - var pd = PocoData.ForType(typeof(T)); - try - { - r = cmd.ExecuteReader(); - OnExecutedCommand(cmd); - } - catch (Exception x) - { - OnException(x); - throw; - } - var factory = pd.GetFactory(cmd.CommandText, _sharedConnection.ConnectionString, ForceDateTimesToUtc, 0, r.FieldCount, r) as Func; - using (r) - { - while (true) - { - T poco; - try - { - if (!r.Read()) - yield break; - poco = factory(r); - } - catch (Exception x) - { - OnException(x); - throw; - } - - yield return poco; - } - } - } - } - finally - { - CloseSharedConnection(); - } - } - - // Multi Fetch - public List Fetch(Func cb, string sql, params object[] args) { return Query(cb, sql, args).ToList(); } - public List Fetch(Func cb, string sql, params object[] args) { return Query(cb, sql, args).ToList(); } - public List Fetch(Func cb, string sql, params object[] args) { return Query(cb, sql, args).ToList(); } - - // Multi Query - public IEnumerable Query(Func cb, string sql, params object[] args) { return Query(new Type[] { typeof(T1), typeof(T2) }, cb, sql, args); } - public IEnumerable Query(Func cb, string sql, params object[] args) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3)}, cb, sql, args); } - public IEnumerable Query(Func cb, string sql, params object[] args) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4)}, cb, sql, args); } - - // Multi Fetch (SQL builder) - public List Fetch(Func cb, Sql sql) { return Query(cb, sql.SQL, sql.Arguments).ToList(); } - public List Fetch(Func cb, Sql sql) { return Query(cb, sql.SQL, sql.Arguments).ToList(); } - public List Fetch(Func cb, Sql sql) { return Query(cb, sql.SQL, sql.Arguments).ToList(); } - - // Multi Query (SQL builder) - public IEnumerable Query(Func cb, Sql sql) { return Query(new Type[] { typeof(T1), typeof(T2) }, cb, sql.SQL, sql.Arguments); } - public IEnumerable Query(Func cb, Sql sql) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3) }, cb, sql.SQL, sql.Arguments); } - public IEnumerable Query(Func cb, Sql sql) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4) }, cb, sql.SQL, sql.Arguments); } - - // Multi Fetch (Simple) - public List Fetch(string sql, params object[] args) { return Query(sql, args).ToList(); } - public List Fetch(string sql, params object[] args) { return Query(sql, args).ToList(); } - public List Fetch(string sql, params object[] args) { return Query(sql, args).ToList(); } - - // Multi Query (Simple) - public IEnumerable Query(string sql, params object[] args) { return Query(new Type[] { typeof(T1), typeof(T2) }, null, sql, args); } - public IEnumerable Query(string sql, params object[] args) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3) }, null, sql, args); } - public IEnumerable Query(string sql, params object[] args) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4) }, null, sql, args); } - - // Multi Fetch (Simple) (SQL builder) - public List Fetch(Sql sql) { return Query(sql.SQL, sql.Arguments).ToList(); } - public List Fetch(Sql sql) { return Query(sql.SQL, sql.Arguments).ToList(); } - public List Fetch(Sql sql) { return Query(sql.SQL, sql.Arguments).ToList(); } - - // Multi Query (Simple) (SQL builder) - public IEnumerable Query(Sql sql) { return Query(new Type[] { typeof(T1), typeof(T2) }, null, sql.SQL, sql.Arguments); } - public IEnumerable Query(Sql sql) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3) }, null, sql.SQL, sql.Arguments); } - public IEnumerable Query(Sql sql) { return Query(new Type[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4) }, null, sql.SQL, sql.Arguments); } - - // Automagically guess the property relationships between various POCOs and create a delegate that will set them up - object GetAutoMapper(Type[] types) - { - // Build a key - var kb = new StringBuilder(); - foreach (var t in types) - { - kb.Append(t.ToString()); - kb.Append(":"); - } - var key = kb.ToString(); - - // Check cache - RWLock.EnterReadLock(); - try - { - object mapper; - if (AutoMappers.TryGetValue(key, out mapper)) - return mapper; - } - finally - { - RWLock.ExitReadLock(); - } - - // Create it - RWLock.EnterWriteLock(); - try - { - // Try again - object mapper; - if (AutoMappers.TryGetValue(key, out mapper)) - return mapper; - - // Create a method - var m = new DynamicMethod("petapoco_automapper", types[0], types, true); - var il = m.GetILGenerator(); - - for (int i = 1; i < types.Length; i++) - { - bool handled = false; - for (int j = i - 1; j >= 0; j--) - { - // Find the property - var candidates = from p in types[j].GetProperties() where p.PropertyType == types[i] select p; - if (candidates.Count() == 0) - continue; - if (candidates.Count() > 1) - throw new InvalidOperationException(string.Format("Can't auto join {0} as {1} has more than one property of type {0}", types[i], types[j])); - - // Generate code - il.Emit(OpCodes.Ldarg_S, j); - il.Emit(OpCodes.Ldarg_S, i); - il.Emit(OpCodes.Callvirt, candidates.First().GetSetMethod(true)); - handled = true; - } - - if (!handled) - throw new InvalidOperationException(string.Format("Can't auto join {0}", types[i])); - } - - il.Emit(OpCodes.Ldarg_0); - il.Emit(OpCodes.Ret); - - // Cache it - var del = m.CreateDelegate(Expression.GetFuncType(types.Concat(types.Take(1)).ToArray())); - AutoMappers.Add(key, del); - return del; - } - finally - { - RWLock.ExitWriteLock(); - } - } - - // Find the split point in a result set for two different pocos and return the poco factory for the first - Delegate FindSplitPoint(Type typeThis, Type typeNext, string sql, IDataReader r, ref int pos) - { - // Last? - if (typeNext == null) - return PocoData.ForType(typeThis).GetFactory(sql, _sharedConnection.ConnectionString, ForceDateTimesToUtc, pos, r.FieldCount - pos, r); - - // Get PocoData for the two types - PocoData pdThis = PocoData.ForType(typeThis); - PocoData pdNext = PocoData.ForType(typeNext); - - // Find split point - int firstColumn = pos; - var usedColumns = new Dictionary(); - for (; pos < r.FieldCount; pos++) - { - // Split if field name has already been used, or if the field doesn't exist in current poco but does in the next - string fieldName = r.GetName(pos); - if (usedColumns.ContainsKey(fieldName) || (!pdThis.Columns.ContainsKey(fieldName) && pdNext.Columns.ContainsKey(fieldName))) - { - return pdThis.GetFactory(sql, _sharedConnection.ConnectionString, ForceDateTimesToUtc, firstColumn, pos - firstColumn, r); - } - usedColumns.Add(fieldName, true); - } - - throw new InvalidOperationException(string.Format("Couldn't find split point between {0} and {1}", typeThis, typeNext)); - } - - // Instance data used by the Multipoco factory delegate - essentially a list of the nested poco factories to call - class MultiPocoFactory - { - public List m_Delegates; - public Delegate GetItem(int index) { return m_Delegates[index]; } - } - - // Create a multi-poco factory - Func CreateMultiPocoFactory(Type[] types, string sql, IDataReader r) - { - var m = new DynamicMethod("petapoco_multipoco_factory", typeof(TRet), new Type[] { typeof(MultiPocoFactory), typeof(IDataReader), typeof(object) }, typeof(MultiPocoFactory)); - var il = m.GetILGenerator(); - - // Load the callback - il.Emit(OpCodes.Ldarg_2); - - // Call each delegate - var dels = new List(); - int pos = 0; - for (int i=0; i)m.CreateDelegate(typeof(Func), new MultiPocoFactory() { m_Delegates = dels }); - } - - // Various cached stuff - static Dictionary MultiPocoFactories = new Dictionary(); - static Dictionary AutoMappers = new Dictionary(); - static System.Threading.ReaderWriterLockSlim RWLock = new System.Threading.ReaderWriterLockSlim(); - - // Get (or create) the multi-poco factory for a query - Func GetMultiPocoFactory(Type[] types, string sql, IDataReader r) - { - // Build a key string (this is crap, should address this at some point) - var kb = new StringBuilder(); - kb.Append(typeof(TRet).ToString()); - kb.Append(":"); - foreach (var t in types) - { - kb.Append(":"); - kb.Append(t.ToString()); - } - kb.Append(":"); kb.Append(_sharedConnection.ConnectionString); - kb.Append(":"); kb.Append(ForceDateTimesToUtc); - kb.Append(":"); kb.Append(sql); - string key = kb.ToString(); - - // Check cache - RWLock.EnterReadLock(); - try - { - object oFactory; - if (MultiPocoFactories.TryGetValue(key, out oFactory)) - return (Func)oFactory; - } - finally - { - RWLock.ExitReadLock(); - } - - // Cache it - RWLock.EnterWriteLock(); - try - { - // Check again - object oFactory; - if (MultiPocoFactories.TryGetValue(key, out oFactory)) - return (Func)oFactory; - - // Create the factory - var Factory = CreateMultiPocoFactory(types, sql, r); - - MultiPocoFactories.Add(key, Factory); - return Factory; - } - finally - { - RWLock.ExitWriteLock(); - } - - } - - // Actual implementation of the multi-poco query - public IEnumerable Query(Type[] types, object cb, string sql, params object[] args) - { - OpenSharedConnection(); - try - { - using (var cmd = CreateCommand(_sharedConnection, sql, args)) - { - IDataReader r; - try - { - r = cmd.ExecuteReader(); - OnExecutedCommand(cmd); - } - catch (Exception x) - { - OnException(x); - throw; - } - var factory = GetMultiPocoFactory(types, sql, r); - if (cb == null) - cb = GetAutoMapper(types.ToArray()); - bool bNeedTerminator=false; - using (r) - { - while (true) - { - TRet poco; - try - { - if (!r.Read()) - break; - poco = factory(r, cb); - } - catch (Exception x) - { - OnException(x); - throw; - } - - if (poco != null) - yield return poco; - else - bNeedTerminator = true; - } - if (bNeedTerminator) - { - var poco = (TRet)(cb as Delegate).DynamicInvoke(new object[types.Length]); - if (poco != null) - yield return poco; - else - yield break; - } - } - } - } - finally - { - CloseSharedConnection(); - } - } - - - public IEnumerable Query(Sql sql) - { - return Query(sql.SQL, sql.Arguments); - } - - public bool Exists(object primaryKey) - { - return FirstOrDefault(string.Format("WHERE {0}=@0", EscapeSqlIdentifier(PocoData.ForType(typeof(T)).TableInfo.PrimaryKey)), primaryKey) != null; - } - public T Single(object primaryKey) - { - return Single(string.Format("WHERE {0}=@0", EscapeSqlIdentifier(PocoData.ForType(typeof(T)).TableInfo.PrimaryKey)), primaryKey); - } - public T SingleOrDefault(object primaryKey) - { - return SingleOrDefault(string.Format("WHERE {0}=@0", EscapeSqlIdentifier(PocoData.ForType(typeof(T)).TableInfo.PrimaryKey)), primaryKey); - } - public T Single(string sql, params object[] args) - { - return Query(sql, args).Single(); - } - public T SingleOrDefault(string sql, params object[] args) - { - return Query(sql, args).SingleOrDefault(); - } - public T First(string sql, params object[] args) - { - return Query(sql, args).First(); - } - public T FirstOrDefault(string sql, params object[] args) - { - return Query(sql, args).FirstOrDefault(); - } - - public T Single(Sql sql) - { - return Query(sql).Single(); - } - public T SingleOrDefault(Sql sql) - { - return Query(sql).SingleOrDefault(); - } - public T First(Sql sql) - { - return Query(sql).First(); - } - public T FirstOrDefault(Sql sql) - { - return Query(sql).FirstOrDefault(); - } - - public string EscapeTableName(string str) - { - // Assume table names with "dot", or opening sq is already escaped - return str.IndexOf('.') >= 0 ? str : EscapeSqlIdentifier(str); - } - public string EscapeSqlIdentifier(string str) - { - switch (_dbType) - { - case DBType.MySql: - return string.Format("`{0}`", str); - - case DBType.PostgreSQL: - case DBType.Oracle: - return string.Format("\"{0}\"", str); - - default: - return string.Format("[{0}]", str); - } - } - - public object Insert(string tableName, string primaryKeyName, object poco) - { - return Insert(tableName, primaryKeyName, true, poco); - } - - // Insert a poco into a table. If the poco has a property with the same name - // as the primary key the id of the new record is assigned to it. Either way, - // the new id is returned. - public object Insert(string tableName, string primaryKeyName, bool autoIncrement, object poco) - { - try - { - OpenSharedConnection(); - try - { - using (var cmd = CreateCommand(_sharedConnection, "")) - { - var pd = PocoData.ForObject(poco, primaryKeyName); - var names = new List(); - var values = new List(); - var index = 0; - foreach (var i in pd.Columns) - { - // Don't insert result columns - if (i.Value.ResultColumn) - continue; - - // Don't insert the primary key (except under oracle where we need bring in the next sequence value) - if (autoIncrement && primaryKeyName != null && string.Compare(i.Key, primaryKeyName, true)==0) - { - if (_dbType == DBType.Oracle && !string.IsNullOrEmpty(pd.TableInfo.SequenceName)) - { - names.Add(i.Key); - values.Add(string.Format("{0}.nextval", pd.TableInfo.SequenceName)); - } - continue; - } - - names.Add(EscapeSqlIdentifier(i.Key)); - values.Add(string.Format("{0}{1}", _paramPrefix, index++)); - AddParam(cmd, i.Value.GetValue(poco), _paramPrefix); - } - - cmd.CommandText = string.Format("INSERT INTO {0} ({1}) VALUES ({2})", - EscapeTableName(tableName), - string.Join(",", names.ToArray()), - string.Join(",", values.ToArray()) - ); - - if (!autoIncrement) - { - DoPreExecute(cmd); - cmd.ExecuteNonQuery(); - OnExecutedCommand(cmd); - return true; - } - - - object id; - switch (_dbType) - { - case DBType.SqlServerCE: - DoPreExecute(cmd); - cmd.ExecuteNonQuery(); - OnExecutedCommand(cmd); - id = ExecuteScalar("SELECT @@@IDENTITY AS NewID;"); - break; - case DBType.SqlServer: - cmd.CommandText += ";\nSELECT SCOPE_IDENTITY() AS NewID;"; - DoPreExecute(cmd); - id = cmd.ExecuteScalar(); - OnExecutedCommand(cmd); - break; - case DBType.PostgreSQL: - if (primaryKeyName != null) - { - cmd.CommandText += string.Format("returning {0} as NewID", EscapeSqlIdentifier(primaryKeyName)); - DoPreExecute(cmd); - id = cmd.ExecuteScalar(); - } - else - { - id = -1; - DoPreExecute(cmd); - cmd.ExecuteNonQuery(); - } - OnExecutedCommand(cmd); - break; - case DBType.Oracle: - if (primaryKeyName != null) - { - cmd.CommandText += string.Format(" returning {0} into :newid", EscapeSqlIdentifier(primaryKeyName)); - var param = cmd.CreateParameter(); - param.ParameterName = ":newid"; - param.Value = DBNull.Value; - param.Direction = ParameterDirection.ReturnValue; - param.DbType = DbType.Int64; - cmd.Parameters.Add(param); - DoPreExecute(cmd); - cmd.ExecuteNonQuery(); - id = param.Value; - } - else - { - id = -1; - DoPreExecute(cmd); - cmd.ExecuteNonQuery(); - } - OnExecutedCommand(cmd); - break; - default: - cmd.CommandText += ";\nSELECT @@IDENTITY AS NewID;"; - DoPreExecute(cmd); - id = cmd.ExecuteScalar(); - OnExecutedCommand(cmd); - break; - } - - - // Assign the ID back to the primary key property - if (primaryKeyName != null) - { - PocoColumn pc; - if (pd.Columns.TryGetValue(primaryKeyName, out pc)) - { - pc.SetValue(poco, pc.ChangeType(id)); - } - } - - return id; - } - } - finally - { - CloseSharedConnection(); - } - } - catch (Exception x) - { - OnException(x); - throw; - } - } - - // Insert an annotated poco object - public object Insert(object poco) - { - var pd = PocoData.ForType(poco.GetType()); - return Insert(pd.TableInfo.TableName, pd.TableInfo.PrimaryKey, pd.TableInfo.AutoIncrement, poco); - } - - // Update a record with values from a poco. primary key value can be either supplied or read from the poco - public int Update(string tableName, string primaryKeyName, object poco, object primaryKeyValue) - { - try - { - OpenSharedConnection(); - try - { - using (var cmd = CreateCommand(_sharedConnection, "")) - { - var sb = new StringBuilder(); - var index = 0; - var pd = PocoData.ForObject(poco,primaryKeyName); - foreach (var i in pd.Columns) - { - // Don't update the primary key, but grab the value if we don't have it - if (string.Compare(i.Key, primaryKeyName, true)==0) - { - if (primaryKeyValue == null) - primaryKeyValue = i.Value.GetValue(poco); - continue; - } - - // Dont update result only columns - if (i.Value.ResultColumn) - continue; - - // Build the sql - if (index > 0) - sb.Append(", "); - sb.AppendFormat("{0} = {1}{2}", EscapeSqlIdentifier(i.Key), _paramPrefix, index++); - - // Store the parameter in the command - AddParam(cmd, i.Value.GetValue(poco), _paramPrefix); - } - - cmd.CommandText = string.Format("UPDATE {0} SET {1} WHERE {2} = {3}{4}", - EscapeTableName(tableName), sb.ToString(), EscapeSqlIdentifier(primaryKeyName), _paramPrefix, index++); - AddParam(cmd, primaryKeyValue, _paramPrefix); - - DoPreExecute(cmd); - - // Do it - var retv=cmd.ExecuteNonQuery(); - OnExecutedCommand(cmd); - return retv; - } - } - finally - { - CloseSharedConnection(); - } - } - catch (Exception x) - { - OnException(x); - throw; - } - } - - public int Update(string tableName, string primaryKeyName, object poco) - { - return Update(tableName, primaryKeyName, poco, null); - } - - public int Update(object poco) - { - return Update(poco, null); - } - - public int Update(object poco, object primaryKeyValue) - { - var pd = PocoData.ForType(poco.GetType()); - return Update(pd.TableInfo.TableName, pd.TableInfo.PrimaryKey, poco, primaryKeyValue); - } - - public int Update(string sql, params object[] args) - { - var pd = PocoData.ForType(typeof(T)); - return Execute(string.Format("UPDATE {0} {1}", EscapeTableName(pd.TableInfo.TableName), sql), args); - } - - public int Update(Sql sql) - { - var pd = PocoData.ForType(typeof(T)); - return Execute(new Sql(string.Format("UPDATE {0}", EscapeTableName(pd.TableInfo.TableName))).Append(sql)); - } - - public int Delete(string tableName, string primaryKeyName, object poco) - { - return Delete(tableName, primaryKeyName, poco, null); - } - - public int Delete(string tableName, string primaryKeyName, object poco, object primaryKeyValue) - { - // If primary key value not specified, pick it up from the object - if (primaryKeyValue == null) - { - var pd = PocoData.ForObject(poco,primaryKeyName); - PocoColumn pc; - if (pd.Columns.TryGetValue(primaryKeyName, out pc)) - { - primaryKeyValue = pc.GetValue(poco); - } - } - - // Do it - var sql = string.Format("DELETE FROM {0} WHERE {1}=@0", EscapeTableName(tableName), EscapeSqlIdentifier(primaryKeyName)); - return Execute(sql, primaryKeyValue); - } - - public int Delete(object poco) - { - var pd = PocoData.ForType(poco.GetType()); - return Delete(pd.TableInfo.TableName, pd.TableInfo.PrimaryKey, poco); - } - - public int Delete(object pocoOrPrimaryKey) - { - if (pocoOrPrimaryKey.GetType() == typeof(T)) - return Delete(pocoOrPrimaryKey); - var pd = PocoData.ForType(typeof(T)); - return Delete(pd.TableInfo.TableName, pd.TableInfo.PrimaryKey, null, pocoOrPrimaryKey); - } - - public int Delete(string sql, params object[] args) - { - var pd = PocoData.ForType(typeof(T)); - return Execute(string.Format("DELETE FROM {0} {1}", EscapeTableName(pd.TableInfo.TableName), sql), args); - } - - public int Delete(Sql sql) - { - var pd = PocoData.ForType(typeof(T)); - return Execute(new Sql(string.Format("DELETE FROM {0}", EscapeTableName(pd.TableInfo.TableName))).Append(sql)); - } - - // Check if a poco represents a new record - public bool IsNew(string primaryKeyName, object poco) - { - var pd = PocoData.ForObject(poco, primaryKeyName); - object pk; - PocoColumn pc; - if (pd.Columns.TryGetValue(primaryKeyName, out pc)) - { - pk = pc.GetValue(poco); - } -#if !PETAPOCO_NO_DYNAMIC - else if (poco.GetType() == typeof(System.Dynamic.ExpandoObject)) - { - return true; - } -#endif - else - { - var pi = poco.GetType().GetProperty(primaryKeyName); - if (pi == null) - throw new ArgumentException(string.Format("The object doesn't have a property matching the primary key column name '{0}'", primaryKeyName)); - pk = pi.GetValue(poco, null); - } - - if (pk == null) - return true; - - var type = pk.GetType(); - - if (type.IsValueType) - { - // Common primary key types - if (type == typeof(long)) - return (long)pk == 0; - else if (type == typeof(ulong)) - return (ulong)pk == 0; - else if (type == typeof(int)) - return (int)pk == 0; - else if (type == typeof(uint)) - return (uint)pk == 0; - - // Create a default instance and compare - return pk == Activator.CreateInstance(pk.GetType()); - } - else - { - return pk == null; - } - } - - public bool IsNew(object poco) - { - var pd = PocoData.ForType(poco.GetType()); - if (!pd.TableInfo.AutoIncrement) - throw new InvalidOperationException("IsNew() and Save() are only supported on tables with auto-increment/identity primary key columns"); - return IsNew(pd.TableInfo.PrimaryKey, poco); - } - - // Insert new record or Update existing record - public void Save(string tableName, string primaryKeyName, object poco) - { - if (IsNew(primaryKeyName, poco)) - { - Insert(tableName, primaryKeyName, true, poco); - } - else - { - Update(tableName, primaryKeyName, poco); - } - } - - public void Save(object poco) - { - var pd = PocoData.ForType(poco.GetType()); - Save(pd.TableInfo.TableName, pd.TableInfo.PrimaryKey, poco); - } - - public int CommandTimeout { get; set; } - public int OneTimeCommandTimeout { get; set; } - - void DoPreExecute(IDbCommand cmd) - { - // Setup command timeout - if (OneTimeCommandTimeout != 0) - { - cmd.CommandTimeout = OneTimeCommandTimeout; - OneTimeCommandTimeout = 0; - } - else if (CommandTimeout!=0) - { - cmd.CommandTimeout = CommandTimeout; - } - - // Call hook - OnExecutingCommand(cmd); - - // Save it - _lastSql = cmd.CommandText; - _lastArgs = (from IDataParameter parameter in cmd.Parameters select parameter.Value).ToArray(); - } - - public string LastSQL { get { return _lastSql; } } - public object[] LastArgs { get { return _lastArgs; } } - public string LastCommand - { - get { return FormatCommand(_lastSql, _lastArgs); } - } - - public string FormatCommand(IDbCommand cmd) - { - return FormatCommand(cmd.CommandText, (from IDataParameter parameter in cmd.Parameters select parameter.Value).ToArray()); - } - - public string FormatCommand(string sql, object[] args) - { - var sb = new StringBuilder(); - if (sql == null) - return ""; - sb.Append(sql); - if (args != null && args.Length > 0) - { - sb.Append("\n"); - for (int i = 0; i < args.Length; i++) - { - sb.AppendFormat("\t -> {0}{1} [{2}] = \"{3}\"\n", _paramPrefix, i, args[i].GetType().Name, args[i]); - } - sb.Remove(sb.Length - 1, 1); - } - return sb.ToString(); - } - - - public static IMapper Mapper - { - get; - set; - } - - internal class PocoColumn - { - public string ColumnName; - public PropertyInfo PropertyInfo; - public bool ResultColumn; - public virtual void SetValue(object target, object val) { PropertyInfo.SetValue(target, val, null); } - public virtual object GetValue(object target) { return PropertyInfo.GetValue(target, null); } - public virtual object ChangeType(object val) { return Convert.ChangeType(val, PropertyInfo.PropertyType); } - } - internal class ExpandoColumn : PocoColumn - { - public override void SetValue(object target, object val) { (target as IDictionary)[ColumnName]=val; } - public override object GetValue(object target) - { - object val=null; - (target as IDictionary).TryGetValue(ColumnName, out val); - return val; - } - public override object ChangeType(object val) { return val; } - } - internal class PocoData - { - public static PocoData ForObject(object o, string primaryKeyName) - { - var t = o.GetType(); -#if !PETAPOCO_NO_DYNAMIC - if (t == typeof(System.Dynamic.ExpandoObject)) - { - var pd = new PocoData(); - pd.TableInfo = new TableInfo(); - pd.Columns = new Dictionary(StringComparer.OrdinalIgnoreCase); - pd.Columns.Add(primaryKeyName, new ExpandoColumn() { ColumnName = primaryKeyName }); - pd.TableInfo.PrimaryKey = primaryKeyName; - pd.TableInfo.AutoIncrement = true; - foreach (var col in (o as IDictionary).Keys) - { - if (col!=primaryKeyName) - pd.Columns.Add(col, new ExpandoColumn() { ColumnName = col }); - } - return pd; - } - else -#endif - return ForType(t); - } - static System.Threading.ReaderWriterLockSlim RWLock = new System.Threading.ReaderWriterLockSlim(); - public static PocoData ForType(Type t) - { -#if !PETAPOCO_NO_DYNAMIC - if (t == typeof(System.Dynamic.ExpandoObject)) - throw new InvalidOperationException("Can't use dynamic types with this method"); -#endif - // Check cache - RWLock.EnterReadLock(); - PocoData pd; - try - { - if (m_PocoDatas.TryGetValue(t, out pd)) - return pd; - } - finally - { - RWLock.ExitReadLock(); - } - - - // Cache it - RWLock.EnterWriteLock(); - try - { - // Check again - if (m_PocoDatas.TryGetValue(t, out pd)) - return pd; - - // Create it - pd = new PocoData(t); - - m_PocoDatas.Add(t, pd); - } - finally - { - RWLock.ExitWriteLock(); - } - - return pd; - } - - public PocoData() - { - } - - public PocoData(Type t) - { - type = t; - TableInfo=new TableInfo(); - - // Get the table name - var a = t.GetCustomAttributes(typeof(TableNameAttribute), true); - TableInfo.TableName = a.Length == 0 ? t.Name : (a[0] as TableNameAttribute).Value; - - // Get the primary key - a = t.GetCustomAttributes(typeof(PrimaryKeyAttribute), true); - TableInfo.PrimaryKey = a.Length == 0 ? "ID" : (a[0] as PrimaryKeyAttribute).Value; - TableInfo.SequenceName = a.Length == 0 ? null : (a[0] as PrimaryKeyAttribute).sequenceName; - TableInfo.AutoIncrement = a.Length == 0 ? false : (a[0] as PrimaryKeyAttribute).autoIncrement; - - // Call column mapper - if (Database.Mapper != null) - Database.Mapper.GetTableInfo(t, TableInfo); - - // Work out bound properties - bool ExplicitColumns = t.GetCustomAttributes(typeof(ExplicitColumnsAttribute), true).Length > 0; - Columns = new Dictionary(StringComparer.OrdinalIgnoreCase); - foreach (var pi in t.GetProperties()) - { - // Work out if properties is to be included - var ColAttrs = pi.GetCustomAttributes(typeof(ColumnAttribute), true); - if (ExplicitColumns) - { - if (ColAttrs.Length == 0) - continue; - } - else - { - if (pi.GetCustomAttributes(typeof(IgnoreAttribute), true).Length != 0) - continue; - } - - var pc = new PocoColumn(); - pc.PropertyInfo = pi; - - // Work out the DB column name - if (ColAttrs.Length > 0) - { - var colattr = (ColumnAttribute)ColAttrs[0]; - pc.ColumnName = colattr.Name; - if ((colattr as ResultColumnAttribute) != null) - pc.ResultColumn = true; - } - if (pc.ColumnName == null) - { - pc.ColumnName = pi.Name; - if (Database.Mapper != null && !Database.Mapper.MapPropertyToColumn(pi, ref pc.ColumnName, ref pc.ResultColumn)) - continue; - } - - // Store it - Columns.Add(pc.ColumnName, pc); - } - - // Build column list for automatic select - QueryColumns = (from c in Columns where !c.Value.ResultColumn select c.Key).ToArray(); - - } - - bool IsIntegralType(Type t) - { - var tc=Type.GetTypeCode(t); - return tc >= TypeCode.SByte && tc <= TypeCode.UInt64; - } - - // Create factory function that can convert a IDataReader record into a POCO - public Delegate GetFactory(string sql, string connString, bool ForceDateTimesToUtc, int firstColumn, int countColumns, IDataReader r) - { - // Check cache - var key = string.Format("{0}:{1}:{2}:{3}:{4}", sql, connString, ForceDateTimesToUtc, firstColumn, countColumns); - RWLock.EnterReadLock(); - try - { - // Have we already created it? - Delegate factory; - if (PocoFactories.TryGetValue(key, out factory)) - return factory; - } - finally - { - RWLock.ExitReadLock(); - } - - // Take the writer lock - RWLock.EnterWriteLock(); - - try - { - // Check again, just in case - Delegate factory; - if (PocoFactories.TryGetValue(key, out factory)) - return factory; - - // Create the method - var m = new DynamicMethod("petapoco_factory_" + PocoFactories.Count.ToString(), type, new Type[] { typeof(IDataReader) }, true); - var il = m.GetILGenerator(); - -#if !PETAPOCO_NO_DYNAMIC - if (type == typeof(object)) - { - // var poco=new T() - il.Emit(OpCodes.Newobj, typeof(System.Dynamic.ExpandoObject).GetConstructor(Type.EmptyTypes)); // obj - - MethodInfo fnAdd = typeof(IDictionary).GetMethod("Add"); - - // Enumerate all fields generating a set assignment for the column - for (int i = firstColumn; i < firstColumn + countColumns; i++) - { - var srcType = r.GetFieldType(i); - - il.Emit(OpCodes.Dup); // obj, obj - il.Emit(OpCodes.Ldstr, r.GetName(i)); // obj, obj, fieldname - - // Get the converter - Func converter = null; - if (Database.Mapper != null) - converter = Database.Mapper.GetFromDbConverter(null, srcType); - if (ForceDateTimesToUtc && converter == null && srcType == typeof(DateTime)) - converter = delegate(object src) { return new DateTime(((DateTime)src).Ticks, DateTimeKind.Utc); }; - - // Setup stack for call to converter - int converterIndex = -1; - if (converter != null) - { - // Add the converter - converterIndex = m_Converters.Count; - m_Converters.Add(converter); - - // Generate IL to push the converter onto the stack - il.Emit(OpCodes.Ldsfld, fldConverters); - il.Emit(OpCodes.Ldc_I4, converterIndex); - il.Emit(OpCodes.Callvirt, fnListGetItem); // obj, obj, fieldname, Converter - } - - - // r[i] - il.Emit(OpCodes.Ldarg_0); // obj, obj, fieldname, converter?, rdr - il.Emit(OpCodes.Ldc_I4, i); // obj, obj, fieldname, converter?, rdr,i - il.Emit(OpCodes.Callvirt, fnGetValue); // obj, obj, fieldname, converter?, value - - // Convert DBNull to null - il.Emit(OpCodes.Dup); // obj, obj, fieldname, converter?, value, value - il.Emit(OpCodes.Isinst, typeof(DBNull)); // obj, obj, fieldname, converter?, value, (value or null) - var lblNotNull = il.DefineLabel(); - il.Emit(OpCodes.Brfalse_S, lblNotNull); // obj, obj, fieldname, converter?, value - il.Emit(OpCodes.Pop); // obj, obj, fieldname, converter? - if (converter != null) - il.Emit(OpCodes.Pop); // obj, obj, fieldname, - il.Emit(OpCodes.Ldnull); // obj, obj, fieldname, null - if (converter != null) - { - var lblReady = il.DefineLabel(); - il.Emit(OpCodes.Br_S, lblReady); - il.MarkLabel(lblNotNull); - il.Emit(OpCodes.Callvirt, fnInvoke); - il.MarkLabel(lblReady); - } - else - { - il.MarkLabel(lblNotNull); - } - - il.Emit(OpCodes.Callvirt, fnAdd); - } - } - else -#endif - if (type.IsValueType) - { - il.Emit(OpCodes.Ldarg_0); // rdr - il.Emit(OpCodes.Ldc_I4_0); // rdr,0 - il.Emit(OpCodes.Callvirt, fnGetValue); // value - il.Emit(OpCodes.Unbox_Any, type); // value converted - } - else if (type == typeof(string) || type == typeof(byte[])) - { - // "if (!rdr.IsDBNull(i))" - il.Emit(OpCodes.Ldarg_0); // rdr - il.Emit(OpCodes.Ldc_I4_0); // rdr,0 - il.Emit(OpCodes.Callvirt, fnIsDBNull); // bool - var lblCont = il.DefineLabel(); - il.Emit(OpCodes.Brfalse_S, lblCont); - il.Emit(OpCodes.Ldnull); // null - var lblFin = il.DefineLabel(); - il.Emit(OpCodes.Br_S, lblFin); - - il.MarkLabel(lblCont); - il.Emit(OpCodes.Ldarg_0); // rdr - il.Emit(OpCodes.Ldc_I4_0); // rdr,0 - il.Emit(OpCodes.Callvirt, fnGetValue); // value - - il.Emit(OpCodes.Unbox_Any, type); // value converted - - il.MarkLabel(lblFin); - } - else - { - // var poco=new T() - il.Emit(OpCodes.Newobj, type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, new Type[0], null)); - - // Enumerate all fields generating a set assignment for the column - for (int i = firstColumn; i < firstColumn + countColumns; i++) - { - // Get the PocoColumn for this db column, ignore if not known - PocoColumn pc; - if (!Columns.TryGetValue(r.GetName(i), out pc)) - continue; - - // Get the source type for this column - var srcType = r.GetFieldType(i); - var dstType = pc.PropertyInfo.PropertyType; - - // "if (!rdr.IsDBNull(i))" - il.Emit(OpCodes.Ldarg_0); // poco,rdr - il.Emit(OpCodes.Ldc_I4, i); // poco,rdr,i - il.Emit(OpCodes.Callvirt, fnIsDBNull); // poco,bool - var lblNext = il.DefineLabel(); - il.Emit(OpCodes.Brtrue_S, lblNext); // poco - - il.Emit(OpCodes.Dup); // poco,poco - - // Do we need to install a converter? - Func converter = null; - - // Get converter from the mapper - if (Database.Mapper != null) - { - converter = Database.Mapper.GetFromDbConverter(pc.PropertyInfo, srcType); - } - - // Standard DateTime->Utc mapper - if (ForceDateTimesToUtc && converter == null && srcType == typeof(DateTime) && (dstType == typeof(DateTime) || dstType == typeof(DateTime?))) - { - converter = delegate(object src) { return new DateTime(((DateTime)src).Ticks, DateTimeKind.Utc); }; - } - - // Forced type conversion including integral types -> enum - if (converter == null) - { - if (dstType.IsEnum && IsIntegralType(srcType)) - { - if (srcType != typeof(int)) - { - converter = delegate(object src) { return Convert.ChangeType(src, typeof(int), null); }; - } - } - else if (!dstType.IsAssignableFrom(srcType)) - { - converter = delegate(object src) { return Convert.ChangeType(src, dstType, null); }; - } - } - - // Fast - bool Handled = false; - if (converter == null) - { - var valuegetter = typeof(IDataRecord).GetMethod("Get" + srcType.Name, new Type[] { typeof(int) }); - if (valuegetter != null - && valuegetter.ReturnType == srcType - && (valuegetter.ReturnType == dstType || valuegetter.ReturnType == Nullable.GetUnderlyingType(dstType))) - { - il.Emit(OpCodes.Ldarg_0); // *,rdr - il.Emit(OpCodes.Ldc_I4, i); // *,rdr,i - il.Emit(OpCodes.Callvirt, valuegetter); // *,value - - // Convert to Nullable - if (Nullable.GetUnderlyingType(dstType) != null) - { - il.Emit(OpCodes.Newobj, dstType.GetConstructor(new Type[] { Nullable.GetUnderlyingType(dstType) })); - } - - il.Emit(OpCodes.Callvirt, pc.PropertyInfo.GetSetMethod(true)); // poco - Handled = true; - } - } - - // Not so fast - if (!Handled) - { - // Setup stack for call to converter - int converterIndex = -1; - if (converter != null) - { - // Add the converter - converterIndex = m_Converters.Count; - m_Converters.Add(converter); - - // Generate IL to push the converter onto the stack - il.Emit(OpCodes.Ldsfld, fldConverters); - il.Emit(OpCodes.Ldc_I4, converterIndex); - il.Emit(OpCodes.Callvirt, fnListGetItem); // Converter - } - - // "value = rdr.GetValue(i)" - il.Emit(OpCodes.Ldarg_0); // *,rdr - il.Emit(OpCodes.Ldc_I4, i); // *,rdr,i - il.Emit(OpCodes.Callvirt, fnGetValue); // *,value - - // Call the converter - if (converter != null) - il.Emit(OpCodes.Callvirt, fnInvoke); - - // Assign it - il.Emit(OpCodes.Unbox_Any, pc.PropertyInfo.PropertyType); // poco,poco,value - il.Emit(OpCodes.Callvirt, pc.PropertyInfo.GetSetMethod(true)); // poco - } - - il.MarkLabel(lblNext); - } - } - - il.Emit(OpCodes.Ret); - - // Cache it, return it - var del = m.CreateDelegate(Expression.GetFuncType(typeof(IDataReader), type)); - PocoFactories.Add(key, del); - return del; - } - finally - { - RWLock.ExitWriteLock(); - } - } - - - static Dictionary m_PocoDatas = new Dictionary(); - static List> m_Converters = new List>(); - static MethodInfo fnGetValue = typeof(IDataRecord).GetMethod("GetValue", new Type[] { typeof(int) }); - static MethodInfo fnIsDBNull = typeof(IDataRecord).GetMethod("IsDBNull"); - static FieldInfo fldConverters = typeof(PocoData).GetField("m_Converters", BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic); - static MethodInfo fnListGetItem = typeof(List>).GetProperty("Item").GetGetMethod(); - static MethodInfo fnInvoke = typeof(Func).GetMethod("Invoke"); - public Type type; - public string[] QueryColumns { get; private set; } - public TableInfo TableInfo { get; private set; } - public Dictionary Columns { get; private set; } - Dictionary PocoFactories = new Dictionary(); - } - - - // Member variables - string _connectionString; - string _providerName; - DbProviderFactory _factory; - IDbConnection _sharedConnection; - IDbTransaction _transaction; - int _sharedConnectionDepth; - int _transactionDepth; - bool _transactionCancelled; - string _lastSql; - object[] _lastArgs; - string _paramPrefix = "@"; - } - - // Transaction object helps maintain transaction depth counts - public class Transaction : IDisposable - { - public Transaction(Database db) - { - _db = db; - _db.BeginTransaction(); - } - - public void Complete() - { - _db.CompleteTransaction(); - _db = null; - } - - public void Dispose() - { - if (_db != null) - _db.AbortTransaction(); - } - - Database _db; - } - - // Simple helper class for building SQL statments - public class Sql - { - public Sql() - { - } - - public Sql(string sql, params object[] args) - { - _sql = sql; - _args = args; - } - - public static Sql Builder - { - get { return new Sql(); } - } - - string _sql; - object[] _args; - Sql _rhs; - string _sqlFinal; - object[] _argsFinal; - - private void Build() - { - // already built? - if (_sqlFinal != null) - return; - - // Build it - var sb = new StringBuilder(); - var args = new List(); - Build(sb, args, null); - _sqlFinal = sb.ToString(); - _argsFinal = args.ToArray(); - } - - public string SQL - { - get - { - Build(); - return _sqlFinal; - } - } - - public object[] Arguments - { - get - { - Build(); - return _argsFinal; - } - } - - public Sql Append(Sql sql) - { - if (_rhs != null) - _rhs.Append(sql); - else - _rhs = sql; - - return this; - } - - public Sql Append(string sql, params object[] args) - { - return Append(new Sql(sql, args)); - } - - static bool Is(Sql sql, string sqltype) - { - return sql != null && sql._sql != null && sql._sql.StartsWith(sqltype, StringComparison.InvariantCultureIgnoreCase); - } - - private void Build(StringBuilder sb, List args, Sql lhs) - { - if (!String.IsNullOrEmpty(_sql)) - { - // Add SQL to the string - if (sb.Length > 0) - { - sb.Append("\n"); - } - - var sql = Database.ProcessParams(_sql, _args, args); - - if (Is(lhs, "WHERE ") && Is(this, "WHERE ")) - sql = "AND " + sql.Substring(6); - if (Is(lhs, "ORDER BY ") && Is(this, "ORDER BY ")) - sql = ", " + sql.Substring(9); - - sb.Append(sql); - } - - // Now do rhs - if (_rhs != null) - _rhs.Build(sb, args, this); - } - - public Sql Where(string sql, params object[] args) - { - return Append(new Sql("WHERE (" + sql + ")", args)); - } - - public Sql OrderBy(params object[] columns) - { - return Append(new Sql("ORDER BY " + String.Join(", ", (from x in columns select x.ToString()).ToArray()))); - } - - public Sql Select(params object[] columns) - { - return Append(new Sql("SELECT " + String.Join(", ", (from x in columns select x.ToString()).ToArray()))); - } - - public Sql From(params object[] tables) - { - return Append(new Sql("FROM " + String.Join(", ", (from x in tables select x.ToString()).ToArray()))); - } - - public Sql GroupBy(params object[] columns) - { - return Append(new Sql("GROUP BY " + String.Join(", ", (from x in columns select x.ToString()).ToArray()))); - } - - private SqlJoinClause Join(string JoinType, string table) - { - return new SqlJoinClause(Append(new Sql(JoinType + table))); - } - - public SqlJoinClause InnerJoin(string table) { return Join("INNER JOIN ", table); } - public SqlJoinClause LeftJoin(string table) { return Join("LEFT JOIN ", table); } - - public class SqlJoinClause - { - private readonly Sql _sql; - - public SqlJoinClause(Sql sql) - { - _sql = sql; - } - - public Sql On(string onClause, params object[] args) - { - return _sql.Append("ON " + onClause, args); - } - } - } - -} diff --git a/packages/PetaPoco.Core.4.0.2/PetaPoco.Core.4.0.2.nupkg b/packages/PetaPoco.Core.4.0.2/PetaPoco.Core.4.0.2.nupkg deleted file mode 100644 index bbc3f4d60..000000000 Binary files a/packages/PetaPoco.Core.4.0.2/PetaPoco.Core.4.0.2.nupkg and /dev/null differ diff --git a/packages/jQuery.1.5.2/Content/Scripts/jquery-1.5.2.js b/packages/jQuery.1.5.2/Content/Scripts/jquery-1.5.2.js deleted file mode 100644 index ae0234d2b..000000000 --- a/packages/jQuery.1.5.2/Content/Scripts/jquery-1.5.2.js +++ /dev/null @@ -1,8374 +0,0 @@ -/*! - * jQuery JavaScript Library v1.5.2 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Thu Mar 31 15:28:23 2011 -0400 - */ -(function( window, undefined ) { - -// Use the correct document accordingly with window argument (sandbox) -var document = window.document; -var jQuery = (function() { - -// Define a local copy of jQuery -var jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // A central reference to the root jQuery(document) - rootjQuery, - - // A simple way to check for HTML strings or ID strings - // (both of which we optimize for) - quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/, - - // Check if a string has a non-whitespace character in it - rnotwhite = /\S/, - - // Used for trimming whitespace - trimLeft = /^\s+/, - trimRight = /\s+$/, - - // Check for digits - rdigit = /\d/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, - rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - - // Useragent RegExp - rwebkit = /(webkit)[ \/]([\w.]+)/, - ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, - rmsie = /(msie) ([\w.]+)/, - rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, - - // Keep a UserAgent string for use with jQuery.browser - userAgent = navigator.userAgent, - - // For matching the engine and version of the browser - browserMatch, - - // The deferred used on DOM ready - readyList, - - // The ready event handler - DOMContentLoaded, - - // Save a reference to some core methods - toString = Object.prototype.toString, - hasOwn = Object.prototype.hasOwnProperty, - push = Array.prototype.push, - slice = Array.prototype.slice, - trim = String.prototype.trim, - indexOf = Array.prototype.indexOf, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), or $(undefined) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // The body element only exists once, optimize finding it - if ( selector === "body" && !context && document.body ) { - this.context = document; - this[0] = document.body; - this.selector = "body"; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - match = quickExpr.exec( selector ); - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = (context ? context.ownerDocument || context : document); - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - ret = rsingleTag.exec( selector ); - - if ( ret ) { - if ( jQuery.isPlainObject( context ) ) { - selector = [ document.createElement( ret[1] ) ]; - jQuery.fn.attr.call( selector, context, true ); - - } else { - selector = [ doc.createElement( ret[1] ) ]; - } - - } else { - ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); - selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes; - } - - return jQuery.merge( this, selector ); - - // HANDLE: $("#id") - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return (context || rootjQuery).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if (selector.selector !== undefined) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.5.2", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return slice.call( this, 0 ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = this.constructor(); - - if ( jQuery.isArray( elems ) ) { - push.apply( ret, elems ); - - } else { - jQuery.merge( ret, elems ); - } - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + (this.selector ? " " : "") + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Attach the listeners - jQuery.bindReady(); - - // Add the callback - readyList.done( fn ); - - return this; - }, - - eq: function( i ) { - return i === -1 ? - this.slice( i ) : - this.slice( i, +i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ), - "slice", slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - window.$ = _$; - - if ( deep ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - // A third-party is pushing the ready event forwards - if ( wait === true ) { - jQuery.readyWait--; - } - - // Make sure that the DOM is not already loaded - if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger( "ready" ).unbind( "ready" ); - } - } - }, - - bindReady: function() { - if ( readyList ) { - return; - } - - readyList = jQuery._Deferred(); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - return setTimeout( jQuery.ready, 1 ); - } - - // Mozilla, Opera and webkit nightlies currently support this event - if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else if ( document.attachEvent ) { - // ensure firing before onload, - // maybe late but safe also for iframes - document.attachEvent("onreadystatechange", DOMContentLoaded); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var toplevel = false; - - try { - toplevel = window.frameElement == null; - } catch(e) {} - - if ( document.documentElement.doScroll && toplevel ) { - doScrollCheck(); - } - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - // A crude way of determining if an object is a window - isWindow: function( obj ) { - return obj && typeof obj === "object" && "setInterval" in obj; - }, - - isNaN: function( obj ) { - return obj == null || !rdigit.test( obj ) || isNaN( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - for ( var name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw msg; - }, - - parseJSON: function( data ) { - if ( typeof data !== "string" || !data ) { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test(data.replace(rvalidescape, "@") - .replace(rvalidtokens, "]") - .replace(rvalidbraces, "")) ) { - - // Try to use the native JSON parser first - return window.JSON && window.JSON.parse ? - window.JSON.parse( data ) : - (new Function("return " + data))(); - - } else { - jQuery.error( "Invalid JSON: " + data ); - } - }, - - // Cross-browser xml parsing - // (xml & tmp used internally) - parseXML: function( data , xml , tmp ) { - - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - - tmp = xml.documentElement; - - if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) { - jQuery.error( "Invalid XML: " + data ); - } - - return xml; - }, - - noop: function() {}, - - // Evalulates a script in a global context - globalEval: function( data ) { - if ( data && rnotwhite.test(data) ) { - // Inspired by code by Andrea Giammarchi - // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html - var head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement, - script = document.createElement( "script" ); - - if ( jQuery.support.scriptEval() ) { - script.appendChild( document.createTextNode( data ) ); - } else { - script.text = data; - } - - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709). - head.insertBefore( script, head.firstChild ); - head.removeChild( script ); - } - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, - length = object.length, - isObj = length === undefined || jQuery.isFunction(object); - - if ( args ) { - if ( isObj ) { - for ( name in object ) { - if ( callback.apply( object[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( object[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in object ) { - if ( callback.call( object[ name ], name, object[ name ] ) === false ) { - break; - } - } - } else { - for ( var value = object[0]; - i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {} - } - } - - return object; - }, - - // Use native String.trim function wherever possible - trim: trim ? - function( text ) { - return text == null ? - "" : - trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); - }, - - // results is for internal usage only - makeArray: function( array, results ) { - var ret = results || []; - - if ( array != null ) { - // The window, strings (and functions) also have 'length' - // The extra typeof function check is to prevent crashes - // in Safari 2 (See: #3039) - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - var type = jQuery.type(array); - - if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { - push.call( ret, array ); - } else { - jQuery.merge( ret, array ); - } - } - - return ret; - }, - - inArray: function( elem, array ) { - if ( array.indexOf ) { - return array.indexOf( elem ); - } - - for ( var i = 0, length = array.length; i < length; i++ ) { - if ( array[ i ] === elem ) { - return i; - } - } - - return -1; - }, - - merge: function( first, second ) { - var i = first.length, - j = 0; - - if ( typeof second.length === "number" ) { - for ( var l = second.length; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var ret = [], retVal; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( var i = 0, length = elems.length; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var ret = [], value; - - // Go through the array, translating each of the items to their - // new value (or values). - for ( var i = 0, length = elems.length; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - proxy: function( fn, proxy, thisObject ) { - if ( arguments.length === 2 ) { - if ( typeof proxy === "string" ) { - thisObject = fn; - fn = thisObject[ proxy ]; - proxy = undefined; - - } else if ( proxy && !jQuery.isFunction( proxy ) ) { - thisObject = proxy; - proxy = undefined; - } - } - - if ( !proxy && fn ) { - proxy = function() { - return fn.apply( thisObject || this, arguments ); - }; - } - - // Set the guid of unique handler to the same of original handler, so it can be removed - if ( fn ) { - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - } - - // So proxy can be declared as an argument - return proxy; - }, - - // Mutifunctional method to get and set values to a collection - // The value/s can be optionally by executed if its a function - access: function( elems, key, value, exec, fn, pass ) { - var length = elems.length; - - // Setting many attributes - if ( typeof key === "object" ) { - for ( var k in key ) { - jQuery.access( elems, k, key[k], exec, fn, value ); - } - return elems; - } - - // Setting one attribute - if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = !pass && exec && jQuery.isFunction(value); - - for ( var i = 0; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - - return elems; - } - - // Getting an attribute - return length ? fn( elems[0], key ) : undefined; - }, - - now: function() { - return (new Date()).getTime(); - }, - - // Use of jQuery.browser is frowned upon. - // More details: http://docs.jquery.com/Utilities/jQuery.browser - uaMatch: function( ua ) { - ua = ua.toLowerCase(); - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }, - - sub: function() { - function jQuerySubclass( selector, context ) { - return new jQuerySubclass.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySubclass, this ); - jQuerySubclass.superclass = this; - jQuerySubclass.fn = jQuerySubclass.prototype = this(); - jQuerySubclass.fn.constructor = jQuerySubclass; - jQuerySubclass.subclass = this.subclass; - jQuerySubclass.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySubclass) ) { - context = jQuerySubclass(context); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySubclass ); - }; - jQuerySubclass.fn.init.prototype = jQuerySubclass.fn; - var rootjQuerySubclass = jQuerySubclass(document); - return jQuerySubclass; - }, - - browser: {} -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -browserMatch = jQuery.uaMatch( userAgent ); -if ( browserMatch.browser ) { - jQuery.browser[ browserMatch.browser ] = true; - jQuery.browser.version = browserMatch.version; -} - -// Deprecated, use jQuery.browser.webkit instead -if ( jQuery.browser.webkit ) { - jQuery.browser.safari = true; -} - -if ( indexOf ) { - jQuery.inArray = function( elem, array ) { - return indexOf.call( array, elem ); - }; -} - -// IE doesn't match non-breaking spaces with \s -if ( rnotwhite.test( "\xA0" ) ) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); - -// Cleanup functions for the document ready method -if ( document.addEventListener ) { - DOMContentLoaded = function() { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - }; - -} else if ( document.attachEvent ) { - DOMContentLoaded = function() { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( document.readyState === "complete" ) { - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; -} - -// The DOM ready check for Internet Explorer -function doScrollCheck() { - if ( jQuery.isReady ) { - return; - } - - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch(e) { - setTimeout( doScrollCheck, 1 ); - return; - } - - // and execute any waiting functions - jQuery.ready(); -} - -// Expose jQuery to the global object -return jQuery; - -})(); - - -var // Promise methods - promiseMethods = "then done fail isResolved isRejected promise".split( " " ), - // Static reference to slice - sliceDeferred = [].slice; - -jQuery.extend({ - // Create a simple deferred (one callbacks list) - _Deferred: function() { - var // callbacks list - callbacks = [], - // stored [ context , args ] - fired, - // to avoid firing when already doing so - firing, - // flag to know if the deferred has been cancelled - cancelled, - // the deferred itself - deferred = { - - // done( f1, f2, ...) - done: function() { - if ( !cancelled ) { - var args = arguments, - i, - length, - elem, - type, - _fired; - if ( fired ) { - _fired = fired; - fired = 0; - } - for ( i = 0, length = args.length; i < length; i++ ) { - elem = args[ i ]; - type = jQuery.type( elem ); - if ( type === "array" ) { - deferred.done.apply( deferred, elem ); - } else if ( type === "function" ) { - callbacks.push( elem ); - } - } - if ( _fired ) { - deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] ); - } - } - return this; - }, - - // resolve with given context and args - resolveWith: function( context, args ) { - if ( !cancelled && !fired && !firing ) { - // make sure args are available (#8421) - args = args || []; - firing = 1; - try { - while( callbacks[ 0 ] ) { - callbacks.shift().apply( context, args ); - } - } - finally { - fired = [ context, args ]; - firing = 0; - } - } - return this; - }, - - // resolve with this as context and given arguments - resolve: function() { - deferred.resolveWith( this, arguments ); - return this; - }, - - // Has this deferred been resolved? - isResolved: function() { - return !!( firing || fired ); - }, - - // Cancel - cancel: function() { - cancelled = 1; - callbacks = []; - return this; - } - }; - - return deferred; - }, - - // Full fledged deferred (two callbacks list) - Deferred: function( func ) { - var deferred = jQuery._Deferred(), - failDeferred = jQuery._Deferred(), - promise; - // Add errorDeferred methods, then and promise - jQuery.extend( deferred, { - then: function( doneCallbacks, failCallbacks ) { - deferred.done( doneCallbacks ).fail( failCallbacks ); - return this; - }, - fail: failDeferred.done, - rejectWith: failDeferred.resolveWith, - reject: failDeferred.resolve, - isRejected: failDeferred.isResolved, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - if ( obj == null ) { - if ( promise ) { - return promise; - } - promise = obj = {}; - } - var i = promiseMethods.length; - while( i-- ) { - obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ]; - } - return obj; - } - } ); - // Make sure only one callback list will be used - deferred.done( failDeferred.cancel ).fail( deferred.cancel ); - // Unexpose cancel - delete deferred.cancel; - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - return deferred; - }, - - // Deferred helper - when: function( firstParam ) { - var args = arguments, - i = 0, - length = args.length, - count = length, - deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? - firstParam : - jQuery.Deferred(); - function resolveFunc( i ) { - return function( value ) { - args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; - if ( !( --count ) ) { - // Strange bug in FF4: - // Values changed onto the arguments object sometimes end up as undefined values - // outside the $.when method. Cloning the object into a fresh array solves the issue - deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) ); - } - }; - } - if ( length > 1 ) { - for( ; i < length; i++ ) { - if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) { - args[ i ].promise().then( resolveFunc(i), deferred.reject ); - } else { - --count; - } - } - if ( !count ) { - deferred.resolveWith( deferred, args ); - } - } else if ( deferred !== firstParam ) { - deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); - } - return deferred.promise(); - } -}); - - - - -(function() { - - jQuery.support = {}; - - var div = document.createElement("div"); - - div.style.display = "none"; - div.innerHTML = "
a"; - - var all = div.getElementsByTagName("*"), - a = div.getElementsByTagName("a")[0], - select = document.createElement("select"), - opt = select.appendChild( document.createElement("option") ), - input = div.getElementsByTagName("input")[0]; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return; - } - - jQuery.support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: div.firstChild.nodeType === 3, - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText insted) - style: /red/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: a.getAttribute("href") === "/a", - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.55$/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: input.value === "on", - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Will be defined later - deleteExpando: true, - optDisabled: false, - checkClone: false, - noCloneEvent: true, - noCloneChecked: true, - boxModel: null, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableHiddenOffsets: true, - reliableMarginRight: true - }; - - input.checked = true; - jQuery.support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as diabled) - select.disabled = true; - jQuery.support.optDisabled = !opt.disabled; - - var _scriptEval = null; - jQuery.support.scriptEval = function() { - if ( _scriptEval === null ) { - var root = document.documentElement, - script = document.createElement("script"), - id = "script" + jQuery.now(); - - // Make sure that the execution of code works by injecting a script - // tag with appendChild/createTextNode - // (IE doesn't support this, fails, and uses .text instead) - try { - script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); - } catch(e) {} - - root.insertBefore( script, root.firstChild ); - - if ( window[ id ] ) { - _scriptEval = true; - delete window[ id ]; - } else { - _scriptEval = false; - } - - root.removeChild( script ); - } - - return _scriptEval; - }; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - - } catch(e) { - jQuery.support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent("onclick", function click() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - jQuery.support.noCloneEvent = false; - div.detachEvent("onclick", click); - }); - div.cloneNode(true).fireEvent("onclick"); - } - - div = document.createElement("div"); - div.innerHTML = ""; - - var fragment = document.createDocumentFragment(); - fragment.appendChild( div.firstChild ); - - // WebKit doesn't clone checked state correctly in fragments - jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked; - - // Figure out if the W3C box model works as expected - // document.body must exist before we can do this - jQuery(function() { - var div = document.createElement("div"), - body = document.getElementsByTagName("body")[0]; - - // Frameset documents with no body should not run this code - if ( !body ) { - return; - } - - div.style.width = div.style.paddingLeft = "1px"; - body.appendChild( div ); - jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; - - if ( "zoom" in div.style ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.style.display = "inline"; - div.style.zoom = 1; - jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2; - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = ""; - div.innerHTML = "
"; - jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2; - } - - div.innerHTML = "
t
"; - var tds = div.getElementsByTagName("td"); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0; - - tds[0].style.display = ""; - tds[1].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE < 8 fail this test) - jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0; - div.innerHTML = ""; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - if ( document.defaultView && document.defaultView.getComputedStyle ) { - div.style.width = "1px"; - div.style.marginRight = "0"; - jQuery.support.reliableMarginRight = ( parseInt(document.defaultView.getComputedStyle(div, null).marginRight, 10) || 0 ) === 0; - } - - body.removeChild( div ).style.display = "none"; - div = tds = null; - }); - - // Technique from Juriy Zaytsev - // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ - var eventSupported = function( eventName ) { - var el = document.createElement("div"); - eventName = "on" + eventName; - - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( !el.attachEvent ) { - return true; - } - - var isSupported = (eventName in el); - if ( !isSupported ) { - el.setAttribute(eventName, "return;"); - isSupported = typeof el[eventName] === "function"; - } - return isSupported; - }; - - jQuery.support.submitBubbles = eventSupported("submit"); - jQuery.support.changeBubbles = eventSupported("change"); - - // release memory in IE - div = all = a = null; -})(); - - - -var rbrace = /^(?:\{.*\}|\[.*\])$/; - -jQuery.extend({ - cache: {}, - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache, - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ jQuery.expando ] = id = ++jQuery.uuid; - } else { - id = jQuery.expando; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery - // metadata on plain JS objects when the object is serialized using - // JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name); - } else { - cache[ id ] = jQuery.extend(cache[ id ], name); - } - } - - thisCache = cache[ id ]; - - // Internal jQuery data is stored in a separate object inside the object's data - // cache in order to avoid key collisions between internal data and user-defined - // data - if ( pvt ) { - if ( !thisCache[ internalKey ] ) { - thisCache[ internalKey ] = {}; - } - - thisCache = thisCache[ internalKey ]; - } - - if ( data !== undefined ) { - thisCache[ name ] = data; - } - - // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should - // not attempt to inspect the internal events object using jQuery.data, as this - // internal data object is undocumented and subject to change. - if ( name === "events" && !thisCache[name] ) { - return thisCache[ internalKey ] && thisCache[ internalKey ].events; - } - - return getByName ? thisCache[ name ] : thisCache; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var internalKey = jQuery.expando, isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - - // See jQuery.data for more information - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - var thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ]; - - if ( thisCache ) { - delete thisCache[ name ]; - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !isEmptyDataObject(thisCache) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( pvt ) { - delete cache[ id ][ internalKey ]; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject(cache[ id ]) ) { - return; - } - } - - var internalCache = cache[ id ][ internalKey ]; - - // Browsers that fail expando deletion also refuse to delete expandos on - // the window, but it will allow it on all other JS objects; other browsers - // don't care - if ( jQuery.support.deleteExpando || cache != window ) { - delete cache[ id ]; - } else { - cache[ id ] = null; - } - - // We destroyed the entire user cache at once because it's faster than - // iterating through each key, but we need to continue to persist internal - // data if it existed - if ( internalCache ) { - cache[ id ] = {}; - // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery - // metadata on plain JS objects when the object is serialized using - // JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - - cache[ id ][ internalKey ] = internalCache; - - // Otherwise, we need to eliminate the expando on the node to avoid - // false lookups in the cache for entries that no longer exist - } else if ( isNode ) { - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( jQuery.support.deleteExpando ) { - delete elem[ jQuery.expando ]; - } else if ( elem.removeAttribute ) { - elem.removeAttribute( jQuery.expando ); - } else { - elem[ jQuery.expando ] = null; - } - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - if ( elem.nodeName ) { - var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; - - if ( match ) { - return !(match === true || elem.getAttribute("classid") !== match); - } - } - - return true; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var data = null; - - if ( typeof key === "undefined" ) { - if ( this.length ) { - data = jQuery.data( this[0] ); - - if ( this[0].nodeType === 1 ) { - var attr = this[0].attributes, name; - for ( var i = 0, l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = name.substr( 5 ); - dataAttr( this[0], name, data[ name ] ); - } - } - } - } - - return data; - - } else if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - var parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - - if ( value === undefined ) { - data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - - // Try to fetch any internally stored data first - if ( data === undefined && this.length ) { - data = jQuery.data( this[0], key ); - data = dataAttr( this[0], key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - - } else { - return this.each(function() { - var $this = jQuery( this ), - args = [ parts[0], value ]; - - $this.triggerHandler( "setData" + parts[1] + "!", args ); - jQuery.data( this, key, value ); - $this.triggerHandler( "changeData" + parts[1] + "!", args ); - }); - } - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - data = elem.getAttribute( "data-" + key ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - !jQuery.isNaN( data ) ? parseFloat( data ) : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON -// property to be considered empty objects; this property always exists in -// order to make sure JSON.stringify does not expose internal metadata -function isEmptyDataObject( obj ) { - for ( var name in obj ) { - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} - - - - -jQuery.extend({ - queue: function( elem, type, data ) { - if ( !elem ) { - return; - } - - type = (type || "fx") + "queue"; - var q = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( !data ) { - return q || []; - } - - if ( !q || jQuery.isArray(data) ) { - q = jQuery._data( elem, type, jQuery.makeArray(data) ); - - } else { - q.push( data ); - } - - return q; - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(); - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift("inprogress"); - } - - fn.call(elem, function() { - jQuery.dequeue(elem, type); - }); - } - - if ( !queue.length ) { - jQuery.removeData( elem, type + "queue", true ); - } - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - } - - if ( data === undefined ) { - return jQuery.queue( this[0], type ); - } - return this.each(function( i ) { - var queue = jQuery.queue( this, type, data ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; - type = type || "fx"; - - return this.queue( type, function() { - var elem = this; - setTimeout(function() { - jQuery.dequeue( elem, type ); - }, time ); - }); - }, - - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - } -}); - - - - -var rclass = /[\n\t\r]/g, - rspaces = /\s+/, - rreturn = /\r/g, - rspecialurl = /^(?:href|src|style)$/, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea)?$/i, - rradiocheck = /^(?:radio|checkbox)$/i; - -jQuery.props = { - "for": "htmlFor", - "class": "className", - readonly: "readOnly", - maxlength: "maxLength", - cellspacing: "cellSpacing", - rowspan: "rowSpan", - colspan: "colSpan", - tabindex: "tabIndex", - usemap: "useMap", - frameborder: "frameBorder" -}; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.attr ); - }, - - removeAttr: function( name, fn ) { - return this.each(function(){ - jQuery.attr( this, name, "" ); - if ( this.nodeType === 1 ) { - this.removeAttribute( name ); - } - }); - }, - - addClass: function( value ) { - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - self.addClass( value.call(this, i, self.attr("class")) ); - }); - } - - if ( value && typeof value === "string" ) { - var classNames = (value || "").split( rspaces ); - - for ( var i = 0, l = this.length; i < l; i++ ) { - var elem = this[i]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className ) { - elem.className = value; - - } else { - var className = " " + elem.className + " ", - setClass = elem.className; - - for ( var c = 0, cl = classNames.length; c < cl; c++ ) { - if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) { - setClass += " " + classNames[c]; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - self.removeClass( value.call(this, i, self.attr("class")) ); - }); - } - - if ( (value && typeof value === "string") || value === undefined ) { - var classNames = (value || "").split( rspaces ); - - for ( var i = 0, l = this.length; i < l; i++ ) { - var elem = this[i]; - - if ( elem.nodeType === 1 && elem.className ) { - if ( value ) { - var className = (" " + elem.className + " ").replace(rclass, " "); - for ( var c = 0, cl = classNames.length; c < cl; c++ ) { - className = className.replace(" " + classNames[c] + " ", " "); - } - elem.className = jQuery.trim( className ); - - } else { - elem.className = ""; - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function(i) { - var self = jQuery(this); - self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( rspaces ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space seperated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " "; - for ( var i = 0, l = this.length; i < l; i++ ) { - if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - if ( !arguments.length ) { - var elem = this[0]; - - if ( elem ) { - if ( jQuery.nodeName( elem, "option" ) ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - - // We need to handle select boxes special - if ( jQuery.nodeName( elem, "select" ) ) { - var index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery(option).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - } - - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) { - return elem.getAttribute("value") === null ? "on" : elem.value; - } - - // Everything else, we just grab the value - return (elem.value || "").replace(rreturn, ""); - - } - - return undefined; - } - - var isFunction = jQuery.isFunction(value); - - return this.each(function(i) { - var self = jQuery(this), val = value; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call(this, i, self.val()); - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray(val) ) { - val = jQuery.map(val, function (value) { - return value == null ? "" : value + ""; - }); - } - - if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) { - this.checked = jQuery.inArray( self.val(), val ) >= 0; - - } else if ( jQuery.nodeName( this, "select" ) ) { - var values = jQuery.makeArray(val); - - jQuery( "option", this ).each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - this.selectedIndex = -1; - } - - } else { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - attrFn: { - val: true, - css: true, - html: true, - text: true, - data: true, - width: true, - height: true, - offset: true - }, - - attr: function( elem, name, value, pass ) { - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || elem.nodeType === 2 ) { - return undefined; - } - - if ( pass && name in jQuery.attrFn ) { - return jQuery(elem)[name](value); - } - - var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ), - // Whether we are setting (or getting) - set = value !== undefined; - - // Try to normalize/fix the name - name = notxml && jQuery.props[ name ] || name; - - // Only do all the following if this is a node (faster for style) - if ( elem.nodeType === 1 ) { - // These attributes require special treatment - var special = rspecialurl.test( name ); - - // Safari mis-reports the default selected property of an option - // Accessing the parent's selectedIndex property fixes it - if ( name === "selected" && !jQuery.support.optSelected ) { - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - - // If applicable, access the attribute via the DOM 0 way - // 'in' checks fail in Blackberry 4.7 #6931 - if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) { - if ( set ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } - - if ( value === null ) { - if ( elem.nodeType === 1 ) { - elem.removeAttribute( name ); - } - - } else { - elem[ name ] = value; - } - } - - // browsers index elements by id/name on forms, give priority to attributes. - if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) { - return elem.getAttributeNode( name ).nodeValue; - } - - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - if ( name === "tabIndex" ) { - var attributeNode = elem.getAttributeNode( "tabIndex" ); - - return attributeNode && attributeNode.specified ? - attributeNode.value : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - - return elem[ name ]; - } - - if ( !jQuery.support.style && notxml && name === "style" ) { - if ( set ) { - elem.style.cssText = "" + value; - } - - return elem.style.cssText; - } - - if ( set ) { - // convert the value to a string (all browsers do this but IE) see #1070 - elem.setAttribute( name, "" + value ); - } - - // Ensure that missing attributes return undefined - // Blackberry 4.7 returns "" from getAttribute #6938 - if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) { - return undefined; - } - - var attr = !jQuery.support.hrefNormalized && notxml && special ? - // Some attributes require a special call on IE - elem.getAttribute( name, 2 ) : - elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return attr === null ? undefined : attr; - } - // Handle everything which isn't a DOM element node - if ( set ) { - elem[ name ] = value; - } - return elem[ name ]; - } -}); - - - - -var rnamespaces = /\.(.*)$/, - rformElems = /^(?:textarea|input|select)$/i, - rperiod = /\./g, - rspace = / /g, - rescape = /[^\w\s.|`]/g, - fcleanup = function( nm ) { - return nm.replace(rescape, "\\$&"); - }; - -/* - * A number of helper functions used for managing events. - * Many of the ideas behind this code originated from - * Dean Edwards' addEvent library. - */ -jQuery.event = { - - // Bind an event to an element - // Original by Dean Edwards - add: function( elem, types, handler, data ) { - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // TODO :: Use a try/catch until it's safe to pull this out (likely 1.6) - // Minor release fix for bug #8018 - try { - // For whatever reason, IE has trouble passing the window object - // around, causing it to be cloned in the process - if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) { - elem = window; - } - } - catch ( e ) {} - - if ( handler === false ) { - handler = returnFalse; - } else if ( !handler ) { - // Fixes bug #7229. Fix recommended by jdalton - return; - } - - var handleObjIn, handleObj; - - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - } - - // Make sure that the function being executed has a unique ID - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure - var elemData = jQuery._data( elem ); - - // If no elemData is found then we must be trying to bind to one of the - // banned noData elements - if ( !elemData ) { - return; - } - - var events = elemData.events, - eventHandle = elemData.handle; - - if ( !events ) { - elemData.events = events = {}; - } - - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Handle the second event of a trigger and when - // an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.handle.apply( eventHandle.elem, arguments ) : - undefined; - }; - } - - // Add elem as a property of the handle function - // This is to prevent a memory leak with non-native events in IE. - eventHandle.elem = elem; - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = types.split(" "); - - var type, i = 0, namespaces; - - while ( (type = types[ i++ ]) ) { - handleObj = handleObjIn ? - jQuery.extend({}, handleObjIn) : - { handler: handler, data: data }; - - // Namespaced event handlers - if ( type.indexOf(".") > -1 ) { - namespaces = type.split("."); - type = namespaces.shift(); - handleObj.namespace = namespaces.slice(0).sort().join("."); - - } else { - namespaces = []; - handleObj.namespace = ""; - } - - handleObj.type = type; - if ( !handleObj.guid ) { - handleObj.guid = handler.guid; - } - - // Get the current list of functions bound to this event - var handlers = events[ type ], - special = jQuery.event.special[ type ] || {}; - - // Init the event handler queue - if ( !handlers ) { - handlers = events[ type ] = []; - - // Check for a special event handler - // Only use addEventListener/attachEvent if the special - // events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add the function to the element's handler list - handlers.push( handleObj ); - - // Keep track of which events have been used, for global triggering - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, pos ) { - // don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - if ( handler === false ) { - handler = returnFalse; - } - - var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ), - events = elemData && elemData.events; - - if ( !elemData || !events ) { - return; - } - - // types is actually an event object here - if ( types && types.type ) { - handler = types.handler; - types = types.type; - } - - // Unbind all events for the element - if ( !types || typeof types === "string" && types.charAt(0) === "." ) { - types = types || ""; - - for ( type in events ) { - jQuery.event.remove( elem, type + types ); - } - - return; - } - - // Handle multiple events separated by a space - // jQuery(...).unbind("mouseover mouseout", fn); - types = types.split(" "); - - while ( (type = types[ i++ ]) ) { - origType = type; - handleObj = null; - all = type.indexOf(".") < 0; - namespaces = []; - - if ( !all ) { - // Namespaced event handlers - namespaces = type.split("."); - type = namespaces.shift(); - - namespace = new RegExp("(^|\\.)" + - jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); - } - - eventType = events[ type ]; - - if ( !eventType ) { - continue; - } - - if ( !handler ) { - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( all || namespace.test( handleObj.namespace ) ) { - jQuery.event.remove( elem, origType, handleObj.handler, j ); - eventType.splice( j--, 1 ); - } - } - - continue; - } - - special = jQuery.event.special[ type ] || {}; - - for ( j = pos || 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( handler.guid === handleObj.guid ) { - // remove the given handler for the given type - if ( all || namespace.test( handleObj.namespace ) ) { - if ( pos == null ) { - eventType.splice( j--, 1 ); - } - - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - - if ( pos != null ) { - break; - } - } - } - - // remove generic event handler if no more handlers exist - if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { - if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - ret = null; - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - var handle = elemData.handle; - if ( handle ) { - handle.elem = null; - } - - delete elemData.events; - delete elemData.handle; - - if ( jQuery.isEmptyObject( elemData ) ) { - jQuery.removeData( elem, undefined, true ); - } - } - }, - - // bubbling is internal - trigger: function( event, data, elem /*, bubbling */ ) { - // Event object or event type - var type = event.type || event, - bubbling = arguments[3]; - - if ( !bubbling ) { - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - jQuery.extend( jQuery.Event(type), event ) : - // Just the event type (string) - jQuery.Event(type); - - if ( type.indexOf("!") >= 0 ) { - event.type = type = type.slice(0, -1); - event.exclusive = true; - } - - // Handle a global trigger - if ( !elem ) { - // Don't bubble custom events when global (to avoid too much overhead) - event.stopPropagation(); - - // Only trigger if we've ever bound an event for it - if ( jQuery.event.global[ type ] ) { - // XXX This code smells terrible. event.js should not be directly - // inspecting the data cache - jQuery.each( jQuery.cache, function() { - // internalKey variable is just used to make it easier to find - // and potentially change this stuff later; currently it just - // points to jQuery.expando - var internalKey = jQuery.expando, - internalCache = this[ internalKey ]; - if ( internalCache && internalCache.events && internalCache.events[ type ] ) { - jQuery.event.trigger( event, data, internalCache.handle.elem ); - } - }); - } - } - - // Handle triggering a single element - - // don't do events on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { - return undefined; - } - - // Clean up in case it is reused - event.result = undefined; - event.target = elem; - - // Clone the incoming data, if any - data = jQuery.makeArray( data ); - data.unshift( event ); - } - - event.currentTarget = elem; - - // Trigger the event, it is assumed that "handle" is a function - var handle = jQuery._data( elem, "handle" ); - - if ( handle ) { - handle.apply( elem, data ); - } - - var parent = elem.parentNode || elem.ownerDocument; - - // Trigger an inline bound script - try { - if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) { - if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) { - event.result = false; - event.preventDefault(); - } - } - - // prevent IE from throwing an error for some elements with some event types, see #3533 - } catch (inlineError) {} - - if ( !event.isPropagationStopped() && parent ) { - jQuery.event.trigger( event, data, parent, true ); - - } else if ( !event.isDefaultPrevented() ) { - var old, - target = event.target, - targetType = type.replace( rnamespaces, "" ), - isClick = jQuery.nodeName( target, "a" ) && targetType === "click", - special = jQuery.event.special[ targetType ] || {}; - - if ( (!special._default || special._default.call( elem, event ) === false) && - !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) { - - try { - if ( target[ targetType ] ) { - // Make sure that we don't accidentally re-trigger the onFOO events - old = target[ "on" + targetType ]; - - if ( old ) { - target[ "on" + targetType ] = null; - } - - jQuery.event.triggered = event.type; - target[ targetType ](); - } - - // prevent IE from throwing an error for some elements with some event types, see #3533 - } catch (triggerError) {} - - if ( old ) { - target[ "on" + targetType ] = old; - } - - jQuery.event.triggered = undefined; - } - } - }, - - handle: function( event ) { - var all, handlers, namespaces, namespace_re, events, - namespace_sort = [], - args = jQuery.makeArray( arguments ); - - event = args[0] = jQuery.event.fix( event || window.event ); - event.currentTarget = this; - - // Namespaced event handlers - all = event.type.indexOf(".") < 0 && !event.exclusive; - - if ( !all ) { - namespaces = event.type.split("."); - event.type = namespaces.shift(); - namespace_sort = namespaces.slice(0).sort(); - namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)"); - } - - event.namespace = event.namespace || namespace_sort.join("."); - - events = jQuery._data(this, "events"); - - handlers = (events || {})[ event.type ]; - - if ( events && handlers ) { - // Clone the handlers to prevent manipulation - handlers = handlers.slice(0); - - for ( var j = 0, l = handlers.length; j < l; j++ ) { - var handleObj = handlers[ j ]; - - // Filter the functions by class - if ( all || namespace_re.test( handleObj.namespace ) ) { - // Pass in a reference to the handler function itself - // So that we can later remove it - event.handler = handleObj.handler; - event.data = handleObj.data; - event.handleObj = handleObj; - - var ret = handleObj.handler.apply( this, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - - if ( event.isImmediatePropagationStopped() ) { - break; - } - } - } - } - - return event.result; - }, - - props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // store a copy of the original event object - // and "clone" to set read-only properties - var originalEvent = event; - event = jQuery.Event( originalEvent ); - - for ( var i = this.props.length, prop; i; ) { - prop = this.props[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary - if ( !event.target ) { - // Fixes #1925 where srcElement might not be defined either - event.target = event.srcElement || document; - } - - // check if target is a textnode (safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && event.fromElement ) { - event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; - } - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && event.clientX != null ) { - var doc = document.documentElement, - body = document.body; - - event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); - event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); - } - - // Add which for key events - if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { - event.which = event.charCode != null ? event.charCode : event.keyCode; - } - - // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) - if ( !event.metaKey && event.ctrlKey ) { - event.metaKey = event.ctrlKey; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && event.button !== undefined ) { - event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); - } - - return event; - }, - - // Deprecated, use jQuery.guid instead - guid: 1E8, - - // Deprecated, use jQuery.proxy instead - proxy: jQuery.proxy, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady, - teardown: jQuery.noop - }, - - live: { - add: function( handleObj ) { - jQuery.event.add( this, - liveConvert( handleObj.origType, handleObj.selector ), - jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); - }, - - remove: function( handleObj ) { - jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); - } - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - if ( elem.detachEvent ) { - elem.detachEvent( "on" + type, handle ); - } - }; - -jQuery.Event = function( src ) { - // Allow instantiation without the 'new' keyword - if ( !this.preventDefault ) { - return new jQuery.Event( src ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // timeStamp is buggy for some events on Firefox(#3843) - // So we won't rely on the native value - this.timeStamp = jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Checks if an event happened on an element within another element -// Used in jQuery.event.special.mouseenter and mouseleave handlers -var withinElement = function( event ) { - // Check if mouse(over|out) are still within the same parent element - var parent = event.relatedTarget; - - // Firefox sometimes assigns relatedTarget a XUL element - // which we cannot access the parentNode property of - try { - - // Chrome does something similar, the parentNode property - // can be accessed but is null. - if ( parent && parent !== document && !parent.parentNode ) { - return; - } - // Traverse up the tree - while ( parent && parent !== this ) { - parent = parent.parentNode; - } - - if ( parent !== this ) { - // set the correct event type - event.type = event.data; - - // handle event if we actually just moused on to a non sub-element - jQuery.event.handle.apply( this, arguments ); - } - - // assuming we've left the element since we most likely mousedover a xul element - } catch(e) { } -}, - -// In case of event delegation, we only need to rename the event.type, -// liveHandler will take care of the rest. -delegate = function( event ) { - event.type = event.data; - jQuery.event.handle.apply( this, arguments ); -}; - -// Create mouseenter and mouseleave events -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - setup: function( data ) { - jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); - }, - teardown: function( data ) { - jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); - } - }; -}); - -// submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function( data, namespaces ) { - if ( this.nodeName && this.nodeName.toLowerCase() !== "form" ) { - jQuery.event.add(this, "click.specialSubmit", function( e ) { - var elem = e.target, - type = elem.type; - - if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { - trigger( "submit", this, arguments ); - } - }); - - jQuery.event.add(this, "keypress.specialSubmit", function( e ) { - var elem = e.target, - type = elem.type; - - if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { - trigger( "submit", this, arguments ); - } - }); - - } else { - return false; - } - }, - - teardown: function( namespaces ) { - jQuery.event.remove( this, ".specialSubmit" ); - } - }; - -} - -// change delegation, happens here so we have bind. -if ( !jQuery.support.changeBubbles ) { - - var changeFilters, - - getVal = function( elem ) { - var type = elem.type, val = elem.value; - - if ( type === "radio" || type === "checkbox" ) { - val = elem.checked; - - } else if ( type === "select-multiple" ) { - val = elem.selectedIndex > -1 ? - jQuery.map( elem.options, function( elem ) { - return elem.selected; - }).join("-") : - ""; - - } else if ( elem.nodeName.toLowerCase() === "select" ) { - val = elem.selectedIndex; - } - - return val; - }, - - testChange = function testChange( e ) { - var elem = e.target, data, val; - - if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { - return; - } - - data = jQuery._data( elem, "_change_data" ); - val = getVal(elem); - - // the current data will be also retrieved by beforeactivate - if ( e.type !== "focusout" || elem.type !== "radio" ) { - jQuery._data( elem, "_change_data", val ); - } - - if ( data === undefined || val === data ) { - return; - } - - if ( data != null || val ) { - e.type = "change"; - e.liveFired = undefined; - jQuery.event.trigger( e, arguments[1], elem ); - } - }; - - jQuery.event.special.change = { - filters: { - focusout: testChange, - - beforedeactivate: testChange, - - click: function( e ) { - var elem = e.target, type = elem.type; - - if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) { - testChange.call( this, e ); - } - }, - - // Change has to be called before submit - // Keydown will be called before keypress, which is used in submit-event delegation - keydown: function( e ) { - var elem = e.target, type = elem.type; - - if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") || - (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || - type === "select-multiple" ) { - testChange.call( this, e ); - } - }, - - // Beforeactivate happens also before the previous element is blurred - // with this event you can't trigger a change event, but you can store - // information - beforeactivate: function( e ) { - var elem = e.target; - jQuery._data( elem, "_change_data", getVal(elem) ); - } - }, - - setup: function( data, namespaces ) { - if ( this.type === "file" ) { - return false; - } - - for ( var type in changeFilters ) { - jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); - } - - return rformElems.test( this.nodeName ); - }, - - teardown: function( namespaces ) { - jQuery.event.remove( this, ".specialChange" ); - - return rformElems.test( this.nodeName ); - } - }; - - changeFilters = jQuery.event.special.change.filters; - - // Handle when the input is .focus()'d - changeFilters.focus = changeFilters.beforeactivate; -} - -function trigger( type, elem, args ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - // Don't pass args or remember liveFired; they apply to the donor event. - var event = jQuery.extend( {}, args[ 0 ] ); - event.type = type; - event.originalEvent = {}; - event.liveFired = undefined; - jQuery.event.handle.call( elem, event ); - if ( event.isDefaultPrevented() ) { - args[ 0 ].preventDefault(); - } -} - -// Create "bubbling" focus and blur events -if ( document.addEventListener ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - - function handler( donor ) { - // Donor event is always a native one; fix it and switch its type. - // Let focusin/out handler cancel the donor focus/blur event. - var e = jQuery.event.fix( donor ); - e.type = fix; - e.originalEvent = {}; - jQuery.event.trigger( e, null, e.target ); - if ( e.isDefaultPrevented() ) { - donor.preventDefault(); - } - } - }); -} - -jQuery.each(["bind", "one"], function( i, name ) { - jQuery.fn[ name ] = function( type, data, fn ) { - // Handle object literals - if ( typeof type === "object" ) { - for ( var key in type ) { - this[ name ](key, data, type[key], fn); - } - return this; - } - - if ( jQuery.isFunction( data ) || data === false ) { - fn = data; - data = undefined; - } - - var handler = name === "one" ? jQuery.proxy( fn, function( event ) { - jQuery( this ).unbind( event, handler ); - return fn.apply( this, arguments ); - }) : fn; - - if ( type === "unload" && name !== "one" ) { - this.one( type, data, fn ); - - } else { - for ( var i = 0, l = this.length; i < l; i++ ) { - jQuery.event.add( this[i], type, handler, data ); - } - } - - return this; - }; -}); - -jQuery.fn.extend({ - unbind: function( type, fn ) { - // Handle object literals - if ( typeof type === "object" && !type.preventDefault ) { - for ( var key in type ) { - this.unbind(key, type[key]); - } - - } else { - for ( var i = 0, l = this.length; i < l; i++ ) { - jQuery.event.remove( this[i], type, fn ); - } - } - - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.live( types, data, fn, selector ); - }, - - undelegate: function( selector, types, fn ) { - if ( arguments.length === 0 ) { - return this.unbind( "live" ); - - } else { - return this.die( types, null, fn, selector ); - } - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - - triggerHandler: function( type, data ) { - if ( this[0] ) { - var event = jQuery.Event( type ); - event.preventDefault(); - event.stopPropagation(); - jQuery.event.trigger( event, data, this[0] ); - return event.result; - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - i = 1; - - // link all the functions, so any of them can unbind this click handler - while ( i < args.length ) { - jQuery.proxy( fn, args[ i++ ] ); - } - - return this.click( jQuery.proxy( fn, function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - })); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -var liveMap = { - focus: "focusin", - blur: "focusout", - mouseenter: "mouseover", - mouseleave: "mouseout" -}; - -jQuery.each(["live", "die"], function( i, name ) { - jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { - var type, i = 0, match, namespaces, preType, - selector = origSelector || this.selector, - context = origSelector ? this : jQuery( this.context ); - - if ( typeof types === "object" && !types.preventDefault ) { - for ( var key in types ) { - context[ name ]( key, data, types[key], selector ); - } - - return this; - } - - if ( jQuery.isFunction( data ) ) { - fn = data; - data = undefined; - } - - types = (types || "").split(" "); - - while ( (type = types[ i++ ]) != null ) { - match = rnamespaces.exec( type ); - namespaces = ""; - - if ( match ) { - namespaces = match[0]; - type = type.replace( rnamespaces, "" ); - } - - if ( type === "hover" ) { - types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); - continue; - } - - preType = type; - - if ( type === "focus" || type === "blur" ) { - types.push( liveMap[ type ] + namespaces ); - type = type + namespaces; - - } else { - type = (liveMap[ type ] || type) + namespaces; - } - - if ( name === "live" ) { - // bind live handler - for ( var j = 0, l = context.length; j < l; j++ ) { - jQuery.event.add( context[j], "live." + liveConvert( type, selector ), - { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); - } - - } else { - // unbind live handler - context.unbind( "live." + liveConvert( type, selector ), fn ); - } - } - - return this; - }; -}); - -function liveHandler( event ) { - var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, - elems = [], - selectors = [], - events = jQuery._data( this, "events" ); - - // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911) - if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) { - return; - } - - if ( event.namespace ) { - namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); - } - - event.liveFired = this; - - var live = events.live.slice(0); - - for ( j = 0; j < live.length; j++ ) { - handleObj = live[j]; - - if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { - selectors.push( handleObj.selector ); - - } else { - live.splice( j--, 1 ); - } - } - - match = jQuery( event.target ).closest( selectors, event.currentTarget ); - - for ( i = 0, l = match.length; i < l; i++ ) { - close = match[i]; - - for ( j = 0; j < live.length; j++ ) { - handleObj = live[j]; - - if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) { - elem = close.elem; - related = null; - - // Those two events require additional checking - if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { - event.type = handleObj.preType; - related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; - } - - if ( !related || related !== elem ) { - elems.push({ elem: elem, handleObj: handleObj, level: close.level }); - } - } - } - } - - for ( i = 0, l = elems.length; i < l; i++ ) { - match = elems[i]; - - if ( maxLevel && match.level > maxLevel ) { - break; - } - - event.currentTarget = match.elem; - event.data = match.handleObj.data; - event.handleObj = match.handleObj; - - ret = match.handleObj.origHandler.apply( match.elem, arguments ); - - if ( ret === false || event.isPropagationStopped() ) { - maxLevel = match.level; - - if ( ret === false ) { - stop = false; - } - if ( event.isImmediatePropagationStopped() ) { - break; - } - } - } - - return stop; -} - -function liveConvert( type, selector ) { - return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&"); -} - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.bind( name, data, fn ) : - this.trigger( name ); - }; - - if ( jQuery.attrFn ) { - jQuery.attrFn[ name ] = true; - } -}); - - -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){ - -var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, - done = 0, - toString = Object.prototype.toString, - hasDuplicate = false, - baseHasDuplicate = true, - rBackslash = /\\/g, - rNonWord = /\W/; - -// Here we check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - baseHasDuplicate = false; - return 0; -}); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - - var origContext = context; - - if ( context.nodeType !== 1 && context.nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - var m, set, checkSet, extra, ret, cur, pop, i, - prune = true, - contextXML = Sizzle.isXML( context ), - parts = [], - soFar = selector; - - // Reset the position of the chunker regexp (start from head) - do { - chunker.exec( "" ); - m = chunker.exec( soFar ); - - if ( m ) { - soFar = m[3]; - - parts.push( m[1] ); - - if ( m[2] ) { - extra = m[3]; - break; - } - } - } while ( m ); - - if ( parts.length > 1 && origPOS.exec( selector ) ) { - - if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { - set = posProcess( parts[0] + parts[1], context ); - - } else { - set = Expr.relative[ parts[0] ] ? - [ context ] : - Sizzle( parts.shift(), context ); - - while ( parts.length ) { - selector = parts.shift(); - - if ( Expr.relative[ selector ] ) { - selector += parts.shift(); - } - - set = posProcess( selector, set ); - } - } - - } else { - // Take a shortcut and set the context if the root selector is an ID - // (but not if it'll be faster if the inner selector is an ID) - if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && - Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { - - ret = Sizzle.find( parts.shift(), context, contextXML ); - context = ret.expr ? - Sizzle.filter( ret.expr, ret.set )[0] : - ret.set[0]; - } - - if ( context ) { - ret = seed ? - { expr: parts.pop(), set: makeArray(seed) } : - Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); - - set = ret.expr ? - Sizzle.filter( ret.expr, ret.set ) : - ret.set; - - if ( parts.length > 0 ) { - checkSet = makeArray( set ); - - } else { - prune = false; - } - - while ( parts.length ) { - cur = parts.pop(); - pop = cur; - - if ( !Expr.relative[ cur ] ) { - cur = ""; - } else { - pop = parts.pop(); - } - - if ( pop == null ) { - pop = context; - } - - Expr.relative[ cur ]( checkSet, pop, contextXML ); - } - - } else { - checkSet = parts = []; - } - } - - if ( !checkSet ) { - checkSet = set; - } - - if ( !checkSet ) { - Sizzle.error( cur || selector ); - } - - if ( toString.call(checkSet) === "[object Array]" ) { - if ( !prune ) { - results.push.apply( results, checkSet ); - - } else if ( context && context.nodeType === 1 ) { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { - results.push( set[i] ); - } - } - - } else { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && checkSet[i].nodeType === 1 ) { - results.push( set[i] ); - } - } - } - - } else { - makeArray( checkSet, results ); - } - - if ( extra ) { - Sizzle( extra, origContext, results, seed ); - Sizzle.uniqueSort( results ); - } - - return results; -}; - -Sizzle.uniqueSort = function( results ) { - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( var i = 1; i < results.length; i++ ) { - if ( results[i] === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -Sizzle.matches = function( expr, set ) { - return Sizzle( expr, null, null, set ); -}; - -Sizzle.matchesSelector = function( node, expr ) { - return Sizzle( expr, null, null, [node] ).length > 0; -}; - -Sizzle.find = function( expr, context, isXML ) { - var set; - - if ( !expr ) { - return []; - } - - for ( var i = 0, l = Expr.order.length; i < l; i++ ) { - var match, - type = Expr.order[i]; - - if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { - var left = match[1]; - match.splice( 1, 1 ); - - if ( left.substr( left.length - 1 ) !== "\\" ) { - match[1] = (match[1] || "").replace( rBackslash, "" ); - set = Expr.find[ type ]( match, context, isXML ); - - if ( set != null ) { - expr = expr.replace( Expr.match[ type ], "" ); - break; - } - } - } - } - - if ( !set ) { - set = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( "*" ) : - []; - } - - return { set: set, expr: expr }; -}; - -Sizzle.filter = function( expr, set, inplace, not ) { - var match, anyFound, - old = expr, - result = [], - curLoop = set, - isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); - - while ( expr && set.length ) { - for ( var type in Expr.filter ) { - if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { - var found, item, - filter = Expr.filter[ type ], - left = match[1]; - - anyFound = false; - - match.splice(1,1); - - if ( left.substr( left.length - 1 ) === "\\" ) { - continue; - } - - if ( curLoop === result ) { - result = []; - } - - if ( Expr.preFilter[ type ] ) { - match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); - - if ( !match ) { - anyFound = found = true; - - } else if ( match === true ) { - continue; - } - } - - if ( match ) { - for ( var i = 0; (item = curLoop[i]) != null; i++ ) { - if ( item ) { - found = filter( item, match, i, curLoop ); - var pass = not ^ !!found; - - if ( inplace && found != null ) { - if ( pass ) { - anyFound = true; - - } else { - curLoop[i] = false; - } - - } else if ( pass ) { - result.push( item ); - anyFound = true; - } - } - } - } - - if ( found !== undefined ) { - if ( !inplace ) { - curLoop = result; - } - - expr = expr.replace( Expr.match[ type ], "" ); - - if ( !anyFound ) { - return []; - } - - break; - } - } - } - - // Improper expression - if ( expr === old ) { - if ( anyFound == null ) { - Sizzle.error( expr ); - - } else { - break; - } - } - - old = expr; - } - - return curLoop; -}; - -Sizzle.error = function( msg ) { - throw "Syntax error, unrecognized expression: " + msg; -}; - -var Expr = Sizzle.selectors = { - order: [ "ID", "NAME", "TAG" ], - - match: { - ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, - ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, - TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, - CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, - POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, - PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ - }, - - leftMatch: {}, - - attrMap: { - "class": "className", - "for": "htmlFor" - }, - - attrHandle: { - href: function( elem ) { - return elem.getAttribute( "href" ); - }, - type: function( elem ) { - return elem.getAttribute( "type" ); - } - }, - - relative: { - "+": function(checkSet, part){ - var isPartStr = typeof part === "string", - isTag = isPartStr && !rNonWord.test( part ), - isPartStrNotTag = isPartStr && !isTag; - - if ( isTag ) { - part = part.toLowerCase(); - } - - for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { - if ( (elem = checkSet[i]) ) { - while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} - - checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? - elem || false : - elem === part; - } - } - - if ( isPartStrNotTag ) { - Sizzle.filter( part, checkSet, true ); - } - }, - - ">": function( checkSet, part ) { - var elem, - isPartStr = typeof part === "string", - i = 0, - l = checkSet.length; - - if ( isPartStr && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - var parent = elem.parentNode; - checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; - } - } - - } else { - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - checkSet[i] = isPartStr ? - elem.parentNode : - elem.parentNode === part; - } - } - - if ( isPartStr ) { - Sizzle.filter( part, checkSet, true ); - } - } - }, - - "": function(checkSet, part, isXML){ - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); - }, - - "~": function( checkSet, part, isXML ) { - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); - } - }, - - find: { - ID: function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }, - - NAME: function( match, context ) { - if ( typeof context.getElementsByName !== "undefined" ) { - var ret = [], - results = context.getElementsByName( match[1] ); - - for ( var i = 0, l = results.length; i < l; i++ ) { - if ( results[i].getAttribute("name") === match[1] ) { - ret.push( results[i] ); - } - } - - return ret.length === 0 ? null : ret; - } - }, - - TAG: function( match, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( match[1] ); - } - } - }, - preFilter: { - CLASS: function( match, curLoop, inplace, result, not, isXML ) { - match = " " + match[1].replace( rBackslash, "" ) + " "; - - if ( isXML ) { - return match; - } - - for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { - if ( elem ) { - if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { - if ( !inplace ) { - result.push( elem ); - } - - } else if ( inplace ) { - curLoop[i] = false; - } - } - } - - return false; - }, - - ID: function( match ) { - return match[1].replace( rBackslash, "" ); - }, - - TAG: function( match, curLoop ) { - return match[1].replace( rBackslash, "" ).toLowerCase(); - }, - - CHILD: function( match ) { - if ( match[1] === "nth" ) { - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - match[2] = match[2].replace(/^\+|\s*/g, ''); - - // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' - var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( - match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || - !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); - - // calculate the numbers (first)n+(last) including if they are negative - match[2] = (test[1] + (test[2] || 1)) - 0; - match[3] = test[3] - 0; - } - else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - // TODO: Move to normal caching system - match[0] = done++; - - return match; - }, - - ATTR: function( match, curLoop, inplace, result, not, isXML ) { - var name = match[1] = match[1].replace( rBackslash, "" ); - - if ( !isXML && Expr.attrMap[name] ) { - match[1] = Expr.attrMap[name]; - } - - // Handle if an un-quoted value was used - match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); - - if ( match[2] === "~=" ) { - match[4] = " " + match[4] + " "; - } - - return match; - }, - - PSEUDO: function( match, curLoop, inplace, result, not ) { - if ( match[1] === "not" ) { - // If we're dealing with a complex expression, or a simple one - if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { - match[3] = Sizzle(match[3], null, null, curLoop); - - } else { - var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); - - if ( !inplace ) { - result.push.apply( result, ret ); - } - - return false; - } - - } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { - return true; - } - - return match; - }, - - POS: function( match ) { - match.unshift( true ); - - return match; - } - }, - - filters: { - enabled: function( elem ) { - return elem.disabled === false && elem.type !== "hidden"; - }, - - disabled: function( elem ) { - return elem.disabled === true; - }, - - checked: function( elem ) { - return elem.checked === true; - }, - - selected: function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - parent: function( elem ) { - return !!elem.firstChild; - }, - - empty: function( elem ) { - return !elem.firstChild; - }, - - has: function( elem, i, match ) { - return !!Sizzle( match[3], elem ).length; - }, - - header: function( elem ) { - return (/h\d/i).test( elem.nodeName ); - }, - - text: function( elem ) { - var attr = elem.getAttribute( "type" ), type = elem.type; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return "text" === type && ( attr === type || attr === null ); - }, - - radio: function( elem ) { - return "radio" === elem.type; - }, - - checkbox: function( elem ) { - return "checkbox" === elem.type; - }, - - file: function( elem ) { - return "file" === elem.type; - }, - password: function( elem ) { - return "password" === elem.type; - }, - - submit: function( elem ) { - return "submit" === elem.type; - }, - - image: function( elem ) { - return "image" === elem.type; - }, - - reset: function( elem ) { - return "reset" === elem.type; - }, - - button: function( elem ) { - return "button" === elem.type || elem.nodeName.toLowerCase() === "button"; - }, - - input: function( elem ) { - return (/input|select|textarea|button/i).test( elem.nodeName ); - } - }, - setFilters: { - first: function( elem, i ) { - return i === 0; - }, - - last: function( elem, i, match, array ) { - return i === array.length - 1; - }, - - even: function( elem, i ) { - return i % 2 === 0; - }, - - odd: function( elem, i ) { - return i % 2 === 1; - }, - - lt: function( elem, i, match ) { - return i < match[3] - 0; - }, - - gt: function( elem, i, match ) { - return i > match[3] - 0; - }, - - nth: function( elem, i, match ) { - return match[3] - 0 === i; - }, - - eq: function( elem, i, match ) { - return match[3] - 0 === i; - } - }, - filter: { - PSEUDO: function( elem, match, i, array ) { - var name = match[1], - filter = Expr.filters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - - } else if ( name === "contains" ) { - return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; - - } else if ( name === "not" ) { - var not = match[3]; - - for ( var j = 0, l = not.length; j < l; j++ ) { - if ( not[j] === elem ) { - return false; - } - } - - return true; - - } else { - Sizzle.error( name ); - } - }, - - CHILD: function( elem, match ) { - var type = match[1], - node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - - case "nth": - var first = match[2], - last = match[3]; - - if ( first === 1 && last === 0 ) { - return true; - } - - var doneName = match[0], - parent = elem.parentNode; - - if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { - var count = 0; - - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.nodeIndex = ++count; - } - } - - parent.sizcache = doneName; - } - - var diff = elem.nodeIndex - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - } - }, - - ID: function( elem, match ) { - return elem.nodeType === 1 && elem.getAttribute("id") === match; - }, - - TAG: function( elem, match ) { - return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; - }, - - CLASS: function( elem, match ) { - return (" " + (elem.className || elem.getAttribute("class")) + " ") - .indexOf( match ) > -1; - }, - - ATTR: function( elem, match ) { - var name = match[1], - result = Expr.attrHandle[ name ] ? - Expr.attrHandle[ name ]( elem ) : - elem[ name ] != null ? - elem[ name ] : - elem.getAttribute( name ), - value = result + "", - type = match[2], - check = match[4]; - - return result == null ? - type === "!=" : - type === "=" ? - value === check : - type === "*=" ? - value.indexOf(check) >= 0 : - type === "~=" ? - (" " + value + " ").indexOf(check) >= 0 : - !check ? - value && result !== false : - type === "!=" ? - value !== check : - type === "^=" ? - value.indexOf(check) === 0 : - type === "$=" ? - value.substr(value.length - check.length) === check : - type === "|=" ? - value === check || value.substr(0, check.length + 1) === check + "-" : - false; - }, - - POS: function( elem, match, i, array ) { - var name = match[2], - filter = Expr.setFilters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - } - } - } -}; - -var origPOS = Expr.match.POS, - fescape = function(all, num){ - return "\\" + (num - 0 + 1); - }; - -for ( var type in Expr.match ) { - Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); - Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); -} - -var makeArray = function( array, results ) { - array = Array.prototype.slice.call( array, 0 ); - - if ( results ) { - results.push.apply( results, array ); - return results; - } - - return array; -}; - -// Perform a simple check to determine if the browser is capable of -// converting a NodeList to an array using builtin methods. -// Also verifies that the returned array holds DOM nodes -// (which is not the case in the Blackberry browser) -try { - Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; - -// Provide a fallback method if it does not work -} catch( e ) { - makeArray = function( array, results ) { - var i = 0, - ret = results || []; - - if ( toString.call(array) === "[object Array]" ) { - Array.prototype.push.apply( ret, array ); - - } else { - if ( typeof array.length === "number" ) { - for ( var l = array.length; i < l; i++ ) { - ret.push( array[i] ); - } - - } else { - for ( ; array[i]; i++ ) { - ret.push( array[i] ); - } - } - } - - return ret; - }; -} - -var sortOrder, siblingCheck; - -if ( document.documentElement.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { - return a.compareDocumentPosition ? -1 : 1; - } - - return a.compareDocumentPosition(b) & 4 ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // If the nodes are siblings (or identical) we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Utility function for retreiving the text value of an array of DOM nodes -Sizzle.getText = function( elems ) { - var ret = "", elem; - - for ( var i = 0; elems[i]; i++ ) { - elem = elems[i]; - - // Get the text from text nodes and CDATA nodes - if ( elem.nodeType === 3 || elem.nodeType === 4 ) { - ret += elem.nodeValue; - - // Traverse everything else, except comment nodes - } else if ( elem.nodeType !== 8 ) { - ret += Sizzle.getText( elem.childNodes ); - } - } - - return ret; -}; - -// Check to see if the browser returns elements by name when -// querying by getElementById (and provide a workaround) -(function(){ - // We're going to inject a fake input element with a specified name - var form = document.createElement("div"), - id = "script" + (new Date()).getTime(), - root = document.documentElement; - - form.innerHTML = ""; - - // Inject it into the root element, check its status, and remove it quickly - root.insertBefore( form, root.firstChild ); - - // The workaround has to do additional checks after a getElementById - // Which slows things down for other browsers (hence the branching) - if ( document.getElementById( id ) ) { - Expr.find.ID = function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - - return m ? - m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? - [m] : - undefined : - []; - } - }; - - Expr.filter.ID = function( elem, match ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - - return elem.nodeType === 1 && node && node.nodeValue === match; - }; - } - - root.removeChild( form ); - - // release memory in IE - root = form = null; -})(); - -(function(){ - // Check to see if the browser returns only elements - // when doing getElementsByTagName("*") - - // Create a fake element - var div = document.createElement("div"); - div.appendChild( document.createComment("") ); - - // Make sure no comments are found - if ( div.getElementsByTagName("*").length > 0 ) { - Expr.find.TAG = function( match, context ) { - var results = context.getElementsByTagName( match[1] ); - - // Filter out possible comments - if ( match[1] === "*" ) { - var tmp = []; - - for ( var i = 0; results[i]; i++ ) { - if ( results[i].nodeType === 1 ) { - tmp.push( results[i] ); - } - } - - results = tmp; - } - - return results; - }; - } - - // Check to see if an attribute returns normalized href attributes - div.innerHTML = ""; - - if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && - div.firstChild.getAttribute("href") !== "#" ) { - - Expr.attrHandle.href = function( elem ) { - return elem.getAttribute( "href", 2 ); - }; - } - - // release memory in IE - div = null; -})(); - -if ( document.querySelectorAll ) { - (function(){ - var oldSizzle = Sizzle, - div = document.createElement("div"), - id = "__sizzle__"; - - div.innerHTML = "

"; - - // Safari can't handle uppercase or unicode characters when - // in quirks mode. - if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { - return; - } - - Sizzle = function( query, context, extra, seed ) { - context = context || document; - - // Only use querySelectorAll on non-XML documents - // (ID selectors don't work in non-HTML documents) - if ( !seed && !Sizzle.isXML(context) ) { - // See if we find a selector to speed up - var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); - - if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { - // Speed-up: Sizzle("TAG") - if ( match[1] ) { - return makeArray( context.getElementsByTagName( query ), extra ); - - // Speed-up: Sizzle(".CLASS") - } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { - return makeArray( context.getElementsByClassName( match[2] ), extra ); - } - } - - if ( context.nodeType === 9 ) { - // Speed-up: Sizzle("body") - // The body element only exists once, optimize finding it - if ( query === "body" && context.body ) { - return makeArray( [ context.body ], extra ); - - // Speed-up: Sizzle("#ID") - } else if ( match && match[3] ) { - var elem = context.getElementById( match[3] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id === match[3] ) { - return makeArray( [ elem ], extra ); - } - - } else { - return makeArray( [], extra ); - } - } - - try { - return makeArray( context.querySelectorAll(query), extra ); - } catch(qsaError) {} - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var oldContext = context, - old = context.getAttribute( "id" ), - nid = old || id, - hasParent = context.parentNode, - relativeHierarchySelector = /^\s*[+~]/.test( query ); - - if ( !old ) { - context.setAttribute( "id", nid ); - } else { - nid = nid.replace( /'/g, "\\$&" ); - } - if ( relativeHierarchySelector && hasParent ) { - context = context.parentNode; - } - - try { - if ( !relativeHierarchySelector || hasParent ) { - return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); - } - - } catch(pseudoError) { - } finally { - if ( !old ) { - oldContext.removeAttribute( "id" ); - } - } - } - } - - return oldSizzle(query, context, extra, seed); - }; - - for ( var prop in oldSizzle ) { - Sizzle[ prop ] = oldSizzle[ prop ]; - } - - // release memory in IE - div = null; - })(); -} - -(function(){ - var html = document.documentElement, - matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; - - if ( matches ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9 fails this) - var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), - pseudoWorks = false; - - try { - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( document.documentElement, "[test!='']:sizzle" ); - - } catch( pseudoError ) { - pseudoWorks = true; - } - - Sizzle.matchesSelector = function( node, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - - if ( !Sizzle.isXML( node ) ) { - try { - if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { - var ret = matches.call( node, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || !disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9, so check for that - node.document && node.document.nodeType !== 11 ) { - return ret; - } - } - } catch(e) {} - } - - return Sizzle(expr, null, null, [node]).length > 0; - }; - } -})(); - -(function(){ - var div = document.createElement("div"); - - div.innerHTML = "
"; - - // Opera can't find a second classname (in 9.6) - // Also, make sure that getElementsByClassName actually exists - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - - if ( div.getElementsByClassName("e").length === 1 ) { - return; - } - - Expr.order.splice(1, 0, "CLASS"); - Expr.find.CLASS = function( match, context, isXML ) { - if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { - return context.getElementsByClassName(match[1]); - } - }; - - // release memory in IE - div = null; -})(); - -function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem.sizcache === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 && !isXML ){ - elem.sizcache = doneName; - elem.sizset = i; - } - - if ( elem.nodeName.toLowerCase() === cur ) { - match = elem; - break; - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem.sizcache === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 ) { - if ( !isXML ) { - elem.sizcache = doneName; - elem.sizset = i; - } - - if ( typeof cur !== "string" ) { - if ( elem === cur ) { - match = true; - break; - } - - } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { - match = elem; - break; - } - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -if ( document.documentElement.contains ) { - Sizzle.contains = function( a, b ) { - return a !== b && (a.contains ? a.contains(b) : true); - }; - -} else if ( document.documentElement.compareDocumentPosition ) { - Sizzle.contains = function( a, b ) { - return !!(a.compareDocumentPosition(b) & 16); - }; - -} else { - Sizzle.contains = function() { - return false; - }; -} - -Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; - - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -var posProcess = function( selector, context ) { - var match, - tmpSet = [], - later = "", - root = context.nodeType ? [context] : context; - - // Position selectors must be done after the filter - // And so must :not(positional) so we move all PSEUDOs to the end - while ( (match = Expr.match.PSEUDO.exec( selector )) ) { - later += match[0]; - selector = selector.replace( Expr.match.PSEUDO, "" ); - } - - selector = Expr.relative[selector] ? selector + "*" : selector; - - for ( var i = 0, l = root.length; i < l; i++ ) { - Sizzle( selector, root[i], tmpSet ); - } - - return Sizzle.filter( later, tmpSet ); -}; - -// EXPOSE -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.filters; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})(); - - -var runtil = /Until$/, - rparentsprev = /^(?:parents|prevUntil|prevAll)/, - // Note: This RegExp should be improved, or likely pulled from Sizzle - rmultiselector = /,/, - isSimple = /^.[^:#\[\.,]*$/, - slice = Array.prototype.slice, - POS = jQuery.expr.match.POS, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var ret = this.pushStack( "", "find", selector ), - length = 0; - - for ( var i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( var n = length; n < ret.length; n++ ) { - for ( var r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var targets = jQuery( target ); - return this.filter(function() { - for ( var i = 0, l = targets.length; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && jQuery.filter( selector, this ).length > 0; - }, - - closest: function( selectors, context ) { - var ret = [], i, l, cur = this[0]; - - if ( jQuery.isArray( selectors ) ) { - var match, selector, - matches = {}, - level = 1; - - if ( cur && selectors.length ) { - for ( i = 0, l = selectors.length; i < l; i++ ) { - selector = selectors[i]; - - if ( !matches[selector] ) { - matches[selector] = jQuery.expr.match.POS.test( selector ) ? - jQuery( selector, context || this.context ) : - selector; - } - } - - while ( cur && cur.ownerDocument && cur !== context ) { - for ( selector in matches ) { - match = matches[selector]; - - if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) { - ret.push({ selector: selector, elem: cur, level: level }); - } - } - - cur = cur.parentNode; - level++; - } - } - - return ret; - } - - var pos = POS.test( selectors ) ? - jQuery( selectors, context || this.context ) : null; - - for ( i = 0, l = this.length; i < l; i++ ) { - cur = this[i]; - - while ( cur ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - - } else { - cur = cur.parentNode; - if ( !cur || !cur.ownerDocument || cur === context ) { - break; - } - } - } - } - - ret = ret.length > 1 ? jQuery.unique(ret) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - if ( !elem || typeof elem === "string" ) { - return jQuery.inArray( this[0], - // If it receives a string, the selector is used - // If it receives nothing, the siblings are used - elem ? jQuery( elem ) : this.parent().children() ); - } - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - andSelf: function() { - return this.add( this.prevObject ); - } -}); - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return jQuery.nth( elem, 2, "nextSibling" ); - }, - prev: function( elem ) { - return jQuery.nth( elem, 2, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( elem.parentNode.firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.makeArray( elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ), - // The variable 'args' was introduced in - // https://github.com/jquery/jquery/commit/52a0238 - // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. - // http://code.google.com/p/v8/issues/detail?id=1050 - args = slice.call(arguments); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, args.join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - nth: function( cur, result, dir, elem ) { - result = result || 1; - var num = 0; - - for ( ; cur; cur = cur[dir] ) { - if ( cur.nodeType === 1 && ++num === result ) { - break; - } - } - - return cur; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return (elem === qualifier) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return (jQuery.inArray( elem, qualifier ) >= 0) === keep; - }); -} - - - - -var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, - rtagName = /<([\w:]+)/, - rtbody = /", "" ], - legend: [ 1, "
", "
" ], - thead: [ 1, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - col: [ 2, "", "
" ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }; - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE can't serialize and