diff --git a/.gitignore b/.gitignore index a8394e4..87f57bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ */[Oo]bj/ */[Bb]in/ *.suo -[Bb]in/ \ No newline at end of file +[Bb]in/ +*.user \ No newline at end of file diff --git a/Include/Fluent/Antlr3.Runtime.dll b/Include/Fluent/Antlr3.Runtime.dll index 637fc3e..fb3ac4e 100644 Binary files a/Include/Fluent/Antlr3.Runtime.dll and b/Include/Fluent/Antlr3.Runtime.dll differ diff --git a/Include/Fluent/Castle.Core.dll b/Include/Fluent/Castle.Core.dll index 5603118..0207bae 100644 Binary files a/Include/Fluent/Castle.Core.dll and b/Include/Fluent/Castle.Core.dll differ diff --git a/Include/Fluent/Castle.Core.xml b/Include/Fluent/Castle.Core.xml index ac647e6..448fd69 100644 --- a/Include/Fluent/Castle.Core.xml +++ b/Include/Fluent/Castle.Core.xml @@ -4,388 +4,2926 @@ Castle.Core - + - This attribute is usefull only when you want to register all components - on an assembly as a batch process. - By doing so, the batch register will look - for this attribute to distinguish components from other classes. + Assignes a specific dictionary key. - + - Base for Attributes that want to express lifestyle - chosen by the component. + Defines the contract for customizing dictionary access. - + - Initializes a new instance of the class. + Determines relative order to apply related behaviors. - The type. - + - Gets or sets the lifestyle. + Determines relative order to apply related behaviors. - The lifestyle. - + - Initializes a new instance of the class. + 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. + 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 service. + The stored value. + The property. + true if return only existing. + The effective property value. - + - Initializes a new instance of the class. + - The key. - The service. - The lifestyle. - + - Gets the service. + Contract for creating additional Dictionary adapters. - The service. - + + + 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 key. + The dictionary adapter. + The key. + The descriptor. + - + - Associates a custom component with a component + 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 + + + + + + + + - + - Initializes a new instance of the class. - - Type of the component activator. - - - - Gets the type of the component activator. - - The type of the component activator. - - - - Specifies the proxying behavior for a component. + Gets the property name. - + - Initializes a new instance of the class. + Gets the property type. - + - Gets or sets a value indicating whether the generated - interface proxy should inherit from . + Gets the property. + + The property. + + + + Returns true if the property is dynamic. - + - Determines if the component requires a single interface proxy. - - true if the component requires a single interface proxy. - - - - Gets or sets the additional interfaces used during proxy generation. + Gets additional state. - + - Marks as property to be skipped and not be wired - by the IoC container + Determines if property should be fetched. - + - Used to declare that a component wants interceptors acting on it. + Determines if notifications should occur. - + - Constructs the InterceptorAttribute pointing to - a key to a interceptor - - - - - - Constructs the InterceptorAttribute pointing to - a service - - - - - - Indicates that the target components wants a - singleton lifestyle. + Gets the property behaviors. - + - Initializes a new instance of the class. + 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. - + - Indicates that the target components wants a - transient lifestyle. + Performs any initialization of the dictionary adapter meta-data. + + The dictionary adapter factory. + The dictionary adapter meta. + + + + + Contract for dictionary validation. - + - Initializes a new instance of the class. + 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. + + + + - + - Indicates that the target components wants a - per thread lifestyle. + 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. - + - Initializes a new instance of the class. + 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. - + - Indicates that the target components wants a - per web request lifestyle. + Encapsulates an invocation of a proxied method. - + - Indicates that the target components wants a - pooled lifestyle. + 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. - + - Initializes a new instance of the class - using the default initial pool size (5) and the max pool size (15). + 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. - + - Initializes a new instance of the class. - - Initial size of the pool. - Max pool size. - - - - Gets the initial size of the pool. - - The initial size of the pool. - - - - Gets the maximum pool size. - - The size of the max pool. - - - - Indicates that the target components wants a - custom lifestyle. + Interface describing elements composing generated type - + - Initializes a new instance of the class. + Checks if the method is public or protected. - The lifestyle handler. + + - + - Gets the type of the lifestyle handler. + Performs some basic screening and invokes the + to select methods. - The type of the lifestyle handler. + + + + - + - New interface that is going to be used by DynamicProxy 2 + Provides functionality for disassembling instances of attributes to CustomAttributeBuilder form, during the process of emiting new types by Dynamic Proxy. - + - New interface that is going to be used by DynamicProxy 2 + 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). - + - Returns the concrete instantiation of , with any generic parameters bound to real types. + 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. - The concrete instantiation of , or if not a generic method. - Can be slower than calling . - + - Returns the concrete instantiation of , with any generic parameters bound to real types. + 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). - The concrete instantiation of , or if not a generic method. - Can be slower than calling . - + + + 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. + + - - - The generic arguments of the method, or null if not a generic method. - - - + - + For interface proxies, this will point to the on the target class - + - Interceptors might implement this to receive the - ComponentModel on behalf of the component where the - interceptor is acting. + 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 - + - Abstract representation of a vertex. + 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 + - + - The nodes that dependes on this node - - - - - The nodes that this node depends - - - - - The node has not been visited yet - - - - - This node is in the process of being visited - - - - - This now was visited - - - - - Represents a collection of objects - which are guaranted to be unique - and holds a color for them - - - - - Holds a timestamp (integer) - for a given item - - - - - Returns the node at the specified index. - - The lookup index. - The node at the specified index. - - If the specified is greater than the - number of objects within the list. - - - - - Validates the specified index. - - The lookup index. - - If the index is invalid. - - - - - Lifecycle interface. If implemented by a component, - the method Initialized will be invoked by the container - before making the component available to the external world. - - - - - Implementors should perform any initialization logic. - - - - - Only called for components that - belongs to a pool when the component - comes back to the pool. - - - - - Implementors should perform any - initialization/clean up. - - - - - Interface for components that wish to be started by the container - - - - - Starts this instance. - - - - - Stops this instance. + Increments IServiceProvider with a generic service resolution operation. @@ -439,53 +2977,58 @@ 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. @@ -493,10 +3036,31 @@ i.e. log4net.config - + - Summary description for ConsoleFactory. + 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 + + @@ -525,23 +3089,11 @@ plus the 'log' extension. - + - Used to create the TraceLogger implementation of ILogger interface. See . - - - - - 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. + Provides an interface that supports and + allows the storage and retrieval of Contexts. These are supported in + both log4net and NLog. @@ -879,6 +3431,70 @@ 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. @@ -1306,28 +3922,6 @@ It also helps when you have a utility that does not have a logger to supply. - - - Provides an interface that supports and - allows the storage and retrieval of Contexts. These are supported in - both log4net and NLog. - - - - - Exposes the Global Context of the extended logger. - - - - - Exposes the Thread Context of the extended logger. - - - - - Exposes the Thread Stack of the extended logger. - - Creates a new NullLogger. @@ -1671,32 +4265,6 @@ Returns empty context stacks. - - - 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 - - - The Stream Logger class. This class can stream log information @@ -1806,114 +4374,6 @@ 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 - - - - Supporting Logger levels. - - - - - Logging will be off - - - - - Fatal logging level - - - - - Error logging level - - - - - Warn logging level - - - - - Info logging level - - - - - Debug logging level - - - - - 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 - - This is an abstract implementation @@ -1938,7 +4398,7 @@ The - The Default value returned if the convertion fails. + The Default value returned if the conversion fails. The Value converted into the specified type. @@ -2045,990 +4505,22 @@ The Value of the . - + - Enumeration used to mark the component's lifestyle. + Pendent - + - No lifestyle specified. - - - - - Singleton components are instantiated once, and shared - between all clients. - - - - - Thread components have a unique instance per thread. - - - - - Transient components are created on demand. - - - - - Optimization of transient components that keeps - instance in a pool instead of always creating them. - - - - - Any other logic to create/release components. - - - - - PerWebRequest components are created once per Http Request - - - - - - - - - - Represents the collection of information and - meta information collected about a component. - - - - Name (key) of the component - - - Service exposed - - - Implementation for the service - - - Extended properties - - - Lifestyle for the component - - - Custom lifestyle, if any - - - Custom activator, if any - - - Dependencies the kernel must resolve - - - All available constructors - - - All potential properties that can be setted by the kernel - - - Steps of lifecycle - - - External parameters - - - Configuration node associated - - - Interceptors associated - - - /// Custom dependencies/// - - - - Constructs a ComponentModel - - - - - Requires the selected property dependencies. - - The property selector. - - - - Requires the property dependencies of type . - - The dependency type. - - - - Sets or returns the component key - - - - - Gets or sets the service exposed. - - The service. - - - - Gets or sets the component implementation. - - The implementation. - - - - Gets or sets a value indicating whether the component requires generic arguments. - - - true if generic arguments are required; otherwise, false. - - - - - Gets or sets the extended properties. - - The extended properties. - - - - Gets the constructors candidates. - - The constructors. - - - - Gets the properties set. - - The properties. - - - - Gets or sets the configuration. - - The configuration. - - - - Gets the lifecycle steps. - - The lifecycle steps. - - - - Gets or sets the lifestyle type. - - The type of the lifestyle. - - - - Gets or sets the strategy for - inspecting public properties - on the components - - - - - Gets or sets the custom lifestyle. - - The custom lifestyle. - - - - Gets or sets the custom component activator. - - The custom component activator. - - - - Gets the interceptors. - - The interceptors. - - - - Gets the parameter collection. - - The parameters. - - - - Dependencies are kept within constructors and - properties. Others dependencies must be - registered here, so the kernel (as a matter - of fact the handler) can check them - - - - - Gets the custom dependencies. - - The custom dependencies. - - - - Represents a constructor of the component - that the container can use to initialize it properly. - - - - - Initializes a new instance of the class. - - The constructor info. - The dependencies. - - - - Gets the ConstructorInfo (from reflection). - - The constructor. - - - - Gets the dependencies this constructor candidate exposes. - - The dependencies. - - - - Collection of - - - - - Gets the fewer arguments candidate. - - The fewer arguments candidate. - - - - Represents a dependency (other component or a - fixed value available through external configuration). - - - - - Initializes a new instance of the class. - - The type. - The dependency key. - Type of the target. - if set to true [is optional]. - - - - Returns a that represents the current . - - - A that represents the current . - - - - - Serves as a hash function for a particular type, suitable - for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - if the specified is equal to the - current ; otherwise, . - - - - - Gets or sets the type of the dependency. - - The type of the dependency. - - - - Gets or sets the dependency key. - - The dependency key. - - - - Gets the type of the target. - - The type of the target. - - - - Gets or sets whether this dependency is optional. - - - true if this dependency is optional; otherwise, false. - - - - - Collection of . - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The dependencies. - - - - Represents an reference to a Interceptor component. - - - - - Initializes a new instance of the class. - - The component key. - - - - Initializes a new instance of the class. - - Type of the service. - - - - Gets an for the component key. - - The component key. - The - - - - Gets an for the service. - - The service. - The - - - - Gets an for the service. - - The service type. - The - - - - Gets the type of the service. - - The type of the service. - - - - Gets the interceptor component key. - - The component key. - - - - Gets the type of the reference. - - The type of the reference. - - - - Collection of - - - - - Adds the specified item. - - The interceptor. - - - - Adds the specified interceptor as the first. - - The interceptor. - - - - Adds the specified interceptor as the last. - - The interceptor. - - - - Inserts the specified interceptor at the specified index. - - The index. - The interceptor. - - - - When implemented by a class, 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 . - - 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 can iterate through a collection. - - - An - that can be used to iterate through the collection. - - - - - Adds the interceptor to the end of the interceptors list if it does not exist already. - - The interceptor reference. - - - - Gets a value indicating whether this instance has interceptors. - - - true if this instance has interceptors; otherwise, false. - - - - - Gets the number of - elements contained in the . - - - - - - Gets an object that - can be used to synchronize access to the . - - - - - - Gets a value - indicating whether access to the is synchronized - (thread-safe). - - - - - - Represents a collection of ordered lifecycle steps. - - - - - Initializes a new instance of the class. - - - - - Returns all steps for the commission phase + Deserializes the specified node into an abstract representation of configuration. + The node. - + - Returns all steps for the decommission phase - - - - - - Adds a step to the commission or decomission phases. - - - - - - - Adds a step as the first step to execute for the commission or decomission phase. - - - - - - - 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 . - - 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 can iterate through a collection. - - - An - that can be used to iterate through the collection. - - - - - Gets a value indicating whether this instance has commission steps. - - - true if this instance has commission steps; otherwise, false. - - - - - Gets a value indicating whether this instance has decommission steps. - - - true if this instance has decommission steps; otherwise, false. - - - - - Gets the number of - elements contained in the . - - - - - - Gets an object that - can be used to synchronize access to the . - - - - - - Gets a value - indicating whether access to the is synchronized - (thread-safe). - - - - - - Represents meta information associated with a method - (not yet defined) - - - - - Initializes a new instance of the class. - - The config node. - - - - Gets the config node. - - The config node. - - - - Collection of - - - - - Gets the method info2 model. - - The method info2 model. - - - - Represents a parameter. Usually the parameter - comes from the external world, ie, an external configuration. - - - - - Initializes a new instance of the class. - - The name. - The value. - - - - Initializes a new instance of the class. - - The name. - The value. - - - - Gets the name. - - The name. - - - - Gets the value. - - The value. - - - - Gets the config value. - - The config value. - - - - Collection of - - - - - Initializes a new instance of the class. - - - - - Adds the specified name. - - The name. - The value. - - - - Adds the specified name. - - The name. - The config node. - - - - Determines whether this collection contains the specified key. - - The key. - - true if yes; otherwise, false. - - - - - Adds the specified key. - - - Not implemented - - The key. - The value. - - - - Clears this instance. - - - Not implemented - - - - - Removes the specified key. - - The key. - - Not implemented - - - - - Copy the content to the specified array - - target array - target index - - Not implemented - - - - - Returns an enumerator that can iterate through a collection. - - - An - that can be used to iterate through the collection. - - - - - Gets the keys. - - The keys. - - Not implemented - - - - - Gets the values. - - The values. - - Not implemented - - - - - Gets a value indicating whether this instance is read only. - - - true if this instance is read only; otherwise, false. - - - - - Gets a value indicating whether this instance is fixed size. - - - true if this instance is fixed size; otherwise, false. - - - - - Gets the with the specified key. - - - - - - Gets the count. - - The count. - - - - Gets the sync root. - - The sync root. - - - - Gets a value indicating whether this instance is synchronized. - - - true if this instance is synchronized; otherwise, false. - - - - - Represents a property and the respective dependency. - - - - - Initializes a new instance of the class. - - The property info. - The dependency. - - - - Gets the property. - - The property. - - - - Gets the dependency. - - The dependency. - - - - Collection of - - - - - Finds a PropertySet the by PropertyInfo. - - The info. - - - - - 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 - - - - - 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. - - - - - 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 - + If a config value is an empty string we return null, this is to keep + backward compability with old code @@ -3116,7 +4608,7 @@ 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. @@ -3165,7 +4657,7 @@ true if the object is read-only; otherwise, false. - + Gets a value indicating whether the object has a fixed size. @@ -3193,5 +4685,243 @@ 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/Include/Fluent/Castle.DynamicProxy2.dll b/Include/Fluent/Castle.DynamicProxy2.dll deleted file mode 100644 index bb06386..0000000 Binary files a/Include/Fluent/Castle.DynamicProxy2.dll and /dev/null differ diff --git a/Include/Fluent/Castle.DynamicProxy2.xml b/Include/Fluent/Castle.DynamicProxy2.xml deleted file mode 100644 index 9ab892a..0000000 --- a/Include/Fluent/Castle.DynamicProxy2.xml +++ /dev/null @@ -1,1249 +0,0 @@ - - - - Castle.DynamicProxy2 - - - - - Wraps a reference that is passed - ByRef and provides indirect load/store support. - - - - - Summary description for NewArrayExpression. - - - - - - - - - - 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). - - - - 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. - - - - - Inspect the base method for generic definitions - and set the return type and the parameters - accordingly - - - - - 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. - - - - - Provides appropriate Stind.X opcode - for the type of primitive value to be stored indirectly. - - - - - Base class that exposes the common functionalities - to proxy generation. - - - TODO: - - Add tests and fixes for 'leaking this' problem - - - - - Used by dinamically implement - - - - - - 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 - - - - - - If callbackMethod is null the InvokeOnTarget implementation - is just the code to throw an exception - - - - - - - - - - - - If callbackMethod is null the InvokeOnTarget implementation - is just the code to throw an exception - - - - - - - - If true the invocation will implement the IChangeProxyTarget interface - - - - - Generates the constructor for the nested class that extends - - - - - - - - - - Improvement: this cache should be static. We should generate a - type constructor instead - - - - - Performs some basic screening and invokes the - to select methods. - - - - - - - - Checks if the method is public or protected. - - - - - - - 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. - - - - - Checks if the method has the same signature as a method that was marked as - one that should generate a new vtable slot. - - - - - Initializes a new instance of the class. - - Type of the target. - The interfaces. - The options. - - - - - - - - - Initializes a new instance of the class. - - The emitter. - The add method. - The remove method. - The attributes. - - - - - - - - - Finds the type of the method on target. - - The method on interface. - Type of the proxy target. - /// if set to true will check implementation on mixins. - - - - - Checks whether the given types are the same. This is - more complicated than it looks. - - - - - - - - Checks whether the given methods are the same. - - - - True if the methods are the same. - - - - This is used by the ProxyObjectReference class durin de-serialiation, to know - which generator it should use - - - - - 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. - - - - - 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 . - - - - 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. - - Non-virtual members cannot be proxied. This method gives an opportunity to inspect - any non-virtual 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. - - - - - Applied to the assemblies saved by in order to persist the cache data included in the persisted assembly. - - - - - 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 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 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. - - - - 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 - . A better way to do this, is by passing all the required - interceptors to the appropriate method of . You can use this - method to influence the order in which interceptors will be called, by reordering the array. - Returning an array containing null references (Nothing in Visual Basic) is not legal, - and will result in a runtime exception. - - - - - - 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 . - - - - 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 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 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 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 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 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 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 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 object 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. - 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 interceptor 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 object 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. - 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 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 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 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. - 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 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. - Actual type that the proxy type will encompass. - 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 the proxy builder instance used to generate proxy types. - - The proxy builder. - - - - - - - - - - - - - - - For interface proxies, this will point to the - on the target class - - - - diff --git a/Include/Fluent/FluentNHibernate.XML b/Include/Fluent/FluentNHibernate.XML index 7956078..7b3ea82 100644 --- a/Include/Fluent/FluentNHibernate.XML +++ b/Include/Fluent/FluentNHibernate.XML @@ -305,6 +305,16 @@ }); + + + Allows the user to add a custom component mapping to the class mapping. + Note: not a fluent method. + + + In some cases, our users need a way to add an instance of their own implementation of IComponentMappingProvider. + For an example of where this might be necessary, see: http://codebetter.com/blogs/jeremy.miller/archive/2010/02/16/our-extension-properties-story.aspx + + Maps a collection of entities as a one-to-many @@ -392,6 +402,12 @@ Column name + + + Specify the key column name + + Column names + Specify the schema @@ -1214,6 +1230,58 @@ this allows the user to find any columns with the matching name. + + + Diagnostic logging configuration + + + + + Conditionally enable logging + + Enable logging + + + + Enable logging + + + + + Disable logging + + + + + Register a logging listener + + Listener + + + + Register a default Console.Write listener + + + + + + Register a Console.Write listener with a custom result formatter + + Result formatter + + + + Register a default file output listener + + Output path + + + + Register a file output listener with a custom result formatter + + Result formatter + Output path + Sets the database dialect. This shouldn't be necessary @@ -1350,6 +1418,30 @@ Setting value Configuration builder + + + Sets the collectiontype.factory_class property. + NOTE: NHibernate 2.1 only + + factory class + Configuration + + + + Sets the collectiontype.factory_class property. + NOTE: NHibernate 2.1 only + + factory class + Configuration + + + + Sets the collectiontype.factory_class property. + NOTE: NHibernate 2.1 only + + factory class + Configuration + Sets the proxyfactory.factory_class property. @@ -1560,6 +1652,16 @@ + + + Applies to the joining table for this many-to-many. + + + + + Applies to the joining table for this many-to-many. + + generates identifiers of any integral type that are unique only when no other @@ -1898,6 +2000,16 @@ Params configuration + + + Applies to the joining table for this many-to-many. + + + + + Applies to the joining table for this many-to-many. + + Specify the lazy behaviour of this relationship. @@ -2916,6 +3028,12 @@ Fluent configuration API for NHibernate + + + Configure diagnostic logging + + Diagnostic configuration + Apply database settings @@ -3088,6 +3206,7 @@ Applies any mappings to the NHibernate Configuration + Diagnostics logger NHibernate Configuration instance @@ -3115,6 +3234,12 @@ Convention finder - used to search through assemblies for types that implement a specific convention interface. + + + Add a source to be queried. + + Source to query + Add an assembly to be queried. @@ -3319,6 +3444,11 @@ Sets the access-strategy to use the backing-field of an auto-property. + + + Sets the access-strategy to readonly. + + Sets the access-strategy to field and the naming-strategy to camelcase (field.camelcase). @@ -4255,6 +4385,12 @@ Sets the access-strategy to use the backing-field of an auto-property. + + + Sets the access-strategy to readonly. + + + Sets the access-strategy to field and the naming-strategy to camelcase (field.camelcase). diff --git a/Include/Fluent/FluentNHibernate.dll b/Include/Fluent/FluentNHibernate.dll index 532cfc0..9798af1 100644 Binary files a/Include/Fluent/FluentNHibernate.dll and b/Include/Fluent/FluentNHibernate.dll differ diff --git a/Include/Fluent/FluentNHibernate.pdb b/Include/Fluent/FluentNHibernate.pdb index a6e1d8d..3b4870d 100644 Binary files a/Include/Fluent/FluentNHibernate.pdb and b/Include/Fluent/FluentNHibernate.pdb differ diff --git a/Include/Fluent/Iesi.Collections.dll b/Include/Fluent/Iesi.Collections.dll index 32f2332..5658af7 100644 Binary files a/Include/Fluent/Iesi.Collections.dll and b/Include/Fluent/Iesi.Collections.dll differ diff --git a/Include/Fluent/Iesi.Collections.pdb b/Include/Fluent/Iesi.Collections.pdb new file mode 100644 index 0000000..bff77d8 Binary files /dev/null and b/Include/Fluent/Iesi.Collections.pdb differ diff --git a/Include/Fluent/NHibernate.ByteCode.Castle.dll b/Include/Fluent/NHibernate.ByteCode.Castle.dll index 785214f..6167e7d 100644 Binary files a/Include/Fluent/NHibernate.ByteCode.Castle.dll and b/Include/Fluent/NHibernate.ByteCode.Castle.dll differ diff --git a/Include/Fluent/NHibernate.ByteCode.Castle.pdb b/Include/Fluent/NHibernate.ByteCode.Castle.pdb new file mode 100644 index 0000000..5d6fbca Binary files /dev/null and b/Include/Fluent/NHibernate.ByteCode.Castle.pdb differ diff --git a/Include/Fluent/NHibernate.ByteCode.Castle.xml b/Include/Fluent/NHibernate.ByteCode.Castle.xml index bf71b0f..05a584a 100644 --- a/Include/Fluent/NHibernate.ByteCode.Castle.xml +++ b/Include/Fluent/NHibernate.ByteCode.Castle.xml @@ -21,12 +21,12 @@ The ISession this Proxy is in. - + Invoke the actual Property/Method using the Proxy or instantiate the actual object and use it when the Proxy can't handle the method. - The from the generated Castle.DynamicProxy. + The from the generated Castle.DynamicProxy. diff --git a/Include/Fluent/NHibernate.dll b/Include/Fluent/NHibernate.dll index f8b0bc2..6edb878 100644 Binary files a/Include/Fluent/NHibernate.dll and b/Include/Fluent/NHibernate.dll differ diff --git a/Include/Fluent/NHibernate.pdb b/Include/Fluent/NHibernate.pdb new file mode 100644 index 0000000..ba153ae Binary files /dev/null and b/Include/Fluent/NHibernate.pdb differ diff --git a/Include/Fluent/NHibernate.xml b/Include/Fluent/NHibernate.xml index 2c5aef6..ec55431 100644 --- a/Include/Fluent/NHibernate.xml +++ b/Include/Fluent/NHibernate.xml @@ -22,22 +22,21 @@ Execute this action - - - Do we need to retain this instance until after the transaction completes? - - - False if this class defines a no-op has after transaction completion. - - - - Called after the transaction completes - What spaces (tables) are affected by this action? + + + Get the before-transaction-completion process, if any, for this action. + + + + + Get the after-transaction-completion process, if any, for this action. + + Create an action that will evict collection and entity regions based on queryspaces (table names). @@ -61,18 +60,7 @@ Called before executing any actions - Execute this action - - - - Do we need to retain this instance until after the transaction completes? - - - False if this class defines a no-op has after transaction completion. - - - - Called after the transaction completes + Execute this action @@ -169,6 +157,27 @@ The entity persister. + + + Delegate representing some process that needs to occur before transaction completion. + + + NH specific: C# does not support dynamic interface proxies so a delegate is used in + place of the Hibernate interface (see Action/BeforeTransactionCompletionProcess). The + delegate omits the parameter as it is not used. + + + + + Delegate representing some process that needs to occur after transaction completion. + + Did the transaction complete successfully? True means it did. + + NH specific: C# does not support dynamic interface proxies so a delegate is used in + place of the Hibernate interface (see Action/AfterTransactionCompletionProcess). The + delegate omits the parameter as it is not used. + + Format an SQL statement using simple rules: a) Insert newline after each comma; @@ -332,6 +341,17 @@ s it can have are followed. + + + Expand the parameters of the cmd to have a single parameter for each parameter in the + sql string + + + This is for databases that do not support named parameters. So, instead of a single parameter + for 'select ... from MyTable t where t.Col1 = @p0 and t.Col2 = @p0' we can issue + 'select ... from MyTable t where t.Col1 = ? and t.Col2 = ?' + + Must be called when an exception occurs. @@ -1093,6 +1113,11 @@ , disabling reflection optimization. + + + Marker interface, denoting a client-visible "soft lock" on a cached item. + + A cached instance of a persistent class @@ -1197,7 +1222,7 @@ This method is used by "synchronous" concurrency strategies. - + Called when we have finished the attempted update/delete (which may or may not have been successful), after transaction completion. @@ -1207,7 +1232,7 @@ This method is used by "asynchronous" concurrency strategies. - + Called after an item has been updated (after the transaction completes), instead of calling Release(). @@ -1307,13 +1332,13 @@ decrement a lock and put it back in the cache - + Re-cache the updated state, if and only if there there are no other concurrent soft locks. Release our lock. - + Is the client's lock commensurate with the item in the cache? If it is not, we know that the cache expired the original @@ -1461,11 +1486,6 @@ This class was named Lock in H2.1 - - - Marker interface, denoting a client-visible "soft lock" on a cached item. - - Increment the lock, setting the @@ -1757,12 +1777,12 @@ Do nothing - + Invalidate the item (again, for safety). - + Invalidate the item (again, for safety). @@ -1796,12 +1816,12 @@ Unsupported! - + Unsupported! - + Unsupported! @@ -1916,32 +1936,6 @@ XPath expression for session-factory.listener nodes - - - Convert a string to . - - The string that represent . - - The converted to . - for invalid values. - - - See for allowed values. - - - - - Convert a string to . - - The string that represent . - - The converted to . - - If the values is invalid. - - See for allowed values. - - Convert a string to . @@ -1968,23 +1962,6 @@ See for allowed values. - - - Values for class-cache and collection-cache strategy. - - - - Xml value: read-only - - - Xml value: read-write - - - Xml value: nonstrict-read-write - - - Xml value: transactional - Values for class-cache include. @@ -2002,7 +1979,7 @@ Configuration parsed values for a class-cache XML node. - + Initializes a new instance of the class. @@ -2010,7 +1987,7 @@ Cache strategy. When is null or empty. - + Initializes a new instance of the class. @@ -2019,7 +1996,7 @@ Values for class-cache include. When is null or empty. - + Initializes a new instance of the class. @@ -2028,7 +2005,7 @@ The cache region. When is null or empty. - + Initializes a new instance of the class. @@ -2068,7 +2045,7 @@ Configuration parsed values for a collection-cache XML node. - + Initializes a new instance of the class. @@ -2076,7 +2053,7 @@ Cache strategy. When is null or empty. - + Initializes a new instance of the class. @@ -2232,46 +2209,177 @@ Configuration parsed values for a session-factory XML node. + + + The session factory name. + + + + + Session factory propeties bag. + + + + + Session factory mapping configuration. + + + + + Session factory class-cache configurations. + + + + + Session factory collection-cache configurations. + + + + + Session factory event configurations. + + + + + Session factory listener configurations. + + + + + The session factory name. + + + + + Session factory propeties bag. + + + + + Session factory mapping configuration. + + + + + Session factory class-cache configurations. + + + + + Session factory collection-cache configurations. + + + + + Session factory event configurations. + + + + + Session factory listener configurations. + + Initializes a new instance of the class. The session factory name. Null or empty string are allowed. - + + + Add a type-definition for mappings. + + The peristent type. + The where add the type-definition. + The custom configuration action. + The . + + + + + Depending on where you will use the type-definition in the mapping the + can be : + + + + + + + + + + + + + + + + + + + - The session factory name. + Define the dialect to use. + + The dialect implementation inherited from . + The fluent configuration itself. + + + + Maximum depth of outer join fetching + + + 0 (zero) disable the usage of OuterJoinFetching + + + + + Set the SessionFactory mnemonic name. + + The mnemonic name. + The fluent configuration itself. + + The SessionFactory mnemonic name can be used as a surrogate key in a multi-DB application. + + + + + DataBase integration configuration. - + - Session factory propeties bag. + Cache configuration. - + - Session factory mapping configuration. + Properties of TypeDef configuration. + + + + + + The key to use the type-definition inside not strongly typed mappings (XML mapping). - + - Session factory class-cache configurations. - - - - - Session factory collection-cache configurations. - - - - - Session factory event configurations. - - - - - Session factory listener configurations. + An which public properties are used as + type-definition pareneters or null where type-definition does not need parameters or you want use default values. + + + As an anonimous object can be used: + + configure.TypeDefinition<TableHiLoGenerator>(c=> + { + c.Alias = "HighLow"; + c.Properties = new {max_lo = 99}; + }); + + + @@ -2288,6 +2396,11 @@ + + + Implemented by any mapping elemes supports simple and/or multicolumn mapping. + + @@ -2411,6 +2524,15 @@ + + + The relation of the element of the collection. + + + Can be one of: HbmCompositeElement, HbmElement, HbmManyToAny, HbmManyToMany, HbmOneToMany... + according to the type of the collection. + + @@ -2663,6 +2785,9 @@ + + + @@ -2750,6 +2875,11 @@ + + + Columns and Formulas, in declared order + + @@ -5434,34 +5564,42 @@ - + Called for all collections. parameter was added in NH to allow for reflection related to generic types. - + Called for arrays and primitive arrays - + Called for Maps - + Called for all collections + + + Bind columns and formulas in the order in which they were mapped. + + + + + Extracts the names of classes mapped in a given file, and the names of the classes they extend. - + Returns a collection of containing information about all classes in this stream. @@ -5491,9 +5629,6 @@ - - The XML Namespace for the nhibernate-mapping - Default name for hibernate configuration file. @@ -5584,6 +5719,13 @@ The NamedXmlDocument that contains the validated mapping XML file. + + + Add mapping data using deserialized class. + + Mapping metadata. + XML file's name where available; otherwise null. + Create a new to add classes and collection @@ -5627,7 +5769,7 @@ - Adds the mappings from ebedded resources of the assembly. + Adds the mappings from embedded resources of the assembly. Paths to the resource files in the assembly. The assembly that contains the resource files. @@ -5900,6 +6042,12 @@ Listeners of must implements one of the interface of event listenesr. + + + Append the listeners to the end of the currently configured + listeners + + Generate DDL for altering tables @@ -6077,6 +6225,48 @@ + + + Values for class-cache and collection-cache strategy. + + + + Xml value: read-only + + + Xml value: read-write + + + Xml value: nonstrict-read-write + + + Xml value: transactional + + + + Helper to parse to and from XML string value. + + + + + Convert a in its xml expected value. + + The to convert. + The . + + + + Convert a string to . + + The string that represent . + + The converted to . + + If the values is invalid. + + See for allowed values. + + Provides access to configuration information. @@ -6444,6 +6634,11 @@ Settings that affect the behavior of NHibernate at runtime. + + + Get the registry to provide Hql-Generators for known properties/methods. + + Reads configuration properties and configures a instance. @@ -7822,10 +8017,16 @@ Provides a current session - for each . + for each System.Web.HttpContext. Works only with Web Applications. + + + This class allows access to the HttpContext without referring to HttpContext at compile time. + The accessors are cached as delegates for performance. + + A impl which scopes the notion of current @@ -7865,12 +8066,503 @@ Gets or sets the currently bound session. + + + Provides a current session + for the current OperationContext in WCF. Works only during the lifetime of a WCF operation. + + Provides a current session - for each . Works only with web applications. + for each System.Web.HttpContext. Works only with web applications. + + + Constructed with property name + + + + + Apply a "between" constraint to the named property + + + + + Apply an "in" constraint to the named property + + + + + Apply an "in" constraint to the named property + + + + + Apply an "in" constraint to the named property + + + + + A case-insensitive "like", similar to Postgres "ilike" operator + + + + + A case-insensitive "like", similar to Postgres "ilike" operator + + + + + Apply a "like" constraint to the named property + + + + + Apply a "like" constraint to the named property + + + + + Apply a "like" constraint to the named property + + + + + Apply an "is empty" constraint to the named property + + + + + Apply a "not is empty" constraint to the named property + + + + + Apply an "is null" constraint to the named property + + + + + Apply an "not is null" constraint to the named property + + + + + Constructed with property name + + + + + Add a property equal subquery criterion + + detached subquery + + + + Add a property equal all subquery criterion + + detached subquery + + + + Create a property greater than or equal subquery criterion + + detached subquery + + + + Create a property greater than or equal all subquery criterion + + detached subquery + + + + Create a property greater than or equal some subquery criterion + + detached subquery + + + + Create a property greater than subquery criterion + + detached subquery + + + + Create a property greater than all subquery criterion + + detached subquery + + + + Create a property greater than some subquery criterion + + detached subquery + + + + Create a property in subquery criterion + + detached subquery + + + + Create a property less than or equal subquery criterion + + detached subquery + + + + Create a property less than or equal all subquery criterion + + detached subquery + + + + Create a property less than or equal some subquery criterion + + detached subquery + + + + Create a property less than subquery criterion + + detached subquery + + + + Create a property less than all subquery criterion + + detached subquery + + + + Create a property less than some subquery criterion + + detached subquery + + + + Create a property not equal subquery criterion + + detached subquery + + + + Create a property not in subquery criterion + + detached subquery + + + + Create an alias for the previous projection + + + + + Select an arbitrary projection + + + + + A property average value + + + + + A property average value + + + + + A property value count + + + + + A property value count + + + + + A distinct property value count + + + + + A distinct property value count + + + + + A grouping property value + + + + + A grouping property value + + + + + A property maximum value + + + + + A property maximum value + + + + + A property minimum value + + + + + A property minimum value + + + + + A projected property value + + + + + A projected property value + + + + + A property value sum + + + + + A property value sum + + + + + Constructed with property name + + + + + Apply a "between" constraint to the named property + + + + + Apply an "in" constraint to the named property + + + + + Apply an "in" constraint to the named property + + + + + Apply an "in" constraint to the named property + + + + + A case-insensitive "like", similar to Postgres "ilike" operator + + + + + A case-insensitive "like", similar to Postgres "ilike" operator + + + + + Apply a "like" constraint to the named property + + + + + Apply a "like" constraint to the named property + + + + + Apply a "like" constraint to the named property + + + + + Apply an "is empty" constraint to the named property + + + + + Apply a "not is empty" constraint to the named property + + + + + Apply an "is null" constraint to the named property + + + + + Apply an "not is null" constraint to the named property + + + + + Add an Exists subquery criterion + + + + + Add a NotExists subquery criterion + + + + + Subquery expression in the format + .Where(t => t.Property [==, !=, >, etc.] detachedQueryOver.As<propertyType>()) + + + + + Subquery expression in the format + .Where(() => alias.Property [==, !=, >, etc.] detachedQueryOver.As<propertyType>()) + + + + + Subquery expression in the format + .WhereAll(t => t.Property [==, !=, >, etc.] detachedQueryOver.As<propertyType>()) + + + + + Subquery expression in the format + .WhereAll(() => alias.Property [==, !=, >, etc.] detachedQueryOver.As<propertyType>()) + + + + + Subquery expression in the format + .WhereSome(t => t.Property [==, !=, >, etc.] detachedQueryOver.As<propertyType>()) + + + + + Subquery expression in the format + .WhereSome(() => alias.Property [==, !=, >, etc.] detachedQueryOver.As<propertyType>()) + + + + + Add a property equal subquery criterion + + detached subquery + + + + Add a property equal all subquery criterion + + detached subquery + + + + Create a property greater than or equal subquery criterion + + detached subquery + + + + Create a property greater than or equal all subquery criterion + + detached subquery + + + + Create a property greater than or equal some subquery criterion + + detached subquery + + + + Create a property greater than subquery criterion + + detached subquery + + + + Create a property greater than all subquery criterion + + detached subquery + + + + Create a property greater than some subquery criterion + + detached subquery + + + + Create a property in subquery criterion + + detached subquery + + + + Create a property less than or equal subquery criterion + + detached subquery + + + + Create a property less than or equal all subquery criterion + + detached subquery + + + + Create a property less than or equal some subquery criterion + + detached subquery + + + + Create a property less than subquery criterion + + detached subquery + + + + Create a property less than all subquery criterion + + detached subquery + + + + Create a property less than some subquery criterion + + detached subquery + + + + Create a property not equal subquery criterion + + detached subquery + + + + Create a property not in subquery criterion + + detached subquery + Base class for implementations. @@ -7947,18 +8639,6 @@ http://steve.emxsoftware.com/NET/Overloading+the++and++operators - - - See here for details: - http://steve.emxsoftware.com/NET/Overloading+the++and++operators - - - - - See here for details: - http://steve.emxsoftware.com/NET/Overloading+the++and++operators - - An Aggregation @@ -7969,6 +8649,11 @@ A single-column projection that may be aliased + + + An "enhanced" Projection for a query. + + Render the SQL Fragment. @@ -8043,6 +8728,29 @@ Does this projection specify aggregate attributes? + + + Get the SQL column aliases used by this projection for the columns it writes for inclusion into the + SELECT clause . NHibernate always uses column aliases + to extract data from the , so it is important that these be implemented + correctly in order for NHibernate to be able to extract these values correctly. + + Just as in , represents the number of columns rendered prior to this projection. + The local criteria to which this project is attached (for resolution). + The overall criteria query instance. + The columns aliases. + + + + Get the SQL column aliases used by this projection for the columns it writes for inclusion into the + SELECT clause () for a particular criteria-level alias. + + The criteria-level alias. + Just as in , represents the number of columns rendered prior to this projection. + The local criteria to which this project is attached (for resolution). + The overall criteria query instance. + The columns aliases. + Gets the typed values for parameters in this projection @@ -8144,9 +8852,9 @@ Initializes a new instance of the class. - The _projection. - The _lo. - The _hi. + The _projection. + The _lo. + The _hi. @@ -8157,9 +8865,6 @@ The low value for the BetweenExpression. The high value for the BetweenExpression. - - - Casting a value from one type to another, at the database @@ -8188,6 +8893,18 @@ This instance. + + + Adds an to the list of s + to junction together. + + + + + Adds an to the list of s + to junction together. + + Get the Sql operator to put between multiple s. @@ -9010,6 +9727,50 @@ a dictionary from property names to values + + + Create an ICriterion for the supplied LambdaExpression + + generic type + lambda expression + return NHibernate.Criterion.ICriterion + + + + Create an ICriterion for the supplied LambdaExpression + + lambda expression + return NHibernate.Criterion.ICriterion + + + + Create an ICriterion for the negation of the supplied LambdaExpression + + generic type + lambda expression + return NHibernate.Criterion.ICriterion + + + + Create an ICriterion for the negation of the supplied LambdaExpression + + lambda expression + return NHibernate.Criterion.ICriterion + + + + Build an ICriterion for the given property + + lambda expression identifying property + returns LambdaRestrictionBuilder + + + + Build an ICriterion for the given property + + lambda expression identifying property + returns LambdaRestrictionBuilder + Apply a constraint expressed in SQL, with the given SQL parameters @@ -9146,22 +9907,25 @@ - Get the names of the columns mapped by a property path, ignoring projection aliases + Get the name of the column mapped by a property path, ignoring projection alias + + + Get the names of the columns mapped by a property path, ignoring projection aliases - Get the type of a property path, ignoring projection aliases + Get the type of a property path, ignoring projection aliases - Get the names of the columns mapped by a property path + Get the names of the columns mapped by a property path - Get the type of a property path + Get the type of a property path - Get the a typed value for the given property value. + Get the a typed value for the given property value. - Get the entity name of an entity + Get the entity name of an entity @@ -9170,7 +9934,7 @@ - Get the root table alias of an entity + Get the root table alias of an entity @@ -9179,18 +9943,18 @@ - Get the property name, given a possibly qualified property name + Get the property name, given a possibly qualified property name - Get the identifier column names of this entity + Get the identifier column names of this entity - Get the identifier type of this entity + Get the identifier type of this entity - + - When adding values to the query string it is imperative that they are reported via this function back to the query builder. - Do not report the same item multiple times as it will be assumed to be a separate parameter. + Creates a dummy parameter index for the supplied paged value. + Returns null if the Dialect does not support limit parameters @@ -9200,7 +9964,7 @@ - An that constrains the property + An that constrains the property to a specified list of values. @@ -9212,17 +9976,7 @@ Initializes a new instance of the class. The projection. - The _values. - - - - - - - - - - + The _values. @@ -9253,9 +10007,6 @@ The name of the Property in the class. The value for the Property. - - - An that represents empty association constraint. @@ -9312,7 +10063,7 @@ An that represents an "like" constraint. - The case sensitivity depends on the database settings for string + The case sensitivity depends on the database settings for string comparisons. Use if the string comparison should not be case sensitive. @@ -9536,20 +10287,9 @@ Represents an order imposed upon a result set. - - - - Constructor for Order. - - - - - - - Constructor for Order. - - - + + Should Order implement ICriteriaQuery? + @@ -9828,6 +10568,94 @@ The when false. + + + A property average value + + + + + A property average value + + + + + A property value count + + + + + A property value count + + + + + A distinct property value count + + + + + A distinct property value count + + + + + A grouping property value + + + + + A grouping property value + + + + + A property maximum value + + + + + A property maximum value + + + + + A property minimum value + + + + + A property minimum value + + + + + A projected property value + + + + + A projected property value + + + + + A property value sum + + + + + A property value sum + + + + + Create an alias for a projection + + the projection instance + LambdaExpression returning an alias + return NHibernate.Criterion.IProjection + A factory for property-specific AbstractCriterion and projection instances @@ -9849,6 +10677,625 @@ result of a subquery + + + QueryOver<TRoot> is an API for retrieving entities by composing + objects expressed using Lambda expression syntax. + + + + IList<Cat> cats = session.QueryOver<Cat>() + .Where( c => c.Name == "Tigger" ) + .And( c => c.Weight > minWeight ) ) + .List(); + + + + + + Access the underlying ICriteria + + + + + Access the root underlying ICriteria + + + + + Get the results of the root type and fill the + + The list filled with the results. + + + + Get the results of the root type and fill the + + The list filled with the results. + + + + Clones the QueryOver, removes orders and paging, and projects the row-count + for the query + + + + + Clones the QueryOver, removes orders and paging, and projects the row-count (Int64) + for the query + + + + + Short for ToRowCountQuery().SingleOrDefault<int>() + + + + + Short for ToRowCountInt64Query().SingleOrDefault<long>() + + + + + Convenience method to return a single instance that matches + the query, or null if the query returns no results. + + the single result or + + If there is more than one matching result + + + + + Override type of . + + + + + Get a enumerable that when enumerated will execute + a batch of queries in a single database roundtrip + + + + + Get a enumerable that when enumerated will execute + a batch of queries in a single database roundtrip + + + + + Get an IFutureValue instance, whose value can be retrieved through + its Value property. The query is not executed until the Value property + is retrieved, which will execute other Future queries as well in a + single roundtrip + + + + + Get an IFutureValue instance, whose value can be retrieved through + its Value property. The query is not executed until the Value property + is retrieved, which will execute other Future queries as well in a + single roundtrip + + + + + Creates an exact clone of the IQueryOver + + + + + Clear all orders from the query. + + + + + Set the first result to be retrieved + + + + + + Set a limit upon the number of objects to be retrieved + + + + + + Enable caching of this query result set + + + + Override the cache mode for this particular query. + The cache mode to use. + this (for method chaining) + + + + Set the name of the cache region. + + the name of a query cache region, or + for the default query cache + + + + Get an executable instance of IQueryOver<TRoot>, + to actually run the query. + + + + Get an executable instance of IQueryOver<TRoot>, + to actually run the query. + + + + Clones the QueryOver, clears the orders and paging, and projects the RowCount + + + + + + Clones the QueryOver, clears the orders and paging, and projects the RowCount (Int64) + + + + + + Creates an exact clone of the QueryOver + + + + + Method to allow comparison of detached query in Lambda expression + e.g., p => p.Name == myQuery.As<string> + + type returned (projected) by query + throws an exception if evaluated directly at runtime. + + + + Implementation of the interface + + + + + QueryOver<TRoot,TSubType> is an API for retrieving entities by composing + objects expressed using Lambda expression syntax. + + + + IList<Cat> cats = session.QueryOver<Cat>() + .Where( c => c.Name == "Tigger" ) + .And( c => c.Weight > minWeight ) ) + .List(); + + + + + + Add criterion expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add criterion expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add arbitrary ICriterion (e.g., to allow protected member access) + + + + + Add negation of criterion expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add negation of criterion expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add restriction to a property + + Lambda expression containing path to property + criteria instance + + + + Add restriction to a property + + Lambda expression containing path to property + criteria instance + + + + Identical semantics to And() to allow more readable queries + + Lambda expression + criteria instance + + + + Identical semantics to And() to allow more readable queries + + Lambda expression + criteria instance + + + + Add arbitrary ICriterion (e.g., to allow protected member access) + + + + + Identical semantics to AndNot() to allow more readable queries + + Lambda expression + criteria instance + + + + Identical semantics to AndNot() to allow more readable queries + + Lambda expression + criteria instance + + + + Identical semantics to AndRestrictionOn() to allow more readable queries + + Lambda expression + criteria instance + + + + Identical semantics to AndRestrictionOn() to allow more readable queries + + Lambda expression + criteria instance + + + + Add projection expressed as a lambda expression + + Lambda expressions + criteria instance + + + + Add arbitrary IProjections to query + + + + + Create a list of projections using a projection builder + + + + + Add order expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add order expressed as a lambda expression + + Lambda expression + criteria instance + + + + Order by arbitrary IProjection (e.g., to allow protected member access) + + + + + Add order for an aliased projection expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add order expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add order expressed as a lambda expression + + Lambda expression + criteria instance + + + + Order by arbitrary IProjection (e.g., to allow protected member access) + + + + + Add order for an aliased projection expressed as a lambda expression + + Lambda expression + criteria instance + + + + Transform the results using the supplied IResultTransformer + + + + + Specify an association fetching strategy. Currently, only + one-to-many and one-to-one associations are supported. + + A lambda expression path (e.g., ChildList[0].Granchildren[0].Pets). + + + + + Set the lock mode of the current entity + + + + + Set the lock mode of the aliased entity + + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Lambda expression returning alias reference + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Lambda expression returning alias reference + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Lambda expression returning alias reference + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Lambda expression returning alias reference + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + The created "sub criteria" + + + + Join an association, assigning an alias to the joined entity + + Lambda expression returning association path + Lambda expression returning alias reference + criteria instance + + + + Join an association, assigning an alias to the joined entity + + Lambda expression returning association path + Lambda expression returning alias reference + criteria instance + + + + Join an association, assigning an alias to the joined entity + + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + criteria instance + + + + Join an association, assigning an alias to the joined entity + + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + criteria instance + + + + Add a subquery expression + + + + + Apply a "like" restriction in a QueryOver expression + Note: throws an exception outside of a QueryOver expression + + + + + Apply a "like" restriction in a QueryOver expression + Note: throws an exception outside of a QueryOver expression + + + + + Apply a "like" restriction in a QueryOver expression + Note: throws an exception outside of a QueryOver expression + + + + + Apply a "like" restriction in a QueryOver expression + Note: throws an exception outside of a QueryOver expression + + + + + Apply a "like" restriction in a QueryOver expression + Note: throws an exception outside of a QueryOver expression + + + + + Apply an "in" constraint to the named property + Note: throws an exception outside of a QueryOver expression + + + + + Apply an "in" constraint to the named property + Note: throws an exception outside of a QueryOver expression + + + + + Apply a "between" constraint to the named property + Note: throws an exception outside of a QueryOver expression + + A comparison between a property value in the outer query and the @@ -9876,9 +11323,6 @@ A SqlString that contains a valid Sql fragment. - - - Gets the named Property for the Expression. @@ -9912,9 +11356,6 @@ write a correct . - - - A SQL fragment. The string {alias} will be replaced by the alias of the root entity. @@ -9937,6 +11378,83 @@ AbstractCriterion + + + Create a ICriterion for the specified property subquery expression + + generic type + lambda expression + returns LambdaSubqueryBuilder + + + + Create a ICriterion for the specified property subquery expression + + lambda expression + returns LambdaSubqueryBuilder + + + + Create a ICriterion for the specified value subquery expression + + value + returns LambdaSubqueryBuilder + + + + Create ICriterion for subquery expression using lambda syntax + + type of property + lambda expression + NHibernate.ICriterion.AbstractCriterion + + + + Create ICriterion for (exact) subquery expression using lambda syntax + + lambda expression + NHibernate.ICriterion.AbstractCriterion + + + + Create ICriterion for (all) subquery expression using lambda syntax + + type of property + lambda expression + NHibernate.ICriterion.AbstractCriterion + + + + Create ICriterion for (all) subquery expression using lambda syntax + + lambda expression + NHibernate.ICriterion.AbstractCriterion + + + + Create ICriterion for (some) subquery expression using lambda syntax + + type of property + lambda expression + NHibernate.ICriterion.AbstractCriterion + + + + Create ICriterion for (some) subquery expression using lambda syntax + + lambda expression + NHibernate.ICriterion.AbstractCriterion + + + + Add an Exists subquery criterion + + + + + Add a NotExists subquery criterion + + A property value, or grouped property value @@ -10084,288 +11602,6 @@ ANSI-SQL style cast(foo as type) where the type is a NHibernate type - - - Delegate the values to a real type - - - The real return type of Cast is know only after the Cast is parsed. - This class was created in NH to remove the responsibility of the parser about know the - real return type. - - - - - Defines a mapping from a .NET to a SQL datatype. - This interface is intended to be implemented by applications that need custom types. - - Implementors should usually be immutable and MUST definately be threadsafe. - - - - Return a cacheable "disassembled" representation of the object. - the value to cache - the session - optional parent entity object (needed for collections) - the disassembled, deep cloned state - - - Reconstruct the object from its cached "disassembled" state. - the disassembled state from the cache - the session - the parent entity object - the the object - - - - Called before assembling a query result set from the query cache, to allow batch fetching - of entities missing from the second-level cache. - - - - - When implemented by a class, returns the SqlTypes for the columns mapped by this IType. - The that uses this IType.An array of s. - - - - When implemented by a class, returns how many columns are used to persist this type. - The that uses this IType.The number of columns this IType spans.MappingException - - - - When implemented by a class, should the parent be considered dirty, - given both the old and current field or element value? - The old valueThe current valueThe true if the field is dirty - - - - When implemented by a class, gets an instance of the object mapped by - this IType from the . - The that contains the values - The names of the columns in the that contain the - value to populate the IType with. - The object mapped by this IType. - Implementors should handle possibility of null values. - - - - - When implemented by a class, gets an instance of the object - mapped by this IType from the . - The that contains the valuesThe name of the column in the that contains the - value to populate the IType with.The object mapped by this IType. - Implementations should handle possibility of null values. - This method might be called if the IType is known to be a single-column type. - - - - - When implemented by a class, puts the value/values from the mapped - class into the . - The to put the values into.The object that contains the values.The index of the to start writing the values to.Indicates which columns are to be set. - Implementors should handle possibility of null values. - A multi-column type should be written to parameters starting from . - - - - - When implemented by a class, puts the value/values from the mapped - class into the . - - The to put the values into. - The object that contains the values. - The index of the to start writing the values to. - - Implementors should handle possibility of null values. - A multi-column type should be written to parameters starting from . - - - - - When implemented by a class, a representation of the value to be - embedded in an XML element - The object that contains the values.An Xml formatted string. - - - - When implemented by a class, returns a deep copy of the persistent - state, stopping at entities and at collections. - A Collection element or Entity fieldThe entityMode.The session factory.A deep copy of the object. - - - - When implemented by a class, retrieves an instance of the mapped class, - or the identifier of an entity or collection from a . - The that contains the values. - The names of the columns in the that contain the - value to populate the IType with. - the sessionThe parent EntityAn identifier or actual object mapped by this IType. - - This is useful for 2-phase property initialization - the second phase is a call to - ResolveIdentifier() - - - Most implementors of this method will just pass the call to NullSafeGet(). - - - - - - When implemented by a class, maps identifiers to Entities or Collections. - An identifier or value returned by Hydrate()The sessionThe parent EntityThe Entity or Collection referenced by this Identifier. - This is the second phase of 2-phase property initialization. - - - - - Given a hydrated, but unresolved value, return a value that may be used to - reconstruct property-ref associations. - - - - - - - - During merge, replace the existing (target) value in the entity we are merging to - with a new (original) value from the detached entity we are merging. For immutable - objects, or null values, it is safe to simply return the first parameter. For - mutable objects, it is safe to return a copy of the first parameter. For objects - with component values, it might make sense to recursively replace component values. - - the value from the detached entity being merged - the value in the managed entity - - - - - the value to be merged - - - - Compare two instances of the class mapped by this type for persistence - "equality" - equality of persistent state - taking a shortcut for - entity references. - - - - - boolean - - - - Compare two instances of the class mapped by this type for persistence - "equality" - equality of persistent state. - - - - - boolean - - - - Compare two instances of the class mapped by this type for persistence - "equality" - equality of persistent state. - - - - - - boolean - - - Get a hashcode, consistent with persistence "equality" - - - - - Get a hashcode, consistent with persistence "equality" - - - - - - compare two instances of the type - - - - - - Get the type of a semi-resolved value. - - - A representation of the value to be embedded in an XML element. - - - - - - Parse the XML representation of an instance. - - - an instance of the type - - - - Given an instance of the type, return an array of boolean, indicating - which mapped columns would be null. - - an instance of the type - - - - - When implemented by a class, gets the abbreviated name of the type. - The NHibernate type name. - - - - When implemented by a class, gets the returned - by the NullSafeGet() methods. - - The from the .NET framework. - - This is used to establish the class of an array of this Itype - - - - - When implemented by a class, gets the value indicating if the objects - of this IType are mutable. - true if the objects mapped by this IType are mutable. - With respect to the referencing object... - Entities and Collections are considered immutable because they manage their own internal state. - - - - - When implemented by a class, gets a value indicating if the implementor is castable to an an - true if this is an AssociationThis does not necessarily imply that the type actually represents an association. - - - - When implemented by a class, gets a value indicating if the implementor is a collection type - true if this is a . - - - - When implemented by a class, gets a value indicating if the implementor - is an . - true if this is an - If true, the implementation must be castable to . - A component type may own collections or associations and hence must provide certain extra functionality. - - - - - When implemented by a class, gets a value indicating if the implementor - extends - true if this is an - - - - Emulation of locate() on Sybase @@ -11148,6 +12384,18 @@ The boolean value The appropriate SQL literal. + + + Add a LIMIT clause to the given SQL SELECT + when the dialect supports variable limits (i.e. parameters for the limit constraints) + + The to base the limit query off. + Offset of the first row to be returned by the query (zero-based) + Maximum number of rows to be returned by the query + Optionally, the Offset parameter index + Optionally, the Limit parameter index + A new that contains the LIMIT clause. + Add a LIMIT clause to the given SQL SELECT @@ -11831,6 +13079,22 @@ Comes into play whenever the user specifies the "identity" generator. + + + Supports splitting batches using GO T-SQL command + + + Batches http://msdn.microsoft.com/en-us/library/ms175502.aspx + + + + + This specialized string tokenizier will break a string to tokens, taking + into account single quotes, parenthesis and commas and [ ] + Notice that we aren't differenciating between [ ) and ( ] on purpose, it would complicate + the code and it is not legal at any rate. + + Defines a contract for implementations that can extract the name of a violated @@ -11856,13 +13120,16 @@ - + Add a LIMIT clause to the given SQL SELECT A Query in the form of a SqlString. - Offset of the first row is not zero - A new SqlString that contains the LIMIT clause. + Offset of the first row to be returned by the query (zero-based) + Maximum number of rows to be returned by the query + Optionally, the Offset parameter index + Optionally, the Limit parameter index + A new that contains the LIMIT clause. @@ -12416,30 +13683,18 @@ false, unless overridden - + Add a LIMIT clause to the given SQL SELECT - The to base the limit query off of. + The to base the limit query off. Offset of the first row to be returned by the query (zero-based) - Maximum number of rows to be returned by the query + Maximum number of rows to be returned by the query + Optionally, the Offset parameter index + Optionally, the Limit parameter index A new with the LIMIT clause applied. - The LIMIT SQL will look like - - - SELECT - TOP last (columns) - FROM - (SELECT (columns), ROW_NUMBER() OVER(ORDER BY {original order by, with un-aliased column names) as __hibernate_sort_row - {original from}) as query - WHERE query.__hibernate_sort_row > offset - ORDER BY query.__hibernate_sort_row - - - - Note that we need to add explicitly specify the columns, because we need to be able to use them - in a paged subselect. NH-1155 + Note that we need to explicitly specify the columns, because we need to be able to use them in a paged subselect [NH-1155] @@ -12471,14 +13726,6 @@ false - - - This specialized string tokenizier will break a string to tokens, taking - into account single quotes, parenthesis and commas and [ ] - Notice that we aren't differenciating between [ ) and ( ] on purpose, it would complicate - the code and it is not legal at any rate. - - An SQL dialect compatible with Microsoft SQL Server 7. @@ -12527,13 +13774,16 @@ - + - + Add a LIMIT clause to the given SQL SELECT - - - + The to base the limit query off. + Offset of the first row to be returned by the query (zero-based) + Maximum number of rows to be returned by the query + Optionally, the Offset parameter index + Optionally, the Limit parameter index + A new that contains the LIMIT clause. @@ -12556,6 +13806,22 @@ The name of the index to drop. The SQL string to drop the index constraint. + + + Suclasses register a typename for the given type code, to be used in CAST() + statements. + + The typecode + The database type name + + + + Get the name of the database type appropriate for casting operations + (via the CAST() SQL function) for the given typecode. + + The typecode + The database type name + @@ -12699,13 +13965,16 @@ - + - + Add a LIMIT clause to the given SQL SELECT - - Offset of the first row to process in the result set is non-zero - + The to base the limit query off. + Offset of the first row to be returned by the query (zero-based) + Maximum number of rows to be returned by the query + Optionally, the Offset parameter index + Optionally, the Limit parameter index + A new that contains the LIMIT clause. PostgreSQL requires to cast NULL values to correctly handle UNION/UNION ALL @@ -12801,194 +14070,374 @@ Offset of the first row to process in the result set A new SqlString that contains the LIMIT clause. - + - This is a subclass of SybaseDialect for sybase 11 databases (specifically tested against 11.9.2). 11.9.2 does not support ANSI JOINs - therefore we have to provide a special join fragment for left/right joins (*= and =* respectively). - - - - - An SQL dialect compatible with Sybase. + An SQL dialect for Sybase Adaptive Server Anywhere 9.0

This dialect probably will not work with schema-export. If anyone out there can fill in the ctor with DbTypes to Strings that would be helpful.

- The SybaseDialect defaults the following configuration properties: + The dialect defaults the following configuration properties: - - Property - Default Value - - - use_outer_join - - - - connection.driver_class - - - - prepare_sql - - + + Property + Default Value + + + connection.driver_class + + + + prepare_sql + +
- + - - - Sybase does not support quoted aliases, this function thus returns - aliasName as is. - - - + - - - - - - - - - - - - - - - - - - - - - - - - This class is basically a port of the hibernate 3.2 Sybase 11 join fragment. It uses concepts from that join fragment and the Oracle join fragment in NHibernate - - - - - Represents a SQL JOIN - - - - - An SQL dialect compatible with Sybase. - - -

- This dialect probably will not work with schema-export. If anyone out there - can fill in the ctor with DbTypes to Strings that would be helpful. -

- The SybaseDialect defaults the following configuration properties: - - - Property - Default Value - - - use_outer_join - - - - connection.driver_class - - - - prepare_sql - - - -
-
- - - - - - Sybase does not support quoted aliases, this function thus returns - aliasName as is. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - An SQL dialect for Sybase Adaptive Server Anywhere 9.0/10.0 - - -

- This dialect probably will not work with schema-export. If anyone out there - can fill in the ctor with DbTypes to Strings that would be helpful. -

- The SybaseAnywhereDialect defaults the following configuration properties: - - - Property - Default Value - - - use_outer_join - - - - connection.driver_class - - - - prepare_sql - - - -
-
- - - - - - - - - - + ASA does not require to drop constraint before dropping tables, and DROP statement - syntax used by Hibernate to drop constraint is not compatible with ASA, so disable it. + syntax used by Hibernate to drop constraint is not compatible with ASA, so disable it. Comments matchs SybaseAnywhereDialect from Hibernate-3.1 src + + + SQL Dialect for SQL Anywhere 10 - for the NHibernate 3.0.0 distribution + Copyright (C) 2010 Glenn Paulley + Contact: http://iablog.sybase.com/paulley + + This NHibernate dialect should be considered BETA software. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + + The dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + prepare_sql + + + + + + + + SQL Anywhere 11 uses SELECT TOP n START AT m [ select list items ] + for LIMIT/OFFSET support. + + Produce a parametertized SQL query using positional parameters for + TOP and START AT (if specified). + + + + + SQL Anywhere 11 uses SELECT TOP n START AT m [ select list items ] + for LIMIT/OFFSET support. + + Generate SELECT TOP n START AT m syntax using bound parameters + SQL Anywhere constraints: n > 0, m >= 0 + + + + + SQL Anywhere 10 supports READ, WRITE, and INTENT row + locks. INTENT locks are sufficient to ensure that other + concurrent connections cannot modify a row (though other + connections can still read that row). SQL Anywhere also + supports 3 modes of snapshot isolation (multi-version + concurrency control (MVCC). + + SQL Anywhere's FOR UPDATE clause supports + FOR UPDATE BY [ LOCK | VALUES ] + FOR UPDATE OF ( COLUMN LIST ) + + though they cannot be specified at the same time. BY LOCK is + the syntax that acquires INTENT locks. FOR UPDATE BY VALUES + forces the use of the KEYSET cursor, which returns a warning to + the application when a row in the cursor has been subsequently + modified by another connection, and an error if the row has + been deleted. + + SQL Anywhere does not support the FOR UPDATE NOWAIT syntax of + Oracle on a statement-by-statement basis. However, the + identical functionality is provided by setting the connection + option BLOCKING to "OFF", or setting an appropriate timeout + period through the connection option BLOCKING_TIMEOUT. + + + + + SQL Anywhere 10 does not perform a COMMIT upon creation of + a temporary table. However, it does perform an implicit + COMMIT when creating an index over a temporary table, or + upon ALTERing the definition of temporary table. + + + + + SQL Anywhere does support OUT parameters with callable stored procedures. + + + + + SQL Anywhere uses DEFAULT AUTOINCREMENT to identify an IDENTITY + column in a CREATE TABLE statement. + + + + + SQL Anywhere supports a query statement that provides LIMIT + functionality. + + true + + + + SQL Anywhere supports a query statement that provides LIMIT + functionality with an offset. + + true + + + + Can parameters be used for a statement containing a LIMIT? + + + + + SQL Anywhere syntax is SELECT TOP n START AT m + + + + + SQL Anywhere 11 uses SELECT TOP n START AT m [ select list items ] + for LIMIT/OFFSET support. + + + + + SQL Anywhere does support FOR UPDATE OF syntax. However, + in SQL Anywhere one cannot specify both FOR UPDATE OF syntax + and FOR UPDATE BY LOCK in the same statement. To achieve INTENT + locking when using FOR UPDATE OF syntax one must use a table hint + in the query's FROM clause, ie. + + SELECT * FROM FOO WITH( UPDLOCK ) FOR UPDATE OF ( column-list ). + + In this dialect, we avoid this issue by supporting only + FOR UPDATE BY LOCK. + + + + + SQL Anywhere supports FOR UPDATE over cursors containing + outer joins. + + + + + Lock rows in the cursor explicitly using INTENT row locks. + + + + + Enforce the condition that this query is read-only. This ensure that certain + query rewrite optimizations, such as join elimination, can be used. + + + + + Lock rows in the cursor explicitly using INTENT row locks. + + + + + SQL Anywhere does not support FOR UPDATE NOWAIT. However, the intent + is to acquire pessimistic locks on the underlying rows; with NHibernate + one can accomplish this through setting the BLOCKING connection option. + Hence, with this API we lock rows in the cursor explicitly using INTENT row locks. + + + + + We assume that applications using this dialect are NOT using + SQL Anywhere's snapshot isolation modes. + + + + + We assume that applications using this dialect are NOT using + SQL Anywhere's snapshot isolation modes. + + + + + SQL Anywhere supports both double quotes or '[' (Microsoft syntax) for + quoted identifiers. + + Note that quoted identifiers are controlled through + the QUOTED_IDENTIFIER connection option. + + + + + SQL Anywhere supports both double quotes or '[' (Microsoft syntax) for + quoted identifiers. + + + + + SQL Anywhere Does not support empty IN lists. + + + + + SQL Anywhere's implementation of KEYSET-DRIVEN cursors does not + permit absolute postioning. With jConnect as the driver, this support + will succeed because jConnect FETCHes the entire result set to the client + first; it will fail with the iAnywhere JDBC driver. Because the server + may decide to use a KEYSET cursor even if the cursor is declared as + FORWARD ONLY, this support is disabled. + + + + + SQL Anywhere does not support an EXISTS clause within a + SELECT list. + + + + + By default, the SQL Anywhere dbinit utility creates a + case-insensitive database for the CHAR collation. This can + be changed through the use of the -c command line switch on + dbinit, and the setting may differ for the NCHAR collation + for national character sets. Whether or not a database + supports case-sensitive comparisons can be determined via + the DB_Extended_property() function, for example + + SELECT DB_EXTENDED_PROPERTY( 'Collation', 'CaseSensitivity'); + + + + + SQL Anywhere supports COMMENT ON statements for a wide variety of + database objects. When the COMMENT statement is executed an implicit + COMMIT is performed. However, COMMENT syntax for CREATE TABLE, as + expected by NHibernate (see Table.cs), is not supported. + + + + + SQL Anywhere does not require qualification of index names. + + + + + SQL Anywhere currently supports only "VALUES (DEFAULT)", not + the ANSI standard "DEFAULT VALUES". This latter syntax will be + supported in the SQL Anywhere 11.0.1 release. For the moment, + "VALUES (DEFAULT)" works only for a single-column table. + + + + + SQL Anywhere does not require dropping a constraint before + dropping a table, and the DROP statement syntax used by Hibernate + to drop a constraint is not compatible with SQL Anywhere, so disable it. + + + + + In SQL Anywhere, the syntax + + DECLARE LOCAL TEMPORARY TABLE ... + + can also be used, which creates a temporary table with procedure scope, + which may be important for stored procedures. + + + + + Assume that temporary table rows should be preserved across COMMITs. + + + + + SQL Anywhere does support query expressions containing UNION ALL. + + + + + SQL Dialect for SQL Anywhere 11 - for the NHibernate 3.0.0 distribution + Copyright (C) 2010 Glenn Paulley + Contact: http://iablog.sybase.com/paulley + + This NHibernate dialect should be considered BETA software. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + + The dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + prepare_sql + + + + + This class maps a DbType to names. @@ -13129,6 +14578,17 @@ The SqlType to set for IDbDataParameter. An IDbDataParameter ready to be added to an IDbCommand. + + + Expand the parameters of the cmd to have a single parameter for each parameter in the + sql string + + + This is for databases that do not support named parameters. So, instead of a single parameter + for 'select ... from MyTable t where t.Col1 = @p0 and t.Col2 = @p0' we can issue + 'select ... from MyTable t where t.Col1 = ? and t.Col2 = ?' + + Does this Driver support having more than 1 open IDataReader with @@ -13252,6 +14712,17 @@ Connection type name. Command type name. + + + Initializes a new instance of with + type names that are loaded from the specified assembly. + + The Invariant name of a provider. + Assembly to load the types from. + Connection type name. + Command type name. + + Initializes a new instance of the class. @@ -13295,6 +14766,30 @@ iAnywhere.Data.AsaClient use the string.Empty to locate parameters in sql. + + + NHibernate driver for the Community CsharpSqlite data provider. +

+ Author: Nikolaos Tountas +

+
+ +

+ In order to use this Driver you must have the Community.CsharpSqlite.dll and Community.CsharpSqlite.SQLiteClient assemblies referenced. +

+

+ Please check http://code.google.com/p/csharp-sqlite/ for more information regarding csharp-sqlite. +

+
+
+ + + Initializes a new instance of . + + + Thrown when the Community.CsharpSqlite.dll assembly can not be loaded. + + A NHibernate Driver for using the IBM.Data.DB2.iSeries DataProvider. @@ -14261,68 +15756,6 @@ created for Yukon because it is supposed to support it. - - - The SybaseClientDriver Driver provides a database driver for Sybase. - - - It has been reported to work with the . - - - - - Initializes a new instance of the class. - - - Thrown when the Sybase.Data.AseClient assembly can not be loaded. - - - - - Sybase.Data.AseClient uses named parameters in the sql. - - - Sybase uses @ in the sql. - - - - - - - Sybase.Data.AseClient use the @ to locate parameters in sql. - - @ is used to locate parameters in sql. - - - - The SybaseClientDriver Driver provides a database driver for Sybase. - - - It has been reported to work with the . - - - - - Initializes a new instance of the class. - - - Thrown when the Sybase.Data.AseClient assembly can not be loaded. - - - - - Sybase.Data.AseClient uses named parameters in the sql. - - - Sybase uses @ in the sql. - - - - - - - Sybase.Data.AseClient use the @ to locate parameters in sql. - - @ is used to locate parameters in sql. - Represents state associated with the processing of a given @@ -14485,6 +15918,13 @@ True if we currently hold state pertaining to loading collections; false otherwise. + + + Do we currently have any registered internal entries corresponding to loading + collections? + True if we currently hold state pertaining to a registered loading collections; false otherwise. + + Represents a collection currently being loaded. @@ -14769,6 +16209,11 @@ Prepares the internal action queues for execution. + + + Execute any registered + + Performs cleanup of any held cache softlocks. @@ -16328,6 +17773,14 @@ + + + Execute a List() expression query + + + + + Strongly-typed version of @@ -17559,12 +19012,12 @@ The evict event to be handled. - - An event that occurs for each entity instance at flush time + + An event that occurs for each entity instance at flush time - + Flushes a single entity's state to the database, by scheduling an update action, if necessary @@ -17578,7 +19031,7 @@ The entity mode. - + Performs all necessary checking to determine if an entity needs an SQL update to synchronize its state to the database. Modifies the event by side-effect! Note: this method is quite slow, avoid calling if possible! @@ -18664,137 +20117,6 @@ The entity name for the instance to be removed. the instance to be removed - - - Execute a query - - A query expressed in Hibernate's query language - A distinct list of instances - See for implications of cache usage. - - - - Execute a query, binding a value to a "?" parameter in the query string. - - The query string - A value to be bound to a "?" placeholder - The Hibernate type of the value - A distinct list of instances - See for implications of cache usage. - - - - Execute a query, binding an array of values to a "?" parameters in the query string. - - The query string - An array of values to be bound to the "?" placeholders - An array of Hibernate types of the values - A distinct list of instances - See for implications of cache usage. - - - - Execute a query and return the results in an interator. - - - - If the query has multiple return values, values will be returned in an array of - type object[]. - - - Entities returned as results are initialized on demand. The first SQL query returns - identifiers only. So Enumerator() is usually a less efficient way to retrieve - object than List(). - - - The query string - An enumerator - - - - Execute a query and return the results in an interator, - binding a value to a "?" parameter in the query string. - - - - If the query has multiple return values, values will be returned in an array of - type object[]. - - - Entities returned as results are initialized on demand. The first SQL query returns - identifiers only. So Enumerator() is usually a less efficient way to retrieve - object than List(). - - - The query string - A value to be written to a "?" placeholder in the query string - The hibernate type of the value - An enumerator - - - - Execute a query and return the results in an interator, - binding the values to "?"s parameters in the query string. - - - - If the query has multiple return values, values will be returned in an array of - type object[]. - - - Entities returned as results are initialized on demand. The first SQL query returns - identifiers only. So Enumerator() is usually a less efficient way to retrieve - object than List(). - - - The query string - A list of values to be written to "?" placeholders in the query - A list of hibernate types of the values - An enumerator - - - - Apply a filter to a persistent collection. - - - A filter is a Hibernate query that may refer to this, the collection element. - Filters allow efficient access to very large lazy collections. (Executing the filter - does not initialize the collection.) - - A persistent collection to filter - A filter query string - The resulting collection - - - - Apply a filter to a persistent collection, binding the given parameter to a "?" placeholder - - - A filter is a Hibernate query that may refer to this, the collection element. - Filters allow efficient access to very large lazy collections. (Executing the filter - does not initialize the collection.) - - A persistent collection to filter - A filter query string - A value to be written to a "?" placeholder in the query - The hibernate type of value - A collection - - - - Apply a filter to a persistent collection, binding the given parameters to "?" placeholders. - - - A filter is a Hibernate query that may refer to this, the collection element. - Filters allow efficient access to very large lazy collections. (Executing the filter - does not initialize the collection.) - - A persistent collection to filter - A filter query string - The values to be written to "?" placeholders in the query - The hibernate types of the values - A collection - Delete all objects returned by the query. @@ -18945,6 +20267,20 @@ The alias of the entity An ICriteria object + + + Creates a new IQueryOver<T> for the entity class. + + The entity class + An ICriteria<T> object + + + + Creates a new IQueryOver<T> for the entity class. + + The entity class + An ICriteria<T> object + Create a new instance of Query for the given query string @@ -18952,6 +20288,13 @@ A hibernate query string The query + + + Create a new instance of Query for the given query expression + A hibernate query expression + The query + + Create a new instance of Query for the given collection and filter string @@ -18971,24 +20314,6 @@ The query can be either in HQL or SQL format. - - - Create a new instance of IQuery for the given SQL string. - - a query expressed in SQL - a table alias that appears inside {} in the SQL string - the returned persistent class - An from the SQL string - - - - Create a new instance of for the given SQL string. - - a query expressed in SQL - an array of table aliases that appear inside {} in the SQL string - the returned persistent classes - An from the SQL string - Create a new instance of for the given SQL query string. @@ -19739,7 +21064,7 @@ Returns to the previous 'FROM' context. - + Implementations will report or handle errors invoked by an ANTLR base parser. @@ -20049,9 +21374,6 @@ called by subclasses after instantiation. - - of - An array indicating whether the entities have eager property fetching @@ -21191,38 +22513,43 @@ Ported by: Steve Strong + + + Facade for generation of + and instances. + + Facade for generation of and instances. - + Construct a instance capable of translating an HQL query string. - - The query-identifier (used in collection). - This is typically the same as the queryString parameter except for the case of - split polymorphic queries which result in multiple physical sql queries. - The query string to be translated + + Currently enabled filters The session factory An appropriate translator. - + - Construct a instance capable of - translating an HQL filter string. + Construct a instance + capable of translating a Linq expression. The query-identifier (used in collection). This is typically the same as the queryString parameter except for the case of split polymorphic queries which result in multiple physical sql queries. - The query string to be translated + The query expression to be translated + + Currently enabled filters The session factory An appropriate translator. @@ -21343,6 +22670,11 @@ Public constructor + + + Public constructor + + Returns a string representation of the object. @@ -21467,12 +22799,12 @@ Defined query substitutions. Does this represent a shallow (scalar or entity-id) select? - + Creates a new AST-based query translator. The query-identifier (used in stats collection) - The hql query to translate + The hql query to translate Currently enabled filters The session factory constructing this translator instance. @@ -23785,11 +25117,11 @@ ISession.List(); - A particulare page of the result set may be selected by calling + A particular page of the result set may be selected by calling SetMaxResults(), SetFirstResult(). The generated sql depends on the capabilities of the . Some Dialects are for databases that have built in paging (LIMIT) and those capabilities - will be used to limit the number of records returned by the sql statement. + will be used to limit the number of records returned by the sql statement. If the database does not support LIMITs then all of the records will be returned, but the objects created will be limited to the specific results requested. @@ -23829,7 +25161,7 @@

Entities returned as results are initialized on demand. The first SQL query returns - identifiers only. + identifiers only.

This is a good strategy to use if you expect a high number of the objects @@ -23882,7 +25214,7 @@

- + Execute the update or delete statement. The number of entities updated or deleted. @@ -23900,10 +25232,10 @@ The first row to retreive. - - Entities retrieved by this query will be loaded in - a read-only mode where Hibernate will never dirty-check - them or make changes persistent. + + Entities retrieved by this query will be loaded in + a read-only mode where NHibernate will never dirty-check + them or make changes persistent. @@ -23955,7 +25287,7 @@ Position of the parameter in the query, numbered from 0 The possibly null parameter value - The Hibernate type + The NHibernate type @@ -23983,7 +25315,7 @@ - Bind a value to an indexed parameter, guessing the Hibernate type from + Bind a value to an indexed parameter, guessing the NHibernate type from the class of the given object. The position of the parameter in the query, numbered from 0 @@ -24004,11 +25336,11 @@ The name of the parameter A collection of values to list - The Hibernate type of the values + The NHibernate type of the values - Bind multiple values to a named query parameter, guessing the Hibernate + Bind multiple values to a named query parameter, guessing the NHibernate type from the class of the first object in the collection. This is useful for binding a list of values to an expression such as foo.bar in (:value_list) @@ -24016,18 +25348,18 @@ A collection of values to list - + Bind multiple values to a named query parameter. This is useful for binding a list of values to an expression such as foo.bar in (:value_list). the name of the parameter a collection of values to list - the Hibernate type of the values + the NHibernate type of the values - - Bind multiple values to a named query parameter. The Hibernate type of the parameter is - first detected via the usage/position in the query and if not sufficient secondly + + Bind multiple values to a named query parameter. The NHibernate type of the parameter is + first detected via the usage/position in the query and if not sufficient secondly guessed from the class of the first object in the array. This is useful for binding a list of values to an expression such as foo.bar in (:value_list). @@ -24038,7 +25370,7 @@ Bind the property values of the given object to named parameters of the query, matching property names with parameter names and mapping property types to - Hibernate types using heuristics. + NHibernate types using heuristics. Any PONO @@ -24359,7 +25691,7 @@ - The Hibernate types of the query result set. + The NHibernate types of the query result set. @@ -24555,6 +25887,17 @@ The type of join to use. this (for method chaining) + + + Join an association using the specified join-type, assigning an alias to the joined + association + + + + The type of join to use. + The criteria to be added to the join condition (ON clause) + this (for method chaining) + Create a new , "rooted" at the associated entity @@ -24590,6 +25933,17 @@ The type of join to use. The created "sub criteria" + + + Create a new , "rooted" at the associated entity, + assigning the given alias and using the specified join type. + + A dot-separated property path + The alias to assign to the joined association (for later reference). + The type of join to use. + The criteria to be added to the join condition (ON clause) + The created "sub criteria" + Set a strategy for handling the query results. This determines the @@ -24756,83 +26110,6 @@ The clone of the root criteria. - - - Error handling in this case will only kick in if we cannot set values on the TLS - this is usally the case if we are called from the finalizer, since this is something - that we do only for logging, we ignore the error. - - - - - Expose the batch functionality in ADO.Net 2.0 - Microsoft in its wisdom decided to make my life hard and mark it internal. - Through the use of Reflection and some delegates magic, I opened up the functionality. - - Observable performance benefits are 50%+ when used, so it is really worth it. - - - - - Append a command to the batch - - - - - - Executes the batch - - - This seems to be returning the total number of affected rows in all queries - - - - - Return the batch command to be executed - - - - - The number of commands batched in this instance - - - - - Append a command to the batch - - - - - - This is required because SqlClient.SqlCommandSet will throw if - the command has no parameters. - - - - - - Executes the batch - - - This seems to be returning the total number of affected rows in all queries - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - 2 - - - - Return the batch command to be executed - - - - - The number of commands batched in this instance - - Named query in "detached mode" where the NHibernate session is not available. @@ -24982,6 +26259,120 @@ returned. + + + Subquery type enumeration + + + + exact + + + all + + + some + + + + Converts lambda expressions to NHibernate criterion/order + + + + + Invoke the expression to extract its runtime value + + + + + Retrieves the name of the property from a member expression + + An expression tree that can contain either a member, or a conversion from a member. + If the member is referenced from a null valued object, then the container is treated as an alias. + The name of the member property + + + + Retrieves the name of the property from a member expression (without leading member access) + + + + + Retrieves a detached criteria from an appropriate lambda expression + + Expresson for detached criteria using .As<>() extension"/> + Evaluated detached criteria + + + + Convert a lambda expression to NHibernate ICriterion + + The type of the lambda expression + The lambda expression to convert + NHibernate ICriterion + + + + Convert a lambda expression to NHibernate ICriterion + + The lambda expression to convert + NHibernate ICriterion + + + + Convert a lambda expression to NHibernate Order + + The type of the lambda expression + The lambda expression to convert + The appropriate order delegate (order direction) + NHibernate Order + + + + Convert a lambda expression to NHibernate Order + + The lambda expression to convert + The appropriate order delegate (order direction) + NHibernate Order + + + + Convert a lambda expression to NHibernate Order + + The lambda expression to convert + The appropriate order delegate (order direction) + Indicates if the path is an aliased projection + NHibernate Order + + + + Convert a lambda expression to NHibernate subquery AbstractCriterion + + type of member expression + type of subquery + lambda expression to convert + NHibernate.ICriterion.AbstractCriterion + + + + Convert a lambda expression to NHibernate subquery AbstractCriterion + + type of subquery + lambda expression to convert + NHibernate.ICriterion.AbstractCriterion + + + + Register a custom method for use in a QueryOver expression + + Lambda expression demonstrating call of custom method + function to convert MethodCallExpression to ICriterion + + + + Warning: adds new parameters to the argument by side-effect, as well as mutating the query expression tree! + + @@ -25237,6 +26628,44 @@ The detached criteria + + + Adds the specified IQueryOver to the query. The result will be contained in a + + Return results in a + The IQueryOver. + + + + + Adds the specified IQueryOver to the query. The result will be contained in a + + The IQueryOver. + + + + + Adds the specified IQueryOver to the query. The result will be contained in a + + The IQueryOver. + + + + + Adds the specified IQueryOver to the query, and associates it with the given key. The result will be contained in a + + The key + The IQueryOver + + + + + Adds the specified IQueryOver to the query, and associates it with the given key. The result will be contained in a + + The key + The IQueryOver + + Sets whatevert this criteria is cacheable. @@ -25278,6 +26707,26 @@ The session. The factory. + + Return a cacheable "disassembled" representation of the object. + the value to cache + the session + optional parent entity object (needed for collections) + the disassembled, deep cloned state + + + Reconstruct the object from its cached "disassembled" state. + the disassembled state from the cache + the session + the parent entity object + the the object + + + + Called before assembling a query result set from the query cache, to allow batch fetching + of entities missing from the second-level cache. + + Combines sevaral queries into a single database call @@ -25287,103 +26736,124 @@ Get all the results + + The result is a IList of IList. + - Adds the specified criteria to the query. The result will be contained in a + Adds the specified query to the query. The result will be contained in a Return results in a - The criteria. - + The query. + The instance for method chain. Add the specified HQL query to the multi query. The result will be contained in a + The query Add the specified HQL query to the multi query, and associate it with the given key. The result will be contained in a - - - + The key to get results of the specific query. + The query + The instance for method chain. + Add the specified HQL Query to the multi query, and associate it with the given key. The result will be contained in a - - - + The key to get results of the specific query. + The query + The instance for method chain. + Add the specified HQL query to the multi query. The result will be contained in a + The query + The instance for method chain. Add a named query to the multi query. The result will be contained in a + The query + The instance for method chain. Add a named query to the multi query, and associate it with the given key. The result will be contained in a - - - + The key to get results of the specific query. + The query + The instance for method chain. + Add the specified HQL query to the multi query, and associate it with the given key - - - + The key to get results of the specific query. + The query + The instance for method chain. + Add the specified HQL query to the multi query + The query + The instance for method chain. Add the specified HQL Query to the multi query, and associate it with the given key - - - + The key to get results of the specific query. + The query + The instance for method chain. + Add the specified HQL query to the multi query + The instance for method chain. Add a named query to the multi query + The query + The instance for method chain. Add a named query to the multi query, and associate it with the given key - - - + The key to get results of the specific query. + The query + The instance for method chain. + Enable caching of this query result set. Should the query results be cacheable? + The instance for method chain. Set the name of the cache region. The name of a query cache region, or for the default query cache + The instance for method chain. Should the query force a refresh of the specified query cache region? @@ -25393,12 +26863,14 @@ based on its knowledge of those events. Should the query result in a forcible refresh of the query cache? + The instance for method chain. The timeout for the underlying ADO query + The instance for method chain. @@ -25407,6 +26879,7 @@ The name of the parameter The possibly null parameter value The NHibernate . + The instance for method chain. @@ -25415,6 +26888,7 @@ The name of the parameter The non-null parameter value + The instance for method chain. @@ -25424,6 +26898,7 @@ The name of the parameter A collection of values to list The Hibernate type of the values + The instance for method chain. @@ -25433,6 +26908,7 @@ The name of the parameter A collection of values to list + The instance for method chain. @@ -25441,6 +26917,7 @@ The name of the parameter A non-null instance of a . + The instance for method chain. @@ -25449,6 +26926,7 @@ The name of the parameter A non-null instance of a array. + The instance for method chain. @@ -25457,6 +26935,7 @@ The name of the parameter A non-null instance of a . + The instance for method chain. @@ -25465,6 +26944,7 @@ The name of the parameter A non-null instance of a . + The instance for method chain. @@ -25473,6 +26953,7 @@ The name of the parameter A non-null instance of a . + The instance for method chain. @@ -25481,6 +26962,7 @@ A non-null instance of a . The name of the parameter + The instance for method chain. @@ -25489,6 +26971,7 @@ The name of the parameter A non-null instance of a . + The instance for method chain. @@ -25497,6 +26980,7 @@ The name of the parameter A non-null instance of a . + The instance for method chain. @@ -25504,6 +26988,7 @@ The name of the parameter A non-null instance of a persistent class + The instance for method chain. @@ -25512,6 +26997,7 @@ The name of the parameter A non-null instance of a persistent enumeration + The instance for method chain. @@ -25520,6 +27006,7 @@ The name of the parameter A non-null instance of a . + The instance for method chain. @@ -25528,6 +27015,7 @@ The name of the parameter A non-null instance of a . + The instance for method chain. @@ -25536,6 +27024,7 @@ The name of the parameter A non-null instance of a . + The instance for method chain. @@ -25544,6 +27033,7 @@ The name of the parameter A non-null instance of a . + The instance for method chain. @@ -25552,6 +27042,7 @@ The name of the parameter A non-null instance of a . + The instance for method chain. @@ -25560,6 +27051,7 @@ The name of the parameter An instance of a . + The instance for method chain. @@ -25568,6 +27060,7 @@ The name of the parameter A non-null instance of a . + The instance for method chain. @@ -25576,24 +27069,30 @@ The name of the parameter A non-null instance of a . + The instance for method chain. Override the current session flush mode, just for this query. + The instance for method chain. Set a strategy for handling the query results. This can be used to change "shape" of the query result. + + The will be applied after the transformer of each single query. + + The instance for method chain. - Returns the result of one of the Criteria based on the key + Returns the result of one of the query based on the key The key - + The instance for method chain. @@ -25884,13 +27383,6 @@ Delete a persistent object (by explicit entity name) - - - Retrieve a list of persistent objects using a Hibernate query - - - - @@ -26519,6 +28011,9 @@ Clear the internal dirty flag. + + Intercept field set/get + Is the entity considered dirty? True if the entity is dirty; otherwise false. @@ -26526,6 +28021,12 @@ Is the entity to which we are bound completely initialized? + + Get the entity-name of the field DeclaringType. + + + Get the MappedClass (field container). + Helper class for dealing with enhanced entity classes. @@ -26538,6 +28039,135 @@ Initialize the property, and return its new value + + + An AggregatingGroupBy is a query such as: + + from p in db.Products + group p by p.Category.CategoryId + into g + select new + { + g.Key, + MaxPrice = g.Max(p => p.UnitPrice) + }; + + Where the grouping operation is being fully aggregated and hence does not create any form of heirarchy. + This class takes such queries, flattens out the re-linq sub-query and re-writes the outer select + + + + + Detects if an expression tree contains aggregate functions + + + + + An AggregatingGroupJoin is a query such as: + + from c in db.Customers + join o in db.Orders on c.CustomerId equals o.Customer.CustomerId into ords + join e in db.Employees on c.Address.City equals e.Address.City into emps + select new { c.ContactName, ords = ords.Count(), emps = emps.Count() }; + + where the results of the joins are being fully aggregated and hence do not create any form of hierarchy. + This class takes such expressions and turns them into this form: + + from c in db.Customers + select new + { + c.ContactName, + ords = (from o2 in db.Orders where o2.Customer.CustomerId == c.CustomerId select o2).Count(), + emps = (from e2 in db.Employees where e2.Address.City == c.Address.City select e2).Count() + }; + + + + + + Builds HQL Equality nodes and used in joins + + + + + Performs the equivalent of a ToString() on an expression. Swaps out constants for + parameters so that, for example: + from c in Customers where c.City = "London" + generate the same key as + from c in Customers where c.City = "Madrid" + + + + + Locates constants in the expression tree and generates parameters for each one + + + + + Performs bottom-up analysis to determine which nodes that match a certain predicate + + + + + Extract the from a given expression. + + The declaring-type of the method. + The method. + The of the no-generic method or the generic-definition for a generic-method. + + + + + Extract the from a given expression. + + The method. + The of the no-generic method or the generic-definition for a generic-method. + + + + + Gets the field or property to be accessed. + + The declaring-type of the property. + The type of the property. + The expression representing the property getter. + The of the property. + + + + Check if a method is declared in a given . + + The method to check. + The where the method is really declared. + True if the method is an implementation of the method declared in ; false otherwise. + + + + Provides the main entry point to a LINQ query. + + + + + Implementors define a strategy for transforming criteria query + results into the actual application-visible query result list. + + + + + + + + + + + + + + + + + + Walker for collections of values and many-to-many associations @@ -26787,8 +28417,7 @@ - Get the names of the columns constrained - by this criterion. + Get the names of the columns constrained by this criterion. @@ -27117,6 +28746,11 @@ + + + Override to use the persister to change the table-alias for columns in join-tables + + Disable outer join fetching if this loader obtains an @@ -30891,6 +32525,11 @@ Return the alised identifier column names + + + Get the table alias used for the supplied column + + Extends the generic ILoadable contract to add operations required by HQL @@ -32485,6 +34124,11 @@ An ANSI-style Join. + + + Represents a SQL JOIN + + @@ -32559,7 +34203,7 @@ An Oracle-style (theta) Join - + This method is a bit of a hack, and assumes that the column on the "right" side of the @@ -32574,15 +34218,17 @@ A placeholder for an ADO.NET parameter in an . - + We need to know what the position of the parameter was in a query before we rearranged the query. - This is used only by dialects that rearrange the query, unfortunately, - the MS SQL 2005 dialect have to re shuffle the query (and ruin positional parameter - support) because the SQL 2005 and 2008 SQL dialects have a completely broken - support for paging, which is just a tad less important than SELECT. - See NH-1528 + This is the ADO parameter position that this SqlString parameter is + bound to. The SqlString can be safely rearranged once this is set. + + + + + Create a parameter with the specified position @@ -33116,6 +34762,11 @@ A provider-neutral version of the CommandText + + + Make a copy of the SqlString, with new parameter references (Placeholders) + + Returns substring of this SqlString starting with the specified @@ -33948,6 +35599,12 @@ Perform the validations. + + + This acts as a template method. Specific Reader instances + override the component methods. + + A implementation based on an explicitly supplied @@ -34169,28 +35826,6 @@ A mimic to the javax.transaction.Synchronization callback to enable - - - Implementors define a strategy for transforming criteria query - results into the actual application-visible query result list. - - - - - - - - - - - - - - - - - - Result transformer that allows to transform a result to @@ -34754,6 +36389,258 @@ Mapping of the built in Type hierarchy. + + + Defines a mapping from a .NET to a SQL datatype. + This interface is intended to be implemented by applications that need custom types. + + Implementors should usually be immutable and MUST definately be threadsafe. + + + + + When implemented by a class, returns the SqlTypes for the columns mapped by this IType. + The that uses this IType.An array of s. + + + + When implemented by a class, returns how many columns are used to persist this type. + The that uses this IType.The number of columns this IType spans.MappingException + + + + When implemented by a class, should the parent be considered dirty, + given both the old and current field or element value? + The old valueThe current valueThe true if the field is dirty + + + + When implemented by a class, gets an instance of the object mapped by + this IType from the . + The that contains the values + The names of the columns in the that contain the + value to populate the IType with. + The object mapped by this IType. + Implementors should handle possibility of null values. + + + + + When implemented by a class, gets an instance of the object + mapped by this IType from the . + The that contains the valuesThe name of the column in the that contains the + value to populate the IType with.The object mapped by this IType. + Implementations should handle possibility of null values. + This method might be called if the IType is known to be a single-column type. + + + + + When implemented by a class, puts the value/values from the mapped + class into the . + The to put the values into.The object that contains the values.The index of the to start writing the values to.Indicates which columns are to be set. + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from . + + + + + When implemented by a class, puts the value/values from the mapped + class into the . + + The to put the values into. + The object that contains the values. + The index of the to start writing the values to. + + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from . + + + + + When implemented by a class, a representation of the value to be + embedded in an XML element + The object that contains the values.An Xml formatted string. + + + + When implemented by a class, returns a deep copy of the persistent + state, stopping at entities and at collections. + A Collection element or Entity fieldThe entityMode.The session factory.A deep copy of the object. + + + + When implemented by a class, retrieves an instance of the mapped class, + or the identifier of an entity or collection from a . + The that contains the values. + The names of the columns in the that contain the + value to populate the IType with. + the sessionThe parent EntityAn identifier or actual object mapped by this IType. + + This is useful for 2-phase property initialization - the second phase is a call to + ResolveIdentifier() + + + Most implementors of this method will just pass the call to NullSafeGet(). + + + + + + When implemented by a class, maps identifiers to Entities or Collections. + An identifier or value returned by Hydrate()The sessionThe parent EntityThe Entity or Collection referenced by this Identifier. + This is the second phase of 2-phase property initialization. + + + + + Given a hydrated, but unresolved value, return a value that may be used to + reconstruct property-ref associations. + + + + + + + + During merge, replace the existing (target) value in the entity we are merging to + with a new (original) value from the detached entity we are merging. For immutable + objects, or null values, it is safe to simply return the first parameter. For + mutable objects, it is safe to return a copy of the first parameter. For objects + with component values, it might make sense to recursively replace component values. + + the value from the detached entity being merged + the value in the managed entity + + + + + the value to be merged + + + + Compare two instances of the class mapped by this type for persistence + "equality" - equality of persistent state - taking a shortcut for + entity references. + + + + + boolean + + + + Compare two instances of the class mapped by this type for persistence + "equality" - equality of persistent state. + + + + + boolean + + + + Compare two instances of the class mapped by this type for persistence + "equality" - equality of persistent state. + + + + + + boolean + + + Get a hashcode, consistent with persistence "equality" + + + + + Get a hashcode, consistent with persistence "equality" + + + + + + compare two instances of the type + + + + + + Get the type of a semi-resolved value. + + + A representation of the value to be embedded in an XML element. + + + + + + Parse the XML representation of an instance. + + + an instance of the type + + + + Given an instance of the type, return an array of boolean, indicating + which mapped columns would be null. + + an instance of the type + + + + + When implemented by a class, gets the abbreviated name of the type. + The NHibernate type name. + + + + When implemented by a class, gets the returned + by the NullSafeGet() methods. + + The from the .NET framework. + + This is used to establish the class of an array of this Itype + + + + + When implemented by a class, gets the value indicating if the objects + of this IType are mutable. + true if the objects mapped by this IType are mutable. + With respect to the referencing object... + Entities and Collections are considered immutable because they manage their own internal state. + + + + + When implemented by a class, gets a value indicating if the implementor is castable to an an + true if this is an AssociationThis does not necessarily imply that the type actually represents an association. + + + + When implemented by a class, gets a value indicating if the implementor is a collection type + true if this is a . + + + + When implemented by a class, gets a value indicating if the implementor + is an . + true if this is an + If true, the implementation must be castable to . + A component type may own collections or associations and hence must provide certain extra functionality. + + + + + When implemented by a class, gets a value indicating if the implementor + extends + true if this is an + + + + Disassembles the object into a cacheable representation. @@ -34841,10 +36728,10 @@ The that uses this IType.The number of columns this IType spans.MappingException - + - + @@ -35329,6 +37216,23 @@ for the System.Type. + + + Maps a Property to a column that + stores date & time down to the accuracy of a second. + + + This only stores down to a second, so if you are looking for the most accurate + date and time storage your provider can give you use the . + or the + + + + + + + + Base class for enum types. @@ -35819,95 +37723,6 @@ - - - Summary description for CompositeCustomType. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Maps a Property @@ -36024,23 +37839,6 @@ Maps a Property to a - - - Maps a Property to a column that - stores date & time down to the accuracy of a second. - - - This only stores down to a second, so if you are looking for the most accurate - date and time storage your provider can give you use the . - or the - - - - - - - - @@ -36058,6 +37856,19 @@ column + + + Support for parameterizable types. A UserType or CustomUserType may be + made parameterizable by implementing this interface. Parameters for a + type may be set by using a nested type element for the property element + + + + + Gets called by Hibernate to pass the configured type parameters to + the implementation. + + @@ -37242,7 +39053,7 @@ Applications should use static methods and constants on NHibernate.NHibernateUtil if the default IType is good enough. For example, the TypeFactory should only be used when the String needs - to have a length of 300 instead of 255. At this point NHibernate.String does not get you the + to have a length of 300 instead of 255. At this point NHibernate.String does not get you the correct IType. Instead use TypeFactory.GetString(300) and keep a local variable that holds a reference to the IType. @@ -37275,15 +39086,15 @@ The Type of Classification This parses through the string and makes the assumption that no class - name and no assembly name will contain the "(". + name and no assembly name will contain the "(". - If it finds - the "(" and then finds a "," afterwards then it is a - TypeClassification.PrecisionScale. + If it finds + the "(" and then finds a "," afterwards then it is a + TypeClassification.PrecisionScale. If it finds the "(" - and doesn't find a "," afterwards, then it is a + and doesn't find a "," afterwards, then it is a TypeClassification.Length. @@ -37295,7 +39106,7 @@ Given the name of a Hibernate type such as Decimal, Decimal(19,0) - , Int32, or even NHibernate.Type.DecimalType, NHibernate.Type.DecimalType(19,0), + , Int32, or even NHibernate.Type.DecimalType, NHibernate.Type.DecimalType(19,0), NHibernate.Type.Int32Type, then return an instance of NHibernate.Type.IType The name of the type. @@ -37306,8 +39117,8 @@ - Uses heuristics to deduce a NHibernate type given a string naming the - type. + Uses heuristics to deduce a NHibernate type given a string naming the + type. An instance of NHibernate.Type.IType @@ -37315,15 +39126,15 @@ When looking for the NHibernate type it will look in the cache of the Basic types first. If it doesn't find it in the cache then it uses the typeName to get a reference to the Class (Type in .NET). Once we get the reference to the .NET class we check to see if it - implements IType, ICompositeUserType, IUserType, ILifecycle (Association), or + implements IType, ICompositeUserType, IUserType, ILifecycle (Association), or IPersistentEnum. If none of those are implemented then we will serialize the Type to the - database using NHibernate.Type.SerializableType(typeName) + database using NHibernate.Type.SerializableType(typeName) - Uses heuristics to deduce a NHibernate type given a string naming the - type. + Uses heuristics to deduce a NHibernate type given a string naming the + type. the type name parameters for the type @@ -37337,7 +39148,7 @@ A BinaryType In addition to returning the BinaryType it will also ensure that it has - been added to the basicNameMap with the keys Byte[](length) and + been added to the basicNameMap with the keys Byte[](length) and NHibernate.Type.BinaryType(length). @@ -37351,7 +39162,7 @@ In addition to returning the SerializableType it will also ensure that it has been added to the basicNameMap with the keys Type.FullName (the result - of IType.Name and Type.AssemblyQualifiedName. This is different + of IType.Name and Type.AssemblyQualifiedName. This is different from the other items put in the basicNameMap because it is uses the AQN and the FQN as opposed to the short name used in the maps and the FQN. @@ -37384,98 +39195,116 @@ A many-to-one association type for the given class and cascade style. - - Deep copy a series of values from one array to another... - The values to copy (the source) - The value types - an array indicating which values to include in the copy - The array into which to copy the values - The originating session - - - Apply the operation across a series of values. - The values - The value types - The originating session - - + - Determine if any of the given field values are dirty, - returning an array containing indexes of - the dirty fields or null if no fields are dirty. + Collection of convenience methods relating to operations across arrays of types... - - - Determine if any of the given field values are modified, - returning an array containing indexes of - the dirty fields or null if no fields are modified. - + + Deep copy a series of values from one array to another + The values to copy (the source) + The value types + An array indicating which values to include in the copy + The array into which to copy the values + The originating session - + + Apply the operation across a series of values. + The values + The value types + The originating session + + - + Apply the operation across a series of values. - - - - + The values + The value types + The originating session + The entity "owning" the values - - Apply the {@link Type#disassemble} operation across a series of values. - The values - The value types - An array indicating which values to include in the disassembled state - The originating session - The entity "owning" the values - The disassembled state + + Apply the operation across a series of values. + The values + The value types + An array indicating which values to include in the disassembled state + The originating session + The entity "owning" the values + The disassembled state - + - Apply the operation across a series of values. + Apply the operation across a series of values. - The source of the state - The target into which to replace the source values. - The value types - The originating session - The entity "owning" the values - Represent a cache of already replaced state - The replaced state + The source of the state + The target into which to replace the source values. + The value types + The originating session + The entity "owning" the values + Represent a cache of already replaced state + The replaced state - + - Apply the + Apply the operation across a series of values. - The source of the state - The target into which to replace the source values. - The value types - The originating session - The entity "owning" the values - A map representing a cache of already replaced state - FK directionality to be applied to the replacement - The replaced state + The source of the state + The target into which to replace the source values. + The value types + The originating session + The entity "owning" the values + A map representing a cache of already replaced state + FK directionality to be applied to the replacement + The replaced state - - - Apply the - operation across a series of values, as - long as the corresponding is an association. + + + Apply the + operation across a series of values, as long as the corresponding is an association. - The source of the state - The target into which to replace the source values. - The value types - The originating session - The entity "owning" the values - A map representing a cache of already replaced state - FK directionality to be applied to the replacement - The replaced state + The source of the state + The target into which to replace the source values. + The value types + The originating session + The entity "owning" the values + A map representing a cache of already replaced state + FK directionality to be applied to the replacement + The replaced state - If the corresponding type is a component type, then apply + If the corresponding type is a component type, then apply across the component subtypes but do not replace the component value itself. + + + Determine if any of the given field values are dirty, returning an array containing + indices of the dirty fields. + If it is determined that no fields are dirty, null is returned. + + The property definitions + The current state of the entity + The baseline state of the entity + Columns to be included in the dirty checking, per property + Does the entity currently hold any uninitialized property values? + The session from which the dirty check request originated. + Array containing indices of the dirty properties, or null if no properties considered dirty. + + + + Determine if any of the given field values are modified, returning an array containing + indices of the modified fields. + If it is determined that no fields are dirty, null is returned. + + The property definitions + The current state of the entity + The baseline state of the entity + Columns to be included in the mod checking, per property + Does the entity currently hold any uninitialized property values? + The session from which the dirty check request originated. + Array containing indices of the modified properties, or null if no properties considered modified. + Maps the Assembly Qualified Name of a to a @@ -37612,23 +39441,23 @@ - - A UserType that may be dereferenced in a query. - This interface allows a custom type to define "properties". - These need not necessarily correspond to physical .NET style properties. + + A UserType that may be dereferenced in a query. + This interface allows a custom type to define "properties". + These need not necessarily correspond to physical .NET style properties. - A ICompositeUserType may be used in almost every way - that a component may be used. It may even contain many-to-one - associations. + A ICompositeUserType may be used in almost every way + that a component may be used. It may even contain many-to-one + associations. - Implementors must be immutable and must declare a public - default constructor. + Implementors must be immutable and must declare a public + default constructor. - Unlike UserType, cacheability does not depend upon - serializability. Instead, Assemble() and - Disassemble() provide conversion to/from a cacheable - representation. - + Unlike UserType, cacheability does not depend upon + serializability. Instead, Assemble() and + Disassemble() provide conversion to/from a cacheable + representation. + @@ -37671,15 +39500,17 @@ the containing entity - + Write an instance of the mapped class to a prepared statement. Implementors should handle possibility of null values. A multi-column type should be written to parameters starting from index. + If a property is not settable, skip it and don't increment the index. + @@ -37715,13 +39546,13 @@ with a new (original) value from the detached entity we are merging. For immutable objects, or null values, it is safe to simply return the first parameter. For mutable objects, it is safe to return a copy of the first parameter. However, since - composite user types often define component values, it might make sense to recursively + composite user types often define component values, it might make sense to recursively replace component values in the target object. - Get the "property names" that may be used in a query. + Get the "property names" that may be used in a query. @@ -37889,19 +39720,6 @@ The factory. The loggable string representation. - - - Support for parameterizable types. A UserType or CustomUserType may be - made parameterizable by implementing this interface. Parameters for a - type may be set by using a nested type element for the property element - - - - - Gets called by Hibernate to pass the configured type parameters to - the implementation. - - Instantiate an uninitialized instance of the collection wrapper @@ -38691,17 +40509,6 @@ The , in general, become from another . - - - Try to find a method in a serie of given types. - - The serie of types where find. - The method info. - The found method or null. - - The , in general, become from another . - - Used to ensure a collection filtering a given IEnumerable by a certain type. @@ -39822,6 +41629,16 @@ NHibernate date type + + + NHibernate local date type + + + + + NHibernate utc date type + + NHibernate date type @@ -39980,13 +41797,6 @@ the entity identifier type - - - A NHibernate persistent object (entity) type - - a mapped entity class - - A NHibernate persistent object (entity) type diff --git a/Include/Fluent/Remotion.Data.Linq.dll b/Include/Fluent/Remotion.Data.Linq.dll new file mode 100644 index 0000000..14aeb2a Binary files /dev/null and b/Include/Fluent/Remotion.Data.Linq.dll differ diff --git a/Include/Fluent/log4net.dll b/Include/Fluent/log4net.dll deleted file mode 100644 index ffc57e1..0000000 Binary files a/Include/Fluent/log4net.dll and /dev/null differ diff --git a/Include/Fluent/log4net.xml b/Include/Fluent/log4net.xml deleted file mode 100644 index db9e99f..0000000 --- a/Include/Fluent/log4net.xml +++ /dev/null @@ -1,28655 +0,0 @@ - - - - log4net - - - - - Appender that logs to a database. - - - - appends logging events to a table within a - database. The appender can be configured to specify the connection - string by setting the property. - The connection type (provider) can be specified by setting the - property. For more information on database connection strings for - your specific database see http://www.connectionstrings.com/. - - - Records are written into the database either using a prepared - statement or a stored procedure. The property - is set to (System.Data.CommandType.Text) to specify a prepared statement - or to (System.Data.CommandType.StoredProcedure) to specify a stored - procedure. - - - The prepared statement text or the name of the stored procedure - must be set in the property. - - - The prepared statement or stored procedure can take a number - of parameters. Parameters are added using the - method. This adds a single to the - ordered list of parameters. The - type may be subclassed if required to provide database specific - functionality. The specifies - the parameter name, database type, size, and how the value should - be generated using a . - - - - An example of a SQL Server table that could be logged to: - - CREATE TABLE [dbo].[Log] ( - [ID] [int] IDENTITY (1, 1) NOT NULL , - [Date] [datetime] NOT NULL , - [Thread] [varchar] (255) NOT NULL , - [Level] [varchar] (20) NOT NULL , - [Logger] [varchar] (255) NOT NULL , - [Message] [varchar] (4000) NOT NULL - ) ON [PRIMARY] - - - - An example configuration to log to the above table: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Julian Biddle - Nicko Cadell - Gert Driesen - Lance Nehring - - - - Abstract base class implementation of that - buffers events in a fixed size buffer. - - - - This base class should be used by appenders that need to buffer a - number of events before logging them. For example the - buffers events and then submits the entire contents of the buffer to - the underlying database in one go. - - - Subclasses should override the - method to deliver the buffered events. - - The BufferingAppenderSkeleton maintains a fixed size cyclic - buffer of events. The size of the buffer is set using - the property. - - A is used to inspect - each event as it arrives in the appender. If the - triggers, then the current buffer is sent immediately - (see ). Otherwise the event - is stored in the buffer. For example, an evaluator can be used to - deliver the events immediately when an ERROR event arrives. - - - The buffering appender can be configured in a mode. - By default the appender is NOT lossy. When the buffer is full all - the buffered events are sent with . - If the property is set to true then the - buffer will not be sent when it is full, and new events arriving - in the appender will overwrite the oldest event in the buffer. - In lossy mode the buffer will only be sent when the - triggers. This can be useful behavior when you need to know about - ERROR events but not about events with a lower level, configure an - evaluator that will trigger when an ERROR event arrives, the whole - buffer will be sent which gives a history of events leading up to - the ERROR event. - - - Nicko Cadell - Gert Driesen - - - - Abstract base class implementation of . - - - - This class provides the code for common functionality, such - as support for threshold filtering and support for general filters. - - - Appenders can also implement the interface. Therefore - they would require that the method - be called after the appenders properties have been configured. - - - Nicko Cadell - Gert Driesen - - - - Implement this interface for your own strategies for printing log statements. - - - - Implementors should consider extending the - class which provides a default implementation of this interface. - - - Appenders can also implement the interface. Therefore - they would require that the method - be called after the appenders properties have been configured. - - - Nicko Cadell - Gert Driesen - - - - Closes the appender and releases resources. - - - - Releases any resources allocated within the appender such as file handles, - network connections, etc. - - - It is a programming error to append to a closed appender. - - - - - - Log the logging event in Appender specific way. - - The event to log - - - This method is called to log a message into this appender. - - - - - - Gets or sets the name of this appender. - - The name of the appender. - - The name uniquely identifies the appender. - - - - - Interface for appenders that support bulk logging. - - - - This interface extends the interface to - support bulk logging of objects. Appenders - should only implement this interface if they can bulk log efficiently. - - - Nicko Cadell - - - - Log the array of logging events in Appender specific way. - - The events to log - - - This method is called to log an array of events into this appender. - - - - - - Interface used to delay activate a configured object. - - - - This allows an object to defer activation of its options until all - options have been set. This is required for components which have - related options that remain ambiguous until all are set. - - - If a component implements this interface then the method - must be called by the container after its all the configured properties have been set - and before the component can be used. - - - Nicko Cadell - - - - Activate the options that were previously set with calls to properties. - - - - This allows an object to defer activation of its options until all - options have been set. This is required for components which have - related options that remain ambiguous until all are set. - - - If a component implements this interface then this method must be called - after its properties have been set before the component can be used. - - - - - - Initial buffer size - - - - - Maximum buffer size before it is recycled - - - - - Default constructor - - - Empty default constructor - - - - - Finalizes this appender by calling the implementation's - method. - - - - If this appender has not been closed then the Finalize method - will call . - - - - - - Initialize the appender based on the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Closes the appender and release resources. - - - - Release any resources allocated within the appender such as file handles, - network connections, etc. - - - It is a programming error to append to a closed appender. - - - This method cannot be overridden by subclasses. This method - delegates the closing of the appender to the - method which must be overridden in the subclass. - - - - - - Performs threshold checks and invokes filters before - delegating actual logging to the subclasses specific - method. - - The event to log. - - - This method cannot be overridden by derived classes. A - derived class should override the method - which is called by this method. - - - The implementation of this method is as follows: - - - - - - Checks that the severity of the - is greater than or equal to the of this - appender. - - - - Checks that the chain accepts the - . - - - - - Calls and checks that - it returns true. - - - - - If all of the above steps succeed then the - will be passed to the abstract method. - - - - - - Performs threshold checks and invokes filters before - delegating actual logging to the subclasses specific - method. - - The array of events to log. - - - This method cannot be overridden by derived classes. A - derived class should override the method - which is called by this method. - - - The implementation of this method is as follows: - - - - - - Checks that the severity of the - is greater than or equal to the of this - appender. - - - - Checks that the chain accepts the - . - - - - - Calls and checks that - it returns true. - - - - - If all of the above steps succeed then the - will be passed to the method. - - - - - - Test if the logging event should we output by this appender - - the event to test - true if the event should be output, false if the event should be ignored - - - This method checks the logging event against the threshold level set - on this appender and also against the filters specified on this - appender. - - - The implementation of this method is as follows: - - - - - - Checks that the severity of the - is greater than or equal to the of this - appender. - - - - Checks that the chain accepts the - . - - - - - - - - - Adds a filter to the end of the filter chain. - - the filter to add to this appender - - - The Filters are organized in a linked list. - - - Setting this property causes the new filter to be pushed onto the - back of the filter chain. - - - - - - Clears the filter list for this appender. - - - - Clears the filter list for this appender. - - - - - - Checks if the message level is below this appender's threshold. - - to test against. - - - If there is no threshold set, then the return value is always true. - - - - true if the meets the - requirements of this appender. - - - - - Is called when the appender is closed. Derived classes should override - this method if resources need to be released. - - - - Releases any resources allocated within the appender such as file handles, - network connections, etc. - - - It is a programming error to append to a closed appender. - - - - - - Subclasses of should implement this method - to perform actual logging. - - The event to append. - - - A subclass must implement this method to perform - logging of the . - - This method will be called by - if all the conditions listed for that method are met. - - - To restrict the logging of events in the appender - override the method. - - - - - - Append a bulk array of logging events. - - the array of logging events - - - This base class implementation calls the - method for each element in the bulk array. - - - A sub class that can better process a bulk array of events should - override this method in addition to . - - - - - - Called before as a precondition. - - - - This method is called by - before the call to the abstract method. - - - This method can be overridden in a subclass to extend the checks - made before the event is passed to the method. - - - A subclass should ensure that they delegate this call to - this base class if it is overridden. - - - true if the call to should proceed. - - - - Renders the to a string. - - The event to render. - The event rendered as a string. - - - Helper method to render a to - a string. This appender must have a - set to render the to - a string. - - If there is exception data in the logging event and - the layout does not process the exception, this method - will append the exception text to the rendered string. - - - Where possible use the alternative version of this method - . - That method streams the rendering onto an existing Writer - which can give better performance if the caller already has - a open and ready for writing. - - - - - - Renders the to a string. - - The event to render. - The TextWriter to write the formatted event to - - - Helper method to render a to - a string. This appender must have a - set to render the to - a string. - - If there is exception data in the logging event and - the layout does not process the exception, this method - will append the exception text to the rendered string. - - - Use this method in preference to - where possible. If, however, the caller needs to render the event - to a string then does - provide an efficient mechanism for doing so. - - - - - - The layout of this appender. - - - See for more information. - - - - - The name of this appender. - - - See for more information. - - - - - The level threshold of this appender. - - - - There is no level threshold filtering by default. - - - See for more information. - - - - - - It is assumed and enforced that errorHandler is never null. - - - - It is assumed and enforced that errorHandler is never null. - - - See for more information. - - - - - - The first filter in the filter chain. - - - - Set to null initially. - - - See for more information. - - - - - - The last filter in the filter chain. - - - See for more information. - - - - - Flag indicating if this appender is closed. - - - See for more information. - - - - - The guard prevents an appender from repeatedly calling its own DoAppend method - - - - - StringWriter used to render events - - - - - Gets or sets the threshold of this appender. - - - The threshold of the appender. - - - - All log events with lower level than the threshold level are ignored - by the appender. - - - In configuration files this option is specified by setting the - value of the option to a level - string, such as "DEBUG", "INFO" and so on. - - - - - - Gets or sets the for this appender. - - The of the appender - - - The provides a default - implementation for the property. - - - - - - The filter chain. - - The head of the filter chain filter chain. - - - Returns the head Filter. The Filters are organized in a linked list - and so all Filters on this Appender are available through the result. - - - - - - Gets or sets the for this appender. - - The layout of the appender. - - - See for more information. - - - - - - - Gets or sets the name of this appender. - - The name of the appender. - - - The name uniquely identifies the appender. - - - - - - Tests if this appender requires a to be set. - - - - In the rather exceptional case, where the appender - implementation admits a layout but can also work without it, - then the appender should return true. - - - This default implementation always returns true. - - - - true if the appender requires a layout object, otherwise false. - - - - - The default buffer size. - - - The default size of the cyclic buffer used to store events. - This is set to 512 by default. - - - - - Initializes a new instance of the class. - - - - Protected default constructor to allow subclassing. - - - - - - Initializes a new instance of the class. - - the events passed through this appender must be - fixed by the time that they arrive in the derived class' SendBuffer method. - - - Protected constructor to allow subclassing. - - - The should be set if the subclass - expects the events delivered to be fixed even if the - is set to zero, i.e. when no buffering occurs. - - - - - - Flush the currently buffered events - - - - Flushes any events that have been buffered. - - - If the appender is buffering in mode then the contents - of the buffer will NOT be flushed to the appender. - - - - - - Flush the currently buffered events - - set to true to flush the buffer of lossy events - - - Flushes events that have been buffered. If is - false then events will only be flushed if this buffer is non-lossy mode. - - - If the appender is buffering in mode then the contents - of the buffer will only be flushed if is true. - In this case the contents of the buffer will be tested against the - and if triggering will be output. All other buffered - events will be discarded. - - - If is true then the buffer will always - be emptied by calling this method. - - - - - - Initialize the appender based on the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Close this appender instance. - - - - Close this appender instance. If this appender is marked - as not then the remaining events in - the buffer must be sent when the appender is closed. - - - - - - This method is called by the method. - - the event to log - - - Stores the in the cyclic buffer. - - - The buffer will be sent (i.e. passed to the - method) if one of the following conditions is met: - - - - The cyclic buffer is full and this appender is - marked as not lossy (see ) - - - An is set and - it is triggered for the - specified. - - - - Before the event is stored in the buffer it is fixed - (see ) to ensure that - any data referenced by the event will be valid when the buffer - is processed. - - - - - - Sends the contents of the buffer. - - The first logging event. - The buffer containing the events that need to be send. - - - The subclass must override . - - - - - - Sends the events. - - The events that need to be send. - - - The subclass must override this method to process the buffered events. - - - - - - The size of the cyclic buffer used to hold the logging events. - - - Set to by default. - - - - - The cyclic buffer used to store the logging events. - - - - - The triggering event evaluator that causes the buffer to be sent immediately. - - - The object that is used to determine if an event causes the entire - buffer to be sent immediately. This field can be null, which - indicates that event triggering is not to be done. The evaluator - can be set using the property. If this appender - has the ( property) set to - true then an must be set. - - - - - Indicates if the appender should overwrite events in the cyclic buffer - when it becomes full, or if the buffer should be flushed when the - buffer is full. - - - If this field is set to true then an must - be set. - - - - - The triggering event evaluator filters discarded events. - - - The object that is used to determine if an event that is discarded should - really be discarded or if it should be sent to the appenders. - This field can be null, which indicates that all discarded events will - be discarded. - - - - - Value indicating which fields in the event should be fixed - - - By default all fields are fixed - - - - - The events delivered to the subclass must be fixed. - - - - - Gets or sets a value that indicates whether the appender is lossy. - - - true if the appender is lossy, otherwise false. The default is false. - - - - This appender uses a buffer to store logging events before - delivering them. A triggering event causes the whole buffer - to be send to the remote sink. If the buffer overruns before - a triggering event then logging events could be lost. Set - to false to prevent logging events - from being lost. - - If is set to true then an - must be specified. - - - - - Gets or sets the size of the cyclic buffer used to hold the - logging events. - - - The size of the cyclic buffer used to hold the logging events. - - - - The option takes a positive integer - representing the maximum number of logging events to collect in - a cyclic buffer. When the is reached, - oldest events are deleted as new events are added to the - buffer. By default the size of the cyclic buffer is 512 events. - - - If the is set to a value less than - or equal to 1 then no buffering will occur. The logging event - will be delivered synchronously (depending on the - and properties). Otherwise the event will - be buffered. - - - - - - Gets or sets the that causes the - buffer to be sent immediately. - - - The that causes the buffer to be - sent immediately. - - - - The evaluator will be called for each event that is appended to this - appender. If the evaluator triggers then the current buffer will - immediately be sent (see ). - - If is set to true then an - must be specified. - - - - - Gets or sets the value of the to use. - - - The value of the to use. - - - - The evaluator will be called for each event that is discarded from this - appender. If the evaluator triggers then the current buffer will immediately - be sent (see ). - - - - - - Gets or sets a value indicating if only part of the logging event data - should be fixed. - - - true if the appender should only fix part of the logging event - data, otherwise false. The default is false. - - - - Setting this property to true will cause only part of the - event data to be fixed and serialized. This will improve performance. - - - See for more information. - - - - - - Gets or sets a the fields that will be fixed in the event - - - The event fields that will be fixed before the event is buffered - - - - The logging event needs to have certain thread specific values - captured before it can be buffered. See - for details. - - - - - - - Initializes a new instance of the class. - - - Public default constructor to initialize a new instance of this class. - - - - - Initialize the appender based on the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Override the parent method to close the database - - - - Closes the database command and database connection. - - - - - - Inserts the events into the database. - - The events to insert into the database. - - - Insert all the events specified in the - array into the database. - - - - - - Adds a parameter to the command. - - The parameter to add to the command. - - - Adds a parameter to the ordered list of command parameters. - - - - - - Writes the events to the database using the transaction specified. - - The transaction that the events will be executed under. - The array of events to insert into the database. - - - The transaction argument can be null if the appender has been - configured not to use transactions. See - property for more information. - - - - - - Formats the log message into database statement text. - - The event being logged. - - This method can be overridden by subclasses to provide - more control over the format of the database statement. - - - Text that can be passed to a . - - - - - Connects to the database. - - - - - Retrieves the class type of the ADO.NET provider. - - - - Gets the Type of the ADO.NET provider to use to connect to the - database. This method resolves the type specified in the - property. - - - Subclasses can override this method to return a different type - if necessary. - - - The of the ADO.NET provider - - - - Prepares the database command and initialize the parameters. - - - - - Flag to indicate if we are using a command object - - - - Set to true when the appender is to use a prepared - statement or stored procedure to insert into the database. - - - - - - The list of objects. - - - - The list of objects. - - - - - - The security context to use for privileged calls - - - - - The that will be used - to insert logging events into a database. - - - - - The database command. - - - - - Database connection string. - - - - - String type name of the type name. - - - - - The text of the command. - - - - - The command type. - - - - - Indicates whether to use transactions when writing to the database. - - - - - Indicates whether to use transactions when writing to the database. - - - - - Gets or sets the database connection string that is used to connect to - the database. - - - The database connection string used to connect to the database. - - - - The connections string is specific to the connection type. - See for more information. - - - Connection string for MS Access via ODBC: - "DSN=MS Access Database;UID=admin;PWD=;SystemDB=C:\data\System.mdw;SafeTransactions = 0;FIL=MS Access;DriverID = 25;DBQ=C:\data\train33.mdb" - - Another connection string for MS Access via ODBC: - "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Work\cvs_root\log4net-1.2\access.mdb;UID=;PWD=;" - - Connection string for MS Access via OLE DB: - "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Work\cvs_root\log4net-1.2\access.mdb;User Id=;Password=;" - - - - - Gets or sets the type name of the connection - that should be created. - - - The type name of the connection. - - - - The type name of the ADO.NET provider to use. - - - The default is to use the OLE DB provider. - - - Use the OLE DB Provider. This is the default value. - System.Data.OleDb.OleDbConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Use the MS SQL Server Provider. - System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Use the ODBC Provider. - Microsoft.Data.Odbc.OdbcConnection,Microsoft.Data.Odbc,version=1.0.3300.0,publicKeyToken=b77a5c561934e089,culture=neutral - This is an optional package that you can download from - http://msdn.microsoft.com/downloads - search for ODBC .NET Data Provider. - - Use the Oracle Provider. - System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - This is an optional package that you can download from - http://msdn.microsoft.com/downloads - search for .NET Managed Provider for Oracle. - - - - - Gets or sets the command text that is used to insert logging events - into the database. - - - The command text used to insert logging events into the database. - - - - Either the text of the prepared statement or the - name of the stored procedure to execute to write into - the database. - - - The property determines if - this text is a prepared statement or a stored procedure. - - - - - - Gets or sets the command type to execute. - - - The command type to execute. - - - - This value may be either (System.Data.CommandType.Text) to specify - that the is a prepared statement to execute, - or (System.Data.CommandType.StoredProcedure) to specify that the - property is the name of a stored procedure - to execute. - - - The default value is (System.Data.CommandType.Text). - - - - - - Should transactions be used to insert logging events in the database. - - - true if transactions should be used to insert logging events in - the database, otherwise false. The default value is true. - - - - Gets or sets a value that indicates whether transactions should be used - to insert logging events in the database. - - - When set a single transaction will be used to insert the buffered events - into the database. Otherwise each event will be inserted without using - an explicit transaction. - - - - - - Gets or sets the used to call the NetSend method. - - - The used to call the NetSend method. - - - - Unless a specified here for this appender - the is queried for the - security context to use. The default behavior is to use the security context - of the current thread. - - - - - - Should this appender try to reconnect to the database on error. - - - true if the appender should try to reconnect to the database after an - error has occurred, otherwise false. The default value is false, - i.e. not to try to reconnect. - - - - The default behaviour is for the appender not to try to reconnect to the - database if an error occurs. Subsequent logging events are discarded. - - - To force the appender to attempt to reconnect to the database set this - property to true. - - - When the appender attempts to connect to the database there may be a - delay of up to the connection timeout specified in the connection string. - This delay will block the calling application's thread. - Until the connection can be reestablished this potential delay may occur multiple times. - - - - - - Gets or sets the underlying . - - - The underlying . - - - creates a to insert - logging events into a database. Classes deriving from - can use this property to get or set this . Use the - underlying returned from if - you require access beyond that which provides. - - - - - Parameter type used by the . - - - - This class provides the basic database parameter properties - as defined by the interface. - - This type can be subclassed to provide database specific - functionality. The two methods that are called externally are - and . - - - - - - Initializes a new instance of the class. - - - Default constructor for the AdoNetAppenderParameter class. - - - - - Prepare the specified database command object. - - The command to prepare. - - - Prepares the database command object by adding - this parameter to its collection of parameters. - - - - - - Renders the logging event and set the parameter value in the command. - - The command containing the parameter. - The event to be rendered. - - - Renders the logging event using this parameters layout - object. Sets the value of the parameter on the command object. - - - - - - The name of this parameter. - - - - - The database type for this parameter. - - - - - Flag to infer type rather than use the DbType - - - - - The precision for this parameter. - - - - - The scale for this parameter. - - - - - The size for this parameter. - - - - - The to use to render the - logging event into an object for this parameter. - - - - - Gets or sets the name of this parameter. - - - The name of this parameter. - - - - The name of this parameter. The parameter name - must match up to a named parameter to the SQL stored procedure - or prepared statement. - - - - - - Gets or sets the database type for this parameter. - - - The database type for this parameter. - - - - The database type for this parameter. This property should - be set to the database type from the - enumeration. See . - - - This property is optional. If not specified the ADO.NET provider - will attempt to infer the type from the value. - - - - - - - Gets or sets the precision for this parameter. - - - The precision for this parameter. - - - - The maximum number of digits used to represent the Value. - - - This property is optional. If not specified the ADO.NET provider - will attempt to infer the precision from the value. - - - - - - - Gets or sets the scale for this parameter. - - - The scale for this parameter. - - - - The number of decimal places to which Value is resolved. - - - This property is optional. If not specified the ADO.NET provider - will attempt to infer the scale from the value. - - - - - - - Gets or sets the size for this parameter. - - - The size for this parameter. - - - - The maximum size, in bytes, of the data within the column. - - - This property is optional. If not specified the ADO.NET provider - will attempt to infer the size from the value. - - - - - - - Gets or sets the to use to - render the logging event into an object for this - parameter. - - - The used to render the - logging event into an object for this parameter. - - - - The that renders the value for this - parameter. - - - The can be used to adapt - any into a - for use in the property. - - - - - - Appends logging events to the terminal using ANSI color escape sequences. - - - - AnsiColorTerminalAppender appends log events to the standard output stream - or the error output stream using a layout specified by the - user. It also allows the color of a specific level of message to be set. - - - This appender expects the terminal to understand the VT100 control set - in order to interpret the color codes. If the terminal or console does not - understand the control codes the behavior is not defined. - - - By default, all output is written to the console's standard output stream. - The property can be set to direct the output to the - error stream. - - - NOTE: This appender writes each message to the System.Console.Out or - System.Console.Error that is set at the time the event is appended. - Therefore it is possible to programmatically redirect the output of this appender - (for example NUnit does this to capture program output). While this is the desired - behavior of this appender it may have security implications in your application. - - - When configuring the ANSI colored terminal appender, a mapping should be - specified to map a logging level to a color. For example: - - - - - - - - - - - - - - - The Level is the standard log4net logging level and ForeColor and BackColor can be any - of the following values: - - Blue - Green - Red - White - Yellow - Purple - Cyan - - These color values cannot be combined together to make new colors. - - - The attributes can be any combination of the following: - - Brightforeground is brighter - Dimforeground is dimmer - Underscoremessage is underlined - Blinkforeground is blinking (does not work on all terminals) - Reverseforeground and background are reversed - Hiddenoutput is hidden - Strikethroughmessage has a line through it - - While any of these attributes may be combined together not all combinations - work well together, for example setting both Bright and Dim attributes makes - no sense. - - - Patrick Wagstrom - Nicko Cadell - - - - The to use when writing to the Console - standard output stream. - - - - The to use when writing to the Console - standard output stream. - - - - - - The to use when writing to the Console - standard error output stream. - - - - The to use when writing to the Console - standard error output stream. - - - - - - Ansi code to reset terminal - - - - - Initializes a new instance of the class. - - - The instance of the class is set up to write - to the standard output stream. - - - - - Add a mapping of level to color - - The mapping to add - - - Add a mapping to this appender. - Each mapping defines the foreground and background colours - for a level. - - - - - - This method is called by the method. - - The event to log. - - - Writes the event to the console. - - - The format of the output will depend on the appender's layout. - - - - - - Initialize the options for this appender - - - - Initialize the level to color mappings set on this appender. - - - - - - Flag to write output to the error stream rather than the standard output stream - - - - - Mapping from level object to color value - - - - - Target is the value of the console output stream. - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - The enum of possible display attributes - - - - The following flags can be combined together to - form the ANSI color attributes. - - - - - - - text is bright - - - - - text is dim - - - - - text is underlined - - - - - text is blinking - - - Not all terminals support this attribute - - - - - text and background colors are reversed - - - - - text is hidden - - - - - text is displayed with a strikethrough - - - - - The enum of possible foreground or background color values for - use with the color mapping method - - - - The output can be in one for the following ANSI colors. - - - - - - - color is black - - - - - color is red - - - - - color is green - - - - - color is yellow - - - - - color is blue - - - - - color is magenta - - - - - color is cyan - - - - - color is white - - - - - A class to act as a mapping between the level that a logging call is made at and - the color it should be displayed as. - - - - Defines the mapping between a level and the color it should be displayed in. - - - - - - An entry in the - - - - This is an abstract base class for types that are stored in the - object. - - - Nicko Cadell - - - - Default protected constructor - - - - Default protected constructor - - - - - - Initialize any options defined on this entry - - - - Should be overridden by any classes that need to initialise based on their options - - - - - - The level that is the key for this mapping - - - The that is the key for this mapping - - - - Get or set the that is the key for this - mapping subclass. - - - - - - Initialize the options for the object - - - - Combine the and together - and append the attributes. - - - - - - The mapped foreground color for the specified level - - - - Required property. - The mapped foreground color for the specified level - - - - - - The mapped background color for the specified level - - - - Required property. - The mapped background color for the specified level - - - - - - The color attributes for the specified level - - - - Required property. - The color attributes for the specified level - - - - - - The combined , and - suitable for setting the ansi terminal color. - - - - - A strongly-typed collection of objects. - - Nicko Cadell - - - - Creates a read-only wrapper for a AppenderCollection instance. - - list to create a readonly wrapper arround - - An AppenderCollection wrapper that is read-only. - - - - - An empty readonly static AppenderCollection - - - - - Initializes a new instance of the AppenderCollection class - that is empty and has the default initial capacity. - - - - - Initializes a new instance of the AppenderCollection class - that has the specified initial capacity. - - - The number of elements that the new AppenderCollection is initially capable of storing. - - - - - Initializes a new instance of the AppenderCollection class - that contains elements copied from the specified AppenderCollection. - - The AppenderCollection whose elements are copied to the new collection. - - - - Initializes a new instance of the AppenderCollection class - that contains elements copied from the specified array. - - The array whose elements are copied to the new list. - - - - Initializes a new instance of the AppenderCollection class - that contains elements copied from the specified collection. - - The collection whose elements are copied to the new list. - - - - Allow subclasses to avoid our default constructors - - - - - - - Copies the entire AppenderCollection to a one-dimensional - array. - - The one-dimensional array to copy to. - - - - Copies the entire AppenderCollection to a one-dimensional - array, starting at the specified index of the target array. - - The one-dimensional array to copy to. - The zero-based index in at which copying begins. - - - - Adds a to the end of the AppenderCollection. - - The to be added to the end of the AppenderCollection. - The index at which the value has been added. - - - - Removes all elements from the AppenderCollection. - - - - - Creates a shallow copy of the . - - A new with a shallow copy of the collection data. - - - - Determines whether a given is in the AppenderCollection. - - The to check for. - true if is found in the AppenderCollection; otherwise, false. - - - - Returns the zero-based index of the first occurrence of a - in the AppenderCollection. - - The to locate in the AppenderCollection. - - The zero-based index of the first occurrence of - in the entire AppenderCollection, if found; otherwise, -1. - - - - - Inserts an element into the AppenderCollection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - is less than zero - -or- - is equal to or greater than . - - - - - Removes the first occurrence of a specific from the AppenderCollection. - - The to remove from the AppenderCollection. - - The specified was not found in the AppenderCollection. - - - - - Removes the element at the specified index of the AppenderCollection. - - The zero-based index of the element to remove. - - is less than zero - -or- - is equal to or greater than . - - - - - Returns an enumerator that can iterate through the AppenderCollection. - - An for the entire AppenderCollection. - - - - Adds the elements of another AppenderCollection to the current AppenderCollection. - - The AppenderCollection whose elements should be added to the end of the current AppenderCollection. - The new of the AppenderCollection. - - - - Adds the elements of a array to the current AppenderCollection. - - The array whose elements should be added to the end of the AppenderCollection. - The new of the AppenderCollection. - - - - Adds the elements of a collection to the current AppenderCollection. - - The collection whose elements should be added to the end of the AppenderCollection. - The new of the AppenderCollection. - - - - Sets the capacity to the actual number of elements. - - - - - Return the collection elements as an array - - the array - - - - is less than zero - -or- - is equal to or greater than . - - - - - is less than zero - -or- - is equal to or greater than . - - - - - Gets the number of elements actually contained in the AppenderCollection. - - - - - Gets a value indicating whether access to the collection is synchronized (thread-safe). - - true if access to the ICollection is synchronized (thread-safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the collection. - - - - - Gets or sets the at the specified index. - - The zero-based index of the element to get or set. - - is less than zero - -or- - is equal to or greater than . - - - - - Gets a value indicating whether the collection has a fixed size. - - true if the collection has a fixed size; otherwise, false. The default is false - - - - Gets a value indicating whether the IList is read-only. - - true if the collection is read-only; otherwise, false. The default is false - - - - Gets or sets the number of elements the AppenderCollection can contain. - - - - - Supports type-safe iteration over a . - - - - - - Advances the enumerator to the next element in the collection. - - - true if the enumerator was successfully advanced to the next element; - false if the enumerator has passed the end of the collection. - - - The collection was modified after the enumerator was created. - - - - - Sets the enumerator to its initial position, before the first element in the collection. - - - - - Gets the current element in the collection. - - - - - Type visible only to our subclasses - Used to access protected constructor - - - - - - A value - - - - - Supports simple iteration over a . - - - - - - Initializes a new instance of the Enumerator class. - - - - - - Advances the enumerator to the next element in the collection. - - - true if the enumerator was successfully advanced to the next element; - false if the enumerator has passed the end of the collection. - - - The collection was modified after the enumerator was created. - - - - - Sets the enumerator to its initial position, before the first element in the collection. - - - - - Gets the current element in the collection. - - - - - - - - - Appends log events to the ASP.NET system. - - - - - Diagnostic information and tracing messages that you specify are appended to the output - of the page that is sent to the requesting browser. Optionally, you can view this information - from a separate trace viewer (Trace.axd) that displays trace information for every page in a - given application. - - - Trace statements are processed and displayed only when tracing is enabled. You can control - whether tracing is displayed to a page, to the trace viewer, or both. - - - The logging event is passed to the or - method depending on the level of the logging event. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Write the logging event to the ASP.NET trace - - the event to log - - - Write the logging event to the ASP.NET trace - HttpContext.Current.Trace - (). - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Buffers events and then forwards them to attached appenders. - - - - The events are buffered in this appender until conditions are - met to allow the appender to deliver the events to the attached - appenders. See for the - conditions that cause the buffer to be sent. - - The forwarding appender can be used to specify different - thresholds and filters for the same appender at different locations - within the hierarchy. - - - Nicko Cadell - Gert Driesen - - - - Interface for attaching appenders to objects. - - - - Interface for attaching, removing and retrieving appenders. - - - Nicko Cadell - Gert Driesen - - - - Attaches an appender. - - The appender to add. - - - Add the specified appender. The implementation may - choose to allow or deny duplicate appenders. - - - - - - Gets an attached appender with the specified name. - - The name of the appender to get. - - The appender with the name specified, or null if no appender with the - specified name is found. - - - - Returns an attached appender with the specified. - If no appender with the specified name is found null will be - returned. - - - - - - Removes all attached appenders. - - - - Removes and closes all attached appenders - - - - - - Removes the specified appender from the list of attached appenders. - - The appender to remove. - The appender removed from the list - - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - - Removes the appender with the specified name from the list of appenders. - - The name of the appender to remove. - The appender removed from the list - - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - - Gets all attached appenders. - - - A collection of attached appenders. - - - - Gets a collection of attached appenders. - If there are no attached appenders the - implementation should return an empty - collection rather than null. - - - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Closes the appender and releases resources. - - - - Releases any resources allocated within the appender such as file handles, - network connections, etc. - - - It is a programming error to append to a closed appender. - - - - - - Send the events. - - The events that need to be send. - - - Forwards the events to the attached appenders. - - - - - - Adds an to the list of appenders of this - instance. - - The to add to this appender. - - - If the specified is already in the list of - appenders, then it won't be added again. - - - - - - Looks for the appender with the specified name. - - The name of the appender to lookup. - - The appender with the specified name, or null. - - - - Get the named appender attached to this buffering appender. - - - - - - Removes all previously added appenders from this appender. - - - - This is useful when re-reading configuration information. - - - - - - Removes the specified appender from the list of appenders. - - The appender to remove. - The appender removed from the list - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - Removes the appender with the specified name from the list of appenders. - - The name of the appender to remove. - The appender removed from the list - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - Implementation of the interface - - - - - Gets the appenders contained in this appender as an - . - - - If no appenders can be found, then an - is returned. - - - A collection of the appenders in this appender. - - - - - Appends logging events to the console. - - - - ColoredConsoleAppender appends log events to the standard output stream - or the error output stream using a layout specified by the - user. It also allows the color of a specific type of message to be set. - - - By default, all output is written to the console's standard output stream. - The property can be set to direct the output to the - error stream. - - - NOTE: This appender writes directly to the application's attached console - not to the System.Console.Out or System.Console.Error TextWriter. - The System.Console.Out and System.Console.Error streams can be - programmatically redirected (for example NUnit does this to capture program output). - This appender will ignore these redirections because it needs to use Win32 - API calls to colorize the output. To respect these redirections the - must be used. - - - When configuring the colored console appender, mapping should be - specified to map a logging level to a color. For example: - - - - - - - - - - - - - - The Level is the standard log4net logging level and ForeColor and BackColor can be any - combination of the following values: - - Blue - Green - Red - White - Yellow - Purple - Cyan - HighIntensity - - - - Rick Hobbs - Nicko Cadell - - - - The to use when writing to the Console - standard output stream. - - - - The to use when writing to the Console - standard output stream. - - - - - - The to use when writing to the Console - standard error output stream. - - - - The to use when writing to the Console - standard error output stream. - - - - - - Initializes a new instance of the class. - - - The instance of the class is set up to write - to the standard output stream. - - - - - Initializes a new instance of the class - with the specified layout. - - the layout to use for this appender - - The instance of the class is set up to write - to the standard output stream. - - - - - Initializes a new instance of the class - with the specified layout. - - the layout to use for this appender - flag set to true to write to the console error stream - - When is set to true, output is written to - the standard error output stream. Otherwise, output is written to the standard - output stream. - - - - - Add a mapping of level to color - done by the config file - - The mapping to add - - - Add a mapping to this appender. - Each mapping defines the foreground and background colors - for a level. - - - - - - This method is called by the method. - - The event to log. - - - Writes the event to the console. - - - The format of the output will depend on the appender's layout. - - - - - - Initialize the options for this appender - - - - Initialize the level to color mappings set on this appender. - - - - - - Flag to write output to the error stream rather than the standard output stream - - - - - Mapping from level object to color value - - - - - The console output stream writer to write to - - - - This writer is not thread safe. - - - - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - The enum of possible color values for use with the color mapping method - - - - The following flags can be combined together to - form the colors. - - - - - - - color is blue - - - - - color is green - - - - - color is red - - - - - color is white - - - - - color is yellow - - - - - color is purple - - - - - color is cyan - - - - - color is intensified - - - - - A class to act as a mapping between the level that a logging call is made at and - the color it should be displayed as. - - - - Defines the mapping between a level and the color it should be displayed in. - - - - - - Initialize the options for the object - - - - Combine the and together. - - - - - - The mapped foreground color for the specified level - - - - Required property. - The mapped foreground color for the specified level. - - - - - - The mapped background color for the specified level - - - - Required property. - The mapped background color for the specified level. - - - - - - The combined and suitable for - setting the console color. - - - - - Appends logging events to the console. - - - - ConsoleAppender appends log events to the standard output stream - or the error output stream using a layout specified by the - user. - - - By default, all output is written to the console's standard output stream. - The property can be set to direct the output to the - error stream. - - - NOTE: This appender writes each message to the System.Console.Out or - System.Console.Error that is set at the time the event is appended. - Therefore it is possible to programmatically redirect the output of this appender - (for example NUnit does this to capture program output). While this is the desired - behavior of this appender it may have security implications in your application. - - - Nicko Cadell - Gert Driesen - - - - The to use when writing to the Console - standard output stream. - - - - The to use when writing to the Console - standard output stream. - - - - - - The to use when writing to the Console - standard error output stream. - - - - The to use when writing to the Console - standard error output stream. - - - - - - Initializes a new instance of the class. - - - The instance of the class is set up to write - to the standard output stream. - - - - - Initializes a new instance of the class - with the specified layout. - - the layout to use for this appender - - The instance of the class is set up to write - to the standard output stream. - - - - - Initializes a new instance of the class - with the specified layout. - - the layout to use for this appender - flag set to true to write to the console error stream - - When is set to true, output is written to - the standard error output stream. Otherwise, output is written to the standard - output stream. - - - - - This method is called by the method. - - The event to log. - - - Writes the event to the console. - - - The format of the output will depend on the appender's layout. - - - - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Appends log events to the system. - - - - The application configuration file can be used to control what listeners - are actually used. See the MSDN documentation for the - class for details on configuring the - debug system. - - - Events are written using the - method. The event's logger name is passed as the value for the category name to the Write method. - - - Nicko Cadell - - - - Initializes a new instance of the . - - - - Default constructor. - - - - - - Initializes a new instance of the - with a specified layout. - - The layout to use with this appender. - - - Obsolete constructor. - - - - - - Writes the logging event to the system. - - The event to log. - - - Writes the logging event to the system. - If is true then the - is called. - - - - - - Immediate flush means that the underlying writer or output stream - will be flushed at the end of each append operation. - - - - Immediate flush is slower but ensures that each append request is - actually written. If is set to - false, then there is a good chance that the last few - logs events are not actually written to persistent media if and - when the application crashes. - - - The default value is true. - - - - - Gets or sets a value that indicates whether the appender will - flush at the end of each write. - - - The default behavior is to flush at the end of each - write. If the option is set tofalse, then the underlying - stream can defer writing to physical medium to a later time. - - - Avoiding the flush operation at the end of each append results - in a performance gain of 10 to 20 percent. However, there is safety - trade-off involved in skipping flushing. Indeed, when flushing is - skipped, then it is likely that the last few log events will not - be recorded on disk when the application exits. This is a high - price to pay even for a 20% performance gain. - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Writes events to the system event log. - - - - The EventID of the event log entry can be - set using the EventLogEventID property () - on the . - - - There is a limit of 32K characters for an event log message - - - When configuring the EventLogAppender a mapping can be - specified to map a logging level to an event log entry type. For example: - - - <mapping> - <level value="ERROR" /> - <eventLogEntryType value="Error" /> - </mapping> - <mapping> - <level value="DEBUG" /> - <eventLogEntryType value="Information" /> - </mapping> - - - The Level is the standard log4net logging level and eventLogEntryType can be any value - from the enum, i.e.: - - Erroran error event - Warninga warning event - Informationan informational event - - - - Aspi Havewala - Douglas de la Torre - Nicko Cadell - Gert Driesen - Thomas Voss - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Initializes a new instance of the class - with the specified . - - The to use with this appender. - - - Obsolete constructor. - - - - - - Add a mapping of level to - done by the config file - - The mapping to add - - - Add a mapping to this appender. - Each mapping defines the event log entry type for a level. - - - - - - Initialize the appender based on the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Create an event log source - - - Uses different API calls under NET_2_0 - - - - - This method is called by the - method. - - the event to log - - Writes the event to the system event log using the - . - - If the event has an EventID property (see ) - set then this integer will be used as the event log event id. - - - There is a limit of 32K characters for an event log message - - - - - - Get the equivalent for a - - the Level to convert to an EventLogEntryType - The equivalent for a - - Because there are fewer applicable - values to use in logging levels than there are in the - this is a one way mapping. There is - a loss of information during the conversion. - - - - - The log name is the section in the event logs where the messages - are stored. - - - - - Name of the application to use when logging. This appears in the - application column of the event log named by . - - - - - The name of the machine which holds the event log. This is - currently only allowed to be '.' i.e. the current machine. - - - - - Mapping from level object to EventLogEntryType - - - - - The security context to use for privileged calls - - - - - The name of the log where messages will be stored. - - - The string name of the log where messages will be stored. - - - This is the name of the log as it appears in the Event Viewer - tree. The default value is to log into the Application - log, this is where most applications write their events. However - if you need a separate log for your application (or applications) - then you should set the appropriately. - This should not be used to distinguish your event log messages - from those of other applications, the - property should be used to distinguish events. This property should be - used to group together events into a single log. - - - - - - Property used to set the Application name. This appears in the - event logs when logging. - - - The string used to distinguish events from different sources. - - - Sets the event log source property. - - - - - This property is used to return the name of the computer to use - when accessing the event logs. Currently, this is the current - computer, denoted by a dot "." - - - The string name of the machine holding the event log that - will be logged into. - - - This property cannot be changed. It is currently set to '.' - i.e. the local machine. This may be changed in future. - - - - - Gets or sets the used to write to the EventLog. - - - The used to write to the EventLog. - - - - The system security context used to write to the EventLog. - - - Unless a specified here for this appender - the is queried for the - security context to use. The default behavior is to use the security context - of the current thread. - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - A class to act as a mapping between the level that a logging call is made at and - the color it should be displayed as. - - - - Defines the mapping between a level and its event log entry type. - - - - - - The for this entry - - - - Required property. - The for this entry - - - - - - Appends logging events to a file. - - - - Logging events are sent to the file specified by - the property. - - - The file can be opened in either append or overwrite mode - by specifying the property. - If the file path is relative it is taken as relative from - the application base directory. The file encoding can be - specified by setting the property. - - - The layout's and - values will be written each time the file is opened and closed - respectively. If the property is - then the file may contain multiple copies of the header and footer. - - - This appender will first try to open the file for writing when - is called. This will typically be during configuration. - If the file cannot be opened for writing the appender will attempt - to open the file again each time a message is logged to the appender. - If the file cannot be opened for writing when a message is logged then - the message will be discarded by this appender. - - - The supports pluggable file locking models via - the property. - The default behavior, implemented by - is to obtain an exclusive write lock on the file until this appender is closed. - The alternative model, , only holds a - write lock while the appender is writing a logging event. - - - Nicko Cadell - Gert Driesen - Rodrigo B. de Oliveira - Douglas de la Torre - Niall Daley - - - - Sends logging events to a . - - - - An Appender that writes to a . - - - This appender may be used stand alone if initialized with an appropriate - writer, however it is typically used as a base class for an appender that - can open a to write to. - - - Nicko Cadell - Gert Driesen - Douglas de la Torre - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Initializes a new instance of the class and - sets the output destination to a new initialized - with the specified . - - The layout to use with this appender. - The to output to. - - - Obsolete constructor. - - - - - - Initializes a new instance of the class and sets - the output destination to the specified . - - The layout to use with this appender - The to output to - - The must have been previously opened. - - - - Obsolete constructor. - - - - - - This method determines if there is a sense in attempting to append. - - - - This method checked if an output target has been set and if a - layout has been set. - - - false if any of the preconditions fail. - - - - This method is called by the - method. - - The event to log. - - - Writes a log statement to the output stream if the output stream exists - and is writable. - - - The format of the output will depend on the appender's layout. - - - - - - This method is called by the - method. - - The array of events to log. - - - This method writes all the bulk logged events to the output writer - before flushing the stream. - - - - - - Close this appender instance. The underlying stream or writer is also closed. - - - Closed appenders cannot be reused. - - - - - Writes the footer and closes the underlying . - - - - Writes the footer and closes the underlying . - - - - - - Closes the underlying . - - - - Closes the underlying . - - - - - - Clears internal references to the underlying - and other variables. - - - - Subclasses can override this method for an alternate closing behavior. - - - - - - Writes a footer as produced by the embedded layout's property. - - - - Writes a footer as produced by the embedded layout's property. - - - - - - Writes a header produced by the embedded layout's property. - - - - Writes a header produced by the embedded layout's property. - - - - - - Called to allow a subclass to lazily initialize the writer - - - - This method is called when an event is logged and the or - have not been set. This allows a subclass to - attempt to initialize the writer multiple times. - - - - - - This is the where logging events - will be written to. - - - - - Immediate flush means that the underlying - or output stream will be flushed at the end of each append operation. - - - - Immediate flush is slower but ensures that each append request is - actually written. If is set to - false, then there is a good chance that the last few - logging events are not actually persisted if and when the application - crashes. - - - The default value is true. - - - - - - Gets or set whether the appender will flush at the end - of each append operation. - - - - The default behavior is to flush at the end of each - append operation. - - - If this option is set to false, then the underlying - stream can defer persisting the logging event to a later - time. - - - - Avoiding the flush operation at the end of each append results in - a performance gain of 10 to 20 percent. However, there is safety - trade-off involved in skipping flushing. Indeed, when flushing is - skipped, then it is likely that the last few log events will not - be recorded on disk when the application exits. This is a high - price to pay even for a 20% performance gain. - - - - - Sets the where the log output will go. - - - - The specified must be open and writable. - - - The will be closed when the appender - instance is closed. - - - Note: Logging to an unopened will fail. - - - - - - Gets or set the and the underlying - , if any, for this appender. - - - The for this appender. - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Gets or sets the where logging events - will be written to. - - - The where logging events are written. - - - - This is the where logging events - will be written to. - - - - - - Default constructor - - - - Default constructor - - - - - - Construct a new appender using the layout, file and append mode. - - the layout to use with this appender - the full path to the file to write to - flag to indicate if the file should be appended to - - - Obsolete constructor. - - - - - - Construct a new appender using the layout and file specified. - The file will be appended to. - - the layout to use with this appender - the full path to the file to write to - - - Obsolete constructor. - - - - - - Activate the options on the file appender. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - This will cause the file to be opened. - - - - - - Closes any previously opened file and calls the parent's . - - - - Resets the filename and the file stream. - - - - - - Called to initialize the file writer - - - - Will be called for each logged message until the file is - successfully opened. - - - - - - This method is called by the - method. - - The event to log. - - - Writes a log statement to the output stream if the output stream exists - and is writable. - - - The format of the output will depend on the appender's layout. - - - - - - This method is called by the - method. - - The array of events to log. - - - Acquires the output file locks once before writing all the events to - the stream. - - - - - - Writes a footer as produced by the embedded layout's property. - - - - Writes a footer as produced by the embedded layout's property. - - - - - - Writes a header produced by the embedded layout's property. - - - - Writes a header produced by the embedded layout's property. - - - - - - Closes the underlying . - - - - Closes the underlying . - - - - - - Closes the previously opened file. - - - - Writes the to the file and then - closes the file. - - - - - - Sets and opens the file where the log output will go. The specified file must be writable. - - The path to the log file. Must be a fully qualified path. - If true will append to fileName. Otherwise will truncate fileName - - - Calls but guarantees not to throw an exception. - Errors are passed to the . - - - - - - Sets and opens the file where the log output will go. The specified file must be writable. - - The path to the log file. Must be a fully qualified path. - If true will append to fileName. Otherwise will truncate fileName - - - If there was already an opened file, then the previous file - is closed first. - - - This method will ensure that the directory structure - for the specified exists. - - - - - - Sets the quiet writer used for file output - - the file stream that has been opened for writing - - - This implementation of creates a - over the and passes it to the - method. - - - This method can be overridden by sub classes that want to wrap the - in some way, for example to encrypt the output - data using a System.Security.Cryptography.CryptoStream. - - - - - - Sets the quiet writer being used. - - the writer over the file stream that has been opened for writing - - - This method can be overridden by sub classes that want to - wrap the in some way. - - - - - - Convert a path into a fully qualified path. - - The path to convert. - The fully qualified path. - - - Converts the path specified to a fully - qualified path. If the path is relative it is - taken as relative from the application base - directory. - - - - - - Flag to indicate if we should append to the file - or overwrite the file. The default is to append. - - - - - The name of the log file. - - - - - The encoding to use for the file stream. - - - - - The security context to use for privileged calls - - - - - The stream to log to. Has added locking semantics - - - - - The locking model to use - - - - - Gets or sets the path to the file that logging will be written to. - - - The path to the file that logging will be written to. - - - - If the path is relative it is taken as relative from - the application base directory. - - - - - - Gets or sets a flag that indicates whether the file should be - appended to or overwritten. - - - Indicates whether the file should be appended to or overwritten. - - - - If the value is set to false then the file will be overwritten, if - it is set to true then the file will be appended to. - - The default value is true. - - - - - Gets or sets used to write to the file. - - - The used to write to the file. - - - - The default encoding set is - which is the encoding for the system's current ANSI code page. - - - - - - Gets or sets the used to write to the file. - - - The used to write to the file. - - - - Unless a specified here for this appender - the is queried for the - security context to use. The default behavior is to use the security context - of the current thread. - - - - - - Gets or sets the used to handle locking of the file. - - - The used to lock the file. - - - - Gets or sets the used to handle locking of the file. - - - There are two built in locking models, and . - The former locks the file from the start of logging to the end and the - later lock only for the minimal amount of time when logging each message. - - - The default locking model is the . - - - - - - Write only that uses the - to manage access to an underlying resource. - - - - - True asynchronous writes are not supported, the implementation forces a synchronous write. - - - - - Exception base type for log4net. - - - - This type extends . It - does not add any new functionality but does differentiate the - type of exception being thrown. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Constructor - - A message to include with the exception. - - - Initializes a new instance of the class with - the specified message. - - - - - - Constructor - - A message to include with the exception. - A nested exception to include. - - - Initializes a new instance of the class - with the specified message and inner exception. - - - - - - Serialization constructor - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - - - Initializes a new instance of the class - with serialized data. - - - - - - Locking model base class - - - - Base class for the locking models available to the derived loggers. - - - - - - Open the output file - - The filename to use - Whether to append to the file, or overwrite - The encoding to use - - - Open the file specified and prepare for logging. - No writes will be made until is called. - Must be called before any calls to , - and . - - - - - - Close the file - - - - Close the file. No further writes will be made. - - - - - - Acquire the lock on the file - - A stream that is ready to be written to. - - - Acquire the lock on the file in preparation for writing to it. - Return a stream pointing to the file. - must be called to release the lock on the output file. - - - - - - Release the lock on the file - - - - Release the lock on the file. No further writes will be made to the - stream until is called again. - - - - - - Gets or sets the for this LockingModel - - - The for this LockingModel - - - - The file appender this locking model is attached to and working on - behalf of. - - - The file appender is used to locate the security context and the error handler to use. - - - The value of this property will be set before is - called. - - - - - - Hold an exclusive lock on the output file - - - - Open the file once for writing and hold it open until is called. - Maintains an exclusive lock on the file during this time. - - - - - - Open the file specified and prepare for logging. - - The filename to use - Whether to append to the file, or overwrite - The encoding to use - - - Open the file specified and prepare for logging. - No writes will be made until is called. - Must be called before any calls to , - and . - - - - - - Close the file - - - - Close the file. No further writes will be made. - - - - - - Acquire the lock on the file - - A stream that is ready to be written to. - - - Does nothing. The lock is already taken - - - - - - Release the lock on the file - - - - Does nothing. The lock will be released when the file is closed. - - - - - - Acquires the file lock for each write - - - - Opens the file once for each / cycle, - thus holding the lock for the minimal amount of time. This method of locking - is considerably slower than but allows - other processes to move/delete the log file whilst logging continues. - - - - - - Prepares to open the file when the first message is logged. - - The filename to use - Whether to append to the file, or overwrite - The encoding to use - - - Open the file specified and prepare for logging. - No writes will be made until is called. - Must be called before any calls to , - and . - - - - - - Close the file - - - - Close the file. No further writes will be made. - - - - - - Acquire the lock on the file - - A stream that is ready to be written to. - - - Acquire the lock on the file in preparation for writing to it. - Return a stream pointing to the file. - must be called to release the lock on the output file. - - - - - - Release the lock on the file - - - - Release the lock on the file. No further writes will be made to the - stream until is called again. - - - - - - This appender forwards logging events to attached appenders. - - - - The forwarding appender can be used to specify different thresholds - and filters for the same appender at different locations within the hierarchy. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Closes the appender and releases resources. - - - - Releases any resources allocated within the appender such as file handles, - network connections, etc. - - - It is a programming error to append to a closed appender. - - - - - - Forward the logging event to the attached appenders - - The event to log. - - - Delivers the logging event to all the attached appenders. - - - - - - Forward the logging events to the attached appenders - - The array of events to log. - - - Delivers the logging events to all the attached appenders. - - - - - - Adds an to the list of appenders of this - instance. - - The to add to this appender. - - - If the specified is already in the list of - appenders, then it won't be added again. - - - - - - Looks for the appender with the specified name. - - The name of the appender to lookup. - - The appender with the specified name, or null. - - - - Get the named appender attached to this appender. - - - - - - Removes all previously added appenders from this appender. - - - - This is useful when re-reading configuration information. - - - - - - Removes the specified appender from the list of appenders. - - The appender to remove. - The appender removed from the list - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - Removes the appender with the specified name from the list of appenders. - - The name of the appender to remove. - The appender removed from the list - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - Implementation of the interface - - - - - Gets the appenders contained in this appender as an - . - - - If no appenders can be found, then an - is returned. - - - A collection of the appenders in this appender. - - - - - Logs events to a local syslog service. - - - - This appender uses the POSIX libc library functions openlog, syslog, and closelog. - If these functions are not available on the local system then this appender will not work! - - - The functions openlog, syslog, and closelog are specified in SUSv2 and - POSIX 1003.1-2001 standards. These are used to log messages to the local syslog service. - - - This appender talks to a local syslog service. If you need to log to a remote syslog - daemon and you cannot configure your local syslog service to do this you may be - able to use the to log via UDP. - - - Syslog messages must have a facility and and a severity. The severity - is derived from the Level of the logging event. - The facility must be chosen from the set of defined syslog - values. The facilities list is predefined - and cannot be extended. - - - An identifier is specified with each log message. This can be specified - by setting the property. The identity (also know - as the tag) must not contain white space. The default value for the - identity is the application name (from ). - - - Rob Lyon - Nicko Cadell - - - - Initializes a new instance of the class. - - - This instance of the class is set up to write - to a local syslog service. - - - - - Add a mapping of level to severity - - The mapping to add - - - Adds a to this appender. - - - - - - Initialize the appender based on the options set. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - This method is called by the method. - - The event to log. - - - Writes the event to a remote syslog daemon. - - - The format of the output will depend on the appender's layout. - - - - - - Close the syslog when the appender is closed - - - - Close the syslog when the appender is closed - - - - - - Translates a log4net level to a syslog severity. - - A log4net level. - A syslog severity. - - - Translates a log4net level to a syslog severity. - - - - - - Generate a syslog priority. - - The syslog facility. - The syslog severity. - A syslog priority. - - - - The facility. The default facility is . - - - - - The message identity - - - - - Marshaled handle to the identity string. We have to hold on to the - string as the openlog and syslog APIs just hold the - pointer to the ident and dereference it for each log message. - - - - - Mapping from level object to syslog severity - - - - - Open connection to system logger. - - - - - Generate a log message. - - - - The libc syslog method takes a format string and a variable argument list similar - to the classic printf function. As this type of vararg list is not supported - by C# we need to specify the arguments explicitly. Here we have specified the - format string with a single message argument. The caller must set the format - string to "%s". - - - - - - Close descriptor used to write to system logger. - - - - - Message identity - - - - An identifier is specified with each log message. This can be specified - by setting the property. The identity (also know - as the tag) must not contain white space. The default value for the - identity is the application name (from ). - - - - - - Syslog facility - - - Set to one of the values. The list of - facilities is predefined and cannot be extended. The default value - is . - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - syslog severities - - - - The log4net Level maps to a syslog severity using the - method and the - class. The severity is set on . - - - - - - system is unusable - - - - - action must be taken immediately - - - - - critical conditions - - - - - error conditions - - - - - warning conditions - - - - - normal but significant condition - - - - - informational - - - - - debug-level messages - - - - - syslog facilities - - - - The syslog facility defines which subsystem the logging comes from. - This is set on the property. - - - - - - kernel messages - - - - - random user-level messages - - - - - mail system - - - - - system daemons - - - - - security/authorization messages - - - - - messages generated internally by syslogd - - - - - line printer subsystem - - - - - network news subsystem - - - - - UUCP subsystem - - - - - clock (cron/at) daemon - - - - - security/authorization messages (private) - - - - - ftp daemon - - - - - NTP subsystem - - - - - log audit - - - - - log alert - - - - - clock daemon - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - A class to act as a mapping between the level that a logging call is made at and - the syslog severity that is should be logged at. - - - - A class to act as a mapping between the level that a logging call is made at and - the syslog severity that is should be logged at. - - - - - - The mapped syslog severity for the specified level - - - - Required property. - The mapped syslog severity for the specified level - - - - - - Stores logging events in an array. - - - - The memory appender stores all the logging events - that are appended in an in-memory array. - - - Use the method to get - the current list of events that have been appended. - - - Use the method to clear the - current list of events. - - - Julian Biddle - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Gets the events that have been logged. - - The events that have been logged - - - Gets the events that have been logged. - - - - - - This method is called by the method. - - the event to log - - Stores the in the events list. - - - - - Clear the list of events - - - Clear the list of events - - - - - The list of events that have been appended. - - - - - Value indicating which fields in the event should be fixed - - - By default all fields are fixed - - - - - Gets or sets a value indicating whether only part of the logging event - data should be fixed. - - - true if the appender should only fix part of the logging event - data, otherwise false. The default is false. - - - - Setting this property to true will cause only part of the event - data to be fixed and stored in the appender, hereby improving performance. - - - See for more information. - - - - - - Gets or sets the fields that will be fixed in the event - - - - The logging event needs to have certain thread specific values - captured before it can be buffered. See - for details. - - - - - - Logs entries by sending network messages using the - native function. - - - - You can send messages only to names that are active - on the network. If you send the message to a user name, - that user must be logged on and running the Messenger - service to receive the message. - - - The receiver will get a top most window displaying the - messages one at a time, therefore this appender should - not be used to deliver a high volume of messages. - - - The following table lists some possible uses for this appender : - - - - - Action - Property Value(s) - - - Send a message to a user account on the local machine - - - = <name of the local machine> - - - = <user name> - - - - - Send a message to a user account on a remote machine - - - = <name of the remote machine> - - - = <user name> - - - - - Send a message to a domain user account - - - = <name of a domain controller | uninitialized> - - - = <user name> - - - - - Send a message to all the names in a workgroup or domain - - - = <workgroup name | domain name>* - - - - - Send a message from the local machine to a remote machine - - - = <name of the local machine | uninitialized> - - - = <name of the remote machine> - - - - - - - Note : security restrictions apply for sending - network messages, see - for more information. - - - - - An example configuration section to log information - using this appender from the local machine, named - LOCAL_PC, to machine OPERATOR_PC : - - - - - - - - - - Nicko Cadell - Gert Driesen - - - - The DNS or NetBIOS name of the server on which the function is to execute. - - - - - The sender of the network message. - - - - - The message alias to which the message should be sent. - - - - - The security context to use for privileged calls - - - - - Initializes the appender. - - - The default constructor initializes all fields to their default values. - - - - - Initialize the appender based on the options set. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - The appender will be ignored if no was specified. - - - The required property was not specified. - - - - This method is called by the method. - - The event to log. - - - Sends the event using a network message. - - - - - - Sends a buffer of information to a registered message alias. - - The DNS or NetBIOS name of the server on which the function is to execute. - The message alias to which the message buffer should be sent - The originator of the message. - The message text. - The length, in bytes, of the message text. - - - The following restrictions apply for sending network messages: - - - - - Platform - Requirements - - - Windows NT - - - No special group membership is required to send a network message. - - - Admin, Accounts, Print, or Server Operator group membership is required to - successfully send a network message on a remote server. - - - - - Windows 2000 or later - - - If you send a message on a domain controller that is running Active Directory, - access is allowed or denied based on the access control list (ACL) for the securable - object. The default ACL permits only Domain Admins and Account Operators to send a network message. - - - On a member server or workstation, only Administrators and Server Operators can send a network message. - - - - - - - For more information see Security Requirements for the Network Management Functions. - - - - - If the function succeeds, the return value is zero. - - - - - - Gets or sets the sender of the message. - - - The sender of the message. - - - If this property is not specified, the message is sent from the local computer. - - - - - Gets or sets the message alias to which the message should be sent. - - - The recipient of the message. - - - This property should always be specified in order to send a message. - - - - - Gets or sets the DNS or NetBIOS name of the remote server on which the function is to execute. - - - DNS or NetBIOS name of the remote server on which the function is to execute. - - - - For Windows NT 4.0 and earlier, the string should begin with \\. - - - If this property is not specified, the local computer is used. - - - - - - Gets or sets the used to call the NetSend method. - - - The used to call the NetSend method. - - - - Unless a specified here for this appender - the is queried for the - security context to use. The default behavior is to use the security context - of the current thread. - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Appends log events to the OutputDebugString system. - - - - OutputDebugStringAppender appends log events to the - OutputDebugString system. - - - The string is passed to the native OutputDebugString - function. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Write the logging event to the output debug string API - - the event to log - - - Write the logging event to the output debug string API - - - - - - Stub for OutputDebugString native method - - the string to output - - - Stub for OutputDebugString native method - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Logs events to a remote syslog daemon. - - - - The BSD syslog protocol is used to remotely log to - a syslog daemon. The syslogd listens for for messages - on UDP port 514. - - - The syslog UDP protocol is not authenticated. Most syslog daemons - do not accept remote log messages because of the security implications. - You may be able to use the LocalSyslogAppender to talk to a local - syslog service. - - - There is an RFC 3164 that claims to document the BSD Syslog Protocol. - This RFC can be seen here: http://www.faqs.org/rfcs/rfc3164.html. - This appender generates what the RFC calls an "Original Device Message", - i.e. does not include the TIMESTAMP or HOSTNAME fields. By observation - this format of message will be accepted by all current syslog daemon - implementations. The daemon will attach the current time and the source - hostname or IP address to any messages received. - - - Syslog messages must have a facility and and a severity. The severity - is derived from the Level of the logging event. - The facility must be chosen from the set of defined syslog - values. The facilities list is predefined - and cannot be extended. - - - An identifier is specified with each log message. This can be specified - by setting the property. The identity (also know - as the tag) must not contain white space. The default value for the - identity is the application name (from ). - - - Rob Lyon - Nicko Cadell - - - - Sends logging events as connectionless UDP datagrams to a remote host or a - multicast group using an . - - - - UDP guarantees neither that messages arrive, nor that they arrive in the correct order. - - - To view the logging results, a custom application can be developed that listens for logging - events. - - - When decoding events send via this appender remember to use the same encoding - to decode the events as was used to send the events. See the - property to specify the encoding to use. - - - - This example shows how to log receive logging events that are sent - on IP address 244.0.0.1 and port 8080 to the console. The event is - encoded in the packet as a unicode string and it is decoded as such. - - IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 0); - UdpClient udpClient; - byte[] buffer; - string loggingEvent; - - try - { - udpClient = new UdpClient(8080); - - while(true) - { - buffer = udpClient.Receive(ref remoteEndPoint); - loggingEvent = System.Text.Encoding.Unicode.GetString(buffer); - Console.WriteLine(loggingEvent); - } - } - catch(Exception e) - { - Console.WriteLine(e.ToString()); - } - - - Dim remoteEndPoint as IPEndPoint - Dim udpClient as UdpClient - Dim buffer as Byte() - Dim loggingEvent as String - - Try - remoteEndPoint = new IPEndPoint(IPAddress.Any, 0) - udpClient = new UdpClient(8080) - - While True - buffer = udpClient.Receive(ByRef remoteEndPoint) - loggingEvent = System.Text.Encoding.Unicode.GetString(buffer) - Console.WriteLine(loggingEvent) - Wend - Catch e As Exception - Console.WriteLine(e.ToString()) - End Try - - - An example configuration section to log information using this appender to the - IP 224.0.0.1 on port 8080: - - - - - - - - - - Gert Driesen - Nicko Cadell - - - - Initializes a new instance of the class. - - - The default constructor initializes all fields to their default values. - - - - - Initialize the appender based on the options set. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - The appender will be ignored if no was specified or - an invalid remote or local TCP port number was specified. - - - The required property was not specified. - The TCP port number assigned to or is less than or greater than . - - - - This method is called by the method. - - The event to log. - - - Sends the event using an UDP datagram. - - - Exceptions are passed to the . - - - - - - Closes the UDP connection and releases all resources associated with - this instance. - - - - Disables the underlying and releases all managed - and unmanaged resources associated with the . - - - - - - Initializes the underlying connection. - - - - The underlying is initialized and binds to the - port number from which you intend to communicate. - - - Exceptions are passed to the . - - - - - - The IP address of the remote host or multicast group to which - the logging event will be sent. - - - - - The TCP port number of the remote host or multicast group to - which the logging event will be sent. - - - - - The cached remote endpoint to which the logging events will be sent. - - - - - The TCP port number from which the will communicate. - - - - - The instance that will be used for sending the - logging events. - - - - - The encoding to use for the packet. - - - - - Gets or sets the IP address of the remote host or multicast group to which - the underlying should sent the logging event. - - - The IP address of the remote host or multicast group to which the logging event - will be sent. - - - - Multicast addresses are identified by IP class D addresses (in the range 224.0.0.0 to - 239.255.255.255). Multicast packets can pass across different networks through routers, so - it is possible to use multicasts in an Internet scenario as long as your network provider - supports multicasting. - - - Hosts that want to receive particular multicast messages must register their interest by joining - the multicast group. Multicast messages are not sent to networks where no host has joined - the multicast group. Class D IP addresses are used for multicast groups, to differentiate - them from normal host addresses, allowing nodes to easily detect if a message is of interest. - - - Static multicast addresses that are needed globally are assigned by IANA. A few examples are listed in the table below: - - - - - IP Address - Description - - - 224.0.0.1 - - - Sends a message to all system on the subnet. - - - - - 224.0.0.2 - - - Sends a message to all routers on the subnet. - - - - - 224.0.0.12 - - - The DHCP server answers messages on the IP address 224.0.0.12, but only on a subnet. - - - - - - - A complete list of actually reserved multicast addresses and their owners in the ranges - defined by RFC 3171 can be found at the IANA web site. - - - The address range 239.0.0.0 to 239.255.255.255 is reserved for administrative scope-relative - addresses. These addresses can be reused with other local groups. Routers are typically - configured with filters to prevent multicast traffic in this range from flowing outside - of the local network. - - - - - - Gets or sets the TCP port number of the remote host or multicast group to which - the underlying should sent the logging event. - - - An integer value in the range to - indicating the TCP port number of the remote host or multicast group to which the logging event - will be sent. - - - The underlying will send messages to this TCP port number - on the remote host or multicast group. - - The value specified is less than or greater than . - - - - Gets or sets the TCP port number from which the underlying will communicate. - - - An integer value in the range to - indicating the TCP port number from which the underlying will communicate. - - - - The underlying will bind to this port for sending messages. - - - Setting the value to 0 (the default) will cause the udp client not to bind to - a local port. - - - The value specified is less than or greater than . - - - - Gets or sets used to write the packets. - - - The used to write the packets. - - - - The used to write the packets. - - - - - - Gets or sets the underlying . - - - The underlying . - - - creates a to send logging events - over a network. Classes deriving from can use this - property to get or set this . Use the underlying - returned from if you require access beyond that which - provides. - - - - - Gets or sets the cached remote endpoint to which the logging events should be sent. - - - The cached remote endpoint to which the logging events will be sent. - - - The method will initialize the remote endpoint - with the values of the and - properties. - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Syslog port 514 - - - - - Initializes a new instance of the class. - - - This instance of the class is set up to write - to a remote syslog daemon. - - - - - Add a mapping of level to severity - - The mapping to add - - - Add a mapping to this appender. - - - - - - This method is called by the method. - - The event to log. - - - Writes the event to a remote syslog daemon. - - - The format of the output will depend on the appender's layout. - - - - - - Initialize the options for this appender - - - - Initialize the level to syslog severity mappings set on this appender. - - - - - - Translates a log4net level to a syslog severity. - - A log4net level. - A syslog severity. - - - Translates a log4net level to a syslog severity. - - - - - - Generate a syslog priority. - - The syslog facility. - The syslog severity. - A syslog priority. - - - Generate a syslog priority. - - - - - - The facility. The default facility is . - - - - - The message identity - - - - - Mapping from level object to syslog severity - - - - - Message identity - - - - An identifier is specified with each log message. This can be specified - by setting the property. The identity (also know - as the tag) must not contain white space. The default value for the - identity is the application name (from ). - - - - - - Syslog facility - - - Set to one of the values. The list of - facilities is predefined and cannot be extended. The default value - is . - - - - - syslog severities - - - - The syslog severities. - - - - - - system is unusable - - - - - action must be taken immediately - - - - - critical conditions - - - - - error conditions - - - - - warning conditions - - - - - normal but significant condition - - - - - informational - - - - - debug-level messages - - - - - syslog facilities - - - - The syslog facilities - - - - - - kernel messages - - - - - random user-level messages - - - - - mail system - - - - - system daemons - - - - - security/authorization messages - - - - - messages generated internally by syslogd - - - - - line printer subsystem - - - - - network news subsystem - - - - - UUCP subsystem - - - - - clock (cron/at) daemon - - - - - security/authorization messages (private) - - - - - ftp daemon - - - - - NTP subsystem - - - - - log audit - - - - - log alert - - - - - clock daemon - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - A class to act as a mapping between the level that a logging call is made at and - the syslog severity that is should be logged at. - - - - A class to act as a mapping between the level that a logging call is made at and - the syslog severity that is should be logged at. - - - - - - The mapped syslog severity for the specified level - - - - Required property. - The mapped syslog severity for the specified level - - - - - - Delivers logging events to a remote logging sink. - - - - This Appender is designed to deliver events to a remote sink. - That is any object that implements the - interface. It delivers the events using .NET remoting. The - object to deliver events to is specified by setting the - appenders property. - - The RemotingAppender buffers events before sending them. This allows it to - make more efficient use of the remoting infrastructure. - - Once the buffer is full the events are still not sent immediately. - They are scheduled to be sent using a pool thread. The effect is that - the send occurs asynchronously. This is very important for a - number of non obvious reasons. The remoting infrastructure will - flow thread local variables (stored in the ), - if they are marked as , across the - remoting boundary. If the server is not contactable then - the remoting infrastructure will clear the - objects from the . To prevent a logging failure from - having side effects on the calling application the remoting call must be made - from a separate thread to the one used by the application. A - thread is used for this. If no thread is available then - the events will block in the thread pool manager until a thread is available. - - Because the events are sent asynchronously using pool threads it is possible to close - this appender before all the queued events have been sent. - When closing the appender attempts to wait until all the queued events have been sent, but - this will timeout after 30 seconds regardless. - - If this appender is being closed because the - event has fired it may not be possible to send all the queued events. During process - exit the runtime limits the time that a - event handler is allowed to run for. If the runtime terminates the threads before - the queued events have been sent then they will be lost. To ensure that all events - are sent the appender must be closed before the application exits. See - for details on how to shutdown - log4net programmatically. - - - Nicko Cadell - Gert Driesen - Daniel Cazzulino - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Initialize the appender based on the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Send the contents of the buffer to the remote sink. - - - The events are not sent immediately. They are scheduled to be sent - using a pool thread. The effect is that the send occurs asynchronously. - This is very important for a number of non obvious reasons. The remoting - infrastructure will flow thread local variables (stored in the ), - if they are marked as , across the - remoting boundary. If the server is not contactable then - the remoting infrastructure will clear the - objects from the . To prevent a logging failure from - having side effects on the calling application the remoting call must be made - from a separate thread to the one used by the application. A - thread is used for this. If no thread is available then - the events will block in the thread pool manager until a thread is available. - - The events to send. - - - - Override base class close. - - - - This method waits while there are queued work items. The events are - sent asynchronously using work items. These items - will be sent once a thread pool thread is available to send them, therefore - it is possible to close the appender before all the queued events have been - sent. - - This method attempts to wait until all the queued events have been sent, but this - method will timeout after 30 seconds regardless. - - If the appender is being closed because the - event has fired it may not be possible to send all the queued events. During process - exit the runtime limits the time that a - event handler is allowed to run for. - - - - - A work item is being queued into the thread pool - - - - - A work item from the thread pool has completed - - - - - Send the contents of the buffer to the remote sink. - - - This method is designed to be used with the . - This method expects to be passed an array of - objects in the state param. - - the logging events to send - - - - The URL of the remote sink. - - - - - The local proxy (.NET remoting) for the remote logging sink. - - - - - The number of queued callbacks currently waiting or executing - - - - - Event used to signal when there are no queued work items - - - This event is set when there are no queued work items. In this - state it is safe to close the appender. - - - - - Gets or sets the URL of the well-known object that will accept - the logging events. - - - The well-known URL of the remote sink. - - - - The URL of the remoting sink that will accept logging events. - The sink must implement the - interface. - - - - - - Interface used to deliver objects to a remote sink. - - - This interface must be implemented by a remoting sink - if the is to be used - to deliver logging events to the sink. - - - - - Delivers logging events to the remote sink - - Array of events to log. - - - Delivers logging events to the remote sink - - - - - - Appender that rolls log files based on size or date or both. - - - - RollingFileAppender can roll log files based on size or date or both - depending on the setting of the property. - When set to the log file will be rolled - once its size exceeds the . - When set to the log file will be rolled - once the date boundary specified in the property - is crossed. - When set to the log file will be - rolled once the date boundary specified in the property - is crossed, but within a date boundary the file will also be rolled - once its size exceeds the . - When set to the log file will be rolled when - the appender is configured. This effectively means that the log file can be - rolled once per program execution. - - - A of few additional optional features have been added: - - Attach date pattern for current log file - Backup number increments for newer files - Infinite number of backups by file size - - - - - - For large or infinite numbers of backup files a - greater than zero is highly recommended, otherwise all the backup files need - to be renamed each time a new backup is created. - - - When Date/Time based rolling is used setting - to will reduce the number of file renamings to few or none. - - - - - - Changing or without clearing - the log file directory of backup files will cause unexpected and unwanted side effects. - - - - - If Date/Time based rolling is enabled this appender will attempt to roll existing files - in the directory without a Date/Time tag based on the last write date of the base log file. - The appender only rolls the log file when a message is logged. If Date/Time based rolling - is enabled then the appender will not roll the log file at the Date/Time boundary but - at the point when the next message is logged after the boundary has been crossed. - - - - The extends the and - has the same behavior when opening the log file. - The appender will first try to open the file for writing when - is called. This will typically be during configuration. - If the file cannot be opened for writing the appender will attempt - to open the file again each time a message is logged to the appender. - If the file cannot be opened for writing when a message is logged then - the message will be discarded by this appender. - - - When rolling a backup file necessitates deleting an older backup file the - file to be deleted is moved to a temporary name before being deleted. - - - - - A maximum number of backup files when rolling on date/time boundaries is not supported. - - - - Nicko Cadell - Gert Driesen - Aspi Havewala - Douglas de la Torre - Edward Smit - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Sets the quiet writer being used. - - - This method can be overridden by sub classes. - - the writer to set - - - - Write out a logging event. - - the event to write to file. - - - Handles append time behavior for RollingFileAppender. This checks - if a roll over either by date (checked first) or time (checked second) - is need and then appends to the file last. - - - - - - Write out an array of logging events. - - the events to write to file. - - - Handles append time behavior for RollingFileAppender. This checks - if a roll over either by date (checked first) or time (checked second) - is need and then appends to the file last. - - - - - - Performs any required rolling before outputting the next event - - - - Handles append time behavior for RollingFileAppender. This checks - if a roll over either by date (checked first) or time (checked second) - is need and then appends to the file last. - - - - - - Creates and opens the file for logging. If - is false then the fully qualified name is determined and used. - - the name of the file to open - true to append to existing file - - This method will ensure that the directory structure - for the specified exists. - - - - - Get the current output file name - - the base file name - the output file name - - The output file name is based on the base fileName specified. - If is set then the output - file name is the same as the base file passed in. Otherwise - the output file depends on the date pattern, on the count - direction or both. - - - - - Determines curSizeRollBackups (only within the current roll point) - - - - - Generates a wildcard pattern that can be used to find all files - that are similar to the base file name. - - - - - - - Builds a list of filenames for all files matching the base filename plus a file - pattern. - - - - - - - Initiates a roll over if needed for crossing a date boundary since the last run. - - - - - Initializes based on existing conditions at time of . - - - - Initializes based on existing conditions at time of . - The following is done - - determine curSizeRollBackups (only within the current roll point) - initiates a roll over if needed for crossing a date boundary since the last run. - - - - - - - Does the work of bumping the 'current' file counter higher - to the highest count when an incremental file name is seen. - The highest count is either the first file (when count direction - is greater than 0) or the last file (when count direction less than 0). - In either case, we want to know the highest count that is present. - - - - - - - Takes a list of files and a base file name, and looks for - 'incremented' versions of the base file. Bumps the max - count up to the highest count seen. - - - - - - - Calculates the RollPoint for the datePattern supplied. - - the date pattern to calculate the check period for - The RollPoint that is most accurate for the date pattern supplied - - Essentially the date pattern is examined to determine what the - most suitable roll point is. The roll point chosen is the roll point - with the smallest period that can be detected using the date pattern - supplied. i.e. if the date pattern only outputs the year, month, day - and hour then the smallest roll point that can be detected would be - and hourly roll point as minutes could not be detected. - - - - - Initialize the appender based on the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - Sets initial conditions including date/time roll over information, first check, - scheduledFilename, and calls to initialize - the current number of backups. - - - - - - Rollover the file(s) to date/time tagged file(s). - - set to true if the file to be rolled is currently open - - - Rollover the file(s) to date/time tagged file(s). - Resets curSizeRollBackups. - If fileIsOpen is set then the new file is opened (through SafeOpenFile). - - - - - - Renames file to file . - - Name of existing file to roll. - New name for file. - - - Renames file to file . It - also checks for existence of target file and deletes if it does. - - - - - - Test if a file exists at a specified path - - the path to the file - true if the file exists - - - Test if a file exists at a specified path - - - - - - Deletes the specified file if it exists. - - The file to delete. - - - Delete a file if is exists. - The file is first moved to a new filename then deleted. - This allows the file to be removed even when it cannot - be deleted, but it still can be moved. - - - - - - Implements file roll base on file size. - - - - If the maximum number of size based backups is reached - (curSizeRollBackups == maxSizeRollBackups) then the oldest - file is deleted -- its index determined by the sign of countDirection. - If countDirection < 0, then files - {File.1, ..., File.curSizeRollBackups -1} - are renamed to {File.2, ..., - File.curSizeRollBackups}. Moreover, File is - renamed File.1 and closed. - - - A new file is created to receive further log output. - - - If maxSizeRollBackups is equal to zero, then the - File is truncated with no backup files created. - - - If maxSizeRollBackups < 0, then File is - renamed if needed and no files are deleted. - - - - - - Implements file roll. - - the base name to rename - - - If the maximum number of size based backups is reached - (curSizeRollBackups == maxSizeRollBackups) then the oldest - file is deleted -- its index determined by the sign of countDirection. - If countDirection < 0, then files - {File.1, ..., File.curSizeRollBackups -1} - are renamed to {File.2, ..., - File.curSizeRollBackups}. - - - If maxSizeRollBackups is equal to zero, then the - File is truncated with no backup files created. - - - If maxSizeRollBackups < 0, then File is - renamed if needed and no files are deleted. - - - This is called by to rename the files. - - - - - - Get the start time of the next window for the current rollpoint - - the current date - the type of roll point we are working with - the start time for the next roll point an interval after the currentDateTime date - - - Returns the date of the next roll point after the currentDateTime date passed to the method. - - - The basic strategy is to subtract the time parts that are less significant - than the rollpoint from the current time. This should roll the time back to - the start of the time window for the current rollpoint. Then we add 1 window - worth of time and get the start time of the next window for the rollpoint. - - - - - - This object supplies the current date/time. Allows test code to plug in - a method to control this class when testing date/time based rolling. - - - - - The date pattern. By default, the pattern is set to ".yyyy-MM-dd" - meaning daily rollover. - - - - - The actual formatted filename that is currently being written to - or will be the file transferred to on roll over - (based on staticLogFileName). - - - - - The timestamp when we shall next recompute the filename. - - - - - Holds date of last roll over - - - - - The type of rolling done - - - - - The default maximum file size is 10MB - - - - - There is zero backup files by default - - - - - How many sized based backups have been made so far - - - - - The rolling file count direction. - - - - - The rolling mode used in this appender. - - - - - Cache flag set if we are rolling by date. - - - - - Cache flag set if we are rolling by size. - - - - - Value indicating whether to always log to the same file. - - - - - FileName provided in configuration. Used for rolling properly - - - - - The 1st of January 1970 in UTC - - - - - Gets or sets the date pattern to be used for generating file names - when rolling over on date. - - - The date pattern to be used for generating file names when rolling - over on date. - - - - Takes a string in the same format as expected by - . - - - This property determines the rollover schedule when rolling over - on date. - - - - - - Gets or sets the maximum number of backup files that are kept before - the oldest is erased. - - - The maximum number of backup files that are kept before the oldest is - erased. - - - - If set to zero, then there will be no backup files and the log file - will be truncated when it reaches . - - - If a negative number is supplied then no deletions will be made. Note - that this could result in very slow performance as a large number of - files are rolled over unless is used. - - - The maximum applies to each time based group of files and - not the total. - - - - - - Gets or sets the maximum size that the output file is allowed to reach - before being rolled over to backup files. - - - The maximum size in bytes that the output file is allowed to reach before being - rolled over to backup files. - - - - This property is equivalent to except - that it is required for differentiating the setter taking a - argument from the setter taking a - argument. - - - The default maximum file size is 10MB (10*1024*1024). - - - - - - Gets or sets the maximum size that the output file is allowed to reach - before being rolled over to backup files. - - - The maximum size that the output file is allowed to reach before being - rolled over to backup files. - - - - This property allows you to specify the maximum size with the - suffixes "KB", "MB" or "GB" so that the size is interpreted being - expressed respectively in kilobytes, megabytes or gigabytes. - - - For example, the value "10KB" will be interpreted as 10240 bytes. - - - The default maximum file size is 10MB. - - - If you have the option to set the maximum file size programmatically - consider using the property instead as this - allows you to set the size in bytes as a . - - - - - - Gets or sets the rolling file count direction. - - - The rolling file count direction. - - - - Indicates if the current file is the lowest numbered file or the - highest numbered file. - - - By default newer files have lower numbers ( < 0), - i.e. log.1 is most recent, log.5 is the 5th backup, etc... - - - >= 0 does the opposite i.e. - log.1 is the first backup made, log.5 is the 5th backup made, etc. - For infinite backups use >= 0 to reduce - rollover costs. - - The default file count direction is -1. - - - - - Gets or sets the rolling style. - - The rolling style. - - - The default rolling style is . - - - When set to this appender's - property is set to false, otherwise - the appender would append to a single file rather than rolling - the file each time it is opened. - - - - - - Gets or sets a value indicating whether to always log to - the same file. - - - true if always should be logged to the same file, otherwise false. - - - - By default file.log is always the current file. Optionally - file.log.yyyy-mm-dd for current formatted datePattern can by the currently - logging file (or file.log.curSizeRollBackup or even - file.log.yyyy-mm-dd.curSizeRollBackup). - - - This will make time based rollovers with a large number of backups - much faster as the appender it won't have to rename all the backups! - - - - - - Style of rolling to use - - - - Style of rolling to use - - - - - - Roll files once per program execution - - - - Roll files once per program execution. - Well really once each time this appender is - configured. - - - Setting this option also sets AppendToFile to - false on the RollingFileAppender, otherwise - this appender would just be a normal file appender. - - - - - - Roll files based only on the size of the file - - - - - Roll files based only on the date - - - - - Roll files based on both the size and date of the file - - - - - The code assumes that the following 'time' constants are in a increasing sequence. - - - - The code assumes that the following 'time' constants are in a increasing sequence. - - - - - - Roll the log not based on the date - - - - - Roll the log for each minute - - - - - Roll the log for each hour - - - - - Roll the log twice a day (midday and midnight) - - - - - Roll the log each day (midnight) - - - - - Roll the log each week - - - - - Roll the log each month - - - - - This interface is used to supply Date/Time information to the . - - - This interface is used to supply Date/Time information to the . - Used primarily to allow test classes to plug themselves in so they can - supply test date/times. - - - - - Gets the current time. - - The current time. - - - Gets the current time. - - - - - - Default implementation of that returns the current time. - - - - - Gets the current time. - - The current time. - - - Gets the current time. - - - - - - Send an e-mail when a specific logging event occurs, typically on errors - or fatal errors. - - - - The number of logging events delivered in this e-mail depend on - the value of option. The - keeps only the last - logging events in its - cyclic buffer. This keeps memory requirements at a reasonable level while - still delivering useful application context. - - - Authentication and setting the server Port are only available on the MS .NET 1.1 runtime. - For these features to be enabled you need to ensure that you are using a version of - the log4net assembly that is built against the MS .NET 1.1 framework and that you are - running the your application on the MS .NET 1.1 runtime. On all other platforms only sending - unauthenticated messages to a server listening on port 25 (the default) is supported. - - - Authentication is supported by setting the property to - either or . - If using authentication then the - and properties must also be set. - - - To set the SMTP server port use the property. The default port is 25. - - - Nicko Cadell - Gert Driesen - - - - Default constructor - - - - Default constructor - - - - - - Sends the contents of the cyclic buffer as an e-mail message. - - The logging events to send. - - - - Send the email message - - the body text to include in the mail - - - - Gets or sets a semicolon-delimited list of recipient e-mail addresses. - - - A semicolon-delimited list of e-mail addresses. - - - - A semicolon-delimited list of recipient e-mail addresses. - - - - - - Gets or sets the e-mail address of the sender. - - - The e-mail address of the sender. - - - - The e-mail address of the sender. - - - - - - Gets or sets the subject line of the e-mail message. - - - The subject line of the e-mail message. - - - - The subject line of the e-mail message. - - - - - - Gets or sets the name of the SMTP relay mail server to use to send - the e-mail messages. - - - The name of the e-mail relay server. If SmtpServer is not set, the - name of the local SMTP server is used. - - - - The name of the e-mail relay server. If SmtpServer is not set, the - name of the local SMTP server is used. - - - - - - Obsolete - - - Use the BufferingAppenderSkeleton Fix methods instead - - - - Obsolete property. - - - - - - The mode to use to authentication with the SMTP server - - - Authentication is only available on the MS .NET 1.1 runtime. - - Valid Authentication mode values are: , - , and . - The default value is . When using - you must specify the - and to use to authenticate. - When using the Windows credentials for the current - thread, if impersonating, or the process will be used to authenticate. - - - - - - The username to use to authenticate with the SMTP server - - - Authentication is only available on the MS .NET 1.1 runtime. - - A and must be specified when - is set to , - otherwise the username will be ignored. - - - - - - The password to use to authenticate with the SMTP server - - - Authentication is only available on the MS .NET 1.1 runtime. - - A and must be specified when - is set to , - otherwise the password will be ignored. - - - - - - The port on which the SMTP server is listening - - - Server Port is only available on the MS .NET 1.1 runtime. - - The port on which the SMTP server is listening. The default - port is 25. The Port can only be changed when running on - the MS .NET 1.1 runtime. - - - - - - Gets or sets the priority of the e-mail message - - - One of the values. - - - - Sets the priority of the e-mails generated by this - appender. The default priority is . - - - If you are using this appender to report errors then - you may want to set the priority to . - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Values for the property. - - - - SMTP authentication modes. - - - - - - No authentication - - - - - Basic authentication. - - - Requires a username and password to be supplied - - - - - Integrated authentication - - - Uses the Windows credentials from the current thread or process to authenticate. - - - - - Send an email when a specific logging event occurs, typically on errors - or fatal errors. Rather than sending via smtp it writes a file into the - directory specified by . This allows services such - as the IIS SMTP agent to manage sending the messages. - - - - The configuration for this appender is identical to that of the SMTPAppender, - except that instead of specifying the SMTPAppender.SMTPHost you specify - . - - - The number of logging events delivered in this e-mail depend on - the value of option. The - keeps only the last - logging events in its - cyclic buffer. This keeps memory requirements at a reasonable level while - still delivering useful application context. - - - Niall Daley - Nicko Cadell - - - - Default constructor - - - - Default constructor - - - - - - Sends the contents of the cyclic buffer as an e-mail message. - - The logging events to send. - - - Sends the contents of the cyclic buffer as an e-mail message. - - - - - - Activate the options on this appender. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Convert a path into a fully qualified path. - - The path to convert. - The fully qualified path. - - - Converts the path specified to a fully - qualified path. If the path is relative it is - taken as relative from the application base - directory. - - - - - - The security context to use for privileged calls - - - - - Gets or sets a semicolon-delimited list of recipient e-mail addresses. - - - A semicolon-delimited list of e-mail addresses. - - - - A semicolon-delimited list of e-mail addresses. - - - - - - Gets or sets the e-mail address of the sender. - - - The e-mail address of the sender. - - - - The e-mail address of the sender. - - - - - - Gets or sets the subject line of the e-mail message. - - - The subject line of the e-mail message. - - - - The subject line of the e-mail message. - - - - - - Gets or sets the path to write the messages to. - - - - Gets or sets the path to write the messages to. This should be the same - as that used by the agent sending the messages. - - - - - - Gets or sets the used to write to the pickup directory. - - - The used to write to the pickup directory. - - - - Unless a specified here for this appender - the is queried for the - security context to use. The default behavior is to use the security context - of the current thread. - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Appender that allows clients to connect via Telnet to receive log messages - - - - The TelnetAppender accepts socket connections and streams logging messages - back to the client. - The output is provided in a telnet-friendly way so that a log can be monitored - over a TCP/IP socket. - This allows simple remote monitoring of application logging. - - - The default is 23 (the telnet port). - - - Keith Long - Nicko Cadell - - - - Default constructor - - - - Default constructor - - - - - - Overrides the parent method to close the socket handler - - - - Closes all the outstanding connections. - - - - - - Initialize the appender based on the options set. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - Create the socket handler and wait for connections - - - - - - Writes the logging event to each connected client. - - The event to log. - - - Writes the logging event to each connected client. - - - - - - Gets or sets the TCP port number on which this will listen for connections. - - - An integer value in the range to - indicating the TCP port number on which this will listen for connections. - - - - The default value is 23 (the telnet port). - - - The value specified is less than - or greater than . - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Helper class to manage connected clients - - - - The SocketHandler class is used to accept connections from - clients. It is threaded so that clients can connect/disconnect - asynchronously. - - - - - - Opens a new server port on - - the local port to listen on for connections - - - Creates a socket handler on the specified local server port. - - - - - - Sends a string message to each of the connected clients - - the text to send - - - Sends a string message to each of the connected clients - - - - - - Add a client to the internal clients list - - client to add - - - - Remove a client from the internal clients list - - client to remove - - - - Callback used to accept a connection on the server socket - - The result of the asynchronous operation - - - On connection adds to the list of connections - if there are two many open connections you will be disconnected - - - - - - Close all network connections - - - - Make sure we close all network connections - - - - - - Test if this handler has active connections - - - true if this handler has active connections - - - - This property will be true while this handler has - active connections, that is at least one connection that - the handler will attempt to send a message to. - - - - - - Class that represents a client connected to this handler - - - - Class that represents a client connected to this handler - - - - - - Create this for the specified - - the client's socket - - - Opens a stream writer on the socket. - - - - - - Write a string to the client - - string to send - - - Write a string to the client - - - - - - Cleanup the clients connection - - - - Close the socket connection. - - - - - - Appends log events to the system. - - - - The application configuration file can be used to control what listeners - are actually used. See the MSDN documentation for the - class for details on configuring the - trace system. - - - Events are written using the System.Diagnostics.Trace.Write(string,string) - method. The event's logger name is passed as the value for the category name to the Write method. - - - Compact Framework
- The Compact Framework does not support the - class for any operation except Assert. When using the Compact Framework this - appender will write to the system rather than - the Trace system. This appender will therefore behave like the . -
-
- Douglas de la Torre - Nicko Cadell - Gert Driesen -
- - - Initializes a new instance of the . - - - - Default constructor. - - - - - - Initializes a new instance of the - with a specified layout. - - The layout to use with this appender. - - - Obsolete constructor. - - - - - - Writes the logging event to the system. - - The event to log. - - - Writes the logging event to the system. - - - - - - Immediate flush means that the underlying writer or output stream - will be flushed at the end of each append operation. - - - - Immediate flush is slower but ensures that each append request is - actually written. If is set to - false, then there is a good chance that the last few - logs events are not actually written to persistent media if and - when the application crashes. - - - The default value is true. - - - - - Gets or sets a value that indicates whether the appender will - flush at the end of each write. - - - The default behavior is to flush at the end of each - write. If the option is set tofalse, then the underlying - stream can defer writing to physical medium to a later time. - - - Avoiding the flush operation at the end of each append results - in a performance gain of 10 to 20 percent. However, there is safety - trade-off involved in skipping flushing. Indeed, when flushing is - skipped, then it is likely that the last few log events will not - be recorded on disk when the application exits. This is a high - price to pay even for a 20% performance gain. - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Assembly level attribute that specifies a domain to alias to this assembly's repository. - - - - AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute. - - - An assembly's logger repository is defined by its , - however this can be overridden by an assembly loaded before the target assembly. - - - An assembly can alias another assembly's domain to its repository by - specifying this attribute with the name of the target domain. - - - This attribute can only be specified on the assembly and may be used - as many times as necessary to alias all the required domains. - - - Nicko Cadell - Gert Driesen - - - - Assembly level attribute that specifies a repository to alias to this assembly's repository. - - - - An assembly's logger repository is defined by its , - however this can be overridden by an assembly loaded before the target assembly. - - - An assembly can alias another assembly's repository to its repository by - specifying this attribute with the name of the target repository. - - - This attribute can only be specified on the assembly and may be used - as many times as necessary to alias all the required repositories. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class with - the specified repository to alias to this assembly's repository. - - The repository to alias to this assemby's repository. - - - Initializes a new instance of the class with - the specified repository to alias to this assembly's repository. - - - - - - Gets or sets the repository to alias to this assemby's repository. - - - The repository to alias to this assemby's repository. - - - - The name of the repository to alias to this assemby's repository. - - - - - - Initializes a new instance of the class with - the specified domain to alias to this assembly's repository. - - The domain to alias to this assemby's repository. - - - Obsolete. Use instead of . - - - - - - Use this class to quickly configure a . - - - - Allows very simple programmatic configuration of log4net. - - - Only one appender can be configured using this configurator. - The appender is set at the root of the hierarchy and all logging - events will be delivered to that appender. - - - Appenders can also implement the interface. Therefore - they would require that the method - be called after the appenders properties have been configured. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to prevent instantiation of this class. - - - - - - Initializes the log4net system with a default configuration. - - - - Initializes the log4net logging system using a - that will write to Console.Out. The log messages are - formatted using the layout object - with the - layout style. - - - - - - Initializes the log4net system using the specified appender. - - The appender to use to log all logging events. - - - Initializes the log4net system using the specified appender. - - - - - - Initializes the with a default configuration. - - The repository to configure. - - - Initializes the specified repository using a - that will write to Console.Out. The log messages are - formatted using the layout object - with the - layout style. - - - - - - Initializes the using the specified appender. - - The repository to configure. - The appender to use to log all logging events. - - - Initializes the using the specified appender. - - - - - - Base class for all log4net configuration attributes. - - - This is an abstract class that must be extended by - specific configurators. This attribute allows the - configurator to be parameterized by an assembly level - attribute. - - Nicko Cadell - Gert Driesen - - - - Constructor used by subclasses. - - the ordering priority for this configurator - - - The is used to order the configurator - attributes before they are invoked. Higher priority configurators are executed - before lower priority ones. - - - - - - Configures the for the specified assembly. - - The assembly that this attribute was defined on. - The repository to configure. - - - Abstract method implemented by a subclass. When this method is called - the subclass should configure the . - - - - - - Compare this instance to another ConfiguratorAttribute - - the object to compare to - see - - - Compares the priorities of the two instances. - Sorts by priority in descending order. Objects with the same priority are - randomly ordered. - - - - - - Assembly level attribute that specifies the logging domain for the assembly. - - - - DomainAttribute is obsolete. Use RepositoryAttribute instead of DomainAttribute. - - - Assemblies are mapped to logging domains. Each domain has its own - logging repository. This attribute specified on the assembly controls - the configuration of the domain. The property specifies the name - of the domain that this assembly is a part of. The - specifies the type of the repository objects to create for the domain. If - this attribute is not specified and a is not specified - then the assembly will be part of the default shared logging domain. - - - This attribute can only be specified on the assembly and may only be used - once per assembly. - - - Nicko Cadell - Gert Driesen - - - - Assembly level attribute that specifies the logging repository for the assembly. - - - - Assemblies are mapped to logging repository. This attribute specified - on the assembly controls - the configuration of the repository. The property specifies the name - of the repository that this assembly is a part of. The - specifies the type of the object - to create for the assembly. If this attribute is not specified or a - is not specified then the assembly will be part of the default shared logging repository. - - - This attribute can only be specified on the assembly and may only be used - once per assembly. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Initialize a new instance of the class - with the name of the repository. - - The name of the repository. - - - Initialize the attribute with the name for the assembly's repository. - - - - - - Gets or sets the name of the logging repository. - - - The string name to use as the name of the repository associated with this - assembly. - - - - This value does not have to be unique. Several assemblies can share the - same repository. They will share the logging configuration of the repository. - - - - - - Gets or sets the type of repository to create for this assembly. - - - The type of repository to create for this assembly. - - - - The type of the repository to create for the assembly. - The type must implement the - interface. - - - This will be the type of repository created when - the repository is created. If multiple assemblies reference the - same repository then the repository is only created once using the - of the first assembly to call into the - repository. - - - - - - Initializes a new instance of the class. - - - - Obsolete. Use RepositoryAttribute instead of DomainAttribute. - - - - - - Initialize a new instance of the class - with the name of the domain. - - The name of the domain. - - - Obsolete. Use RepositoryAttribute instead of DomainAttribute. - - - - - - Use this class to initialize the log4net environment using an Xml tree. - - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - Configures a using an Xml tree. - - - Nicko Cadell - Gert Driesen - - - - Private constructor - - - - - Automatically configures the log4net system based on the - application's configuration settings. - - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - Each application has a configuration file. This has the - same name as the application with '.config' appended. - This file is XML and calling this function prompts the - configurator to look in that file for a section called - log4net that contains the configuration data. - - - - - Automatically configures the using settings - stored in the application's configuration file. - - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - Each application has a configuration file. This has the - same name as the application with '.config' appended. - This file is XML and calling this function prompts the - configurator to look in that file for a section called - log4net that contains the configuration data. - - The repository to configure. - - - - Configures log4net using a log4net element - - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - Loads the log4net configuration from the XML element - supplied as . - - The element to parse. - - - - Configures the using the specified XML - element. - - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - Loads the log4net configuration from the XML element - supplied as . - - The repository to configure. - The element to parse. - - - - Configures log4net using the specified configuration file. - - The XML file to load the configuration from. - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the log4net configuration data. - - - The log4net configuration file can possible be specified in the application's - configuration file (either MyAppName.exe.config for a - normal application on Web.config for an ASP.NET application). - - - The following example configures log4net using a configuration file, of which the - location is stored in the application's configuration file : - - - using log4net.Config; - using System.IO; - using System.Configuration; - - ... - - DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); - - - In the .config file, the path to the log4net can be specified like this : - - - - - - - - - - - - - Configures log4net using the specified configuration file. - - A stream to load the XML configuration from. - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - The configuration data must be valid XML. It must contain - at least one element called log4net that holds - the log4net configuration data. - - - Note that this method will NOT close the stream parameter. - - - - - - Configures the using the specified configuration - file. - - The repository to configure. - The XML file to load the configuration from. - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The log4net configuration file can possible be specified in the application's - configuration file (either MyAppName.exe.config for a - normal application on Web.config for an ASP.NET application). - - - The following example configures log4net using a configuration file, of which the - location is stored in the application's configuration file : - - - using log4net.Config; - using System.IO; - using System.Configuration; - - ... - - DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); - - - In the .config file, the path to the log4net can be specified like this : - - - - - - - - - - - - - Configures the using the specified configuration - file. - - The repository to configure. - The stream to load the XML configuration from. - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - The configuration data must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - Note that this method will NOT close the stream parameter. - - - - - - Configures log4net using the file specified, monitors the file for changes - and reloads the configuration if a change is detected. - - The XML file to load the configuration from. - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The configuration file will be monitored using a - and depends on the behavior of that class. - - - For more information on how to configure log4net using - a separate configuration file, see . - - - - - - - Configures the using the file specified, - monitors the file for changes and reloads the configuration if a change - is detected. - - The repository to configure. - The XML file to load the configuration from. - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The configuration file will be monitored using a - and depends on the behavior of that class. - - - For more information on how to configure log4net using - a separate configuration file, see . - - - - - - - Assembly level attribute to configure the . - - - - AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute. - - - This attribute may only be used at the assembly scope and can only - be used once per assembly. - - - Use this attribute to configure the - without calling one of the - methods. - - - Nicko Cadell - Gert Driesen - - - - Assembly level attribute to configure the . - - - - This attribute may only be used at the assembly scope and can only - be used once per assembly. - - - Use this attribute to configure the - without calling one of the - methods. - - - If neither of the or - properties are set the configuration is loaded from the application's .config file. - If set the property takes priority over the - property. The property - specifies a path to a file to load the config from. The path is relative to the - application's base directory; . - The property is used as a postfix to the assembly file name. - The config file must be located in the application's base directory; . - For example in a console application setting the to - config has the same effect as not specifying the or - properties. - - - The property can be set to cause the - to watch the configuration file for changes. - - - - Log4net will only look for assembly level configuration attributes once. - When using the log4net assembly level attributes to control the configuration - of log4net you must ensure that the first call to any of the - methods is made from the assembly with the configuration - attributes. - - - If you cannot guarantee the order in which log4net calls will be made from - different assemblies you must use programmatic configuration instead, i.e. - call the method directly. - - - - Nicko Cadell - Gert Driesen - - - - Default constructor - - - - Default constructor - - - - - - Configures the for the specified assembly. - - The assembly that this attribute was defined on. - The repository to configure. - - - Configure the repository using the . - The specified must extend the - class otherwise the will not be able to - configure it. - - - The does not extend . - - - - Attempt to load configuration from the local file system - - The assembly that this attribute was defined on. - The repository to configure. - - - - Configure the specified repository using a - - The repository to configure. - the FileInfo pointing to the config file - - - - Attempt to load configuration from a URI - - The assembly that this attribute was defined on. - The repository to configure. - - - - Gets or sets the filename of the configuration file. - - - The filename of the configuration file. - - - - If specified, this is the name of the configuration file to use with - the . This file path is relative to the - application base directory (). - - - The takes priority over the . - - - - - - Gets or sets the extension of the configuration file. - - - The extension of the configuration file. - - - - If specified this is the extension for the configuration file. - The path to the config file is built by using the application - base directory (), - the assembly file name and the config file extension. - - - If the is set to MyExt then - possible config file names would be: MyConsoleApp.exe.MyExt or - MyClassLibrary.dll.MyExt. - - - The takes priority over the . - - - - - - Gets or sets a value indicating whether to watch the configuration file. - - - true if the configuration should be watched, false otherwise. - - - - If this flag is specified and set to true then the framework - will watch the configuration file and will reload the config each time - the file is modified. - - - The config file can only be watched if it is loaded from local disk. - In a No-Touch (Smart Client) deployment where the application is downloaded - from a web server the config file may not reside on the local disk - and therefore it may not be able to watch it. - - - Watching configuration is not supported on the SSCLI. - - - - - - Class to register for the log4net section of the configuration file - - - The log4net section of the configuration file needs to have a section - handler registered. This is the section handler used. It simply returns - the XML element that is the root of the section. - - - Example of registering the log4net section handler : - - - -
- - - log4net configuration XML goes here - - - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Parses the configuration section. - - The configuration settings in a corresponding parent configuration section. - The configuration context when called from the ASP.NET configuration system. Otherwise, this parameter is reserved and is a null reference. - The for the log4net section. - The for the log4net section. - - - Returns the containing the configuration data, - - - - - - Assembly level attribute that specifies a plugin to attach to - the repository. - - - - Specifies the type of a plugin to create and attach to the - assembly's repository. The plugin type must implement the - interface. - - - Nicko Cadell - Gert Driesen - - - - Interface used to create plugins. - - - - Interface used to create a plugin. - - - Nicko Cadell - Gert Driesen - - - - Creates the plugin object. - - the new plugin instance - - - Create and return a new plugin instance. - - - - - - Initializes a new instance of the class - with the specified type. - - The type name of plugin to create. - - - Create the attribute with the plugin type specified. - - - Where possible use the constructor that takes a . - - - - - - Initializes a new instance of the class - with the specified type. - - The type of plugin to create. - - - Create the attribute with the plugin type specified. - - - - - - Creates the plugin object defined by this attribute. - - - - Creates the instance of the object as - specified by this attribute. - - - The plugin object. - - - - Returns a representation of the properties of this object. - - - - Overrides base class method to - return a representation of the properties of this object. - - - A representation of the properties of this object - - - - Gets or sets the type for the plugin. - - - The type for the plugin. - - - - The type for the plugin. - - - - - - Gets or sets the type name for the plugin. - - - The type name for the plugin. - - - - The type name for the plugin. - - - Where possible use the property instead. - - - - - - Assembly level attribute to configure the . - - - - This attribute may only be used at the assembly scope and can only - be used once per assembly. - - - Use this attribute to configure the - without calling one of the - methods. - - - Nicko Cadell - - - - Construct provider attribute with type specified - - the type of the provider to use - - - The provider specified must subclass the - class. - - - - - - Configures the SecurityContextProvider - - The assembly that this attribute was defined on. - The repository to configure. - - - Creates a provider instance from the specified. - Sets this as the default security context provider . - - - - - - Gets or sets the type of the provider to use. - - - the type of the provider to use. - - - - The provider specified must subclass the - class. - - - - - - Use this class to initialize the log4net environment using an Xml tree. - - - - Configures a using an Xml tree. - - - Nicko Cadell - Gert Driesen - - - - Private constructor - - - - - Automatically configures the log4net system based on the - application's configuration settings. - - - - Each application has a configuration file. This has the - same name as the application with '.config' appended. - This file is XML and calling this function prompts the - configurator to look in that file for a section called - log4net that contains the configuration data. - - - To use this method to configure log4net you must specify - the section - handler for the log4net configuration section. See the - for an example. - - - - - - - Automatically configures the using settings - stored in the application's configuration file. - - - - Each application has a configuration file. This has the - same name as the application with '.config' appended. - This file is XML and calling this function prompts the - configurator to look in that file for a section called - log4net that contains the configuration data. - - - To use this method to configure log4net you must specify - the section - handler for the log4net configuration section. See the - for an example. - - - The repository to configure. - - - - Configures log4net using a log4net element - - - - Loads the log4net configuration from the XML element - supplied as . - - - The element to parse. - - - - Configures the using the specified XML - element. - - - Loads the log4net configuration from the XML element - supplied as . - - The repository to configure. - The element to parse. - - - - Configures log4net using the specified configuration file. - - The XML file to load the configuration from. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the log4net configuration data. - - - The log4net configuration file can possible be specified in the application's - configuration file (either MyAppName.exe.config for a - normal application on Web.config for an ASP.NET application). - - - The first element matching <configuration> will be read as the - configuration. If this file is also a .NET .config file then you must specify - a configuration section for the log4net element otherwise .NET will - complain. Set the type for the section handler to , for example: - - -
- - - - - The following example configures log4net using a configuration file, of which the - location is stored in the application's configuration file : - - - using log4net.Config; - using System.IO; - using System.Configuration; - - ... - - XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); - - - In the .config file, the path to the log4net can be specified like this : - - - - - - - - - - - - - Configures log4net using the specified configuration URI. - - A URI to load the XML configuration from. - - - The configuration data must be valid XML. It must contain - at least one element called log4net that holds - the log4net configuration data. - - - The must support the URI scheme specified. - - - - - - Configures log4net using the specified configuration data stream. - - A stream to load the XML configuration from. - - - The configuration data must be valid XML. It must contain - at least one element called log4net that holds - the log4net configuration data. - - - Note that this method will NOT close the stream parameter. - - - - - - Configures the using the specified configuration - file. - - The repository to configure. - The XML file to load the configuration from. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The log4net configuration file can possible be specified in the application's - configuration file (either MyAppName.exe.config for a - normal application on Web.config for an ASP.NET application). - - - The first element matching <configuration> will be read as the - configuration. If this file is also a .NET .config file then you must specify - a configuration section for the log4net element otherwise .NET will - complain. Set the type for the section handler to , for example: - - -
- - - - - The following example configures log4net using a configuration file, of which the - location is stored in the application's configuration file : - - - using log4net.Config; - using System.IO; - using System.Configuration; - - ... - - XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); - - - In the .config file, the path to the log4net can be specified like this : - - - - - - - - - - - - - Configures the using the specified configuration - URI. - - The repository to configure. - A URI to load the XML configuration from. - - - The configuration data must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The must support the URI scheme specified. - - - - - - Configures the using the specified configuration - file. - - The repository to configure. - The stream to load the XML configuration from. - - - The configuration data must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - Note that this method will NOT close the stream parameter. - - - - - - Configures log4net using the file specified, monitors the file for changes - and reloads the configuration if a change is detected. - - The XML file to load the configuration from. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The configuration file will be monitored using a - and depends on the behavior of that class. - - - For more information on how to configure log4net using - a separate configuration file, see . - - - - - - - Configures the using the file specified, - monitors the file for changes and reloads the configuration if a change - is detected. - - The repository to configure. - The XML file to load the configuration from. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The configuration file will be monitored using a - and depends on the behavior of that class. - - - For more information on how to configure log4net using - a separate configuration file, see . - - - - - - - Configures the specified repository using a log4net element. - - The hierarchy to configure. - The element to parse. - - - Loads the log4net configuration from the XML element - supplied as . - - - This method is ultimately called by one of the Configure methods - to load the configuration from an . - - - - - - Class used to watch config files. - - - - Uses the to monitor - changes to a specified file. Because multiple change notifications - may be raised when the file is modified, a timer is used to - compress the notifications into a single event. The timer - waits for time before delivering - the event notification. If any further - change notifications arrive while the timer is waiting it - is reset and waits again for to - elapse. - - - - - - The default amount of time to wait after receiving notification - before reloading the config file. - - - - - Watch a specified config file used to configure a repository - - The repository to configure. - The configuration file to watch. - - - Watch a specified config file used to configure a repository - - - - - - Holds the FileInfo used to configure the XmlConfigurator - - - - - Holds the repository being configured. - - - - - The timer used to compress the notification events. - - - - - Initializes a new instance of the class. - - The repository to configure. - The configuration file to watch. - - - Initializes a new instance of the class. - - - - - - Event handler used by . - - The firing the event. - The argument indicates the file that caused the event to be fired. - - - This handler reloads the configuration from the file when the event is fired. - - - - - - Event handler used by . - - The firing the event. - The argument indicates the file that caused the event to be fired. - - - This handler reloads the configuration from the file when the event is fired. - - - - - - Called by the timer when the configuration has been updated. - - null - - - - The implementation of the interface suitable - for use with the compact framework - - - - This implementation is a simple - mapping between repository name and - object. - - - The .NET Compact Framework 1.0 does not support retrieving assembly - level attributes therefore unlike the DefaultRepositorySelector - this selector does not examine the calling assembly for attributes. - - - Nicko Cadell - - - - Interface used by the to select the . - - - - The uses a - to specify the policy for selecting the correct - to return to the caller. - - - Nicko Cadell - Gert Driesen - - - - Gets the for the specified assembly. - - The assembly to use to lookup to the - The for the assembly. - - - Gets the for the specified assembly. - - - How the association between and - is made is not defined. The implementation may choose any method for - this association. The results of this method must be repeatable, i.e. - when called again with the same arguments the result must be the - save value. - - - - - - Gets the named . - - The name to use to lookup to the . - The named - - Lookup a named . This is the repository created by - calling . - - - - - Creates a new repository for the assembly specified. - - The assembly to use to create the domain to associate with the . - The type of repository to create, must implement . - The repository created. - - - The created will be associated with the domain - specified such that a call to with the - same assembly specified will return the same repository instance. - - - How the association between and - is made is not defined. The implementation may choose any method for - this association. - - - - - - Creates a new repository with the name specified. - - The name to associate with the . - The type of repository to create, must implement . - The repository created. - - - The created will be associated with the name - specified such that a call to with the - same name will return the same repository instance. - - - - - - Test if a named repository exists - - the named repository to check - true if the repository exists - - - Test if a named repository exists. Use - to create a new repository and to retrieve - a repository. - - - - - - Gets an array of all currently defined repositories. - - - An array of the instances created by - this . - - - Gets an array of all of the repositories created by this selector. - - - - - - Event to notify that a logger repository has been created. - - - Event to notify that a logger repository has been created. - - - - Event raised when a new repository is created. - The event source will be this selector. The event args will - be a which - holds the newly created . - - - - - - Create a new repository selector - - the type of the repositories to create, must implement - - - Create an new compact repository selector. - The default type for repositories must be specified, - an appropriate value would be . - - - throw if is null - throw if does not implement - - - - Get the for the specified assembly - - not used - The default - - - The argument is not used. This selector does not create a - separate repository for each assembly. - - - As a named repository is not specified the default repository is - returned. The default repository is named log4net-default-repository. - - - - - - Get the named - - the name of the repository to lookup - The named - - - Get the named . The default - repository is log4net-default-repository. Other repositories - must be created using the . - If the named repository does not exist an exception is thrown. - - - throw if is null - throw if the does not exist - - - - Create a new repository for the assembly specified - - not used - the type of repository to create, must implement - the repository created - - - The argument is not used. This selector does not create a - separate repository for each assembly. - - - If the is null then the - default repository type specified to the constructor is used. - - - As a named repository is not specified the default repository is - returned. The default repository is named log4net-default-repository. - - - - - - Create a new repository for the repository specified - - the repository to associate with the - the type of repository to create, must implement . - If this param is null then the default repository type is used. - the repository created - - - The created will be associated with the repository - specified such that a call to with the - same repository specified will return the same repository instance. - - - If the named repository already exists an exception will be thrown. - - - If is null then the default - repository type specified to the constructor is used. - - - throw if is null - throw if the already exists - - - - Test if a named repository exists - - the named repository to check - true if the repository exists - - - Test if a named repository exists. Use - to create a new repository and to retrieve - a repository. - - - - - - Gets a list of objects - - an array of all known objects - - - Gets an array of all of the repositories created by this selector. - - - - - - Notify the registered listeners that the repository has been created - - The repository that has been created - - - Raises the LoggerRepositoryCreatedEvent - event. - - - - - - Event to notify that a logger repository has been created. - - - Event to notify that a logger repository has been created. - - - - Event raised when a new repository is created. - The event source will be this selector. The event args will - be a which - holds the newly created . - - - - - - The default implementation of the interface. - - - - Uses attributes defined on the calling assembly to determine how to - configure the hierarchy for the repository. - - - Nicko Cadell - Gert Driesen - - - - Creates a new repository selector. - - The type of the repositories to create, must implement - - - Create an new repository selector. - The default type for repositories must be specified, - an appropriate value would be . - - - is . - does not implement . - - - - Gets the for the specified assembly. - - The assembly use to lookup the . - - - The type of the created and the repository - to create can be overridden by specifying the - attribute on the . - - - The default values are to use the - implementation of the interface and to use the - as the name of the repository. - - - The created will be automatically configured using - any attributes defined on - the . - - - The for the assembly - is . - - - - Gets the for the specified repository. - - The repository to use to lookup the . - The for the specified repository. - - - Returns the named repository. If is null - a is thrown. If the repository - does not exist a is thrown. - - - Use to create a repository. - - - is . - does not exist. - - - - Create a new repository for the assembly specified - - the assembly to use to create the repository to associate with the . - The type of repository to create, must implement . - The repository created. - - - The created will be associated with the repository - specified such that a call to with the - same assembly specified will return the same repository instance. - - - The type of the created and - the repository to create can be overridden by specifying the - attribute on the - . The default values are to use the - implementation of the - interface and to use the - as the name of the repository. - - - The created will be automatically - configured using any - attributes defined on the . - - - If a repository for the already exists - that repository will be returned. An error will not be raised and that - repository may be of a different type to that specified in . - Also the attribute on the - assembly may be used to override the repository type specified in - . - - - is . - - - - Creates a new repository for the assembly specified. - - the assembly to use to create the repository to associate with the . - The type of repository to create, must implement . - The name to assign to the created repository - Set to true to read and apply the assembly attributes - The repository created. - - - The created will be associated with the repository - specified such that a call to with the - same assembly specified will return the same repository instance. - - - The type of the created and - the repository to create can be overridden by specifying the - attribute on the - . The default values are to use the - implementation of the - interface and to use the - as the name of the repository. - - - The created will be automatically - configured using any - attributes defined on the . - - - If a repository for the already exists - that repository will be returned. An error will not be raised and that - repository may be of a different type to that specified in . - Also the attribute on the - assembly may be used to override the repository type specified in - . - - - is . - - - - Creates a new repository for the specified repository. - - The repository to associate with the . - The type of repository to create, must implement . - If this param is then the default repository type is used. - The new repository. - - - The created will be associated with the repository - specified such that a call to with the - same repository specified will return the same repository instance. - - - is . - already exists. - - - - Test if a named repository exists - - the named repository to check - true if the repository exists - - - Test if a named repository exists. Use - to create a new repository and to retrieve - a repository. - - - - - - Gets a list of objects - - an array of all known objects - - - Gets an array of all of the repositories created by this selector. - - - - - - Aliases a repository to an existing repository. - - The repository to alias. - The repository that the repository is aliased to. - - - The repository specified will be aliased to the repository when created. - The repository must not already exist. - - - When the repository is created it must utilize the same repository type as - the repository it is aliased to, otherwise the aliasing will fail. - - - - is . - -or- - is . - - - - - Notifies the registered listeners that the repository has been created. - - The repository that has been created. - - - Raises the event. - - - - - - Gets the repository name and repository type for the specified assembly. - - The assembly that has a . - in/out param to hold the repository name to use for the assembly, caller should set this to the default value before calling. - in/out param to hold the type of the repository to create for the assembly, caller should set this to the default value before calling. - is . - - - - Configures the repository using information from the assembly. - - The assembly containing - attributes which define the configuration for the repository. - The repository to configure. - - is . - -or- - is . - - - - - Loads the attribute defined plugins on the assembly. - - The assembly that contains the attributes. - The repository to add the plugins to. - - is . - -or- - is . - - - - - Loads the attribute defined aliases on the assembly. - - The assembly that contains the attributes. - The repository to alias to. - - is . - -or- - is . - - - - - Event to notify that a logger repository has been created. - - - Event to notify that a logger repository has been created. - - - - Event raised when a new repository is created. - The event source will be this selector. The event args will - be a which - holds the newly created . - - - - - - Defined error codes that can be passed to the method. - - - - Values passed to the method. - - - Nicko Cadell - - - - A general error - - - - - Error while writing output - - - - - Failed to flush file - - - - - Failed to close file - - - - - Unable to open output file - - - - - No layout specified - - - - - Failed to parse address - - - - - Appenders may delegate their error handling to an . - - - - Error handling is a particularly tedious to get right because by - definition errors are hard to predict and to reproduce. - - - Nicko Cadell - Gert Driesen - - - - Handles the error and information about the error condition is passed as - a parameter. - - The message associated with the error. - The that was thrown when the error occurred. - The error code associated with the error. - - - Handles the error and information about the error condition is passed as - a parameter. - - - - - - Prints the error message passed as a parameter. - - The message associated with the error. - The that was thrown when the error occurred. - - - See . - - - - - - Prints the error message passed as a parameter. - - The message associated with the error. - - - See . - - - - - - Interface for objects that require fixing. - - - - Interface that indicates that the object requires fixing before it - can be taken outside the context of the appender's - method. - - - When objects that implement this interface are stored - in the context properties maps - and - are fixed - (see ) the - method will be called. - - - Nicko Cadell - - - - Get a portable version of this object - - the portable instance of this object - - - Get a portable instance object that represents the current - state of this object. The portable object can be stored - and logged from any thread with identical results. - - - - - - Interface that all loggers implement - - - - This interface supports logging events and testing if a level - is enabled for logging. - - - These methods will not throw exceptions. Note to implementor, ensure - that the implementation of these methods cannot allow an exception - to be thrown to the caller. - - - Nicko Cadell - Gert Driesen - - - - This generic form is intended to be used by wrappers. - - The declaring type of the method that is - the stack boundary into the logging system for this call. - The level of the message to be logged. - The message object to log. - the exception to log, including its stack trace. Pass null to not log an exception. - - - Generates a logging event for the specified using - the and . - - - - - - This is the most generic printing method that is intended to be used - by wrappers. - - The event being logged. - - - Logs the specified logging event through this logger. - - - - - - Checks if this logger is enabled for a given passed as parameter. - - The level to check. - - true if this logger is enabled for level, otherwise false. - - - - Test if this logger is going to log events of the specified . - - - - - - Gets the name of the logger. - - - The name of the logger. - - - - The name of this logger - - - - - - Gets the where this - Logger instance is attached to. - - - The that this logger belongs to. - - - - Gets the where this - Logger instance is attached to. - - - - - - Base interface for all wrappers - - - - Base interface for all wrappers. - - - All wrappers must implement this interface. - - - Nicko Cadell - - - - Get the implementation behind this wrapper object. - - - The object that in implementing this object. - - - - The object that in implementing this - object. The Logger object may not - be the same object as this object because of logger decorators. - This gets the actual underlying objects that is used to process - the log events. - - - - - - Delegate used to handle logger repository creation event notifications - - The which created the repository. - The event args - that holds the instance that has been created. - - - Delegate used to handle logger repository creation event notifications. - - - - - - Provides data for the event. - - - - A - event is raised every time a is created. - - - - - - The created - - - - - Construct instance using specified - - the that has been created - - - Construct instance using specified - - - - - - The that has been created - - - The that has been created - - - - The that has been created - - - - - - Test if an triggers an action - - - - Implementations of this interface allow certain appenders to decide - when to perform an appender specific action. - - - The action or behavior triggered is defined by the implementation. - - - Nicko Cadell - - - - Test if this event triggers the action - - The event to check - true if this event triggers the action, otherwise false - - - Return true if this event triggers the action - - - - - - Defines the default set of levels recognized by the system. - - - - Each has an associated . - - - Levels have a numeric that defines the relative - ordering between levels. Two Levels with the same - are deemed to be equivalent. - - - The levels that are recognized by log4net are set for each - and each repository can have different levels defined. The levels are stored - in the on the repository. Levels are - looked up by name from the . - - - When logging at level INFO the actual level used is not but - the value of LoggerRepository.LevelMap["INFO"]. The default value for this is - , but this can be changed by reconfiguring the level map. - - - Each level has a in addition to its . The - is the string that is written into the output log. By default - the display name is the same as the level name, but this can be used to alias levels - or to localize the log output. - - - Some of the predefined levels recognized by the system are: - - - - . - - - . - - - . - - - . - - - . - - - . - - - . - - - - Nicko Cadell - Gert Driesen - - - - Constructor - - Integer value for this level, higher values represent more severe levels. - The string name of this level. - The display name for this level. This may be localized or otherwise different from the name - - - Initializes a new instance of the class with - the specified level name and value. - - - - - - Constructor - - Integer value for this level, higher values represent more severe levels. - The string name of this level. - - - Initializes a new instance of the class with - the specified level name and value. - - - - - - Returns the representation of the current - . - - - A representation of the current . - - - - Returns the level . - - - - - - Compares levels. - - The object to compare against. - true if the objects are equal. - - - Compares the levels of instances, and - defers to base class if the target object is not a - instance. - - - - - - Returns a hash code - - A hash code for the current . - - - Returns a hash code suitable for use in hashing algorithms and data - structures like a hash table. - - - Returns the hash code of the level . - - - - - - Compares this instance to a specified object and returns an - indication of their relative values. - - A instance or to compare with this instance. - - A 32-bit signed integer that indicates the relative order of the - values compared. The return value has these meanings: - - - Value - Meaning - - - Less than zero - This instance is less than . - - - Zero - This instance is equal to . - - - Greater than zero - - This instance is greater than . - -or- - is . - - - - - - - must be an instance of - or ; otherwise, an exception is thrown. - - - is not a . - - - - Returns a value indicating whether a specified - is greater than another specified . - - A - A - - true if is greater than - ; otherwise, false. - - - - Compares two levels. - - - - - - Returns a value indicating whether a specified - is less than another specified . - - A - A - - true if is less than - ; otherwise, false. - - - - Compares two levels. - - - - - - Returns a value indicating whether a specified - is greater than or equal to another specified . - - A - A - - true if is greater than or equal to - ; otherwise, false. - - - - Compares two levels. - - - - - - Returns a value indicating whether a specified - is less than or equal to another specified . - - A - A - - true if is less than or equal to - ; otherwise, false. - - - - Compares two levels. - - - - - - Returns a value indicating whether two specified - objects have the same value. - - A or . - A or . - - true if the value of is the same as the - value of ; otherwise, false. - - - - Compares two levels. - - - - - - Returns a value indicating whether two specified - objects have different values. - - A or . - A or . - - true if the value of is different from - the value of ; otherwise, false. - - - - Compares two levels. - - - - - - Compares two specified instances. - - The first to compare. - The second to compare. - - A 32-bit signed integer that indicates the relative order of the - two values compared. The return value has these meanings: - - - Value - Meaning - - - Less than zero - is less than . - - - Zero - is equal to . - - - Greater than zero - is greater than . - - - - - - Compares two levels. - - - - - - The level designates a higher level than all the rest. - - - - - The level designates very severe error events. - System unusable, emergencies. - - - - - The level designates very severe error events - that will presumably lead the application to abort. - - - - - The level designates very severe error events. - Take immediate action, alerts. - - - - - The level designates very severe error events. - Critical condition, critical. - - - - - The level designates very severe error events. - - - - - The level designates error events that might - still allow the application to continue running. - - - - - The level designates potentially harmful - situations. - - - - - The level designates informational messages - that highlight the progress of the application at the highest level. - - - - - The level designates informational messages that - highlight the progress of the application at coarse-grained level. - - - - - The level designates fine-grained informational - events that are most useful to debug an application. - - - - - The level designates fine-grained informational - events that are most useful to debug an application. - - - - - The level designates fine-grained informational - events that are most useful to debug an application. - - - - - The level designates fine-grained informational - events that are most useful to debug an application. - - - - - The level designates fine-grained informational - events that are most useful to debug an application. - - - - - The level designates fine-grained informational - events that are most useful to debug an application. - - - - - The level designates the lowest level possible. - - - - - Gets the name of this level. - - - The name of this level. - - - - Gets the name of this level. - - - - - - Gets the value of this level. - - - The value of this level. - - - - Gets the value of this level. - - - - - - Gets the display name of this level. - - - The display name of this level. - - - - Gets the display name of this level. - - - - - - A strongly-typed collection of objects. - - Nicko Cadell - - - - Creates a read-only wrapper for a LevelCollection instance. - - list to create a readonly wrapper arround - - A LevelCollection wrapper that is read-only. - - - - - Initializes a new instance of the LevelCollection class - that is empty and has the default initial capacity. - - - - - Initializes a new instance of the LevelCollection class - that has the specified initial capacity. - - - The number of elements that the new LevelCollection is initially capable of storing. - - - - - Initializes a new instance of the LevelCollection class - that contains elements copied from the specified LevelCollection. - - The LevelCollection whose elements are copied to the new collection. - - - - Initializes a new instance of the LevelCollection class - that contains elements copied from the specified array. - - The array whose elements are copied to the new list. - - - - Initializes a new instance of the LevelCollection class - that contains elements copied from the specified collection. - - The collection whose elements are copied to the new list. - - - - Allow subclasses to avoid our default constructors - - - - - - Copies the entire LevelCollection to a one-dimensional - array. - - The one-dimensional array to copy to. - - - - Copies the entire LevelCollection to a one-dimensional - array, starting at the specified index of the target array. - - The one-dimensional array to copy to. - The zero-based index in at which copying begins. - - - - Adds a to the end of the LevelCollection. - - The to be added to the end of the LevelCollection. - The index at which the value has been added. - - - - Removes all elements from the LevelCollection. - - - - - Creates a shallow copy of the . - - A new with a shallow copy of the collection data. - - - - Determines whether a given is in the LevelCollection. - - The to check for. - true if is found in the LevelCollection; otherwise, false. - - - - Returns the zero-based index of the first occurrence of a - in the LevelCollection. - - The to locate in the LevelCollection. - - The zero-based index of the first occurrence of - in the entire LevelCollection, if found; otherwise, -1. - - - - - Inserts an element into the LevelCollection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - is less than zero - -or- - is equal to or greater than . - - - - - Removes the first occurrence of a specific from the LevelCollection. - - The to remove from the LevelCollection. - - The specified was not found in the LevelCollection. - - - - - Removes the element at the specified index of the LevelCollection. - - The zero-based index of the element to remove. - - is less than zero - -or- - is equal to or greater than . - - - - - Returns an enumerator that can iterate through the LevelCollection. - - An for the entire LevelCollection. - - - - Adds the elements of another LevelCollection to the current LevelCollection. - - The LevelCollection whose elements should be added to the end of the current LevelCollection. - The new of the LevelCollection. - - - - Adds the elements of a array to the current LevelCollection. - - The array whose elements should be added to the end of the LevelCollection. - The new of the LevelCollection. - - - - Adds the elements of a collection to the current LevelCollection. - - The collection whose elements should be added to the end of the LevelCollection. - The new of the LevelCollection. - - - - Sets the capacity to the actual number of elements. - - - - - is less than zero - -or- - is equal to or greater than . - - - - - is less than zero - -or- - is equal to or greater than . - - - - - Gets the number of elements actually contained in the LevelCollection. - - - - - Gets a value indicating whether access to the collection is synchronized (thread-safe). - - true if access to the ICollection is synchronized (thread-safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the collection. - - - - - Gets or sets the at the specified index. - - The zero-based index of the element to get or set. - - is less than zero - -or- - is equal to or greater than . - - - - - Gets a value indicating whether the collection has a fixed size. - - true if the collection has a fixed size; otherwise, false. The default is false - - - - Gets a value indicating whether the IList is read-only. - - true if the collection is read-only; otherwise, false. The default is false - - - - Gets or sets the number of elements the LevelCollection can contain. - - - - - Supports type-safe iteration over a . - - - - - Advances the enumerator to the next element in the collection. - - - true if the enumerator was successfully advanced to the next element; - false if the enumerator has passed the end of the collection. - - - The collection was modified after the enumerator was created. - - - - - Sets the enumerator to its initial position, before the first element in the collection. - - - - - Gets the current element in the collection. - - - - - Type visible only to our subclasses - Used to access protected constructor - - - - - A value - - - - - Supports simple iteration over a . - - - - - Initializes a new instance of the Enumerator class. - - - - - - Advances the enumerator to the next element in the collection. - - - true if the enumerator was successfully advanced to the next element; - false if the enumerator has passed the end of the collection. - - - The collection was modified after the enumerator was created. - - - - - Sets the enumerator to its initial position, before the first element in the collection. - - - - - Gets the current element in the collection. - - - - - An evaluator that triggers at a threshold level - - - - This evaluator will trigger if the level of the event - passed to - is equal to or greater than the - level. - - - Nicko Cadell - - - - The threshold for triggering - - - - - Create a new evaluator using the threshold. - - - - Create a new evaluator using the threshold. - - - This evaluator will trigger if the level of the event - passed to - is equal to or greater than the - level. - - - - - - Create a new evaluator using the specified threshold. - - the threshold to trigger at - - - Create a new evaluator using the specified threshold. - - - This evaluator will trigger if the level of the event - passed to - is equal to or greater than the - level. - - - - - - Is this the triggering event? - - The event to check - This method returns true, if the event level - is equal or higher than the . - Otherwise it returns false - - - This evaluator will trigger if the level of the event - passed to - is equal to or greater than the - level. - - - - - - the threshold to trigger at - - - The that will cause this evaluator to trigger - - - - This evaluator will trigger if the level of the event - passed to - is equal to or greater than the - level. - - - - - - Mapping between string name and Level object - - - - Mapping between string name and object. - This mapping is held separately for each . - The level name is case insensitive. - - - Nicko Cadell - - - - Mapping from level name to Level object. The - level name is case insensitive - - - - - Construct the level map - - - - Construct the level map. - - - - - - Clear the internal maps of all levels - - - - Clear the internal maps of all levels - - - - - - Create a new Level and add it to the map - - the string to display for the Level - the level value to give to the Level - - - Create a new Level and add it to the map - - - - - - - Create a new Level and add it to the map - - the string to display for the Level - the level value to give to the Level - the display name to give to the Level - - - Create a new Level and add it to the map - - - - - - Add a Level to the map - - the Level to add - - - Add a Level to the map - - - - - - Lookup a named level from the map - - the name of the level to lookup is taken from this level. - If the level is not set on the map then this level is added - the level in the map with the name specified - - - Lookup a named level from the map. The name of the level to lookup is taken - from the property of the - argument. - - - If no level with the specified name is found then the - argument is added to the level map - and returned. - - - - - - Lookup a by name - - The name of the Level to lookup - a Level from the map with the name specified - - - Returns the from the - map with the name specified. If the no level is - found then null is returned. - - - - - - Return all possible levels as a list of Level objects. - - all possible levels as a list of Level objects - - - Return all possible levels as a list of Level objects. - - - - - - The internal representation of caller location information. - - - - This class uses the System.Diagnostics.StackTrace class to generate - a call stack. The caller's information is then extracted from this stack. - - - The System.Diagnostics.StackTrace class is not supported on the - .NET Compact Framework 1.0 therefore caller location information is not - available on that framework. - - - The System.Diagnostics.StackTrace class has this to say about Release builds: - - - "StackTrace information will be most informative with Debug build configurations. - By default, Debug builds include debug symbols, while Release builds do not. The - debug symbols contain most of the file, method name, line number, and column - information used in constructing StackFrame and StackTrace objects. StackTrace - might not report as many method calls as expected, due to code transformations - that occur during optimization." - - - This means that in a Release build the caller information may be incomplete or may - not exist at all! Therefore caller location information cannot be relied upon in a Release build. - - - Nicko Cadell - Gert Driesen - - - - When location information is not available the constant - NA is returned. Current value of this string - constant is ?. - - - - - Constructor - - The declaring type of the method that is - the stack boundary into the logging system for this call. - - - Initializes a new instance of the - class based on the current thread. - - - - - - Constructor - - The fully qualified class name. - The method name. - The file name. - The line number of the method within the file. - - - Initializes a new instance of the - class with the specified data. - - - - - - Gets the fully qualified class name of the caller making the logging - request. - - - The fully qualified class name of the caller making the logging - request. - - - - Gets the fully qualified class name of the caller making the logging - request. - - - - - - Gets the file name of the caller. - - - The file name of the caller. - - - - Gets the file name of the caller. - - - - - - Gets the line number of the caller. - - - The line number of the caller. - - - - Gets the line number of the caller. - - - - - - Gets the method name of the caller. - - - The method name of the caller. - - - - Gets the method name of the caller. - - - - - - Gets all available caller information - - - All available caller information, in the format - fully.qualified.classname.of.caller.methodName(Filename:line) - - - - Gets all available caller information, in the format - fully.qualified.classname.of.caller.methodName(Filename:line) - - - - - - Static manager that controls the creation of repositories - - - - Static manager that controls the creation of repositories - - - This class is used by the wrapper managers (e.g. ) - to provide access to the objects. - - - This manager also holds the that is used to - lookup and create repositories. The selector can be set either programmatically using - the property, or by setting the log4net.RepositorySelector - AppSetting in the applications config file to the fully qualified type name of the - selector to use. - - - Nicko Cadell - Gert Driesen - - - - Private constructor to prevent instances. Only static methods should be used. - - - - Private constructor to prevent instances. Only static methods should be used. - - - - - - Hook the shutdown event - - - - On the full .NET runtime, the static constructor hooks up the - AppDomain.ProcessExit and AppDomain.DomainUnload> events. - These are used to shutdown the log4net system as the application exits. - - - - - - Register for ProcessExit and DomainUnload events on the AppDomain - - - - This needs to be in a separate method because the events make - a LinkDemand for the ControlAppDomain SecurityPermission. Because - this is a LinkDemand it is demanded at JIT time. Therefore we cannot - catch the exception in the method itself, we have to catch it in the - caller. - - - - - - Return the default instance. - - the repository to lookup in - Return the default instance - - - Gets the for the repository specified - by the argument. - - - - - - Returns the default instance. - - The assembly to use to lookup the repository. - The default instance. - - - - Return the default instance. - - the repository to lookup in - Return the default instance - - - Gets the for the repository specified - by the argument. - - - - - - Returns the default instance. - - The assembly to use to lookup the repository. - The default instance. - - - Returns the default instance. - - - - - - Returns the named logger if it exists. - - The repository to lookup in. - The fully qualified logger name to look for. - - The logger found, or null if the named logger does not exist in the - specified repository. - - - - If the named logger exists (in the specified repository) then it - returns a reference to the logger, otherwise it returns - null. - - - - - - Returns the named logger if it exists. - - The assembly to use to lookup the repository. - The fully qualified logger name to look for. - - The logger found, or null if the named logger does not exist in the - specified assembly's repository. - - - - If the named logger exists (in the specified assembly's repository) then it - returns a reference to the logger, otherwise it returns - null. - - - - - - Returns all the currently defined loggers in the specified repository. - - The repository to lookup in. - All the defined loggers. - - - The root logger is not included in the returned array. - - - - - - Returns all the currently defined loggers in the specified assembly's repository. - - The assembly to use to lookup the repository. - All the defined loggers. - - - The root logger is not included in the returned array. - - - - - - Retrieves or creates a named logger. - - The repository to lookup in. - The name of the logger to retrieve. - The logger with the name specified. - - - Retrieves a logger named as the - parameter. If the named logger already exists, then the - existing instance will be returned. Otherwise, a new instance is - created. - - - By default, loggers do not have a set level but inherit - it from the hierarchy. This is one of the central features of - log4net. - - - - - - Retrieves or creates a named logger. - - The assembly to use to lookup the repository. - The name of the logger to retrieve. - The logger with the name specified. - - - Retrieves a logger named as the - parameter. If the named logger already exists, then the - existing instance will be returned. Otherwise, a new instance is - created. - - - By default, loggers do not have a set level but inherit - it from the hierarchy. This is one of the central features of - log4net. - - - - - - Shorthand for . - - The repository to lookup in. - The of which the fullname will be used as the name of the logger to retrieve. - The logger with the name specified. - - - Gets the logger for the fully qualified name of the type specified. - - - - - - Shorthand for . - - the assembly to use to lookup the repository - The of which the fullname will be used as the name of the logger to retrieve. - The logger with the name specified. - - - Gets the logger for the fully qualified name of the type specified. - - - - - - Shuts down the log4net system. - - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in all the - default repositories. - - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - - Shuts down the repository for the repository specified. - - The repository to shutdown. - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in the - repository for the specified. - - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - - Shuts down the repository for the repository specified. - - The assembly to use to lookup the repository. - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in the - repository for the repository. The repository is looked up using - the specified. - - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - - Resets all values contained in this repository instance to their defaults. - - The repository to reset. - - - Resets all values contained in the repository instance to their - defaults. This removes all appenders from all loggers, sets - the level of all non-root loggers to null, - sets their additivity flag to true and sets the level - of the root logger to . Moreover, - message disabling is set its default "off" value. - - - - - - Resets all values contained in this repository instance to their defaults. - - The assembly to use to lookup the repository to reset. - - - Resets all values contained in the repository instance to their - defaults. This removes all appenders from all loggers, sets - the level of all non-root loggers to null, - sets their additivity flag to true and sets the level - of the root logger to . Moreover, - message disabling is set its default "off" value. - - - - - - Creates a repository with the specified name. - - The name of the repository, this must be unique amongst repositories. - The created for the repository. - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - Creates the default type of which is a - object. - - - The name must be unique. Repositories cannot be redefined. - An will be thrown if the repository already exists. - - - The specified repository already exists. - - - - Creates a repository with the specified name. - - The name of the repository, this must be unique amongst repositories. - The created for the repository. - - - Creates the default type of which is a - object. - - - The name must be unique. Repositories cannot be redefined. - An will be thrown if the repository already exists. - - - The specified repository already exists. - - - - Creates a repository with the specified name and repository type. - - The name of the repository, this must be unique to the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - The name must be unique. Repositories cannot be redefined. - An Exception will be thrown if the repository already exists. - - - The specified repository already exists. - - - - Creates a repository with the specified name and repository type. - - The name of the repository, this must be unique to the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - The name must be unique. Repositories cannot be redefined. - An Exception will be thrown if the repository already exists. - - - The specified repository already exists. - - - - Creates a repository for the specified assembly and repository type. - - The assembly to use to get the name of the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - The created will be associated with the repository - specified such that a call to with the - same assembly specified will return the same repository instance. - - - - - - Creates a repository for the specified assembly and repository type. - - The assembly to use to get the name of the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - The created will be associated with the repository - specified such that a call to with the - same assembly specified will return the same repository instance. - - - - - - Gets an array of all currently defined repositories. - - An array of all the known objects. - - - Gets an array of all currently defined repositories. - - - - - - Internal method to get pertinent version info. - - A string of version info. - - - - Called when the event fires - - the that is exiting - null - - - Called when the event fires. - - - When the event is triggered the log4net system is . - - - - - - Called when the event fires - - the that is exiting - null - - - Called when the event fires. - - - When the event is triggered the log4net system is . - - - - - - Initialize the default repository selector - - - - - Gets or sets the repository selector used by the . - - - The repository selector used by the . - - - - The repository selector () is used by - the to create and select repositories - (). - - - The caller to supplies either a string name - or an assembly (if not supplied the assembly is inferred using - ). - - - This context is used by the selector to lookup a specific repository. - - - For the full .NET Framework, the default repository is DefaultRepositorySelector; - for the .NET Compact Framework CompactRepositorySelector is the default - repository. - - - - - - Implementation of the interface. - - - - This class should be used as the base for all wrapper implementations. - - - Nicko Cadell - Gert Driesen - - - - Constructs a new wrapper for the specified logger. - - The logger to wrap. - - - Constructs a new wrapper for the specified logger. - - - - - - The logger that this object is wrapping - - - - - Gets the implementation behind this wrapper object. - - - The object that this object is implementing. - - - - The Logger object may not be the same object as this object - because of logger decorators. - - - This gets the actual underlying objects that is used to process - the log events. - - - - - - Portable data structure used by - - - - Portable data structure used by - - - Nicko Cadell - - - - The logger name. - - - - The logger name. - - - - - - Level of logging event. - - - - Level of logging event. Level cannot be Serializable - because it is a flyweight. Due to its special serialization it - cannot be declared final either. - - - - - - The application supplied message. - - - - The application supplied message of logging event. - - - - - - The name of thread - - - - The name of thread in which this logging event was generated - - - - - - The time the event was logged - - - - The TimeStamp is stored in the local time zone for this computer. - - - - - - Location information for the caller. - - - - Location information for the caller. - - - - - - String representation of the user - - - - String representation of the user's windows name, - like DOMAIN\username - - - - - - String representation of the identity. - - - - String representation of the current thread's principal identity. - - - - - - The string representation of the exception - - - - The string representation of the exception - - - - - - String representation of the AppDomain. - - - - String representation of the AppDomain. - - - - - - Additional event specific properties - - - - A logger or an appender may attach additional - properties to specific events. These properties - have a string key and an object value. - - - - - - Flags passed to the property - - - - Flags passed to the property - - - Nicko Cadell - - - - Fix the MDC - - - - - Fix the NDC - - - - - Fix the rendered message - - - - - Fix the thread name - - - - - Fix the callers location information - - - CAUTION: Very slow to generate - - - - - Fix the callers windows user name - - - CAUTION: Slow to generate - - - - - Fix the domain friendly name - - - - - Fix the callers principal name - - - CAUTION: May be slow to generate - - - - - Fix the exception text - - - - - Fix the event properties - - - - - No fields fixed - - - - - All fields fixed - - - - - Partial fields fixed - - - - This set of partial fields gives good performance. The following fields are fixed: - - - - - - - - - - - - - The internal representation of logging events. - - - - When an affirmative decision is made to log then a - instance is created. This instance - is passed around to the different log4net components. - - - This class is of concern to those wishing to extend log4net. - - - Some of the values in instances of - are considered volatile, that is the values are correct at the - time the event is delivered to appenders, but will not be consistent - at any time afterwards. If an event is to be stored and then processed - at a later time these volatile values must be fixed by calling - . There is a performance penalty - for incurred by calling but it - is essential to maintaining data consistency. - - - Nicko Cadell - Gert Driesen - Douglas de la Torre - Daniel Cazzulino - - - - The key into the Properties map for the host name value. - - - - - The key into the Properties map for the thread identity value. - - - - - The key into the Properties map for the user name value. - - - - - Initializes a new instance of the class - from the supplied parameters. - - The declaring type of the method that is - the stack boundary into the logging system for this call. - The repository this event is logged in. - The name of the logger of this event. - The level of this event. - The message of this event. - The exception for this event. - - - Except , and , - all fields of LoggingEvent are filled when actually needed. Call - to cache all data locally - to prevent inconsistencies. - - This method is called by the log4net framework - to create a logging event. - - - - - - Initializes a new instance of the class - using specific data. - - The declaring type of the method that is - the stack boundary into the logging system for this call. - The repository this event is logged in. - Data used to initialize the logging event. - The fields in the struct that have already been fixed. - - - This constructor is provided to allow a - to be created independently of the log4net framework. This can - be useful if you require a custom serialization scheme. - - - Use the method to obtain an - instance of the class. - - - The parameter should be used to specify which fields in the - struct have been preset. Fields not specified in the - will be captured from the environment if requested or fixed. - - - - - - Initializes a new instance of the class - using specific data. - - The declaring type of the method that is - the stack boundary into the logging system for this call. - The repository this event is logged in. - Data used to initialize the logging event. - - - This constructor is provided to allow a - to be created independently of the log4net framework. This can - be useful if you require a custom serialization scheme. - - - Use the method to obtain an - instance of the class. - - - This constructor sets this objects flags to , - this assumes that all the data relating to this event is passed in via the - parameter and no other data should be captured from the environment. - - - - - - Initializes a new instance of the class - using specific data. - - Data used to initialize the logging event. - - - This constructor is provided to allow a - to be created independently of the log4net framework. This can - be useful if you require a custom serialization scheme. - - - Use the method to obtain an - instance of the class. - - - This constructor sets this objects flags to , - this assumes that all the data relating to this event is passed in via the - parameter and no other data should be captured from the environment. - - - - - - Serialization constructor - - The that holds the serialized object data. - The that contains contextual information about the source or destination. - - - Initializes a new instance of the class - with serialized data. - - - - - - Ensure that the repository is set. - - the value for the repository - - - - Write the rendered message to a TextWriter - - the writer to write the message to - - - Unlike the property this method - does store the message data in the internal cache. Therefore - if called only once this method should be faster than the - property, however if the message is - to be accessed multiple times then the property will be more efficient. - - - - - - Serializes this object into the provided. - - The to populate with data. - The destination for this serialization. - - - The data in this event must be fixed before it can be serialized. - - - The method must be called during the - method call if this event - is to be used outside that method. - - - - - - Gets the portable data for this . - - The for this event. - - - A new can be constructed using a - instance. - - - Does a fix of the data - in the logging event before returning the event data. - - - - - - Gets the portable data for this . - - The set of data to ensure is fixed in the LoggingEventData - The for this event. - - - A new can be constructed using a - instance. - - - - - - Returns this event's exception's rendered using the - . - - - This event's exception's rendered using the . - - - - Obsolete. Use instead. - - - - - - Returns this event's exception's rendered using the - . - - - This event's exception's rendered using the . - - - - Returns this event's exception's rendered using the - . - - - - - - Fix instance fields that hold volatile data. - - - - Some of the values in instances of - are considered volatile, that is the values are correct at the - time the event is delivered to appenders, but will not be consistent - at any time afterwards. If an event is to be stored and then processed - at a later time these volatile values must be fixed by calling - . There is a performance penalty - incurred by calling but it - is essential to maintaining data consistency. - - - Calling is equivalent to - calling passing the parameter - false. - - - See for more - information. - - - - - - Fixes instance fields that hold volatile data. - - Set to true to not fix data that takes a long time to fix. - - - Some of the values in instances of - are considered volatile, that is the values are correct at the - time the event is delivered to appenders, but will not be consistent - at any time afterwards. If an event is to be stored and then processed - at a later time these volatile values must be fixed by calling - . There is a performance penalty - for incurred by calling but it - is essential to maintaining data consistency. - - - The param controls the data that - is fixed. Some of the data that can be fixed takes a long time to - generate, therefore if you do not require those settings to be fixed - they can be ignored by setting the param - to true. This setting will ignore the - and settings. - - - Set to false to ensure that all - settings are fixed. - - - - - - Fix the fields specified by the parameter - - the fields to fix - - - Only fields specified in the will be fixed. - Fields will not be fixed if they have previously been fixed. - It is not possible to 'unfix' a field. - - - - - - Lookup a composite property in this event - - the key for the property to lookup - the value for the property - - - This event has composite properties that combine together properties from - several different contexts in the following order: - - - this events properties - - This event has that can be set. These - properties are specific to this event only. - - - - the thread properties - - The that are set on the current - thread. These properties are shared by all events logged on this thread. - - - - the global properties - - The that are set globally. These - properties are shared by all the threads in the AppDomain. - - - - - - - - - Get all the composite properties in this event - - the containing all the properties - - - See for details of the composite properties - stored by the event. - - - This method returns a single containing all the - properties defined for this event. - - - - - - The internal logging event data. - - - - - The internal logging event data. - - - - - The internal logging event data. - - - - - The fully qualified Type of the calling - logger class in the stack frame (i.e. the declaring type of the method). - - - - - The application supplied message of logging event. - - - - - The exception that was thrown. - - - This is not serialized. The string representation - is serialized instead. - - - - - The repository that generated the logging event - - - This is not serialized. - - - - - The fix state for this event - - - These flags indicate which fields have been fixed. - Not serialized. - - - - - Indicated that the internal cache is updateable (ie not fixed) - - - This is a seperate flag to m_fixFlags as it allows incrementel fixing and simpler - changes in the caching strategy. - - - - - Gets the time when the current process started. - - - This is the time when this process started. - - - - The TimeStamp is stored in the local time zone for this computer. - - - Tries to get the start time for the current process. - Failing that it returns the time of the first call to - this property. - - - Note that AppDomains may be loaded and unloaded within the - same process without the process terminating and therefore - without the process start time being reset. - - - - - - Gets the of the logging event. - - - The of the logging event. - - - - Gets the of the logging event. - - - - - - Gets the time of the logging event. - - - The time of the logging event. - - - - The TimeStamp is stored in the local time zone for this computer. - - - - - - Gets the name of the logger that logged the event. - - - The name of the logger that logged the event. - - - - Gets the name of the logger that logged the event. - - - - - - Gets the location information for this logging event. - - - The location information for this logging event. - - - - The collected information is cached for future use. - - - See the class for more information on - supported frameworks and the different behavior in Debug and - Release builds. - - - - - - Gets the message object used to initialize this event. - - - The message object used to initialize this event. - - - - Gets the message object used to initialize this event. - Note that this event may not have a valid message object. - If the event is serialized the message object will not - be transferred. To get the text of the message the - property must be used - not this property. - - - If there is no defined message object for this event then - null will be returned. - - - - - - Gets the exception object used to initialize this event. - - - The exception object used to initialize this event. - - - - Gets the exception object used to initialize this event. - Note that this event may not have a valid exception object. - If the event is serialized the exception object will not - be transferred. To get the text of the exception the - method must be used - not this property. - - - If there is no defined exception object for this event then - null will be returned. - - - - - - The that this event was created in. - - - - The that this event was created in. - - - - - - Gets the message, rendered through the . - - - The message rendered through the . - - - - The collected information is cached for future use. - - - - - - Gets the name of the current thread. - - - The name of the current thread, or the thread ID when - the name is not available. - - - - The collected information is cached for future use. - - - - - - Gets the name of the current user. - - - The name of the current user, or NOT AVAILABLE when the - underlying runtime has no support for retrieving the name of the - current user. - - - - Calls WindowsIdentity.GetCurrent().Name to get the name of - the current windows user. - - - To improve performance, we could cache the string representation of - the name, and reuse that as long as the identity stayed constant. - Once the identity changed, we would need to re-assign and re-render - the string. - - - However, the WindowsIdentity.GetCurrent() call seems to - return different objects every time, so the current implementation - doesn't do this type of caching. - - - Timing for these operations: - - - - Method - Results - - - WindowsIdentity.GetCurrent() - 10000 loops, 00:00:00.2031250 seconds - - - WindowsIdentity.GetCurrent().Name - 10000 loops, 00:00:08.0468750 seconds - - - - This means we could speed things up almost 40 times by caching the - value of the WindowsIdentity.GetCurrent().Name property, since - this takes (8.04-0.20) = 7.84375 seconds. - - - - - - Gets the identity of the current thread principal. - - - The string name of the identity of the current thread principal. - - - - Calls System.Threading.Thread.CurrentPrincipal.Identity.Name to get - the name of the current thread principal. - - - - - - Gets the AppDomain friendly name. - - - The AppDomain friendly name. - - - - Gets the AppDomain friendly name. - - - - - - Additional event specific properties. - - - Additional event specific properties. - - - - A logger or an appender may attach additional - properties to specific events. These properties - have a string key and an object value. - - - This property is for events that have been added directly to - this event. The aggregate properties (which include these - event properties) can be retrieved using - and . - - - Once the properties have been fixed this property - returns the combined cached properties. This ensures that updates to - this property are always reflected in the underlying storage. When - returning the combined properties there may be more keys in the - Dictionary than expected. - - - - - - The fixed fields in this event - - - The set of fields that are fixed in this event - - - - Fields will not be fixed if they have previously been fixed. - It is not possible to 'unfix' a field. - - - - - - Implementation of wrapper interface. - - - - This implementation of the interface - forwards to the held by the base class. - - - This logger has methods to allow the caller to log at the following - levels: - - - - DEBUG - - The and methods log messages - at the DEBUG level. That is the level with that name defined in the - repositories . The default value - for this level is . The - property tests if this level is enabled for logging. - - - - INFO - - The and methods log messages - at the INFO level. That is the level with that name defined in the - repositories . The default value - for this level is . The - property tests if this level is enabled for logging. - - - - WARN - - The and methods log messages - at the WARN level. That is the level with that name defined in the - repositories . The default value - for this level is . The - property tests if this level is enabled for logging. - - - - ERROR - - The and methods log messages - at the ERROR level. That is the level with that name defined in the - repositories . The default value - for this level is . The - property tests if this level is enabled for logging. - - - - FATAL - - The and methods log messages - at the FATAL level. That is the level with that name defined in the - repositories . The default value - for this level is . The - property tests if this level is enabled for logging. - - - - - The values for these levels and their semantic meanings can be changed by - configuring the for the repository. - - - Nicko Cadell - Gert Driesen - - - - The ILog interface is use by application to log messages into - the log4net framework. - - - - Use the to obtain logger instances - that implement this interface. The - static method is used to get logger instances. - - - This class contains methods for logging at different levels and also - has properties for determining if those logging levels are - enabled in the current configuration. - - - This interface can be implemented in different ways. This documentation - specifies reasonable behavior that a caller can expect from the actual - implementation, however different implementations reserve the right to - do things differently. - - - Simple example of logging messages - - ILog log = LogManager.GetLogger("application-log"); - - log.Info("Application Start"); - log.Debug("This is a debug message"); - - if (log.IsDebugEnabled) - { - log.Debug("This is another debug message"); - } - - - - - Nicko Cadell - Gert Driesen - - - Log a message object with the level. - - Log a message object with the level. - - The message object to log. - - - This method first checks if this logger is DEBUG - enabled by comparing the level of this logger with the - level. If this logger is - DEBUG enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of - the additivity flag. - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - - - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - See the form for more detailed information. - - - - - - - Log a formatted string with the level. - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - Log a message object with the level. - - Logs a message object with the level. - - - - This method first checks if this logger is INFO - enabled by comparing the level of this logger with the - level. If this logger is - INFO enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of the - additivity flag. - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - The message object to log. - - - - - - Logs a message object with the INFO level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - See the form for more detailed information. - - - - - - - Log a formatted message string with the level. - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - Log a message object with the level. - - Log a message object with the level. - - - - This method first checks if this logger is WARN - enabled by comparing the level of this logger with the - level. If this logger is - WARN enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of the - additivity flag. - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - The message object to log. - - - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - See the form for more detailed information. - - - - - - - Log a formatted message string with the level. - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - Log a message object with the level. - - Logs a message object with the level. - - The message object to log. - - - This method first checks if this logger is ERROR - enabled by comparing the level of this logger with the - level. If this logger is - ERROR enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of the - additivity flag. - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - - - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - See the form for more detailed information. - - - - - - - Log a formatted message string with the level. - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - Log a message object with the level. - - Log a message object with the level. - - - - This method first checks if this logger is FATAL - enabled by comparing the level of this logger with the - level. If this logger is - FATAL enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of the - additivity flag. - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - The message object to log. - - - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - See the form for more detailed information. - - - - - - - Log a formatted message string with the level. - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Checks if this logger is enabled for the level. - - - true if this logger is enabled for events, false otherwise. - - - - This function is intended to lessen the computational cost of - disabled log debug statements. - - For some ILog interface log, when you write: - - log.Debug("This is entry number: " + i ); - - - You incur the cost constructing the message, string construction and concatenation in - this case, regardless of whether the message is logged or not. - - - If you are worried about speed (who isn't), then you should write: - - - if (log.IsDebugEnabled) - { - log.Debug("This is entry number: " + i ); - } - - - This way you will not incur the cost of parameter - construction if debugging is disabled for log. On - the other hand, if the log is debug enabled, you - will incur the cost of evaluating whether the logger is debug - enabled twice. Once in and once in - the . This is an insignificant overhead - since evaluating a logger takes about 1% of the time it - takes to actually log. This is the preferred style of logging. - - Alternatively if your logger is available statically then the is debug - enabled state can be stored in a static variable like this: - - - private static readonly bool isDebugEnabled = log.IsDebugEnabled; - - - Then when you come to log you can write: - - - if (isDebugEnabled) - { - log.Debug("This is entry number: " + i ); - } - - - This way the debug enabled state is only queried once - when the class is loaded. Using a private static readonly - variable is the most efficient because it is a run time constant - and can be heavily optimized by the JIT compiler. - - - Of course if you use a static readonly variable to - hold the enabled state of the logger then you cannot - change the enabled state at runtime to vary the logging - that is produced. You have to decide if you need absolute - speed or runtime flexibility. - - - - - - - - Checks if this logger is enabled for the level. - - - true if this logger is enabled for events, false otherwise. - - - For more information see . - - - - - - - - Checks if this logger is enabled for the level. - - - true if this logger is enabled for events, false otherwise. - - - For more information see . - - - - - - - - Checks if this logger is enabled for the level. - - - true if this logger is enabled for events, false otherwise. - - - For more information see . - - - - - - - - Checks if this logger is enabled for the level. - - - true if this logger is enabled for events, false otherwise. - - - For more information see . - - - - - - - - Construct a new wrapper for the specified logger. - - The logger to wrap. - - - Construct a new wrapper for the specified logger. - - - - - - Virtual method called when the configuration of the repository changes - - the repository holding the levels - - - Virtual method called when the configuration of the repository changes - - - - - - Logs a message object with the DEBUG level. - - The message object to log. - - - This method first checks if this logger is DEBUG - enabled by comparing the level of this logger with the - DEBUG level. If this logger is - DEBUG enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of the - additivity flag. - - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - - - - Logs a message object with the DEBUG level - - The message object to log. - The exception to log, including its stack trace. - - - Logs a message object with the DEBUG level including - the stack trace of the passed - as a parameter. - - - See the form for more detailed information. - - - - - - - Logs a formatted message string with the DEBUG level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the DEBUG level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the DEBUG level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the DEBUG level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the DEBUG level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a message object with the INFO level. - - The message object to log. - - - This method first checks if this logger is INFO - enabled by comparing the level of this logger with the - INFO level. If this logger is - INFO enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of - the additivity flag. - - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - - - - Logs a message object with the INFO level. - - The message object to log. - The exception to log, including its stack trace. - - - Logs a message object with the INFO level including - the stack trace of the - passed as a parameter. - - - See the form for more detailed information. - - - - - - - Logs a formatted message string with the INFO level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the INFO level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the INFO level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the INFO level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the INFO level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a message object with the WARN level. - - the message object to log - - - This method first checks if this logger is WARN - enabled by comparing the level of this logger with the - WARN level. If this logger is - WARN enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger and - also higher in the hierarchy depending on the value of the - additivity flag. - - - WARNING Note that passing an to this - method will print the name of the but no - stack trace. To print a stack trace use the - form instead. - - - - - - Logs a message object with the WARN level - - The message object to log. - The exception to log, including its stack trace. - - - Logs a message object with the WARN level including - the stack trace of the - passed as a parameter. - - - See the form for more detailed information. - - - - - - - Logs a formatted message string with the WARN level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the WARN level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the WARN level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the WARN level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the WARN level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a message object with the ERROR level. - - The message object to log. - - - This method first checks if this logger is ERROR - enabled by comparing the level of this logger with the - ERROR level. If this logger is - ERROR enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger and - also higher in the hierarchy depending on the value of the - additivity flag. - - - WARNING Note that passing an to this - method will print the name of the but no - stack trace. To print a stack trace use the - form instead. - - - - - - Logs a message object with the ERROR level - - The message object to log. - The exception to log, including its stack trace. - - - Logs a message object with the ERROR level including - the stack trace of the - passed as a parameter. - - - See the form for more detailed information. - - - - - - - Logs a formatted message string with the ERROR level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the ERROR level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the ERROR level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the ERROR level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the ERROR level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a message object with the FATAL level. - - The message object to log. - - - This method first checks if this logger is FATAL - enabled by comparing the level of this logger with the - FATAL level. If this logger is - FATAL enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger and - also higher in the hierarchy depending on the value of the - additivity flag. - - - WARNING Note that passing an to this - method will print the name of the but no - stack trace. To print a stack trace use the - form instead. - - - - - - Logs a message object with the FATAL level - - The message object to log. - The exception to log, including its stack trace. - - - Logs a message object with the FATAL level including - the stack trace of the - passed as a parameter. - - - See the form for more detailed information. - - - - - - - Logs a formatted message string with the FATAL level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the FATAL level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the FATAL level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the FATAL level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the FATAL level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Event handler for the event - - the repository - Empty - - - - The fully qualified name of this declaring type not the type of any subclass. - - - - - Checks if this logger is enabled for the DEBUG - level. - - - true if this logger is enabled for DEBUG events, - false otherwise. - - - - This function is intended to lessen the computational cost of - disabled log debug statements. - - - For some log Logger object, when you write: - - - log.Debug("This is entry number: " + i ); - - - You incur the cost constructing the message, concatenation in - this case, regardless of whether the message is logged or not. - - - If you are worried about speed, then you should write: - - - if (log.IsDebugEnabled()) - { - log.Debug("This is entry number: " + i ); - } - - - This way you will not incur the cost of parameter - construction if debugging is disabled for log. On - the other hand, if the log is debug enabled, you - will incur the cost of evaluating whether the logger is debug - enabled twice. Once in IsDebugEnabled and once in - the Debug. This is an insignificant overhead - since evaluating a logger takes about 1% of the time it - takes to actually log. - - - - - - Checks if this logger is enabled for the INFO level. - - - true if this logger is enabled for INFO events, - false otherwise. - - - - See for more information and examples - of using this method. - - - - - - - Checks if this logger is enabled for the WARN level. - - - true if this logger is enabled for WARN events, - false otherwise. - - - - See for more information and examples - of using this method. - - - - - - - Checks if this logger is enabled for the ERROR level. - - - true if this logger is enabled for ERROR events, - false otherwise. - - - - See for more information and examples of using this method. - - - - - - - Checks if this logger is enabled for the FATAL level. - - - true if this logger is enabled for FATAL events, - false otherwise. - - - - See for more information and examples of using this method. - - - - - - - A SecurityContext used by log4net when interacting with protected resources - - - - A SecurityContext used by log4net when interacting with protected resources - for example with operating system services. This can be used to impersonate - a principal that has been granted privileges on the system resources. - - - Nicko Cadell - - - - Impersonate this SecurityContext - - State supplied by the caller - An instance that will - revoke the impersonation of this SecurityContext, or null - - - Impersonate this security context. Further calls on the current - thread should now be made in the security context provided - by this object. When the result - method is called the security - context of the thread should be reverted to the state it was in - before was called. - - - - - - The providers default instances. - - - - A configured component that interacts with potentially protected system - resources uses a to provide the elevated - privileges required. If the object has - been not been explicitly provided to the component then the component - will request one from this . - - - By default the is - an instance of which returns only - objects. This is a reasonable default - where the privileges required are not know by the system. - - - This default behavior can be overridden by subclassing the - and overriding the method to return - the desired objects. The default provider - can be replaced by programmatically setting the value of the - property. - - - An alternative is to use the log4net.Config.SecurityContextProviderAttribute - This attribute can be applied to an assembly in the same way as the - log4net.Config.XmlConfiguratorAttribute". The attribute takes - the type to use as the as an argument. - - - Nicko Cadell - - - - The default provider - - - - - Protected default constructor to allow subclassing - - - - Protected default constructor to allow subclassing - - - - - - Create a SecurityContext for a consumer - - The consumer requesting the SecurityContext - An impersonation context - - - The default implementation is to return a . - - - Subclasses should override this method to provide their own - behavior. - - - - - - Gets or sets the default SecurityContextProvider - - - The default SecurityContextProvider - - - - The default provider is used by configured components that - require a and have not had one - given to them. - - - By default this is an instance of - that returns objects. - - - The default provider can be set programmatically by setting - the value of this property to a sub class of - that has the desired behavior. - - - - - - Delegate used to handle creation of new wrappers. - - The logger to wrap in a wrapper. - - - Delegate used to handle creation of new wrappers. This delegate - is called from the - method to construct the wrapper for the specified logger. - - - The delegate to use is supplied to the - constructor. - - - - - - Maps between logger objects and wrapper objects. - - - - This class maintains a mapping between objects and - objects. Use the method to - lookup the for the specified . - - - New wrapper instances are created by the - method. The default behavior is for this method to delegate construction - of the wrapper to the delegate supplied - to the constructor. This allows specialization of the behavior without - requiring subclassing of this type. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the - - The handler to use to create the wrapper objects. - - - Initializes a new instance of the class with - the specified handler to create the wrapper objects. - - - - - - Gets the wrapper object for the specified logger. - - The wrapper object for the specified logger - - - If the logger is null then the corresponding wrapper is null. - - - Looks up the wrapper it it has previously been requested and - returns it. If the wrapper has never been requested before then - the virtual method is - called. - - - - - - Creates the wrapper object for the specified logger. - - The logger to wrap in a wrapper. - The wrapper object for the logger. - - - This implementation uses the - passed to the constructor to create the wrapper. This method - can be overridden in a subclass. - - - - - - Called when a monitored repository shutdown event is received. - - The that is shutting down - - - This method is called when a that this - is holding loggers for has signaled its shutdown - event . The default - behavior of this method is to release the references to the loggers - and their wrappers generated for this repository. - - - - - - Event handler for repository shutdown event. - - The sender of the event. - The event args. - - - - Map of logger repositories to hashtables of ILogger to ILoggerWrapper mappings - - - - - The handler to use to create the extension wrapper objects. - - - - - Internal reference to the delegate used to register for repository shutdown events. - - - - - Gets the map of logger repositories. - - - Map of logger repositories. - - - - Gets the hashtable that is keyed on . The - values are hashtables keyed on with the - value being the corresponding . - - - - - - Formats a as "HH:mm:ss,fff". - - - - Formats a in the format "HH:mm:ss,fff" for example, "15:49:37,459". - - - Nicko Cadell - Gert Driesen - - - - Render a as a string. - - - - Interface to abstract the rendering of a - instance into a string. - - - The method is used to render the - date to a text writer. - - - Nicko Cadell - Gert Driesen - - - - Formats the specified date as a string. - - The date to format. - The writer to write to. - - - Format the as a string and write it - to the provided. - - - - - - String constant used to specify AbsoluteTimeDateFormat in layouts. Current value is ABSOLUTE. - - - - - String constant used to specify DateTimeDateFormat in layouts. Current value is DATE. - - - - - String constant used to specify ISO8601DateFormat in layouts. Current value is ISO8601. - - - - - Renders the date into a string. Format is "HH:mm:ss". - - The date to render into a string. - The string builder to write to. - - - Subclasses should override this method to render the date - into a string using a precision up to the second. This method - will be called at most once per second and the result will be - reused if it is needed again during the same second. - - - - - - Renders the date into a string. Format is "HH:mm:ss,fff". - - The date to render into a string. - The writer to write to. - - - Uses the method to generate the - time string up to the seconds and then appends the current - milliseconds. The results from are - cached and is called at most once - per second. - - - Sub classes should override - rather than . - - - - - - Last stored time with precision up to the second. - - - - - Last stored time with precision up to the second, formatted - as a string. - - - - - Last stored time with precision up to the second, formatted - as a string. - - - - - Formats a as "dd MMM yyyy HH:mm:ss,fff" - - - - Formats a in the format - "dd MMM yyyy HH:mm:ss,fff" for example, - "06 Nov 1994 15:49:37,459". - - - Nicko Cadell - Gert Driesen - Angelika Schnagl - - - - Default constructor. - - - - Initializes a new instance of the class. - - - - - - Formats the date without the milliseconds part - - The date to format. - The string builder to write to. - - - Formats a DateTime in the format "dd MMM yyyy HH:mm:ss" - for example, "06 Nov 1994 15:49:37". - - - The base class will append the ",fff" milliseconds section. - This method will only be called at most once per second. - - - - - - The format info for the invariant culture. - - - - - Formats the as "yyyy-MM-dd HH:mm:ss,fff". - - - - Formats the specified as a string: "yyyy-MM-dd HH:mm:ss,fff". - - - Nicko Cadell - Gert Driesen - - - - Default constructor - - - - Initializes a new instance of the class. - - - - - - Formats the date without the milliseconds part - - The date to format. - The string builder to write to. - - - Formats the date specified as a string: "yyyy-MM-dd HH:mm:ss". - - - The base class will append the ",fff" milliseconds section. - This method will only be called at most once per second. - - - - - - Formats the using the method. - - - - Formats the using the method. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - The format string. - - - Initializes a new instance of the class - with the specified format string. - - - The format string must be compatible with the options - that can be supplied to . - - - - - - Formats the date using . - - The date to convert to a string. - The writer to write to. - - - Uses the date format string supplied to the constructor to call - the method to format the date. - - - - - - The format string used to format the . - - - - The format string must be compatible with the options - that can be supplied to . - - - - - - This filter drops all . - - - - You can add this filter to the end of a filter chain to - switch from the default "accept all unless instructed otherwise" - filtering behavior to a "deny all unless instructed otherwise" - behavior. - - - Nicko Cadell - Gert Driesen - - - - Subclass this type to implement customized logging event filtering - - - - Users should extend this class to implement customized logging - event filtering. Note that and - , the parent class of all standard - appenders, have built-in filtering rules. It is suggested that you - first use and understand the built-in rules before rushing to write - your own custom filters. - - - This abstract class assumes and also imposes that filters be - organized in a linear chain. The - method of each filter is called sequentially, in the order of their - addition to the chain. - - - The method must return one - of the integer constants , - or . - - - If the value is returned, then the log event is dropped - immediately without consulting with the remaining filters. - - - If the value is returned, then the next filter - in the chain is consulted. If there are no more filters in the - chain, then the log event is logged. Thus, in the presence of no - filters, the default behavior is to log all logging events. - - - If the value is returned, then the log - event is logged without consulting the remaining filters. - - - The philosophy of log4net filters is largely inspired from the - Linux ipchains. - - - Nicko Cadell - Gert Driesen - - - - Implement this interface to provide customized logging event filtering - - - - Users should implement this interface to implement customized logging - event filtering. Note that and - , the parent class of all standard - appenders, have built-in filtering rules. It is suggested that you - first use and understand the built-in rules before rushing to write - your own custom filters. - - - This abstract class assumes and also imposes that filters be - organized in a linear chain. The - method of each filter is called sequentially, in the order of their - addition to the chain. - - - The method must return one - of the integer constants , - or . - - - If the value is returned, then the log event is dropped - immediately without consulting with the remaining filters. - - - If the value is returned, then the next filter - in the chain is consulted. If there are no more filters in the - chain, then the log event is logged. Thus, in the presence of no - filters, the default behavior is to log all logging events. - - - If the value is returned, then the log - event is logged without consulting the remaining filters. - - - The philosophy of log4net filters is largely inspired from the - Linux ipchains. - - - Nicko Cadell - Gert Driesen - - - - Decide if the logging event should be logged through an appender. - - The LoggingEvent to decide upon - The decision of the filter - - - If the decision is , then the event will be - dropped. If the decision is , then the next - filter, if any, will be invoked. If the decision is then - the event will be logged without consulting with other filters in - the chain. - - - - - - Property to get and set the next filter - - - The next filter in the chain - - - - Filters are typically composed into chains. This property allows the next filter in - the chain to be accessed. - - - - - - Points to the next filter in the filter chain. - - - - See for more information. - - - - - - Initialize the filter with the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - Typically filter's options become active immediately on set, - however this method must still be called. - - - - - - Decide if the should be logged through an appender. - - The to decide upon - The decision of the filter - - - If the decision is , then the event will be - dropped. If the decision is , then the next - filter, if any, will be invoked. If the decision is then - the event will be logged without consulting with other filters in - the chain. - - - This method is marked abstract and must be implemented - in a subclass. - - - - - - Property to get and set the next filter - - - The next filter in the chain - - - - Filters are typically composed into chains. This property allows the next filter in - the chain to be accessed. - - - - - - Default constructor - - - - - Always returns the integer constant - - the LoggingEvent to filter - Always returns - - - Ignores the event being logged and just returns - . This can be used to change the default filter - chain behavior from to . This filter - should only be used as the last filter in the chain - as any further filters will be ignored! - - - - - - The return result from - - - - The return result from - - - - - - The log event must be dropped immediately without - consulting with the remaining filters, if any, in the chain. - - - - - This filter is neutral with respect to the log event. - The remaining filters, if any, should be consulted for a final decision. - - - - - The log event must be logged immediately without - consulting with the remaining filters, if any, in the chain. - - - - - This is a very simple filter based on matching. - - - - The filter admits two options and - . If there is an exact match between the value - of the option and the of the - , then the method returns in - case the option value is set - to true, if it is false then - is returned. If the does not match then - the result will be . - - - Nicko Cadell - Gert Driesen - - - - flag to indicate if the filter should on a match - - - - - the to match against - - - - - Default constructor - - - - - Tests if the of the logging event matches that of the filter - - the event to filter - see remarks - - - If the of the event matches the level of the - filter then the result of the function depends on the - value of . If it is true then - the function will return , it it is false then it - will return . If the does not match then - the result will be . - - - - - - when matching - - - - The property is a flag that determines - the behavior when a matching is found. If the - flag is set to true then the filter will the - logging event, otherwise it will the event. - - - The default is true i.e. to the event. - - - - - - The that the filter will match - - - - The level that this filter will attempt to match against the - level. If a match is found then - the result depends on the value of . - - - - - - This is a simple filter based on matching. - - - - The filter admits three options and - that determine the range of priorities that are matched, and - . If there is a match between the range - of priorities and the of the , then the - method returns in case the - option value is set to true, if it is false - then is returned. If there is no match, is returned. - - - Nicko Cadell - Gert Driesen - - - - Flag to indicate the behavior when matching a - - - - - the minimum value to match - - - - - the maximum value to match - - - - - Default constructor - - - - - Check if the event should be logged. - - the logging event to check - see remarks - - - If the of the logging event is outside the range - matched by this filter then - is returned. If the is matched then the value of - is checked. If it is true then - is returned, otherwise - is returned. - - - - - - when matching and - - - - The property is a flag that determines - the behavior when a matching is found. If the - flag is set to true then the filter will the - logging event, otherwise it will the event. - - - The default is true i.e. to the event. - - - - - - Set the minimum matched - - - - The minimum level that this filter will attempt to match against the - level. If a match is found then - the result depends on the value of . - - - - - - Sets the maximum matched - - - - The maximum level that this filter will attempt to match against the - level. If a match is found then - the result depends on the value of . - - - - - - Simple filter to match a string in the event's logger name. - - - - The works very similar to the . It admits two - options and . If the - of the starts - with the value of the option, then the - method returns in - case the option value is set to true, - if it is false then is returned. - - - Daniel Cazzulino - - - - Flag to indicate the behavior when we have a match - - - - - The logger name string to substring match against the event - - - - - Default constructor - - - - - Check if this filter should allow the event to be logged - - the event being logged - see remarks - - - The rendered message is matched against the . - If the equals the beginning of - the incoming () - then a match will have occurred. If no match occurs - this function will return - allowing other filters to check the event. If a match occurs then - the value of is checked. If it is - true then is returned otherwise - is returned. - - - - - - when matching - - - - The property is a flag that determines - the behavior when a matching is found. If the - flag is set to true then the filter will the - logging event, otherwise it will the event. - - - The default is true i.e. to the event. - - - - - - The that the filter will match - - - - This filter will attempt to match this value against logger name in - the following way. The match will be done against the beginning of the - logger name (using ). The match is - case sensitive. If a match is found then - the result depends on the value of . - - - - - - Simple filter to match a keyed string in the - - - - Simple filter to match a keyed string in the - - - As the MDC has been replaced with layered properties the - should be used instead. - - - Nicko Cadell - Gert Driesen - - - - Simple filter to match a string an event property - - - - Simple filter to match a string in the value for a - specific event property - - - Nicko Cadell - - - - Simple filter to match a string in the rendered message - - - - Simple filter to match a string in the rendered message - - - Nicko Cadell - Gert Driesen - - - - Flag to indicate the behavior when we have a match - - - - - The string to substring match against the message - - - - - A string regex to match - - - - - A regex object to match (generated from m_stringRegexToMatch) - - - - - Default constructor - - - - - Initialize and precompile the Regex if required - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Check if this filter should allow the event to be logged - - the event being logged - see remarks - - - The rendered message is matched against the . - If the occurs as a substring within - the message then a match will have occurred. If no match occurs - this function will return - allowing other filters to check the event. If a match occurs then - the value of is checked. If it is - true then is returned otherwise - is returned. - - - - - - when matching or - - - - The property is a flag that determines - the behavior when a matching is found. If the - flag is set to true then the filter will the - logging event, otherwise it will the event. - - - The default is true i.e. to the event. - - - - - - Sets the static string to match - - - - The string that will be substring matched against - the rendered message. If the message contains this - string then the filter will match. If a match is found then - the result depends on the value of . - - - One of or - must be specified. - - - - - - Sets the regular expression to match - - - - The regular expression pattern that will be matched against - the rendered message. If the message matches this - pattern then the filter will match. If a match is found then - the result depends on the value of . - - - One of or - must be specified. - - - - - - The key to use to lookup the string from the event properties - - - - - Default constructor - - - - - Check if this filter should allow the event to be logged - - the event being logged - see remarks - - - The event property for the is matched against - the . - If the occurs as a substring within - the property value then a match will have occurred. If no match occurs - this function will return - allowing other filters to check the event. If a match occurs then - the value of is checked. If it is - true then is returned otherwise - is returned. - - - - - - The key to lookup in the event properties and then match against. - - - - The key name to use to lookup in the properties map of the - . The match will be performed against - the value of this property if it exists. - - - - - - Simple filter to match a string in the - - - - Simple filter to match a string in the - - - As the MDC has been replaced with named stacks stored in the - properties collections the should - be used instead. - - - Nicko Cadell - Gert Driesen - - - - Default constructor - - - - Sets the to "NDC". - - - - - - Write the event appdomain name to the output - - - - Writes the to the output writer. - - - Daniel Cazzulino - Nicko Cadell - - - - Abstract class that provides the formatting functionality that - derived classes need. - - - Conversion specifiers in a conversion patterns are parsed to - individual PatternConverters. Each of which is responsible for - converting a logging event in a converter specific manner. - - Nicko Cadell - - - - Abstract class that provides the formatting functionality that - derived classes need. - - - - Conversion specifiers in a conversion patterns are parsed to - individual PatternConverters. Each of which is responsible for - converting a logging event in a converter specific manner. - - - Nicko Cadell - Gert Driesen - - - - Initial buffer size - - - - - Maximum buffer size before it is recycled - - - - - Protected constructor - - - - Initializes a new instance of the class. - - - - - - Evaluate this pattern converter and write the output to a writer. - - that will receive the formatted result. - The state object on which the pattern converter should be executed. - - - Derived pattern converters must override this method in order to - convert conversion specifiers in the appropriate way. - - - - - - Set the next pattern converter in the chains - - the pattern converter that should follow this converter in the chain - the next converter - - - The PatternConverter can merge with its neighbor during this method (or a sub class). - Therefore the return value may or may not be the value of the argument passed in. - - - - - - Write the pattern converter to the writer with appropriate formatting - - that will receive the formatted result. - The state object on which the pattern converter should be executed. - - - This method calls to allow the subclass to perform - appropriate conversion of the pattern converter. If formatting options have - been specified via the then this method will - apply those formattings before writing the output. - - - - - - Fast space padding method. - - to which the spaces will be appended. - The number of spaces to be padded. - - - Fast space padding method. - - - - - - The option string to the converter - - - - - Write an dictionary to a - - the writer to write to - a to use for object conversion - the value to write to the writer - - - Writes the to a writer in the form: - - - {key1=value1, key2=value2, key3=value3} - - - If the specified - is not null then it is used to render the key and value to text, otherwise - the object's ToString method is called. - - - - - - Write an object to a - - the writer to write to - a to use for object conversion - the value to write to the writer - - - Writes the Object to a writer. If the specified - is not null then it is used to render the object to text, otherwise - the object's ToString method is called. - - - - - - Get the next pattern converter in the chain - - - the next pattern converter in the chain - - - - Get the next pattern converter in the chain - - - - - - Gets or sets the formatting info for this converter - - - The formatting info for this converter - - - - Gets or sets the formatting info for this converter - - - - - - Gets or sets the option value for this converter - - - The option for this converter - - - - Gets or sets the option value for this converter - - - - - - Initializes a new instance of the class. - - - - - Derived pattern converters must override this method in order to - convert conversion specifiers in the correct way. - - that will receive the formatted result. - The on which the pattern converter should be executed. - - - - Derived pattern converters must override this method in order to - convert conversion specifiers in the correct way. - - that will receive the formatted result. - The state object on which the pattern converter should be executed. - - - - Flag indicating if this converter handles exceptions - - - false if this converter handles exceptions - - - - - Flag indicating if this converter handles the logging event exception - - false if this converter handles the logging event exception - - - If this converter handles the exception object contained within - , then this property should be set to - false. Otherwise, if the layout ignores the exception - object, then the property should be set to true. - - - Set this value to override a this default setting. The default - value is true, this converter does not handle the exception. - - - - - - Write the event appdomain name to the output - - that will receive the formatted result. - the event being logged - - - Writes the to the output . - - - - - - Date pattern converter, uses a to format - the date of a . - - - - Render the to the writer as a string. - - - The value of the determines - the formatting of the date. The following values are allowed: - - - Option value - Output - - - ISO8601 - - Uses the formatter. - Formats using the "yyyy-MM-dd HH:mm:ss,fff" pattern. - - - - DATE - - Uses the formatter. - Formats using the "dd MMM yyyy HH:mm:ss,fff" for example, "06 Nov 1994 15:49:37,459". - - - - ABSOLUTE - - Uses the formatter. - Formats using the "HH:mm:ss,yyyy" for example, "15:49:37,459". - - - - other - - Any other pattern string uses the formatter. - This formatter passes the pattern string to the - method. - For details on valid patterns see - DateTimeFormatInfo Class. - - - - - - The is in the local time zone and is rendered in that zone. - To output the time in Universal time see . - - - Nicko Cadell - - - - The used to render the date to a string - - - - The used to render the date to a string - - - - - - Initialize the converter pattern based on the property. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Convert the pattern into the rendered message - - that will receive the formatted result. - the event being logged - - - Pass the to the - for it to render it to the writer. - - - The passed is in the local time zone. - - - - - - Write the exception text to the output - - - - If an exception object is stored in the logging event - it will be rendered into the pattern output with a - trailing newline. - - - If there is no exception then nothing will be output - and no trailing newline will be appended. - It is typical to put a newline before the exception - and to have the exception as the last data in the pattern. - - - Nicko Cadell - - - - Default constructor - - - - - Write the exception text to the output - - that will receive the formatted result. - the event being logged - - - If an exception object is stored in the logging event - it will be rendered into the pattern output with a - trailing newline. - - - If there is no exception then nothing will be output - and no trailing newline will be appended. - It is typical to put a newline before the exception - and to have the exception as the last data in the pattern. - - - - - - Writes the caller location file name to the output - - - - Writes the value of the for - the event to the output writer. - - - Nicko Cadell - - - - Write the caller location file name to the output - - that will receive the formatted result. - the event being logged - - - Writes the value of the for - the to the output . - - - - - - Write the caller location info to the output - - - - Writes the to the output writer. - - - Nicko Cadell - - - - Write the caller location info to the output - - that will receive the formatted result. - the event being logged - - - Writes the to the output writer. - - - - - - Writes the event identity to the output - - - - Writes the value of the to - the output writer. - - - Daniel Cazzulino - Nicko Cadell - - - - Writes the event identity to the output - - that will receive the formatted result. - the event being logged - - - Writes the value of the - to - the output . - - - - - - Write the event level to the output - - - - Writes the display name of the event - to the writer. - - - Nicko Cadell - - - - Write the event level to the output - - that will receive the formatted result. - the event being logged - - - Writes the of the - to the . - - - - - - Write the caller location line number to the output - - - - Writes the value of the for - the event to the output writer. - - - Nicko Cadell - - - - Write the caller location line number to the output - - that will receive the formatted result. - the event being logged - - - Writes the value of the for - the to the output . - - - - - - Converter for logger name - - - - Outputs the of the event. - - - Nicko Cadell - - - - Converter to output and truncate '.' separated strings - - - - This abstract class supports truncating a '.' separated string - to show a specified number of elements from the right hand side. - This is used to truncate class names that are fully qualified. - - - Subclasses should override the method to - return the fully qualified string. - - - Nicko Cadell - - - - Initialize the converter - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Get the fully qualified string data - - the event being logged - the fully qualified name - - - Overridden by subclasses to get the fully qualified name before the - precision is applied to it. - - - Return the fully qualified '.' (dot/period) separated string. - - - - - - Convert the pattern to the rendered message - - that will receive the formatted result. - the event being logged - - Render the to the precision - specified by the property. - - - - - Gets the fully qualified name of the logger - - the event being logged - The fully qualified logger name - - - Returns the of the . - - - - - - Writes the event message to the output - - - - Uses the method - to write out the event message. - - - Nicko Cadell - - - - Writes the event message to the output - - that will receive the formatted result. - the event being logged - - - Uses the method - to write out the event message. - - - - - - Write the method name to the output - - - - Writes the caller location to - the output. - - - Nicko Cadell - - - - Write the method name to the output - - that will receive the formatted result. - the event being logged - - - Writes the caller location to - the output. - - - - - - Converter to include event NDC - - - - Outputs the value of the event property named NDC. - - - The should be used instead. - - - Nicko Cadell - - - - Write the event NDC to the output - - that will receive the formatted result. - the event being logged - - - As the thread context stacks are now stored in named event properties - this converter simply looks up the value of the NDC property. - - - The should be used instead. - - - - - - Property pattern converter - - - - Writes out the value of a named property. The property name - should be set in the - property. - - - If the is set to null - then all the properties are written as key value pairs. - - - Nicko Cadell - - - - Write the property value to the output - - that will receive the formatted result. - the event being logged - - - Writes out the value of a named property. The property name - should be set in the - property. - - - If the is set to null - then all the properties are written as key value pairs. - - - - - - Converter to output the relative time of the event - - - - Converter to output the time of the event relative to the start of the program. - - - Nicko Cadell - - - - Write the relative time to the output - - that will receive the formatted result. - the event being logged - - - Writes out the relative time of the event in milliseconds. - That is the number of milliseconds between the event - and the . - - - - - - Helper method to get the time difference between two DateTime objects - - start time (in the current local time zone) - end time (in the current local time zone) - the time difference in milliseconds - - - - Converter to include event thread name - - - - Writes the to the output. - - - Nicko Cadell - - - - Write the ThreadName to the output - - that will receive the formatted result. - the event being logged - - - Writes the to the . - - - - - - Pattern converter for the class name - - - - Outputs the of the event. - - - Nicko Cadell - - - - Gets the fully qualified name of the class - - the event being logged - The fully qualified type name for the caller location - - - Returns the of the . - - - - - - Converter to include event user name - - Douglas de la Torre - Nicko Cadell - - - - Convert the pattern to the rendered message - - that will receive the formatted result. - the event being logged - - - - Write the TimeStamp to the output - - - - Date pattern converter, uses a to format - the date of a . - - - Uses a to format the - in Universal time. - - - See the for details on the date pattern syntax. - - - - Nicko Cadell - - - - Write the TimeStamp to the output - - that will receive the formatted result. - the event being logged - - - Pass the to the - for it to render it to the writer. - - - The passed is in the local time zone, this is converted - to Universal time before it is rendered. - - - - - - - A Layout that renders only the Exception text from the logging event - - - - A Layout that renders only the Exception text from the logging event. - - - This Layout should only be used with appenders that utilize multiple - layouts (e.g. ). - - - Nicko Cadell - Gert Driesen - - - - Extend this abstract class to create your own log layout format. - - - - This is the base implementation of the - interface. Most layout objects should extend this class. - - - - - - Subclasses must implement the - method. - - - Subclasses should set the in their default - constructor. - - - - Nicko Cadell - Gert Driesen - - - - Interface implemented by layout objects - - - - An object is used to format a - as text. The method is called by an - appender to transform the into a string. - - - The layout can also supply and - text that is appender before any events and after all the events respectively. - - - Nicko Cadell - Gert Driesen - - - - Implement this method to create your own layout format. - - The TextWriter to write the formatted event to - The event to format - - - This method is called by an appender to format - the as text and output to a writer. - - - If the caller does not have a and prefers the - event to be formatted as a then the following - code can be used to format the event into a . - - - StringWriter writer = new StringWriter(); - Layout.Format(writer, loggingEvent); - string formattedEvent = writer.ToString(); - - - - - - The content type output by this layout. - - The content type - - - The content type output by this layout. - - - This is a MIME type e.g. "text/plain". - - - - - - The header for the layout format. - - the layout header - - - The Header text will be appended before any logging events - are formatted and appended. - - - - - - The footer for the layout format. - - the layout footer - - - The Footer text will be appended after all the logging events - have been formatted and appended. - - - - - - Flag indicating if this layout handle exceptions - - false if this layout handles exceptions - - - If this layout handles the exception object contained within - , then the layout should return - false. Otherwise, if the layout ignores the exception - object, then the layout should return true. - - - - - - The header text - - - - See for more information. - - - - - - The footer text - - - - See for more information. - - - - - - Flag indicating if this layout handles exceptions - - - - false if this layout handles exceptions - - - - - - Empty default constructor - - - - Empty default constructor - - - - - - Activate component options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - This method must be implemented by the subclass. - - - - - - Implement this method to create your own layout format. - - The TextWriter to write the formatted event to - The event to format - - - This method is called by an appender to format - the as text. - - - - - - The content type output by this layout. - - The content type is "text/plain" - - - The content type output by this layout. - - - This base class uses the value "text/plain". - To change this value a subclass must override this - property. - - - - - - The header for the layout format. - - the layout header - - - The Header text will be appended before any logging events - are formatted and appended. - - - - - - The footer for the layout format. - - the layout footer - - - The Footer text will be appended after all the logging events - have been formatted and appended. - - - - - - Flag indicating if this layout handles exceptions - - false if this layout handles exceptions - - - If this layout handles the exception object contained within - , then the layout should return - false. Otherwise, if the layout ignores the exception - object, then the layout should return true. - - - Set this value to override a this default setting. The default - value is true, this layout does not handle the exception. - - - - - - Default constructor - - - - Constructs a ExceptionLayout - - - - - - Activate component options - - - - Part of the component activation - framework. - - - This method does nothing as options become effective immediately. - - - - - - Gets the exception text from the logging event - - The TextWriter to write the formatted event to - the event being logged - - - Write the exception string to the . - The exception string is retrieved from . - - - - - - Interface for raw layout objects - - - - Interface used to format a - to an object. - - - This interface should not be confused with the - interface. This interface is used in - only certain specialized situations where a raw object is - required rather than a formatted string. The - is not generally useful than this interface. - - - Nicko Cadell - Gert Driesen - - - - Implement this method to create your own layout format. - - The event to format - returns the formatted event - - - Implement this method to create your own layout format. - - - - - - Adapts any to a - - - - Where an is required this adapter - allows a to be specified. - - - Nicko Cadell - Gert Driesen - - - - The layout to adapt - - - - - Construct a new adapter - - the layout to adapt - - - Create the adapter for the specified . - - - - - - Format the logging event as an object. - - The event to format - returns the formatted event - - - Format the logging event as an object. - - - Uses the object supplied to - the constructor to perform the formatting. - - - - - - A flexible layout configurable with pattern string. - - - - The goal of this class is to a - as a string. The results - depend on the conversion pattern. - - - The conversion pattern is closely related to the conversion - pattern of the printf function in C. A conversion pattern is - composed of literal text and format control expressions called - conversion specifiers. - - - You are free to insert any literal text within the conversion - pattern. - - - Each conversion specifier starts with a percent sign (%) and is - followed by optional format modifiers and a conversion - pattern name. The conversion pattern name specifies the type of - data, e.g. logger, level, date, thread name. The format - modifiers control such things as field width, padding, left and - right justification. The following is a simple example. - - - Let the conversion pattern be "%-5level [%thread]: %message%newline" and assume - that the log4net environment was set to use a PatternLayout. Then the - statements - - - ILog log = LogManager.GetLogger(typeof(TestApp)); - log.Debug("Message 1"); - log.Warn("Message 2"); - - would yield the output - - DEBUG [main]: Message 1 - WARN [main]: Message 2 - - - Note that there is no explicit separator between text and - conversion specifiers. The pattern parser knows when it has reached - the end of a conversion specifier when it reads a conversion - character. In the example above the conversion specifier - %-5level means the level of the logging event should be left - justified to a width of five characters. - - - The recognized conversion pattern names are: - - - - Conversion Pattern Name - Effect - - - a - Equivalent to appdomain - - - appdomain - - Used to output the friendly name of the AppDomain where the - logging event was generated. - - - - c - Equivalent to logger - - - C - Equivalent to type - - - class - Equivalent to type - - - d - Equivalent to date - - - date - - - Used to output the date of the logging event in the local time zone. - To output the date in universal time use the %utcdate pattern. - The date conversion - specifier may be followed by a date format specifier enclosed - between braces. For example, %date{HH:mm:ss,fff} or - %date{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is - given then ISO8601 format is - assumed (). - - - The date format specifier admits the same syntax as the - time pattern string of the . - - - For better results it is recommended to use the log4net date - formatters. These can be specified using one of the strings - "ABSOLUTE", "DATE" and "ISO8601" for specifying - , - and respectively - . For example, - %date{ISO8601} or %date{ABSOLUTE}. - - - These dedicated date formatters perform significantly - better than . - - - - - exception - - - Used to output the exception passed in with the log message. - - - If an exception object is stored in the logging event - it will be rendered into the pattern output with a - trailing newline. - If there is no exception then nothing will be output - and no trailing newline will be appended. - It is typical to put a newline before the exception - and to have the exception as the last data in the pattern. - - - - - F - Equivalent to file - - - file - - - Used to output the file name where the logging request was - issued. - - - WARNING Generating caller location information is - extremely slow. Its use should be avoided unless execution speed - is not an issue. - - - See the note below on the availability of caller location information. - - - - - identity - - - Used to output the user name for the currently active user - (Principal.Identity.Name). - - - WARNING Generating caller information is - extremely slow. Its use should be avoided unless execution speed - is not an issue. - - - - - l - Equivalent to location - - - L - Equivalent to line - - - location - - - Used to output location information of the caller which generated - the logging event. - - - The location information depends on the CLI implementation but - usually consists of the fully qualified name of the calling - method followed by the callers source the file name and line - number between parentheses. - - - The location information can be very useful. However, its - generation is extremely slow. Its use should be avoided - unless execution speed is not an issue. - - - See the note below on the availability of caller location information. - - - - - level - - - Used to output the level of the logging event. - - - - - line - - - Used to output the line number from where the logging request - was issued. - - - WARNING Generating caller location information is - extremely slow. Its use should be avoided unless execution speed - is not an issue. - - - See the note below on the availability of caller location information. - - - - - logger - - - Used to output the logger of the logging event. The - logger conversion specifier can be optionally followed by - precision specifier, that is a decimal constant in - brackets. - - - If a precision specifier is given, then only the corresponding - number of right most components of the logger name will be - printed. By default the logger name is printed in full. - - - For example, for the logger name "a.b.c" the pattern - %logger{2} will output "b.c". - - - - - m - Equivalent to message - - - M - Equivalent to method - - - message - - - Used to output the application supplied message associated with - the logging event. - - - - - mdc - - - The MDC (old name for the ThreadContext.Properties) is now part of the - combined event properties. This pattern is supported for compatibility - but is equivalent to property. - - - - - method - - - Used to output the method name where the logging request was - issued. - - - WARNING Generating caller location information is - extremely slow. Its use should be avoided unless execution speed - is not an issue. - - - See the note below on the availability of caller location information. - - - - - n - Equivalent to newline - - - newline - - - Outputs the platform dependent line separator character or - characters. - - - This conversion pattern offers the same performance as using - non-portable line separator strings such as "\n", or "\r\n". - Thus, it is the preferred way of specifying a line separator. - - - - - ndc - - - Used to output the NDC (nested diagnostic context) associated - with the thread that generated the logging event. - - - - - p - Equivalent to level - - - P - Equivalent to property - - - properties - Equivalent to property - - - property - - - Used to output the an event specific property. The key to - lookup must be specified within braces and directly following the - pattern specifier, e.g. %property{user} would include the value - from the property that is keyed by the string 'user'. Each property value - that is to be included in the log must be specified separately. - Properties are added to events by loggers or appenders. By default - the log4net:HostName property is set to the name of machine on - which the event was originally logged. - - - If no key is specified, e.g. %property then all the keys and their - values are printed in a comma separated list. - - - The properties of an event are combined from a number of different - contexts. These are listed below in the order in which they are searched. - - - - the event properties - - The event has that can be set. These - properties are specific to this event only. - - - - the thread properties - - The that are set on the current - thread. These properties are shared by all events logged on this thread. - - - - the global properties - - The that are set globally. These - properties are shared by all the threads in the AppDomain. - - - - - - - - r - Equivalent to timestamp - - - t - Equivalent to thread - - - timestamp - - - Used to output the number of milliseconds elapsed since the start - of the application until the creation of the logging event. - - - - - thread - - - Used to output the name of the thread that generated the - logging event. Uses the thread number if no name is available. - - - - - type - - - Used to output the fully qualified type name of the caller - issuing the logging request. This conversion specifier - can be optionally followed by precision specifier, that - is a decimal constant in brackets. - - - If a precision specifier is given, then only the corresponding - number of right most components of the class name will be - printed. By default the class name is output in fully qualified form. - - - For example, for the class name "log4net.Layout.PatternLayout", the - pattern %type{1} will output "PatternLayout". - - - WARNING Generating the caller class information is - slow. Thus, its use should be avoided unless execution speed is - not an issue. - - - See the note below on the availability of caller location information. - - - - - u - Equivalent to identity - - - username - - - Used to output the WindowsIdentity for the currently - active user. - - - WARNING Generating caller WindowsIdentity information is - extremely slow. Its use should be avoided unless execution speed - is not an issue. - - - - - utcdate - - - Used to output the date of the logging event in universal time. - The date conversion - specifier may be followed by a date format specifier enclosed - between braces. For example, %utcdate{HH:mm:ss,fff} or - %utcdate{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is - given then ISO8601 format is - assumed (). - - - The date format specifier admits the same syntax as the - time pattern string of the . - - - For better results it is recommended to use the log4net date - formatters. These can be specified using one of the strings - "ABSOLUTE", "DATE" and "ISO8601" for specifying - , - and respectively - . For example, - %utcdate{ISO8601} or %utcdate{ABSOLUTE}. - - - These dedicated date formatters perform significantly - better than . - - - - - w - Equivalent to username - - - x - Equivalent to ndc - - - X - Equivalent to mdc - - - % - - - The sequence %% outputs a single percent sign. - - - - - - The single letter patterns are deprecated in favor of the - longer more descriptive pattern names. - - - By default the relevant information is output as is. However, - with the aid of format modifiers it is possible to change the - minimum field width, the maximum field width and justification. - - - The optional format modifier is placed between the percent sign - and the conversion pattern name. - - - The first optional format modifier is the left justification - flag which is just the minus (-) character. Then comes the - optional minimum field width modifier. This is a decimal - constant that represents the minimum number of characters to - output. If the data item requires fewer characters, it is padded on - either the left or the right until the minimum width is - reached. The default is to pad on the left (right justify) but you - can specify right padding with the left justification flag. The - padding character is space. If the data item is larger than the - minimum field width, the field is expanded to accommodate the - data. The value is never truncated. - - - This behavior can be changed using the maximum field - width modifier which is designated by a period followed by a - decimal constant. If the data item is longer than the maximum - field, then the extra characters are removed from the - beginning of the data item and not from the end. For - example, it the maximum field width is eight and the data item is - ten characters long, then the first two characters of the data item - are dropped. This behavior deviates from the printf function in C - where truncation is done from the end. - - - Below are various format modifier examples for the logger - conversion specifier. - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Format modifierleft justifyminimum widthmaximum widthcomment
%20loggerfalse20none - - Left pad with spaces if the logger name is less than 20 - characters long. - -
%-20loggertrue20none - - Right pad with spaces if the logger - name is less than 20 characters long. - -
%.30loggerNAnone30 - - Truncate from the beginning if the logger - name is longer than 30 characters. - -
%20.30loggerfalse2030 - - Left pad with spaces if the logger name is shorter than 20 - characters. However, if logger name is longer than 30 characters, - then truncate from the beginning. - -
%-20.30loggertrue2030 - - Right pad with spaces if the logger name is shorter than 20 - characters. However, if logger name is longer than 30 characters, - then truncate from the beginning. - -
-
- - Note about caller location information.
- The following patterns %type %file %line %method %location %class %C %F %L %l %M - all generate caller location information. - Location information uses the System.Diagnostics.StackTrace class to generate - a call stack. The caller's information is then extracted from this stack. -
- - - The System.Diagnostics.StackTrace class is not supported on the - .NET Compact Framework 1.0 therefore caller location information is not - available on that framework. - - - - - The System.Diagnostics.StackTrace class has this to say about Release builds: - - - "StackTrace information will be most informative with Debug build configurations. - By default, Debug builds include debug symbols, while Release builds do not. The - debug symbols contain most of the file, method name, line number, and column - information used in constructing StackFrame and StackTrace objects. StackTrace - might not report as many method calls as expected, due to code transformations - that occur during optimization." - - - This means that in a Release build the caller information may be incomplete or may - not exist at all! Therefore caller location information cannot be relied upon in a Release build. - - - - Additional pattern converters may be registered with a specific - instance using the method. - -
- - This is a more detailed pattern. - %timestamp [%thread] %level %logger %ndc - %message%newline - - - A similar pattern except that the relative time is - right padded if less than 6 digits, thread name is right padded if - less than 15 characters and truncated if longer and the logger - name is left padded if shorter than 30 characters and truncated if - longer. - %-6timestamp [%15.15thread] %-5level %30.30logger %ndc - %message%newline - - Nicko Cadell - Gert Driesen - Douglas de la Torre - Daniel Cazzulino -
- - - Default pattern string for log output. - - - - Default pattern string for log output. - Currently set to the string "%message%newline" - which just prints the application supplied message. - - - - - - A detailed conversion pattern - - - - A conversion pattern which includes Time, Thread, Logger, and Nested Context. - Current value is %timestamp [%thread] %level %logger %ndc - %message%newline. - - - - - - Internal map of converter identifiers to converter types. - - - - This static map is overridden by the m_converterRegistry instance map - - - - - - the pattern - - - - - the head of the pattern converter chain - - - - - patterns defined on this PatternLayout only - - - - - Initialize the global registry - - - - Defines the builtin global rules. - - - - - - Constructs a PatternLayout using the DefaultConversionPattern - - - - The default pattern just produces the application supplied message. - - - Note to Inheritors: This constructor calls the virtual method - . If you override this method be - aware that it will be called before your is called constructor. - - - As per the contract the - method must be called after the properties on this object have been - configured. - - - - - - Constructs a PatternLayout using the supplied conversion pattern - - the pattern to use - - - Note to Inheritors: This constructor calls the virtual method - . If you override this method be - aware that it will be called before your is called constructor. - - - When using this constructor the method - need not be called. This may not be the case when using a subclass. - - - - - - Create the pattern parser instance - - the pattern to parse - The that will format the event - - - Creates the used to parse the conversion string. Sets the - global and instance rules on the . - - - - - - Initialize layout options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Produces a formatted string as specified by the conversion pattern. - - the event being logged - The TextWriter to write the formatted event to - - - Parse the using the patter format - specified in the property. - - - - - - Add a converter to this PatternLayout - - the converter info - - - This version of the method is used by the configurator. - Programmatic users should use the alternative method. - - - - - - Add a converter to this PatternLayout - - the name of the conversion pattern for this converter - the type of the converter - - - Add a named pattern converter to this instance. This - converter will be used in the formatting of the event. - This method must be called before . - - - The specified must extend the - type. - - - - - - The pattern formatting string - - - - The ConversionPattern option. This is the string which - controls formatting and consists of a mix of literal content and - conversion specifiers. - - - - - - Wrapper class used to map converter names to converter types - - - - Pattern converter info class used during configuration to - pass to the - method. - - - - - - default constructor - - - - - Gets or sets the name of the conversion pattern - - - - The name of the pattern in the format string - - - - - - Gets or sets the type of the converter - - - - The value specified must extend the - type. - - - - - - Type converter for the interface - - - - Used to convert objects to the interface. - Supports converting from the interface to - the interface using the . - - - Nicko Cadell - Gert Driesen - - - - Interface supported by type converters - - - - This interface supports conversion from arbitrary types - to a single target type. See . - - - Nicko Cadell - Gert Driesen - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Test if the can be converted to the - type supported by this converter. - - - - - - Convert the source object to the type supported by this object - - the object to convert - the converted object - - - Converts the to the type supported - by this converter. - - - - - - Can the sourceType be converted to an - - the source to be to be converted - true if the source type can be converted to - - - Test if the can be converted to a - . Only is supported - as the . - - - - - - Convert the value to a object - - the value to convert - the object - - - Convert the object to a - object. If the object - is a then the - is used to adapt between the two interfaces, otherwise an - exception is thrown. - - - - - - Extract the value of a property from the - - - - Extract the value of a property from the - - - Nicko Cadell - - - - Constructs a RawPropertyLayout - - - - - Lookup the property for - - The event to format - returns property value - - - Looks up and returns the object value of the property - named . If there is no property defined - with than name then null will be returned. - - - - - - The name of the value to lookup in the LoggingEvent Properties collection. - - - Value to lookup in the LoggingEvent Properties collection - - - - String name of the property to lookup in the . - - - - - - Extract the date from the - - - - Extract the date from the - - - Nicko Cadell - Gert Driesen - - - - Constructs a RawTimeStampLayout - - - - - Gets the as a . - - The event to format - returns the time stamp - - - Gets the as a . - - - The time stamp is in local time. To format the time stamp - in universal time use . - - - - - - Extract the date from the - - - - Extract the date from the - - - Nicko Cadell - Gert Driesen - - - - Constructs a RawUtcTimeStampLayout - - - - - Gets the as a . - - The event to format - returns the time stamp - - - Gets the as a . - - - The time stamp is in universal time. To format the time stamp - in local time use . - - - - - - A very simple layout - - - - SimpleLayout consists of the level of the log statement, - followed by " - " and then the log message itself. For example, - - DEBUG - Hello world - - - - Nicko Cadell - Gert Driesen - - - - Constructs a SimpleLayout - - - - - Initialize layout options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Produces a simple formatted output. - - the event being logged - The TextWriter to write the formatted event to - - - Formats the event as the level of the even, - followed by " - " and then the log message itself. The - output is terminated by a newline. - - - - - - Layout that formats the log events as XML elements. - - - - The output of the consists of a series of - log4net:event elements. It does not output a complete well-formed XML - file. The output is designed to be included as an external entity - in a separate file to form a correct XML file. - - - For example, if abc is the name of the file where - the output goes, then a well-formed XML file would - be: - - - <?xml version="1.0" ?> - - <!DOCTYPE log4net:events SYSTEM "log4net-events.dtd" [<!ENTITY data SYSTEM "abc">]> - - <log4net:events version="1.2" xmlns:log4net="http://logging.apache.org/log4net/schemas/log4net-events-1.2> - &data; - </log4net:events> - - - This approach enforces the independence of the - and the appender where it is embedded. - - - The version attribute helps components to correctly - interpret output generated by . The value of - this attribute should be "1.2" for release 1.2 and later. - - - Alternatively the Header and Footer properties can be - configured to output the correct XML header, open tag and close tag. - When setting the Header and Footer properties it is essential - that the underlying data store not be appendable otherwise the data - will become invalid XML. - - - Nicko Cadell - Gert Driesen - - - - Layout that formats the log events as XML elements. - - - - This is an abstract class that must be subclassed by an implementation - to conform to a specific schema. - - - Deriving classes must implement the method. - - - Nicko Cadell - Gert Driesen - - - - Protected constructor to support subclasses - - - - Initializes a new instance of the class - with no location info. - - - - - - Protected constructor to support subclasses - - - - The parameter determines whether - location information will be output by the layout. If - is set to true, then the - file name and line number of the statement at the origin of the log - statement will be output. - - - If you are embedding this layout within an SMTPAppender - then make sure to set the LocationInfo option of that - appender as well. - - - - - - Initialize layout options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Produces a formatted string. - - The event being logged. - The TextWriter to write the formatted event to - - - Format the and write it to the . - - - This method creates an that writes to the - . The is passed - to the method. Subclasses should override the - method rather than this method. - - - - - - Does the actual writing of the XML. - - The writer to use to output the event to. - The event to write. - - - Subclasses should override this method to format - the as XML. - - - - - - Flag to indicate if location information should be included in - the XML events. - - - - - Writer adapter that ignores Close - - - - - The string to replace invalid chars with - - - - - Gets a value indicating whether to include location information in - the XML events. - - - true if location information should be included in the XML - events; otherwise, false. - - - - If is set to true, then the file - name and line number of the statement at the origin of the log - statement will be output. - - - If you are embedding this layout within an SMTPAppender - then make sure to set the LocationInfo option of that - appender as well. - - - - - - The string to replace characters that can not be expressed in XML with. - - - Not all characters may be expressed in XML. This property contains the - string to replace those that can not with. This defaults to a ?. Set it - to the empty string to simply remove offending characters. For more - details on the allowed character ranges see http://www.w3.org/TR/REC-xml/#charsets - Character replacement will occur in the log message, the property names - and the property values. - - - - - - - Gets the content type output by this layout. - - - As this is the XML layout, the value is always "text/xml". - - - - As this is the XML layout, the value is always "text/xml". - - - - - - Constructs an XmlLayout - - - - - Constructs an XmlLayout. - - - - The LocationInfo option takes a boolean value. By - default, it is set to false which means there will be no location - information output by this layout. If the the option is set to - true, then the file name and line number of the statement - at the origin of the log statement will be output. - - - If you are embedding this layout within an SmtpAppender - then make sure to set the LocationInfo option of that - appender as well. - - - - - - Initialize layout options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - Builds a cache of the element names - - - - - - Does the actual writing of the XML. - - The writer to use to output the event to. - The event to write. - - - Override the base class method - to write the to the . - - - - - - The prefix to use for all generated element names - - - - - The prefix to use for all element names - - - - The default prefix is log4net. Set this property - to change the prefix. If the prefix is set to an empty string - then no prefix will be written. - - - - - - Set whether or not to base64 encode the message. - - - - By default the log message will be written as text to the xml - output. This can cause problems when the message contains binary - data. By setting this to true the contents of the message will be - base64 encoded. If this is set then invalid character replacement - (see ) will not be performed - on the log message. - - - - - - Set whether or not to base64 encode the property values. - - - - By default the properties will be written as text to the xml - output. This can cause problems when one or more properties contain - binary data. By setting this to true the values of the properties - will be base64 encoded. If this is set then invalid character replacement - (see ) will not be performed - on the property values. - - - - - - Layout that formats the log events as XML elements compatible with the log4j schema - - - - Formats the log events according to the http://logging.apache.org/log4j schema. - - - Nicko Cadell - - - - The 1st of January 1970 in UTC - - - - - Constructs an XMLLayoutSchemaLog4j - - - - - Constructs an XMLLayoutSchemaLog4j. - - - - The LocationInfo option takes a boolean value. By - default, it is set to false which means there will be no location - information output by this layout. If the the option is set to - true, then the file name and line number of the statement - at the origin of the log statement will be output. - - - If you are embedding this layout within an SMTPAppender - then make sure to set the LocationInfo option of that - appender as well. - - - - - - Actually do the writing of the xml - - the writer to use - the event to write - - - Generate XML that is compatible with the log4j schema. - - - - - - The version of the log4j schema to use. - - - - Only version 1.2 of the log4j schema is supported. - - - - - - The default object Renderer. - - - - The default renderer supports rendering objects and collections to strings. - - - See the method for details of the output. - - - Nicko Cadell - Gert Driesen - - - - Implement this interface in order to render objects as strings - - - - Certain types require special case conversion to - string form. This conversion is done by an object renderer. - Object renderers implement the - interface. - - - Nicko Cadell - Gert Driesen - - - - Render the object to a string - - The map used to lookup renderers - The object to render - The writer to render to - - - Render the object to a - string. - - - The parameter is - provided to lookup and render other objects. This is - very useful where contains - nested objects of unknown type. The - method can be used to render these objects. - - - - - - Default constructor - - - - Default constructor - - - - - - Render the object to a string - - The map used to lookup renderers - The object to render - The writer to render to - - - Render the object to a string. - - - The parameter is - provided to lookup and render other objects. This is - very useful where contains - nested objects of unknown type. The - method can be used to render these objects. - - - The default renderer supports rendering objects to strings as follows: - - - - Value - Rendered String - - - null - - "(null)" - - - - - - - For a one dimensional array this is the - array type name, an open brace, followed by a comma - separated list of the elements (using the appropriate - renderer), followed by a close brace. - - - For example: int[] {1, 2, 3}. - - - If the array is not one dimensional the - Array.ToString() is returned. - - - - - , & - - - Rendered as an open brace, followed by a comma - separated list of the elements (using the appropriate - renderer), followed by a close brace. - - - For example: {a, b, c}. - - - All collection classes that implement its subclasses, - or generic equivalents all implement the interface. - - - - - - - - Rendered as the key, an equals sign ('='), and the value (using the appropriate - renderer). - - - For example: key=value. - - - - - other - - Object.ToString() - - - - - - - - Render the array argument into a string - - The map used to lookup renderers - the array to render - The writer to render to - - - For a one dimensional array this is the - array type name, an open brace, followed by a comma - separated list of the elements (using the appropriate - renderer), followed by a close brace. For example: - int[] {1, 2, 3}. - - - If the array is not one dimensional the - Array.ToString() is returned. - - - - - - Render the enumerator argument into a string - - The map used to lookup renderers - the enumerator to render - The writer to render to - - - Rendered as an open brace, followed by a comma - separated list of the elements (using the appropriate - renderer), followed by a close brace. For example: - {a, b, c}. - - - - - - Render the DictionaryEntry argument into a string - - The map used to lookup renderers - the DictionaryEntry to render - The writer to render to - - - Render the key, an equals sign ('='), and the value (using the appropriate - renderer). For example: key=value. - - - - - - Map class objects to an . - - - - Maintains a mapping between types that require special - rendering and the that - is used to render them. - - - The method is used to render an - object using the appropriate renderers defined in this map. - - - Nicko Cadell - Gert Driesen - - - - Default Constructor - - - - Default constructor. - - - - - - Render using the appropriate renderer. - - the object to render to a string - the object rendered as a string - - - This is a convenience method used to render an object to a string. - The alternative method - should be used when streaming output to a . - - - - - - Render using the appropriate renderer. - - the object to render to a string - The writer to render to - - - Find the appropriate renderer for the type of the - parameter. This is accomplished by calling the - method. Once a renderer is found, it is - applied on the object and the result is returned - as a . - - - - - - Gets the renderer for the specified object type - - the object to lookup the renderer for - the renderer for - - - Gets the renderer for the specified object type. - - - Syntactic sugar method that calls - with the type of the object parameter. - - - - - - Gets the renderer for the specified type - - the type to lookup the renderer for - the renderer for the specified type - - - Returns the renderer for the specified type. - If no specific renderer has been defined the - will be returned. - - - - - - Internal function to recursively search interfaces - - the type to lookup the renderer for - the renderer for the specified type - - - - Clear the map of renderers - - - - Clear the custom renderers defined by using - . The - cannot be removed. - - - - - - Register an for . - - the type that will be rendered by - the renderer for - - - Register an object renderer for a specific source type. - This renderer will be returned from a call to - specifying the same as an argument. - - - - - - Get the default renderer instance - - the default renderer - - - Get the default renderer - - - - - - Interface implemented by logger repository plugins. - - - - Plugins define additional behavior that can be associated - with a . - The held by the - property is used to store the plugins for a repository. - - - The log4net.Config.PluginAttribute can be used to - attach plugins to repositories created using configuration - attributes. - - - Nicko Cadell - Gert Driesen - - - - Attaches the plugin to the specified . - - The that this plugin should be attached to. - - - A plugin may only be attached to a single repository. - - - This method is called when the plugin is attached to the repository. - - - - - - Is called when the plugin is to shutdown. - - - - This method is called to notify the plugin that - it should stop operating and should detach from - the repository. - - - - - - Gets the name of the plugin. - - - The name of the plugin. - - - - Plugins are stored in the - keyed by name. Each plugin instance attached to a - repository must be a unique name. - - - - - - A strongly-typed collection of objects. - - Nicko Cadell - - - - Creates a read-only wrapper for a PluginCollection instance. - - list to create a readonly wrapper arround - - A PluginCollection wrapper that is read-only. - - - - - Initializes a new instance of the PluginCollection class - that is empty and has the default initial capacity. - - - - - Initializes a new instance of the PluginCollection class - that has the specified initial capacity. - - - The number of elements that the new PluginCollection is initially capable of storing. - - - - - Initializes a new instance of the PluginCollection class - that contains elements copied from the specified PluginCollection. - - The PluginCollection whose elements are copied to the new collection. - - - - Initializes a new instance of the PluginCollection class - that contains elements copied from the specified array. - - The array whose elements are copied to the new list. - - - - Initializes a new instance of the PluginCollection class - that contains elements copied from the specified collection. - - The collection whose elements are copied to the new list. - - - - Allow subclasses to avoid our default constructors - - - - - - - Copies the entire PluginCollection to a one-dimensional - array. - - The one-dimensional array to copy to. - - - - Copies the entire PluginCollection to a one-dimensional - array, starting at the specified index of the target array. - - The one-dimensional array to copy to. - The zero-based index in at which copying begins. - - - - Adds a to the end of the PluginCollection. - - The to be added to the end of the PluginCollection. - The index at which the value has been added. - - - - Removes all elements from the PluginCollection. - - - - - Creates a shallow copy of the . - - A new with a shallow copy of the collection data. - - - - Determines whether a given is in the PluginCollection. - - The to check for. - true if is found in the PluginCollection; otherwise, false. - - - - Returns the zero-based index of the first occurrence of a - in the PluginCollection. - - The to locate in the PluginCollection. - - The zero-based index of the first occurrence of - in the entire PluginCollection, if found; otherwise, -1. - - - - - Inserts an element into the PluginCollection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - is less than zero - -or- - is equal to or greater than . - - - - - Removes the first occurrence of a specific from the PluginCollection. - - The to remove from the PluginCollection. - - The specified was not found in the PluginCollection. - - - - - Removes the element at the specified index of the PluginCollection. - - The zero-based index of the element to remove. - - is less than zero. - -or- - is equal to or greater than . - - - - - Returns an enumerator that can iterate through the PluginCollection. - - An for the entire PluginCollection. - - - - Adds the elements of another PluginCollection to the current PluginCollection. - - The PluginCollection whose elements should be added to the end of the current PluginCollection. - The new of the PluginCollection. - - - - Adds the elements of a array to the current PluginCollection. - - The array whose elements should be added to the end of the PluginCollection. - The new of the PluginCollection. - - - - Adds the elements of a collection to the current PluginCollection. - - The collection whose elements should be added to the end of the PluginCollection. - The new of the PluginCollection. - - - - Sets the capacity to the actual number of elements. - - - - - is less than zero. - -or- - is equal to or greater than . - - - - - is less than zero. - -or- - is equal to or greater than . - - - - - Gets the number of elements actually contained in the PluginCollection. - - - - - Gets a value indicating whether access to the collection is synchronized (thread-safe). - - true if access to the ICollection is synchronized (thread-safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the collection. - - - An object that can be used to synchronize access to the collection. - - - - - Gets or sets the at the specified index. - - - The at the specified index. - - The zero-based index of the element to get or set. - - is less than zero. - -or- - is equal to or greater than . - - - - - Gets a value indicating whether the collection has a fixed size. - - true if the collection has a fixed size; otherwise, false. The default is false. - - - - Gets a value indicating whether the IList is read-only. - - true if the collection is read-only; otherwise, false. The default is false. - - - - Gets or sets the number of elements the PluginCollection can contain. - - - The number of elements the PluginCollection can contain. - - - - - Supports type-safe iteration over a . - - - - - - Advances the enumerator to the next element in the collection. - - - true if the enumerator was successfully advanced to the next element; - false if the enumerator has passed the end of the collection. - - - The collection was modified after the enumerator was created. - - - - - Sets the enumerator to its initial position, before the first element in the collection. - - - - - Gets the current element in the collection. - - - - - Type visible only to our subclasses - Used to access protected constructor - - - - - - A value - - - - - Supports simple iteration over a . - - - - - - Initializes a new instance of the Enumerator class. - - - - - - Advances the enumerator to the next element in the collection. - - - true if the enumerator was successfully advanced to the next element; - false if the enumerator has passed the end of the collection. - - - The collection was modified after the enumerator was created. - - - - - Sets the enumerator to its initial position, before the first element in the collection. - - - - - Gets the current element in the collection. - - - The current element in the collection. - - - - - - - - Map of repository plugins. - - - - This class is a name keyed map of the plugins that are - attached to a repository. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - The repository that the plugins should be attached to. - - - Initialize a new instance of the class with a - repository that the plugins should be attached to. - - - - - - Adds a to the map. - - The to add to the map. - - - The will be attached to the repository when added. - - - If there already exists a plugin with the same name - attached to the repository then the old plugin will - be and replaced with - the new plugin. - - - - - - Removes a from the map. - - The to remove from the map. - - - Remove a specific plugin from this map. - - - - - - Gets a by name. - - The name of the to lookup. - - The from the map with the name specified, or - null if no plugin is found. - - - - Lookup a plugin by name. If the plugin is not found null - will be returned. - - - - - - Gets all possible plugins as a list of objects. - - All possible plugins as a list of objects. - - - Get a collection of all the plugins defined in this map. - - - - - - Base implementation of - - - - Default abstract implementation of the - interface. This base class can be used by implementors - of the interface. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - the name of the plugin - - Initializes a new Plugin with the specified name. - - - - - Attaches this plugin to a . - - The that this plugin should be attached to. - - - A plugin may only be attached to a single repository. - - - This method is called when the plugin is attached to the repository. - - - - - - Is called when the plugin is to shutdown. - - - - This method is called to notify the plugin that - it should stop operating and should detach from - the repository. - - - - - - The name of this plugin. - - - - - The repository this plugin is attached to. - - - - - Gets or sets the name of the plugin. - - - The name of the plugin. - - - - Plugins are stored in the - keyed by name. Each plugin instance attached to a - repository must be a unique name. - - - The name of the plugin must not change one the - plugin has been attached to a repository. - - - - - - The repository for this plugin - - - The that this plugin is attached to. - - - - Gets or sets the that this plugin is - attached to. - - - - - - Plugin that listens for events from the - - - - This plugin publishes an instance of - on a specified . This listens for logging events delivered from - a remote . - - - When an event is received it is relogged within the attached repository - as if it had been raised locally. - - - Nicko Cadell - Gert Driesen - - - - Default constructor - - - - Initializes a new instance of the class. - - - The property must be set. - - - - - - Construct with sink Uri. - - The name to publish the sink under in the remoting infrastructure. - See for more details. - - - Initializes a new instance of the class - with specified name. - - - - - - Attaches this plugin to a . - - The that this plugin should be attached to. - - - A plugin may only be attached to a single repository. - - - This method is called when the plugin is attached to the repository. - - - - - - Is called when the plugin is to shutdown. - - - - When the plugin is shutdown the remote logging - sink is disconnected. - - - - - - Gets or sets the URI of this sink. - - - The URI of this sink. - - - - This is the name under which the object is marshaled. - - - - - - - Delivers objects to a remote sink. - - - - Internal class used to listen for logging events - and deliver them to the local repository. - - - - - - Constructor - - The repository to log to. - - - Initializes a new instance of the for the - specified . - - - - - - Logs the events to the repository. - - The events to log. - - - The events passed are logged to the - - - - - - Obtains a lifetime service object to control the lifetime - policy for this instance. - - null to indicate that this instance should live forever. - - - Obtains a lifetime service object to control the lifetime - policy for this instance. This object should live forever - therefore this implementation returns null. - - - - - - The underlying that events should - be logged to. - - - - - Default implementation of - - - - This default implementation of the - interface is used to create the default subclass - of the object. - - - Nicko Cadell - Gert Driesen - - - - Interface abstracts creation of instances - - - - This interface is used by the to - create new objects. - - - The method is called - to create a named . - - - Implement this interface to create new subclasses of . - - - Nicko Cadell - Gert Driesen - - - - Create a new instance - - The name of the . - The instance for the specified name. - - - Create a new instance with the - specified name. - - - Called by the to create - new named instances. - - - If the is null then the root logger - must be returned. - - - - - - Default constructor - - - - Initializes a new instance of the class. - - - - - - Create a new instance - - The name of the . - The instance for the specified name. - - - Create a new instance with the - specified name. - - - Called by the to create - new named instances. - - - If the is null then the root logger - must be returned. - - - - - - Default internal subclass of - - - - This subclass has no additional behavior over the - class but does allow instances - to be created. - - - - - - Implementation of used by - - - - Internal class used to provide implementation of - interface. Applications should use to get - logger instances. - - - This is one of the central classes in the log4net implementation. One of the - distinctive features of log4net are hierarchical loggers and their - evaluation. The organizes the - instances into a rooted tree hierarchy. - - - The class is abstract. Only concrete subclasses of - can be created. The - is used to create instances of this type for the . - - - Nicko Cadell - Gert Driesen - Aspi Havewala - Douglas de la Torre - - - - This constructor created a new instance and - sets its name. - - The name of the . - - - This constructor is protected and designed to be used by - a subclass that is not abstract. - - - Loggers are constructed by - objects. See for the default - logger creator. - - - - - - Add to the list of appenders of this - Logger instance. - - An appender to add to this logger - - - Add to the list of appenders of this - Logger instance. - - - If is already in the list of - appenders, then it won't be added again. - - - - - - Look for the appender named as name - - The name of the appender to lookup - The appender with the name specified, or null. - - - Returns the named appender, or null if the appender is not found. - - - - - - Remove all previously added appenders from this Logger instance. - - - - Remove all previously added appenders from this Logger instance. - - - This is useful when re-reading configuration information. - - - - - - Remove the appender passed as parameter form the list of appenders. - - The appender to remove - The appender removed from the list - - - Remove the appender passed as parameter form the list of appenders. - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - - Remove the appender passed as parameter form the list of appenders. - - The name of the appender to remove - The appender removed from the list - - - Remove the named appender passed as parameter form the list of appenders. - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - - This generic form is intended to be used by wrappers. - - The declaring type of the method that is - the stack boundary into the logging system for this call. - The level of the message to be logged. - The message object to log. - The exception to log, including its stack trace. - - - Generate a logging event for the specified using - the and . - - - This method must not throw any exception to the caller. - - - - - - This is the most generic printing method that is intended to be used - by wrappers. - - The event being logged. - - - Logs the specified logging event through this logger. - - - This method must not throw any exception to the caller. - - - - - - Checks if this logger is enabled for a given passed as parameter. - - The level to check. - - true if this logger is enabled for level, otherwise false. - - - - Test if this logger is going to log events of the specified . - - - This method must not throw any exception to the caller. - - - - - - Deliver the to the attached appenders. - - The event to log. - - - Call the appenders in the hierarchy starting at - this. If no appenders could be found, emit a - warning. - - - This method calls all the appenders inherited from the - hierarchy circumventing any evaluation of whether to log or not - to log the particular log request. - - - - - - Closes all attached appenders implementing the interface. - - - - Used to ensure that the appenders are correctly shutdown. - - - - - - This is the most generic printing method. This generic form is intended to be used by wrappers - - The level of the message to be logged. - The message object to log. - The exception to log, including its stack trace. - - - Generate a logging event for the specified using - the . - - - - - - Creates a new logging event and logs the event without further checks. - - The declaring type of the method that is - the stack boundary into the logging system for this call. - The level of the message to be logged. - The message object to log. - The exception to log, including its stack trace. - - - Generates a logging event and delivers it to the attached - appenders. - - - - - - Creates a new logging event and logs the event without further checks. - - The event being logged. - - - Delivers the logging event to the attached appenders. - - - - - - The fully qualified type of the Logger class. - - - - - The name of this logger. - - - - - The assigned level of this logger. - - - - The level variable need not be - assigned a value in which case it is inherited - form the hierarchy. - - - - - - The parent of this logger. - - - - The parent of this logger. - All loggers have at least one ancestor which is the root logger. - - - - - - Loggers need to know what Hierarchy they are in. - - - - Loggers need to know what Hierarchy they are in. - The hierarchy that this logger is a member of is stored - here. - - - - - - Helper implementation of the interface - - - - - Flag indicating if child loggers inherit their parents appenders - - - - Additivity is set to true by default, that is children inherit - the appenders of their ancestors by default. If this variable is - set to false then the appenders found in the - ancestors of this logger are not used. However, the children - of this logger will inherit its appenders, unless the children - have their additivity flag set to false too. See - the user manual for more details. - - - - - - Lock to protect AppenderAttachedImpl variable m_appenderAttachedImpl - - - - - Gets or sets the parent logger in the hierarchy. - - - The parent logger in the hierarchy. - - - - Part of the Composite pattern that makes the hierarchy. - The hierarchy is parent linked rather than child linked. - - - - - - Gets or sets a value indicating if child loggers inherit their parent's appenders. - - - true if child loggers inherit their parent's appenders. - - - - Additivity is set to true by default, that is children inherit - the appenders of their ancestors by default. If this variable is - set to false then the appenders found in the - ancestors of this logger are not used. However, the children - of this logger will inherit its appenders, unless the children - have their additivity flag set to false too. See - the user manual for more details. - - - - - - Gets the effective level for this logger. - - The nearest level in the logger hierarchy. - - - Starting from this logger, searches the logger hierarchy for a - non-null level and returns it. Otherwise, returns the level of the - root logger. - - The Logger class is designed so that this method executes as - quickly as possible. - - - - - Gets or sets the where this - Logger instance is attached to. - - The hierarchy that this logger belongs to. - - - This logger must be attached to a single . - - - - - - Gets or sets the assigned , if any, for this Logger. - - - The of this logger. - - - - The assigned can be null. - - - - - - Get the appenders contained in this logger as an - . - - A collection of the appenders in this logger - - - Get the appenders contained in this logger as an - . If no appenders - can be found, then a is returned. - - - - - - Gets the logger name. - - - The name of the logger. - - - - The name of this logger - - - - - - Gets the where this - Logger instance is attached to. - - - The that this logger belongs to. - - - - Gets the where this - Logger instance is attached to. - - - - - - Construct a new Logger - - the name of the logger - - - Initializes a new instance of the class - with the specified name. - - - - - - Delegate used to handle logger creation event notifications. - - The in which the has been created. - The event args that hold the instance that has been created. - - - Delegate used to handle logger creation event notifications. - - - - - - Provides data for the event. - - - - A event is raised every time a - is created. - - - - - - The created - - - - - Constructor - - The that has been created. - - - Initializes a new instance of the event argument - class,with the specified . - - - - - - Gets the that has been created. - - - The that has been created. - - - - The that has been created. - - - - - - Hierarchical organization of loggers - - - - The casual user should not have to deal with this class - directly. - - - This class is specialized in retrieving loggers by name and - also maintaining the logger hierarchy. Implements the - interface. - - - The structure of the logger hierarchy is maintained by the - method. The hierarchy is such that children - link to their parent but parents do not have any references to their - children. Moreover, loggers can be instantiated in any order, in - particular descendant before ancestor. - - - In case a descendant is created before a particular ancestor, - then it creates a provision node for the ancestor and adds itself - to the provision node. Other descendants of the same ancestor add - themselves to the previously created provision node. - - - Nicko Cadell - Gert Driesen - - - - Base implementation of - - - - Default abstract implementation of the interface. - - - Skeleton implementation of the interface. - All types can extend this type. - - - Nicko Cadell - Gert Driesen - - - - Interface implemented by logger repositories. - - - - This interface is implemented by logger repositories. e.g. - . - - - This interface is used by the - to obtain interfaces. - - - Nicko Cadell - Gert Driesen - - - - Check if the named logger exists in the repository. If so return - its reference, otherwise returns null. - - The name of the logger to lookup - The Logger object with the name specified - - - If the names logger exists it is returned, otherwise - null is returned. - - - - - - Returns all the currently defined loggers as an Array. - - All the defined loggers - - - Returns all the currently defined loggers as an Array. - - - - - - Returns a named logger instance - - The name of the logger to retrieve - The logger object with the name specified - - - Returns a named logger instance. - - - If a logger of that name already exists, then it will be - returned. Otherwise, a new logger will be instantiated and - then linked with its existing ancestors as well as children. - - - - - Shutdown the repository - - - Shutting down a repository will safely close and remove - all appenders in all loggers including the root logger. - - - Some appenders need to be closed before the - application exists. Otherwise, pending logging events might be - lost. - - - The method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - - Reset the repositories configuration to a default state - - - - Reset all values contained in this instance to their - default state. - - - Existing loggers are not removed. They are just reset. - - - This method should be used sparingly and with care as it will - block all logging until it is completed. - - - - - - Log the through this repository. - - the event to log - - - This method should not normally be used to log. - The interface should be used - for routine logging. This interface can be obtained - using the method. - - - The logEvent is delivered to the appropriate logger and - that logger is then responsible for logging the event. - - - - - - Returns all the Appenders that are configured as an Array. - - All the Appenders - - - Returns all the Appenders that are configured as an Array. - - - - - - The name of the repository - - - The name of the repository - - - - The name of the repository. - - - - - - RendererMap accesses the object renderer map for this repository. - - - RendererMap accesses the object renderer map for this repository. - - - - RendererMap accesses the object renderer map for this repository. - - - The RendererMap holds a mapping between types and - objects. - - - - - - The plugin map for this repository. - - - The plugin map for this repository. - - - - The plugin map holds the instances - that have been attached to this repository. - - - - - - Get the level map for the Repository. - - - - Get the level map for the Repository. - - - The level map defines the mappings between - level names and objects in - this repository. - - - - - - The threshold for all events in this repository - - - The threshold for all events in this repository - - - - The threshold for all events in this repository. - - - - - - Flag indicates if this repository has been configured. - - - Flag indicates if this repository has been configured. - - - - Flag indicates if this repository has been configured. - - - - - - Event to notify that the repository has been shutdown. - - - Event to notify that the repository has been shutdown. - - - - Event raised when the repository has been shutdown. - - - - - - Event to notify that the repository has had its configuration reset. - - - Event to notify that the repository has had its configuration reset. - - - - Event raised when the repository's configuration has been - reset to default. - - - - - - Event to notify that the repository has had its configuration changed. - - - Event to notify that the repository has had its configuration changed. - - - - Event raised when the repository's configuration has been changed. - - - - - - Repository specific properties - - - Repository specific properties - - - - These properties can be specified on a repository specific basis. - - - - - - Default Constructor - - - - Initializes the repository with default (empty) properties. - - - - - - Construct the repository using specific properties - - the properties to set for this repository - - - Initializes the repository with specified properties. - - - - - - Test if logger exists - - The name of the logger to lookup - The Logger object with the name specified - - - Check if the named logger exists in the repository. If so return - its reference, otherwise returns null. - - - - - - Returns all the currently defined loggers in the repository - - All the defined loggers - - - Returns all the currently defined loggers in the repository as an Array. - - - - - - Return a new logger instance - - The name of the logger to retrieve - The logger object with the name specified - - - Return a new logger instance. - - - If a logger of that name already exists, then it will be - returned. Otherwise, a new logger will be instantiated and - then linked with its existing ancestors as well as children. - - - - - - Shutdown the repository - - - - Shutdown the repository. Can be overridden in a subclass. - This base class implementation notifies the - listeners and all attached plugins of the shutdown event. - - - - - - Reset the repositories configuration to a default state - - - - Reset all values contained in this instance to their - default state. - - - Existing loggers are not removed. They are just reset. - - - This method should be used sparingly and with care as it will - block all logging until it is completed. - - - - - - Log the logEvent through this repository. - - the event to log - - - This method should not normally be used to log. - The interface should be used - for routine logging. This interface can be obtained - using the method. - - - The logEvent is delivered to the appropriate logger and - that logger is then responsible for logging the event. - - - - - - Returns all the Appenders that are configured as an Array. - - All the Appenders - - - Returns all the Appenders that are configured as an Array. - - - - - - Adds an object renderer for a specific class. - - The type that will be rendered by the renderer supplied. - The object renderer used to render the object. - - - Adds an object renderer for a specific class. - - - - - - Notify the registered listeners that the repository is shutting down - - Empty EventArgs - - - Notify any listeners that this repository is shutting down. - - - - - - Notify the registered listeners that the repository has had its configuration reset - - Empty EventArgs - - - Notify any listeners that this repository's configuration has been reset. - - - - - - Notify the registered listeners that the repository has had its configuration changed - - Empty EventArgs - - - Notify any listeners that this repository's configuration has changed. - - - - - - Raise a configuration changed event on this repository - - EventArgs.Empty - - - Applications that programmatically change the configuration of the repository should - raise this event notification to notify listeners. - - - - - - The name of the repository - - - The string name of the repository - - - - The name of this repository. The name is - used to store and lookup the repositories - stored by the . - - - - - - The threshold for all events in this repository - - - The threshold for all events in this repository - - - - The threshold for all events in this repository - - - - - - RendererMap accesses the object renderer map for this repository. - - - RendererMap accesses the object renderer map for this repository. - - - - RendererMap accesses the object renderer map for this repository. - - - The RendererMap holds a mapping between types and - objects. - - - - - - The plugin map for this repository. - - - The plugin map for this repository. - - - - The plugin map holds the instances - that have been attached to this repository. - - - - - - Get the level map for the Repository. - - - - Get the level map for the Repository. - - - The level map defines the mappings between - level names and objects in - this repository. - - - - - - Flag indicates if this repository has been configured. - - - Flag indicates if this repository has been configured. - - - - Flag indicates if this repository has been configured. - - - - - - Event to notify that the repository has been shutdown. - - - Event to notify that the repository has been shutdown. - - - - Event raised when the repository has been shutdown. - - - - - - Event to notify that the repository has had its configuration reset. - - - Event to notify that the repository has had its configuration reset. - - - - Event raised when the repository's configuration has been - reset to default. - - - - - - Event to notify that the repository has had its configuration changed. - - - Event to notify that the repository has had its configuration changed. - - - - Event raised when the repository's configuration has been changed. - - - - - - Repository specific properties - - - Repository specific properties - - - These properties can be specified on a repository specific basis - - - - - Basic Configurator interface for repositories - - - - Interface used by basic configurator to configure a - with a default . - - - A should implement this interface to support - configuration by the . - - - Nicko Cadell - Gert Driesen - - - - Initialize the repository using the specified appender - - the appender to use to log all logging events - - - Configure the repository to route all logging events to the - specified appender. - - - - - - Configure repository using XML - - - - Interface used by Xml configurator to configure a . - - - A should implement this interface to support - configuration by the . - - - Nicko Cadell - Gert Driesen - - - - Initialize the repository using the specified config - - the element containing the root of the config - - - The schema for the XML configuration data is defined by - the implementation. - - - - - - Default constructor - - - - Initializes a new instance of the class. - - - - - - Construct with properties - - The properties to pass to this repository. - - - Initializes a new instance of the class. - - - - - - Construct with a logger factory - - The factory to use to create new logger instances. - - - Initializes a new instance of the class with - the specified . - - - - - - Construct with properties and a logger factory - - The properties to pass to this repository. - The factory to use to create new logger instances. - - - Initializes a new instance of the class with - the specified . - - - - - - Test if a logger exists - - The name of the logger to lookup - The Logger object with the name specified - - - Check if the named logger exists in the hierarchy. If so return - its reference, otherwise returns null. - - - - - - Returns all the currently defined loggers in the hierarchy as an Array - - All the defined loggers - - - Returns all the currently defined loggers in the hierarchy as an Array. - The root logger is not included in the returned - enumeration. - - - - - - Return a new logger instance named as the first parameter using - the default factory. - - - - Return a new logger instance named as the first parameter using - the default factory. - - - If a logger of that name already exists, then it will be - returned. Otherwise, a new logger will be instantiated and - then linked with its existing ancestors as well as children. - - - The name of the logger to retrieve - The logger object with the name specified - - - - Shutting down a hierarchy will safely close and remove - all appenders in all loggers including the root logger. - - - - Shutting down a hierarchy will safely close and remove - all appenders in all loggers including the root logger. - - - Some appenders need to be closed before the - application exists. Otherwise, pending logging events might be - lost. - - - The Shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - - Reset all values contained in this hierarchy instance to their default. - - - - Reset all values contained in this hierarchy instance to their - default. This removes all appenders from all loggers, sets - the level of all non-root loggers to null, - sets their additivity flag to true and sets the level - of the root logger to . Moreover, - message disabling is set its default "off" value. - - - Existing loggers are not removed. They are just reset. - - - This method should be used sparingly and with care as it will - block all logging until it is completed. - - - - - - Log the logEvent through this hierarchy. - - the event to log - - - This method should not normally be used to log. - The interface should be used - for routine logging. This interface can be obtained - using the method. - - - The logEvent is delivered to the appropriate logger and - that logger is then responsible for logging the event. - - - - - - Returns all the Appenders that are currently configured - - An array containing all the currently configured appenders - - - Returns all the instances that are currently configured. - All the loggers are searched for appenders. The appenders may also be containers - for appenders and these are also searched for additional loggers. - - - The list returned is unordered but does not contain duplicates. - - - - - - Collect the appenders from an . - The appender may also be a container. - - - - - - - Collect the appenders from an container - - - - - - - Initialize the log4net system using the specified appender - - the appender to use to log all logging events - - - - Initialize the log4net system using the specified appender - - the appender to use to log all logging events - - - This method provides the same functionality as the - method implemented - on this object, but it is protected and therefore can be called by subclasses. - - - - - - Initialize the log4net system using the specified config - - the element containing the root of the config - - - - Initialize the log4net system using the specified config - - the element containing the root of the config - - - This method provides the same functionality as the - method implemented - on this object, but it is protected and therefore can be called by subclasses. - - - - - - Test if this hierarchy is disabled for the specified . - - The level to check against. - - true if the repository is disabled for the level argument, false otherwise. - - - - If this hierarchy has not been configured then this method will - always return true. - - - This method will return true if this repository is - disabled for level object passed as parameter and - false otherwise. - - - See also the property. - - - - - - Clear all logger definitions from the internal hashtable - - - - This call will clear all logger definitions from the internal - hashtable. Invoking this method will irrevocably mess up the - logger hierarchy. - - - You should really know what you are doing before - invoking this method. - - - - - - Return a new logger instance named as the first parameter using - . - - The name of the logger to retrieve - The factory that will make the new logger instance - The logger object with the name specified - - - If a logger of that name already exists, then it will be - returned. Otherwise, a new logger will be instantiated by the - parameter and linked with its existing - ancestors as well as children. - - - - - - Sends a logger creation event to all registered listeners - - The newly created logger - - Raises the logger creation event. - - - - - Updates all the parents of the specified logger - - The logger to update the parents for - - - This method loops through all the potential parents of - . There 3 possible cases: - - - - No entry for the potential parent of exists - - We create a ProvisionNode for this potential - parent and insert in that provision node. - - - - The entry is of type Logger for the potential parent. - - The entry is 's nearest existing parent. We - update 's parent field with this entry. We also break from - he loop because updating our parent's parent is our parent's - responsibility. - - - - The entry is of type ProvisionNode for this potential parent. - - We add to the list of children for this - potential parent. - - - - - - - - Replace a with a in the hierarchy. - - - - - - We update the links for all the children that placed themselves - in the provision node 'pn'. The second argument 'log' is a - reference for the newly created Logger, parent of all the - children in 'pn'. - - - We loop on all the children 'c' in 'pn'. - - - If the child 'c' has been already linked to a child of - 'log' then there is no need to update 'c'. - - - Otherwise, we set log's parent field to c's parent and set - c's parent field to log. - - - - - - Define or redefine a Level using the values in the argument - - the level values - - - Define or redefine a Level using the values in the argument - - - Supports setting levels via the configuration file. - - - - - - Set a Property using the values in the argument - - the property value - - - Set a Property using the values in the argument. - - - Supports setting property values via the configuration file. - - - - - - Event used to notify that a logger has been created. - - - - Event raised when a logger is created. - - - - - - Has no appender warning been emitted - - - - Flag to indicate if we have already issued a warning - about not having an appender warning. - - - - - - Get the root of this hierarchy - - - - Get the root of this hierarchy. - - - - - - Gets or sets the default instance. - - The default - - - The logger factory is used to create logger instances. - - - - - - A class to hold the value, name and display name for a level - - - - A class to hold the value, name and display name for a level - - - - - - Override Object.ToString to return sensible debug info - - string info about this object - - - - Value of the level - - - - If the value is not set (defaults to -1) the value will be looked - up for the current level with the same name. - - - - - - Name of the level - - - The name of the level - - - - The name of the level. - - - - - - Display name for the level - - - The display name of the level - - - - The display name of the level. - - - - - - A class to hold the key and data for a property set in the config file - - - - A class to hold the key and data for a property set in the config file - - - - - - Override Object.ToString to return sensible debug info - - string info about this object - - - - Property Key - - - Property Key - - - - Property Key. - - - - - - Property Value - - - Property Value - - - - Property Value. - - - - - - Used internally to accelerate hash table searches. - - - - Internal class used to improve performance of - string keyed hashtables. - - - The hashcode of the string is cached for reuse. - The string is stored as an interned value. - When comparing two objects for equality - the reference equality of the interned strings is compared. - - - Nicko Cadell - Gert Driesen - - - - Construct key with string name - - - - Initializes a new instance of the class - with the specified name. - - - Stores the hashcode of the string and interns - the string key to optimize comparisons. - - - The Compact Framework 1.0 the - method does not work. On the Compact Framework - the string keys are not interned nor are they - compared by reference. - - - The name of the logger. - - - - Returns a hash code for the current instance. - - A hash code for the current instance. - - - Returns the cached hashcode. - - - - - - Determines whether two instances - are equal. - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - - - Compares the references of the interned strings. - - - - - - Provision nodes are used where no logger instance has been specified - - - - instances are used in the - when there is no specified - for that node. - - - A provision node holds a list of child loggers on behalf of - a logger that does not exist. - - - Nicko Cadell - Gert Driesen - - - - Create a new provision node with child node - - A child logger to add to this node. - - - Initializes a new instance of the class - with the specified child logger. - - - - - - The sits at the root of the logger hierarchy tree. - - - - The is a regular except - that it provides several guarantees. - - - First, it cannot be assigned a null - level. Second, since the root logger cannot have a parent, the - property always returns the value of the - level field without walking the hierarchy. - - - Nicko Cadell - Gert Driesen - - - - Construct a - - The level to assign to the root logger. - - - Initializes a new instance of the class with - the specified logging level. - - - The root logger names itself as "root". However, the root - logger cannot be retrieved by name. - - - - - - Gets the assigned level value without walking the logger hierarchy. - - The assigned level value without walking the logger hierarchy. - - - Because the root logger cannot have a parent and its level - must not be null this property just returns the - value of . - - - - - - Gets or sets the assigned for the root logger. - - - The of the root logger. - - - - Setting the level of the root logger to a null reference - may have catastrophic results. We prevent this here. - - - - - - Initializes the log4net environment using an XML DOM. - - - - Configures a using an XML DOM. - - - Nicko Cadell - Gert Driesen - - - - Construct the configurator for a hierarchy - - The hierarchy to build. - - - Initializes a new instance of the class - with the specified . - - - - - - Configure the hierarchy by parsing a DOM tree of XML elements. - - The root element to parse. - - - Configure the hierarchy by parsing a DOM tree of XML elements. - - - - - - Parse appenders by IDREF. - - The appender ref element. - The instance of the appender that the ref refers to. - - - Parse an XML element that represents an appender and return - the appender. - - - - - - Parses an appender element. - - The appender element. - The appender instance or null when parsing failed. - - - Parse an XML element that represents an appender and return - the appender instance. - - - - - - Parses a logger element. - - The logger element. - - - Parse an XML element that represents a logger. - - - - - - Parses the root logger element. - - The root element. - - - Parse an XML element that represents the root logger. - - - - - - Parses the children of a logger element. - - The category element. - The logger instance. - Flag to indicate if the logger is the root logger. - - - Parse the child elements of a <logger> element. - - - - - - Parses an object renderer. - - The renderer element. - - - Parse an XML element that represents a renderer. - - - - - - Parses a level element. - - The level element. - The logger object to set the level on. - Flag to indicate if the logger is the root logger. - - - Parse an XML element that represents a level. - - - - - - Sets a parameter on an object. - - The parameter element. - The object to set the parameter on. - - The parameter name must correspond to a writable property - on the object. The value of the parameter is a string, - therefore this function will attempt to set a string - property first. If unable to set a string property it - will inspect the property and its argument type. It will - attempt to call a static method called Parse on the - type of the property. This method will take a single - string argument and return a value that can be used to - set the property. - - - - - Test if an element has no attributes or child elements - - the element to inspect - true if the element has any attributes or child elements, false otherwise - - - - Test if a is constructible with Activator.CreateInstance. - - the type to inspect - true if the type is creatable using a default constructor, false otherwise - - - - Look for a method on the that matches the supplied - - the type that has the method - the name of the method - the method info found - - - The method must be a public instance method on the . - The method must be named or "Add" followed by . - The method must take a single parameter. - - - - - - Converts a string value to a target type. - - The type of object to convert the string to. - The string value to use as the value of the object. - - - An object of type with value or - null when the conversion could not be performed. - - - - - - Creates an object as specified in XML. - - The XML element that contains the definition of the object. - The object type to use if not explicitly specified. - The type that the returned object must be or must inherit from. - The object or null - - - Parse an XML element and create an object instance based on the configuration - data. - - - The type of the instance may be specified in the XML. If not - specified then the is used - as the type. However the type is specified it must support the - type. - - - - - - key: appenderName, value: appender. - - - - - The Hierarchy being configured. - - - - - Delegate used to handle logger repository shutdown event notifications - - The that is shutting down. - Empty event args - - - Delegate used to handle logger repository shutdown event notifications. - - - - - - Delegate used to handle logger repository configuration reset event notifications - - The that has had its configuration reset. - Empty event args - - - Delegate used to handle logger repository configuration reset event notifications. - - - - - - Delegate used to handle event notifications for logger repository configuration changes. - - The that has had its configuration changed. - Empty event arguments. - - - Delegate used to handle event notifications for logger repository configuration changes. - - - - - - Write the name of the current AppDomain to the output - - - - Write the name of the current AppDomain to the output writer - - - Nicko Cadell - - - - Write the name of the current AppDomain to the output - - the writer to write to - null, state is not set - - - Writes name of the current AppDomain to the output . - - - - - - Write the current date to the output - - - - Date pattern converter, uses a to format - the current date and time to the writer as a string. - - - The value of the determines - the formatting of the date. The following values are allowed: - - - Option value - Output - - - ISO8601 - - Uses the formatter. - Formats using the "yyyy-MM-dd HH:mm:ss,fff" pattern. - - - - DATE - - Uses the formatter. - Formats using the "dd MMM yyyy HH:mm:ss,fff" for example, "06 Nov 1994 15:49:37,459". - - - - ABSOLUTE - - Uses the formatter. - Formats using the "HH:mm:ss,fff" for example, "15:49:37,459". - - - - other - - Any other pattern string uses the formatter. - This formatter passes the pattern string to the - method. - For details on valid patterns see - DateTimeFormatInfo Class. - - - - - - The date and time is in the local time zone and is rendered in that zone. - To output the time in Universal time see . - - - Nicko Cadell - - - - The used to render the date to a string - - - - The used to render the date to a string - - - - - - Initialize the converter options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Write the current date to the output - - that will receive the formatted result. - null, state is not set - - - Pass the current date and time to the - for it to render it to the writer. - - - The date and time passed is in the local time zone. - - - - - - Write an environment variable to the output - - - - Write an environment variable to the output writer. - The value of the determines - the name of the variable to output. - - - Nicko Cadell - - - - Write an environment variable to the output - - the writer to write to - null, state is not set - - - Writes the environment variable to the output . - The name of the environment variable to output must be set - using the - property. - - - - - - Write the current thread identity to the output - - - - Write the current thread identity to the output writer - - - Nicko Cadell - - - - Write the current thread identity to the output - - the writer to write to - null, state is not set - - - Writes the current thread identity to the output . - - - - - - Pattern converter for literal string instances in the pattern - - - - Writes the literal string value specified in the - property to - the output. - - - Nicko Cadell - - - - Set the next converter in the chain - - The next pattern converter in the chain - The next pattern converter - - - Special case the building of the pattern converter chain - for instances. Two adjacent - literals in the pattern can be represented by a single combined - pattern converter. This implementation detects when a - is added to the chain - after this converter and combines its value with this converter's - literal value. - - - - - - Write the literal to the output - - the writer to write to - null, not set - - - Override the formatting behavior to ignore the FormattingInfo - because we have a literal instead. - - - Writes the value of - to the output . - - - - - - Convert this pattern into the rendered message - - that will receive the formatted result. - null, not set - - - This method is not used. - - - - - - Writes a newline to the output - - - - Writes the system dependent line terminator to the output. - This behavior can be overridden by setting the : - - - - Option Value - Output - - - DOS - DOS or Windows line terminator "\r\n" - - - UNIX - UNIX line terminator "\n" - - - - Nicko Cadell - - - - Initialize the converter - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Write the current process ID to the output - - - - Write the current process ID to the output writer - - - Nicko Cadell - - - - Write the current process ID to the output - - the writer to write to - null, state is not set - - - Write the current process ID to the output . - - - - - - Property pattern converter - - - - This pattern converter reads the thread and global properties. - The thread properties take priority over global properties. - See for details of the - thread properties. See for - details of the global properties. - - - If the is specified then that will be used to - lookup a single property. If no is specified - then all properties will be dumped as a list of key value pairs. - - - Nicko Cadell - - - - Write the property value to the output - - that will receive the formatted result. - null, state is not set - - - Writes out the value of a named property. The property name - should be set in the - property. - - - If the is set to null - then all the properties are written as key value pairs. - - - - - - A Pattern converter that generates a string of random characters - - - - The converter generates a string of random characters. By default - the string is length 4. This can be changed by setting the - to the string value of the length required. - - - The random characters in the string are limited to uppercase letters - and numbers only. - - - The random number generator used by this class is not cryptographically secure. - - - Nicko Cadell - - - - Shared random number generator - - - - - Length of random string to generate. Default length 4. - - - - - Initialize the converter options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Write a randoim string to the output - - the writer to write to - null, state is not set - - - Write a randoim string to the output . - - - - - - Write the current threads username to the output - - - - Write the current threads username to the output writer - - - Nicko Cadell - - - - Write the current threads username to the output - - the writer to write to - null, state is not set - - - Write the current threads username to the output . - - - - - - Write the UTC date time to the output - - - - Date pattern converter, uses a to format - the current date and time in Universal time. - - - See the for details on the date pattern syntax. - - - - Nicko Cadell - - - - Write the current date and time to the output - - that will receive the formatted result. - null, state is not set - - - Pass the current date and time to the - for it to render it to the writer. - - - The date is in Universal time when it is rendered. - - - - - - - Type converter for Boolean. - - - - Supports conversion from string to bool type. - - - - - - Nicko Cadell - Gert Driesen - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Returns true if the is - the type. - - - - - - Convert the source object to the type supported by this object - - the object to convert - the converted object - - - Uses the method to convert the - argument to a . - - - - The object cannot be converted to the - target type. To check for this condition use the - method. - - - - - Exception base type for conversion errors. - - - - This type extends . It - does not add any new functionality but does differentiate the - type of exception being thrown. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Constructor - - A message to include with the exception. - - - Initializes a new instance of the class - with the specified message. - - - - - - Constructor - - A message to include with the exception. - A nested exception to include. - - - Initializes a new instance of the class - with the specified message and inner exception. - - - - - - Serialization constructor - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - - - Initializes a new instance of the class - with serialized data. - - - - - - Creates a new instance of the class. - - The conversion destination type. - The value to convert. - An instance of the . - - - Creates a new instance of the class. - - - - - - Creates a new instance of the class. - - The conversion destination type. - The value to convert. - A nested exception to include. - An instance of the . - - - Creates a new instance of the class. - - - - - - Register of type converters for specific types. - - - - Maintains a registry of type converters used to convert between - types. - - - Use the and - methods to register new converters. - The and methods - lookup appropriate converters to use. - - - - - Nicko Cadell - Gert Driesen - - - - Private constructor - - - Initializes a new instance of the class. - - - - - Static constructor. - - - - This constructor defines the intrinsic type converters. - - - - - - Adds a converter for a specific type. - - The type being converted to. - The type converter to use to convert to the destination type. - - - Adds a converter instance for a specific type. - - - - - - Adds a converter for a specific type. - - The type being converted to. - The type of the type converter to use to convert to the destination type. - - - Adds a converter for a specific type. - - - - - - Gets the type converter to use to convert values to the destination type. - - The type being converted from. - The type being converted to. - - The type converter instance to use for type conversions or null - if no type converter is found. - - - - Gets the type converter to use to convert values to the destination type. - - - - - - Gets the type converter to use to convert values to the destination type. - - The type being converted to. - - The type converter instance to use for type conversions or null - if no type converter is found. - - - - Gets the type converter to use to convert values to the destination type. - - - - - - Lookups the type converter to use as specified by the attributes on the - destination type. - - The type being converted to. - - The type converter instance to use for type conversions or null - if no type converter is found. - - - - - Creates the instance of the type converter. - - The type of the type converter. - - The type converter instance to use for type conversions or null - if no type converter is found. - - - - The type specified for the type converter must implement - the or interfaces - and must have a public default (no argument) constructor. - - - - - - Mapping from to type converter. - - - - - Supports conversion from string to type. - - - - Supports conversion from string to type. - - - - - - Nicko Cadell - Gert Driesen - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Returns true if the is - the type. - - - - - - Overrides the ConvertFrom method of IConvertFrom. - - the object to convert to an encoding - the encoding - - - Uses the method to - convert the argument to an . - - - - The object cannot be converted to the - target type. To check for this condition use the - method. - - - - - Interface supported by type converters - - - - This interface supports conversion from a single type to arbitrary types. - See . - - - Nicko Cadell - - - - Returns whether this converter can convert the object to the specified type - - A Type that represents the type you want to convert to - true if the conversion is possible - - - Test if the type supported by this converter can be converted to the - . - - - - - - Converts the given value object to the specified type, using the arguments - - the object to convert - The Type to convert the value parameter to - the converted object - - - Converts the (which must be of the type supported - by this converter) to the specified.. - - - - - - Supports conversion from string to type. - - - - Supports conversion from string to type. - - - - - Nicko Cadell - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Returns true if the is - the type. - - - - - - Overrides the ConvertFrom method of IConvertFrom. - - the object to convert to an IPAddress - the IPAddress - - - Uses the method to convert the - argument to an . - If that fails then the string is resolved as a DNS hostname. - - - - The object cannot be converted to the - target type. To check for this condition use the - method. - - - - - Valid characters in an IPv4 or IPv6 address string. (Does not support subnets) - - - - - Supports conversion from string to type. - - - - Supports conversion from string to type. - - - The string is used as the - of the . - - - - - - Nicko Cadell - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Returns true if the is - the type. - - - - - - Overrides the ConvertFrom method of IConvertFrom. - - the object to convert to a PatternLayout - the PatternLayout - - - Creates and returns a new using - the as the - . - - - - The object cannot be converted to the - target type. To check for this condition use the - method. - - - - - Convert between string and - - - - Supports conversion from string to type, - and from a type to a string. - - - The string is used as the - of the . - - - - - - Nicko Cadell - - - - Can the target type be converted to the type supported by this object - - A that represents the type you want to convert to - true if the conversion is possible - - - Returns true if the is - assignable from a type. - - - - - - Converts the given value object to the specified type, using the arguments - - the object to convert - The Type to convert the value parameter to - the converted object - - - Uses the method to convert the - argument to a . - - - - The object cannot be converted to the - . To check for this condition use the - method. - - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Returns true if the is - the type. - - - - - - Overrides the ConvertFrom method of IConvertFrom. - - the object to convert to a PatternString - the PatternString - - - Creates and returns a new using - the as the - . - - - - The object cannot be converted to the - target type. To check for this condition use the - method. - - - - - Supports conversion from string to type. - - - - Supports conversion from string to type. - - - - - - Nicko Cadell - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Returns true if the is - the type. - - - - - - Overrides the ConvertFrom method of IConvertFrom. - - the object to convert to a Type - the Type - - - Uses the method to convert the - argument to a . - Additional effort is made to locate partially specified types - by searching the loaded assemblies. - - - - The object cannot be converted to the - target type. To check for this condition use the - method. - - - - - Attribute used to associate a type converter - - - - Class and Interface level attribute that specifies a type converter - to use with the associated type. - - - To associate a type converter with a target type apply a - TypeConverterAttribute to the target type. Specify the - type of the type converter on the attribute. - - - Nicko Cadell - Gert Driesen - - - - The string type name of the type converter - - - - - Default constructor - - - - Default constructor - - - - - - Create a new type converter attribute for the specified type name - - The string type name of the type converter - - - The type specified must implement the - or the interfaces. - - - - - - Create a new type converter attribute for the specified type - - The type of the type converter - - - The type specified must implement the - or the interfaces. - - - - - - The string type name of the type converter - - - The string type name of the type converter - - - - The type specified must implement the - or the interfaces. - - - - - - A straightforward implementation of the interface. - - - - This is the default implementation of the - interface. Implementors of the interface - should aggregate an instance of this type. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Append on on all attached appenders. - - The event being logged. - The number of appenders called. - - - Calls the method on all - attached appenders. - - - - - - Append on on all attached appenders. - - The array of events being logged. - The number of appenders called. - - - Calls the method on all - attached appenders. - - - - - - Calls the DoAppende method on the with - the objects supplied. - - The appender - The events - - - If the supports the - interface then the will be passed - through using that interface. Otherwise the - objects in the array will be passed one at a time. - - - - - - Attaches an appender. - - The appender to add. - - - If the appender is already in the list it won't be added again. - - - - - - Gets an attached appender with the specified name. - - The name of the appender to get. - - The appender with the name specified, or null if no appender with the - specified name is found. - - - - Lookup an attached appender by name. - - - - - - Removes all attached appenders. - - - - Removes and closes all attached appenders - - - - - - Removes the specified appender from the list of attached appenders. - - The appender to remove. - The appender removed from the list - - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - - Removes the appender with the specified name from the list of appenders. - - The name of the appender to remove. - The appender removed from the list - - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - - List of appenders - - - - - Array of appenders, used to cache the m_appenderList - - - - - Gets all attached appenders. - - - A collection of attached appenders, or null if there - are no attached appenders. - - - - The read only collection of all currently attached appenders. - - - - - - This class aggregates several PropertiesDictionary collections together. - - - - Provides a dictionary style lookup over an ordered list of - collections. - - - Nicko Cadell - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Add a Properties Dictionary to this composite collection - - the properties to add - - - Properties dictionaries added first take precedence over dictionaries added - later. - - - - - - Flatten this composite collection into a single properties dictionary - - the flattened dictionary - - - Reduces the collection of ordered dictionaries to a single dictionary - containing the resultant values for the keys. - - - - - - Gets the value of a property - - - The value for the property with the specified key - - - - Looks up the value for the specified. - The collections are searched - in the order in which they were added to this collection. The value - returned is the value held by the first collection that contains - the specified key. - - - If none of the collections contain the specified key then - null is returned. - - - - - - Base class for Context Properties implementations - - - - This class defines a basic property get set accessor - - - 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 - - - - - - Subclass of that maintains a count of - the number of bytes written. - - - - This writer counts the number of bytes written. - - - Nicko Cadell - Gert Driesen - - - - that does not leak exceptions - - - - does not throw exceptions when things go wrong. - Instead, it delegates error handling to its . - - - Nicko Cadell - Gert Driesen - - - - Adapter that extends and forwards all - messages to an instance of . - - - - Adapter that extends and forwards all - messages to an instance of . - - - Nicko Cadell - - - - The writer to forward messages to - - - - - Create an instance of that forwards all - messages to a . - - The to forward to - - - Create an instance of that forwards all - messages to a . - - - - - - Closes the writer and releases any system resources associated with the writer - - - - - - - - - Dispose this writer - - flag indicating if we are being disposed - - - Dispose this writer - - - - - - Flushes any buffered output - - - - Clears all buffers for the writer and causes any buffered data to be written - to the underlying device - - - - - - Writes a character to the wrapped TextWriter - - the value to write to the TextWriter - - - Writes a character to the wrapped TextWriter - - - - - - Writes a character buffer to the wrapped TextWriter - - the data buffer - the start index - the number of characters to write - - - Writes a character buffer to the wrapped TextWriter - - - - - - Writes a string to the wrapped TextWriter - - the value to write to the TextWriter - - - Writes a string to the wrapped TextWriter - - - - - - Gets or sets the underlying . - - - The underlying . - - - - Gets or sets the underlying . - - - - - - The Encoding in which the output is written - - - The - - - - The Encoding in which the output is written - - - - - - Gets an object that controls formatting - - - The format provider - - - - Gets an object that controls formatting - - - - - - Gets or sets the line terminator string used by the TextWriter - - - The line terminator to use - - - - Gets or sets the line terminator string used by the TextWriter - - - - - - Constructor - - the writer to actually write to - the error handler to report error to - - - Create a new QuietTextWriter using a writer and error handler - - - - - - Writes a character to the underlying writer - - the char to write - - - Writes a character to the underlying writer - - - - - - Writes a buffer to the underlying writer - - the buffer to write - the start index to write from - the number of characters to write - - - Writes a buffer to the underlying writer - - - - - - Writes a string to the output. - - The string data to write to the output. - - - Writes a string to the output. - - - - - - Closes the underlying output writer. - - - - Closes the underlying output writer. - - - - - - The error handler instance to pass all errors to - - - - - Flag to indicate if this writer is closed - - - - - Gets or sets the error handler that all errors are passed to. - - - The error handler that all errors are passed to. - - - - Gets or sets the error handler that all errors are passed to. - - - - - - Gets a value indicating whether this writer is closed. - - - true if this writer is closed, otherwise false. - - - - Gets a value indicating whether this writer is closed. - - - - - - Constructor - - The to actually write to. - The to report errors to. - - - Creates a new instance of the class - with the specified and . - - - - - - Writes a character to the underlying writer and counts the number of bytes written. - - the char to write - - - Overrides implementation of . Counts - the number of bytes written. - - - - - - Writes a buffer to the underlying writer and counts the number of bytes written. - - the buffer to write - the start index to write from - the number of characters to write - - - Overrides implementation of . Counts - the number of bytes written. - - - - - - Writes a string to the output and counts the number of bytes written. - - The string data to write to the output. - - - Overrides implementation of . Counts - the number of bytes written. - - - - - - Total number of bytes written. - - - - - Gets or sets the total number of bytes written. - - - The total number of bytes written. - - - - Gets or sets the total number of bytes written. - - - - - - A fixed size rolling buffer of logging events. - - - - An array backed fixed size leaky bucket. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - The maximum number of logging events in the buffer. - - - Initializes a new instance of the class with - the specified maximum number of buffered logging events. - - - The argument is not a positive integer. - - - - Appends a to the buffer. - - The event to append to the buffer. - The event discarded from the buffer, if the buffer is full, otherwise null. - - - Append an event to the buffer. If the buffer still contains free space then - null is returned. If the buffer is full then an event will be dropped - to make space for the new event, the event dropped is returned. - - - - - - Get and remove the oldest event in the buffer. - - The oldest logging event in the buffer - - - Gets the oldest (first) logging event in the buffer and removes it - from the buffer. - - - - - - Pops all the logging events from the buffer into an array. - - An array of all the logging events in the buffer. - - - Get all the events in the buffer and clear the buffer. - - - - - - Clear the buffer - - - - Clear the buffer of all events. The events in the buffer are lost. - - - - - - Gets the th oldest event currently in the buffer. - - The th oldest event currently in the buffer. - - - If is outside the range 0 to the number of events - currently in the buffer, then null is returned. - - - - - - Gets the maximum size of the buffer. - - The maximum size of the buffer. - - - Gets the maximum size of the buffer - - - - - - Gets the number of logging events in the buffer. - - The number of logging events in the buffer. - - - This number is guaranteed to be in the range 0 to - (inclusive). - - - - - - An always empty . - - - - A singleton implementation of the - interface that always represents an empty collection. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to enforce the singleton pattern. - - - - - - Copies the elements of the to an - , starting at a particular Array index. - - The one-dimensional - that is the destination of the elements copied from - . The Array must have zero-based - indexing. - The zero-based index in array at which - copying begins. - - - As the collection is empty no values are copied into the array. - - - - - - Returns an enumerator that can iterate through a collection. - - - An that can be used to - iterate through the collection. - - - - As the collection is empty a is returned. - - - - - - The singleton instance of the empty collection. - - - - - Gets the singleton instance of the empty collection. - - The singleton instance of the empty collection. - - - Gets the singleton instance of the empty collection. - - - - - - Gets a value indicating if access to the is synchronized (thread-safe). - - - true if access to the is synchronized (thread-safe); otherwise, false. - - - - For the this property is always true. - - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - As the collection is empty the is always 0. - - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - As the collection is empty and thread safe and synchronized this instance is also - the object. - - - - - - An always empty . - - - - A singleton implementation of the - interface that always represents an empty collection. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to enforce the singleton pattern. - - - - - - Copies the elements of the to an - , starting at a particular Array index. - - The one-dimensional - that is the destination of the elements copied from - . The Array must have zero-based - indexing. - The zero-based index in array at which - copying begins. - - - As the collection is empty no values are copied into the array. - - - - - - Returns an enumerator that can iterate through a collection. - - - An that can be used to - iterate through the collection. - - - - As the collection is empty a is returned. - - - - - - Adds an element with the provided key and value to the - . - - The to use as the key of the element to add. - The to use as the value of the element to add. - - - As the collection is empty no new values can be added. A - is thrown if this method is called. - - - This dictionary is always empty and cannot be modified. - - - - Removes all elements from the . - - - - As the collection is empty no values can be removed. A - is thrown if this method is called. - - - This dictionary is always empty and cannot be modified. - - - - Determines whether the contains an element - with the specified key. - - The key to locate in the . - false - - - As the collection is empty the method always returns false. - - - - - - Returns an enumerator that can iterate through a collection. - - - An that can be used to - iterate through the collection. - - - - As the collection is empty a is returned. - - - - - - Removes the element with the specified key from the . - - The key of the element to remove. - - - As the collection is empty no values can be removed. A - is thrown if this method is called. - - - This dictionary is always empty and cannot be modified. - - - - The singleton instance of the empty dictionary. - - - - - Gets the singleton instance of the . - - The singleton instance of the . - - - Gets the singleton instance of the . - - - - - - Gets a value indicating if access to the is synchronized (thread-safe). - - - true if access to the is synchronized (thread-safe); otherwise, false. - - - - For the this property is always true. - - - - - - Gets the number of elements contained in the - - - The number of elements contained in the . - - - - As the collection is empty the is always 0. - - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - As the collection is empty and thread safe and synchronized this instance is also - the object. - - - - - - Gets a value indicating whether the has a fixed size. - - true - - - As the collection is empty always returns true. - - - - - - Gets a value indicating whether the is read-only. - - true - - - As the collection is empty always returns true. - - - - - - Gets an containing the keys of the . - - An containing the keys of the . - - - As the collection is empty a is returned. - - - - - - Gets an containing the values of the . - - An containing the values of the . - - - As the collection is empty a is returned. - - - - - - Gets or sets the element with the specified key. - - The key of the element to get or set. - null - - - As the collection is empty no values can be looked up or stored. - If the index getter is called then null is returned. - A is thrown if the setter is called. - - - This dictionary is always empty and cannot be modified. - - - - Contain the information obtained when parsing formatting modifiers - in conversion modifiers. - - - - Holds the formatting information extracted from the format string by - the . This is used by the - objects when rendering the output. - - - Nicko Cadell - Gert Driesen - - - - Defaut Constructor - - - - Initializes a new instance of the class. - - - - - - Constructor - - - - Initializes a new instance of the class - with the specified parameters. - - - - - - Gets or sets the minimum value. - - - The minimum value. - - - - Gets or sets the minimum value. - - - - - - Gets or sets the maximum value. - - - The maximum value. - - - - Gets or sets the maximum value. - - - - - - Gets or sets a flag indicating whether left align is enabled - or not. - - - A flag indicating whether left align is enabled or not. - - - - Gets or sets a flag indicating whether left align is enabled or not. - - - - - - Implementation of Properties collection for the - - - - This class implements a properties collection that is thread safe and supports both - storing properties and capturing a read only copy of the current propertied. - - - This class is optimized to the scenario where the properties are read frequently - and are modified infrequently. - - - Nicko Cadell - - - - The read only copy of the properties. - - - - This variable is declared volatile to prevent the compiler and JIT from - reordering reads and writes of this thread performed on different threads. - - - - - - Lock object used to synchronize updates within this instance - - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Remove a property from the global context - - the key for the entry to remove - - - Removing an entry from the global context properties is relatively expensive compared - with reading a value. - - - - - - Clear the global context properties - - - - - Get a readonly immutable copy of the properties - - the current global context properties - - - This implementation is fast because the GlobalContextProperties class - stores a readonly copy of the properties. - - - - - - Gets or sets the value of a property - - - The value for the property with the specified key - - - - Reading the value for a key is faster than setting the value. - When the value is written a new read only copy of - the properties is created. - - - - - - Manages a mapping from levels to - - - - Manages an ordered mapping from instances - to subclasses. - - - Nicko Cadell - - - - Default constructor - - - - Initialise a new instance of . - - - - - - Add a to this mapping - - the entry to add - - - If a has previously been added - for the same then that entry will be - overwritten. - - - - - - Lookup the mapping for the specified level - - the level to lookup - the for the level or null if no mapping found - - - Lookup the value for the specified level. Finds the nearest - mapping value for the level that is equal to or less than the - specified. - - - If no mapping could be found then null is returned. - - - - - - Initialize options - - - - Caches the sorted list of in an array - - - - - - Implementation of Properties collection for the - - - - Class implements a collection of properties that is specific to each thread. - The class is not synchronized as each thread has its own . - - - Nicko Cadell - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Remove a property - - the key for the entry to remove - - - Remove the value for the specified from the context. - - - - - - Clear all the context properties - - - - Clear all the context properties - - - - - - Get the PropertiesDictionary stored in the LocalDataStoreSlot for this thread. - - create the dictionary if it does not exist, otherwise return null if is does not exist - the properties for this thread - - - The collection returned is only to be used on the calling thread. If the - caller needs to share the collection between different threads then the - caller must clone the collection before doings so. - - - - - - Gets or sets the value of a property - - - The value for the property with the specified key - - - - Get or set the property value for the specified. - - - - - - Outputs log statements from within the log4net assembly. - - - - Log4net components cannot make log4net logging calls. However, it is - sometimes useful for the user to learn about what log4net is - doing. - - - All log4net internal debug calls go to the standard output stream - whereas internal error messages are sent to the standard error output - stream. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to prevent instantiation of this class. - - - - - - Static constructor that initializes logging by reading - settings from the application configuration file. - - - - The log4net.Internal.Debug application setting - controls internal debugging. This setting should be set - to true to enable debugging. - - - The log4net.Internal.Quiet application setting - suppresses all internal logging including error messages. - This setting should be set to true to enable message - suppression. - - - - - - Writes log4net internal debug messages to the - standard output stream. - - The message to log. - - - All internal debug messages are prepended with - the string "log4net: ". - - - - - - Writes log4net internal debug messages to the - standard output stream. - - The message to log. - An exception to log. - - - All internal debug messages are prepended with - the string "log4net: ". - - - - - - Writes log4net internal warning messages to the - standard error stream. - - The message to log. - - - All internal warning messages are prepended with - the string "log4net:WARN ". - - - - - - Writes log4net internal warning messages to the - standard error stream. - - The message to log. - An exception to log. - - - All internal warning messages are prepended with - the string "log4net:WARN ". - - - - - - Writes log4net internal error messages to the - standard error stream. - - The message to log. - - - All internal error messages are prepended with - the string "log4net:ERROR ". - - - - - - Writes log4net internal error messages to the - standard error stream. - - The message to log. - An exception to log. - - - All internal debug messages are prepended with - the string "log4net:ERROR ". - - - - - - Writes output to the standard output stream. - - The message to log. - - - Writes to both Console.Out and System.Diagnostics.Trace. - Note that the System.Diagnostics.Trace is not supported - on the Compact Framework. - - - If the AppDomain is not configured with a config file then - the call to System.Diagnostics.Trace may fail. This is only - an issue if you are programmatically creating your own AppDomains. - - - - - - Writes output to the standard error stream. - - The message to log. - - - Writes to both Console.Error and System.Diagnostics.Trace. - Note that the System.Diagnostics.Trace is not supported - on the Compact Framework. - - - If the AppDomain is not configured with a config file then - the call to System.Diagnostics.Trace may fail. This is only - an issue if you are programmatically creating your own AppDomains. - - - - - - Default debug level - - - - - In quietMode not even errors generate any output. - - - - - Gets or sets a value indicating whether log4net internal logging - is enabled or disabled. - - - true if log4net internal logging is enabled, otherwise - false. - - - - When set to true, internal debug level logging will be - displayed. - - - This value can be set by setting the application setting - log4net.Internal.Debug in the application configuration - file. - - - The default value is false, i.e. debugging is - disabled. - - - - - The following example enables internal debugging using the - application configuration file : - - - - - - - - - - - - - Gets or sets a value indicating whether log4net should generate no output - from internal logging, not even for errors. - - - true if log4net should generate no output at all from internal - logging, otherwise false. - - - - When set to true will cause internal logging at all levels to be - suppressed. This means that no warning or error reports will be logged. - This option overrides the setting and - disables all debug also. - - This value can be set by setting the application setting - log4net.Internal.Quiet in the application configuration file. - - - The default value is false, i.e. internal logging is not - disabled. - - - - The following example disables internal logging using the - application configuration file : - - - - - - - - - - - - Test if LogLog.Debug is enabled for output. - - - true if Debug is enabled - - - - Test if LogLog.Debug is enabled for output. - - - - - - Test if LogLog.Warn is enabled for output. - - - true if Warn is enabled - - - - Test if LogLog.Warn is enabled for output. - - - - - - Test if LogLog.Error is enabled for output. - - - true if Error is enabled - - - - Test if LogLog.Error is enabled for output. - - - - - - Represents a native error code and message. - - - - Represents a Win32 platform native error. - - - Nicko Cadell - Gert Driesen - - - - Create an instance of the class with the specified - error number and message. - - The number of the native error. - The message of the native error. - - - Create an instance of the class with the specified - error number and message. - - - - - - Create a new instance of the class for the last Windows error. - - - An instance of the class for the last windows error. - - - - The message for the error number is lookup up using the - native Win32 FormatMessage function. - - - - - - Create a new instance of the class. - - the error number for the native error - - An instance of the class for the specified - error number. - - - - The message for the specified error number is lookup up using the - native Win32 FormatMessage function. - - - - - - Retrieves the message corresponding with a Win32 message identifier. - - Message identifier for the requested message. - - The message corresponding with the specified message identifier. - - - - The message will be searched for in system message-table resource(s) - using the native FormatMessage function. - - - - - - Return error information string - - error information string - - - Return error information string - - - - - - Formats a message string. - - Formatting options, and how to interpret the parameter. - Location of the message definition. - Message identifier for the requested message. - Language identifier for the requested message. - If includes FORMAT_MESSAGE_ALLOCATE_BUFFER, the function allocates a buffer using the LocalAlloc function, and places the pointer to the buffer at the address specified in . - If the FORMAT_MESSAGE_ALLOCATE_BUFFER flag is not set, this parameter specifies the maximum number of TCHARs that can be stored in the output buffer. If FORMAT_MESSAGE_ALLOCATE_BUFFER is set, this parameter specifies the minimum number of TCHARs to allocate for an output buffer. - Pointer to an array of values that are used as insert values in the formatted message. - - - The function requires a message definition as input. The message definition can come from a - buffer passed into the function. It can come from a message table resource in an - already-loaded module. Or the caller can ask the function to search the system's message - table resource(s) for the message definition. The function finds the message definition - in a message table resource based on a message identifier and a language identifier. - The function copies the formatted message text to an output buffer, processing any embedded - insert sequences if requested. - - - To prevent the usage of unsafe code, this stub does not support inserting values in the formatted message. - - - - - If the function succeeds, the return value is the number of TCHARs stored in the output - buffer, excluding the terminating null character. - - - If the function fails, the return value is zero. To get extended error information, - call . - - - - - - Gets the number of the native error. - - - The number of the native error. - - - - Gets the number of the native error. - - - - - - Gets the message of the native error. - - - The message of the native error. - - - - - Gets the message of the native error. - - - - - An always empty . - - - - A singleton implementation of the over a collection - that is empty and not modifiable. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to enforce the singleton pattern. - - - - - - Test if the enumerator can advance, if so advance. - - false as the cannot advance. - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will always return false. - - - - - - Resets the enumerator back to the start. - - - - As the enumerator is over an empty collection does nothing. - - - - - - The singleton instance of the . - - - - - Gets the singleton instance of the . - - The singleton instance of the . - - - Gets the singleton instance of the . - - - - - - Gets the current object from the enumerator. - - - Throws an because the - never has a current value. - - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will throw an . - - - The collection is empty and - cannot be positioned over a valid location. - - - - Gets the current key from the enumerator. - - - Throws an exception because the - never has a current value. - - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will throw an . - - - The collection is empty and - cannot be positioned over a valid location. - - - - Gets the current value from the enumerator. - - The current value from the enumerator. - - Throws an because the - never has a current value. - - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will throw an . - - - The collection is empty and - cannot be positioned over a valid location. - - - - Gets the current entry from the enumerator. - - - Throws an because the - never has a current entry. - - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will throw an . - - - The collection is empty and - cannot be positioned over a valid location. - - - - An always empty . - - - - A singleton implementation of the over a collection - that is empty and not modifiable. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to enforce the singleton pattern. - - - - - - Test if the enumerator can advance, if so advance - - false as the cannot advance. - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will always return false. - - - - - - Resets the enumerator back to the start. - - - - As the enumerator is over an empty collection does nothing. - - - - - - The singleton instance of the . - - - - - Get the singleton instance of the . - - The singleton instance of the . - - - Gets the singleton instance of the . - - - - - - Gets the current object from the enumerator. - - - Throws an because the - never has a current value. - - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will throw an . - - - The collection is empty and - cannot be positioned over a valid location. - - - - A SecurityContext used when a SecurityContext is not required - - - - The is a no-op implementation of the - base class. It is used where a - is required but one has not been provided. - - - Nicko Cadell - - - - Singleton instance of - - - - Singleton instance of - - - - - - Private constructor - - - - Private constructor for singleton pattern. - - - - - - Impersonate this SecurityContext - - State supplied by the caller - null - - - No impersonation is done and null is always returned. - - - - - - Implements log4net's default error handling policy which consists - of emitting a message for the first error in an appender and - ignoring all subsequent errors. - - - - The error message is printed on the standard error output stream. - - - This policy aims at protecting an otherwise working application - from being flooded with error messages when logging fails. - - - Nicko Cadell - Gert Driesen - - - - Default Constructor - - - - Initializes a new instance of the class. - - - - - - Constructor - - The prefix to use for each message. - - - Initializes a new instance of the class - with the specified prefix. - - - - - - Log an Error - - The error message. - The exception. - The internal error code. - - - Prints the message and the stack trace of the exception on the standard - error output stream. - - - - - - Log an Error - - The error message. - The exception. - - - Prints the message and the stack trace of the exception on the standard - error output stream. - - - - - - Log an error - - The error message. - - - Print a the error message passed as parameter on the standard - error output stream. - - - - - - Flag to indicate if it is the first error - - - - - String to prefix each message with - - - - - Is error logging enabled - - - - Is error logging enabled. Logging is only enabled for the - first error delivered to the . - - - - - - A convenience class to convert property values to specific types. - - - - Utility functions for converting types and parsing values. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to prevent instantiation of this class. - - - - - - Converts a string to a value. - - String to convert. - The default value. - The value of . - - - If is "true", then true is returned. - If is "false", then false is returned. - Otherwise, is returned. - - - - - - Parses a file size into a number. - - String to parse. - The default value. - The value of . - - - Parses a file size of the form: number[KB|MB|GB] into a - long value. It is scaled with the appropriate multiplier. - - - is returned when - cannot be converted to a value. - - - - - - Converts a string to an object. - - The target type to convert to. - The string to convert to an object. - - The object converted from a string or null when the - conversion failed. - - - - Converts a string to an object. Uses the converter registry to try - to convert the string value into the specified target type. - - - - - - Checks if there is an appropriate type conversion from the source type to the target type. - - The type to convert from. - The type to convert to. - true if there is a conversion from the source type to the target type. - - Checks if there is an appropriate type conversion from the source type to the target type. - - - - - - - Converts an object to the target type. - - The object to convert to the target type. - The type to convert to. - The converted object. - - - Converts an object to the target type. - - - - - - Instantiates an object given a class name. - - The fully qualified class name of the object to instantiate. - The class to which the new object should belong. - The object to return in case of non-fulfillment. - - An instance of the or - if the object could not be instantiated. - - - - Checks that the is a subclass of - . If that test fails or the object could - not be instantiated, then is returned. - - - - - - Performs variable substitution in string from the - values of keys found in . - - The string on which variable substitution is performed. - The dictionary to use to lookup variables. - The result of the substitutions. - - - The variable substitution delimiters are ${ and }. - - - For example, if props contains key=value, then the call - - - - string s = OptionConverter.SubstituteVariables("Value of key is ${key}."); - - - - will set the variable s to "Value of key is value.". - - - If no value could be found for the specified key, then substitution - defaults to an empty string. - - - For example, if system properties contains no value for the key - "nonExistentKey", then the call - - - - string s = OptionConverter.SubstituteVariables("Value of nonExistentKey is [${nonExistentKey}]"); - - - - will set s to "Value of nonExistentKey is []". - - - An Exception is thrown if contains a start - delimiter "${" which is not balanced by a stop delimiter "}". - - - - - - Converts the string representation of the name or numeric value of one or - more enumerated constants to an equivalent enumerated object. - - The type to convert to. - The enum string value. - If true, ignore case; otherwise, regard case. - An object of type whose value is represented by . - - - - Most of the work of the class - is delegated to the PatternParser class. - - - - The PatternParser processes a pattern string and - returns a chain of objects. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - The pattern to parse. - - - Initializes a new instance of the class - with the specified pattern string. - - - - - - Parses the pattern into a chain of pattern converters. - - The head of a chain of pattern converters. - - - Parses the pattern into a chain of pattern converters. - - - - - - Build the unified cache of converters from the static and instance maps - - the list of all the converter names - - - Build the unified cache of converters from the static and instance maps - - - - - - Internal method to parse the specified pattern to find specified matches - - the pattern to parse - the converter names to match in the pattern - - - The matches param must be sorted such that longer strings come before shorter ones. - - - - - - Process a parsed literal - - the literal text - - - - Process a parsed converter pattern - - the name of the converter - the optional option for the converter - the formatting info for the converter - - - - Resets the internal state of the parser and adds the specified pattern converter - to the chain. - - The pattern converter to add. - - - - The first pattern converter in the chain - - - - - the last pattern converter in the chain - - - - - The pattern - - - - - Internal map of converter identifiers to converter types - - - - This map overrides the static s_globalRulesRegistry map. - - - - - - Get the converter registry used by this parser - - - The converter registry used by this parser - - - - Get the converter registry used by this parser - - - - - - Sort strings by length - - - - that orders strings by string length. - The longest strings are placed first - - - - - - This class implements a patterned string. - - - - This string has embedded patterns that are resolved and expanded - when the string is formatted. - - - This class functions similarly to the - in that it accepts a pattern and renders it to a string. Unlike the - however the PatternString - does not render the properties of a specific but - of the process in general. - - - The recognized conversion pattern names are: - - - - Conversion Pattern Name - Effect - - - appdomain - - - Used to output the friendly name of the current AppDomain. - - - - - date - - - Used to output the date of the logging event in the local time zone. - To output the date in universal time use the %utcdate pattern. - The date conversion - specifier may be followed by a date format specifier enclosed - between braces. For example, %date{HH:mm:ss,fff} or - %date{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is - given then ISO8601 format is - assumed (). - - - The date format specifier admits the same syntax as the - time pattern string of the . - - - For better results it is recommended to use the log4net date - formatters. These can be specified using one of the strings - "ABSOLUTE", "DATE" and "ISO8601" for specifying - , - and respectively - . For example, - %date{ISO8601} or %date{ABSOLUTE}. - - - These dedicated date formatters perform significantly - better than . - - - - - env - - - Used to output the a specific environment variable. The key to - lookup must be specified within braces and directly following the - pattern specifier, e.g. %env{COMPUTERNAME} would include the value - of the COMPUTERNAME environment variable. - - - The env pattern is not supported on the .NET Compact Framework. - - - - - identity - - - Used to output the user name for the currently active user - (Principal.Identity.Name). - - - - - newline - - - Outputs the platform dependent line separator character or - characters. - - - This conversion pattern name offers the same performance as using - non-portable line separator strings such as "\n", or "\r\n". - Thus, it is the preferred way of specifying a line separator. - - - - - processid - - - Used to output the system process ID for the current process. - - - - - property - - - Used to output a specific context property. The key to - lookup must be specified within braces and directly following the - pattern specifier, e.g. %property{user} would include the value - from the property that is keyed by the string 'user'. Each property value - that is to be included in the log must be specified separately. - Properties are stored in logging contexts. By default - the log4net:HostName property is set to the name of machine on - which the event was originally logged. - - - If no key is specified, e.g. %property then all the keys and their - values are printed in a comma separated list. - - - The properties of an event are combined from a number of different - contexts. These are listed below in the order in which they are searched. - - - - the thread properties - - The that are set on the current - thread. These properties are shared by all events logged on this thread. - - - - the global properties - - The that are set globally. These - properties are shared by all the threads in the AppDomain. - - - - - - - random - - - Used to output a random string of characters. The string is made up of - uppercase letters and numbers. By default the string is 4 characters long. - The length of the string can be specified within braces directly following the - pattern specifier, e.g. %random{8} would output an 8 character string. - - - - - username - - - Used to output the WindowsIdentity for the currently - active user. - - - - - utcdate - - - Used to output the date of the logging event in universal time. - The date conversion - specifier may be followed by a date format specifier enclosed - between braces. For example, %utcdate{HH:mm:ss,fff} or - %utcdate{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is - given then ISO8601 format is - assumed (). - - - The date format specifier admits the same syntax as the - time pattern string of the . - - - For better results it is recommended to use the log4net date - formatters. These can be specified using one of the strings - "ABSOLUTE", "DATE" and "ISO8601" for specifying - , - and respectively - . For example, - %utcdate{ISO8601} or %utcdate{ABSOLUTE}. - - - These dedicated date formatters perform significantly - better than . - - - - - % - - - The sequence %% outputs a single percent sign. - - - - - - Additional pattern converters may be registered with a specific - instance using or - . - - - See the for details on the - format modifiers supported by the patterns. - - - Nicko Cadell - - - - Internal map of converter identifiers to converter types. - - - - - the pattern - - - - - the head of the pattern converter chain - - - - - patterns defined on this PatternString only - - - - - Initialize the global registry - - - - - Default constructor - - - - Initialize a new instance of - - - - - - Constructs a PatternString - - The pattern to use with this PatternString - - - Initialize a new instance of with the pattern specified. - - - - - - Initialize object options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Create the used to parse the pattern - - the pattern to parse - The - - - Returns PatternParser used to parse the conversion string. Subclasses - may override this to return a subclass of PatternParser which recognize - custom conversion pattern name. - - - - - - Produces a formatted string as specified by the conversion pattern. - - The TextWriter to write the formatted event to - - - Format the pattern to the . - - - - - - Format the pattern as a string - - the pattern formatted as a string - - - Format the pattern to a string. - - - - - - Add a converter to this PatternString - - the converter info - - - This version of the method is used by the configurator. - Programmatic users should use the alternative method. - - - - - - Add a converter to this PatternString - - the name of the conversion pattern for this converter - the type of the converter - - - Add a converter to this PatternString - - - - - - Gets or sets the pattern formatting string - - - The pattern formatting string - - - - The ConversionPattern option. This is the string which - controls formatting and consists of a mix of literal content and - conversion specifiers. - - - - - - Wrapper class used to map converter names to converter types - - - - Wrapper class used to map converter names to converter types - - - - - - default constructor - - - - - Gets or sets the name of the conversion pattern - - - The name of the conversion pattern - - - - Gets or sets the name of the conversion pattern - - - - - - Gets or sets the type of the converter - - - The type of the converter - - - - Gets or sets the type of the converter - - - - - - String keyed object map. - - - - While this collection is serializable only member - objects that are serializable will - be serialized along with this collection. - - - Nicko Cadell - Gert Driesen - - - - String keyed object map that is read only. - - - - This collection is readonly and cannot be modified. - - - While this collection is serializable only member - objects that are serializable will - be serialized along with this collection. - - - Nicko Cadell - Gert Driesen - - - - The Hashtable used to store the properties data - - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Copy Constructor - - properties to copy - - - Initializes a new instance of the class. - - - - - - Deserialization constructor - - The that holds the serialized object data. - The that contains contextual information about the source or destination. - - - Initializes a new instance of the class - with serialized data. - - - - - - Gets the key names. - - An array of all the keys. - - - Gets the key names. - - - - - - Test if the dictionary contains a specified key - - the key to look for - true if the dictionary contains the specified key - - - Test if the dictionary contains a specified key - - - - - - Serializes this object into the provided. - - The to populate with data. - The destination for this serialization. - - - Serializes this object into the provided. - - - - - - See - - - - - See - - - - - - See - - - - - - - Remove all properties from the properties collection - - - - - See - - - - - - - See - - - - - - - See - - - - - Gets or sets the value of the property with the specified key. - - - The value of the property with the specified key. - - The key of the property to get or set. - - - The property value will only be serialized if it is serializable. - If it cannot be serialized it will be silently ignored if - a serialization operation is performed. - - - - - - The hashtable used to store the properties - - - The internal collection used to store the properties - - - - The hashtable used to store the properties - - - - - - See - - - - - See - - - - - See - - - - - See - - - - - See - - - - - See - - - - - The number of properties in this collection - - - - - See - - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Constructor - - properties to copy - - - Initializes a new instance of the class. - - - - - - Initializes a new instance of the class - with serialized data. - - The that holds the serialized object data. - The that contains contextual information about the source or destination. - - - Because this class is sealed the serialization constructor is private. - - - - - - Remove the entry with the specified key from this dictionary - - the key for the entry to remove - - - Remove the entry with the specified key from this dictionary - - - - - - See - - an enumerator - - - Returns a over the contest of this collection. - - - - - - See - - the key to remove - - - Remove the entry with the specified key from this dictionary - - - - - - See - - the key to lookup in the collection - true if the collection contains the specified key - - - Test if this collection contains a specified key. - - - - - - Remove all properties from the properties collection - - - - Remove all properties from the properties collection - - - - - - See - - the key - the value to store for the key - - - Store a value for the specified . - - - Thrown if the is not a string - - - - See - - - - - - - See - - - - - Gets or sets the value of the property with the specified key. - - - The value of the property with the specified key. - - The key of the property to get or set. - - - The property value will only be serialized if it is serializable. - If it cannot be serialized it will be silently ignored if - a serialization operation is performed. - - - - - - See - - - false - - - - This collection is modifiable. This property always - returns false. - - - - - - See - - - The value for the key specified. - - - - Get or set a value for the specified . - - - Thrown if the is not a string - - - - See - - - - - See - - - - - See - - - - - See - - - - - See - - - - - A that ignores the message - - - - This writer is used in special cases where it is necessary - to protect a writer from being closed by a client. - - - Nicko Cadell - - - - Constructor - - the writer to actually write to - - - Create a new ProtectCloseTextWriter using a writer - - - - - - Attach this instance to a different underlying - - the writer to attach to - - - Attach this instance to a different underlying - - - - - - Does not close the underlying output writer. - - - - Does not close the underlying output writer. - This method does nothing. - - - - - - Defines a lock that supports single writers and multiple readers - - - - ReaderWriterLock is used to synchronize access to a resource. - At any given time, it allows either concurrent read access for - multiple threads, or write access for a single thread. In a - situation where a resource is changed infrequently, a - ReaderWriterLock provides better throughput than a simple - one-at-a-time lock, such as . - - - If a platform does not support a System.Threading.ReaderWriterLock - implementation then all readers and writers are serialized. Therefore - the caller must not rely on multiple simultaneous readers. - - - Nicko Cadell - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Acquires a reader lock - - - - blocks if a different thread has the writer - lock, or if at least one thread is waiting for the writer lock. - - - - - - Decrements the lock count - - - - decrements the lock count. When the count - reaches zero, the lock is released. - - - - - - Acquires the writer lock - - - - This method blocks if another thread has a reader lock or writer lock. - - - - - - Decrements the lock count on the writer lock - - - - ReleaseWriterLock decrements the writer lock count. - When the count reaches zero, the writer lock is released. - - - - - - A that can be and reused - - - - A that can be and reused. - This uses a single buffer for string operations. - - - Nicko Cadell - - - - Create an instance of - - the format provider to use - - - Create an instance of - - - - - - Override Dispose to prevent closing of writer - - flag - - - Override Dispose to prevent closing of writer - - - - - - Reset this string writer so that it can be reused. - - the maximum buffer capacity before it is trimmed - the default size to make the buffer - - - Reset this string writer so that it can be reused. - The internal buffers are cleared and reset. - - - - - - Utility class for system specific information. - - - - Utility class of static methods for system specific information. - - - Nicko Cadell - Gert Driesen - Alexey Solofnenko - - - - Private constructor to prevent instances. - - - - Only static methods are exposed from this type. - - - - - - Initialize default values for private static fields. - - - - Only static methods are exposed from this type. - - - - - - Gets the assembly location path for the specified assembly. - - The assembly to get the location for. - The location of the assembly. - - - This method does not guarantee to return the correct path - to the assembly. If only tries to give an indication as to - where the assembly was loaded from. - - - - - - Gets the fully qualified name of the , including - the name of the assembly from which the was - loaded. - - The to get the fully qualified name for. - The fully qualified name for the . - - - This is equivalent to the Type.AssemblyQualifiedName property, - but this method works on the .NET Compact Framework 1.0 as well as - the full .NET runtime. - - - - - - Gets the short name of the . - - The to get the name for. - The short name of the . - - - The short name of the assembly is the - without the version, culture, or public key. i.e. it is just the - assembly's file name without the extension. - - - Use this rather than Assembly.GetName().Name because that - is not available on the Compact Framework. - - - Because of a FileIOPermission security demand we cannot do - the obvious Assembly.GetName().Name. We are allowed to get - the of the assembly so we - start from there and strip out just the assembly name. - - - - - - Gets the file name portion of the , including the extension. - - The to get the file name for. - The file name of the assembly. - - - Gets the file name portion of the , including the extension. - - - - - - Loads the type specified in the type string. - - A sibling type to use to load the type. - The name of the type to load. - Flag set to true to throw an exception if the type cannot be loaded. - true to ignore the case of the type name; otherwise, false - The type loaded or null if it could not be loaded. - - - If the type name is fully qualified, i.e. if contains an assembly name in - the type name, the type will be loaded from the system using - . - - - If the type name is not fully qualified, it will be loaded from the assembly - containing the specified relative type. If the type is not found in the assembly - then all the loaded assemblies will be searched for the type. - - - - - - Loads the type specified in the type string. - - The name of the type to load. - Flag set to true to throw an exception if the type cannot be loaded. - true to ignore the case of the type name; otherwise, false - The type loaded or null if it could not be loaded. - - - If the type name is fully qualified, i.e. if contains an assembly name in - the type name, the type will be loaded from the system using - . - - - If the type name is not fully qualified it will be loaded from the - assembly that is directly calling this method. If the type is not found - in the assembly then all the loaded assemblies will be searched for the type. - - - - - - Loads the type specified in the type string. - - An assembly to load the type from. - The name of the type to load. - Flag set to true to throw an exception if the type cannot be loaded. - true to ignore the case of the type name; otherwise, false - The type loaded or null if it could not be loaded. - - - If the type name is fully qualified, i.e. if contains an assembly name in - the type name, the type will be loaded from the system using - . - - - If the type name is not fully qualified it will be loaded from the specified - assembly. If the type is not found in the assembly then all the loaded assemblies - will be searched for the type. - - - - - - Generate a new guid - - A new Guid - - - Generate a new guid - - - - - - Create an - - The name of the parameter that caused the exception - The value of the argument that causes this exception - The message that describes the error - the ArgumentOutOfRangeException object - - - Create a new instance of the class - with a specified error message, the parameter name, and the value - of the argument. - - - The Compact Framework does not support the 3 parameter constructor for the - type. This method provides an - implementation that works for all platforms. - - - - - - Parse a string into an value - - the string to parse - out param where the parsed value is placed - true if the string was able to be parsed into an integer - - - Attempts to parse the string into an integer. If the string cannot - be parsed then this method returns false. The method does not throw an exception. - - - - - - Parse a string into an value - - the string to parse - out param where the parsed value is placed - true if the string was able to be parsed into an integer - - - Attempts to parse the string into an integer. If the string cannot - be parsed then this method returns false. The method does not throw an exception. - - - - - - Lookup an application setting - - the application settings key to lookup - the value for the key, or null - - - Configuration APIs are not supported under the Compact Framework - - - - - - Convert a path into a fully qualified local file path. - - The path to convert. - The fully qualified path. - - - Converts the path specified to a fully - qualified path. If the path is relative it is - taken as relative from the application base - directory. - - - The path specified must be a local file path, a URI is not supported. - - - - - - Creates a new case-insensitive instance of the class with the default initial capacity. - - A new case-insensitive instance of the class with the default initial capacity - - - The new Hashtable instance uses the default load factor, the CaseInsensitiveHashCodeProvider, and the CaseInsensitiveComparer. - - - - - - Gets an empty array of types. - - - - The Type.EmptyTypes field is not available on - the .NET Compact Framework 1.0. - - - - - - Cache the host name for the current machine - - - - - Cache the application friendly name - - - - - Text to output when a null is encountered. - - - - - Text to output when an unsupported feature is requested. - - - - - Start time for the current process. - - - - - Gets the system dependent line terminator. - - - The system dependent line terminator. - - - - Gets the system dependent line terminator. - - - - - - Gets the base directory for this . - - The base directory path for the current . - - - Gets the base directory for this . - - - The value returned may be either a local file path or a URI. - - - - - - Gets the path to the configuration file for the current . - - The path to the configuration file for the current . - - - The .NET Compact Framework 1.0 does not have a concept of a configuration - file. For this runtime, we use the entry assembly location as the root for - the configuration file name. - - - The value returned may be either a local file path or a URI. - - - - - - Gets the path to the file that first executed in the current . - - The path to the entry assembly. - - - Gets the path to the file that first executed in the current . - - - - - - Gets the ID of the current thread. - - The ID of the current thread. - - - On the .NET framework, the AppDomain.GetCurrentThreadId method - is used to obtain the thread ID for the current thread. This is the - operating system ID for the thread. - - - On the .NET Compact Framework 1.0 it is not possible to get the - operating system thread ID for the current thread. The native method - GetCurrentThreadId is implemented inline in a header file - and cannot be called. - - - On the .NET Framework 2.0 the Thread.ManagedThreadId is used as this - gives a stable id unrelated to the operating system thread ID which may - change if the runtime is using fibers. - - - - - - Get the host name or machine name for the current machine - - - The hostname or machine name - - - - Get the host name or machine name for the current machine - - - The host name () or - the machine name (Environment.MachineName) for - the current machine, or if neither of these are available - then NOT AVAILABLE is returned. - - - - - - Get this application's friendly name - - - The friendly name of this application as a string - - - - If available the name of the application is retrieved from - the AppDomain using AppDomain.CurrentDomain.FriendlyName. - - - Otherwise the file name of the entry assembly is used. - - - - - - Get the start time for the current process. - - - - This is the time at which the log4net library was loaded into the - AppDomain. Due to reports of a hang in the call to System.Diagnostics.Process.StartTime - this is not the start time for the current process. - - - The log4net library should be loaded by an application early during its - startup, therefore this start time should be a good approximation for - the actual start time. - - - Note that AppDomains may be loaded and unloaded within the - same process without the process terminating, however this start time - will be set per AppDomain. - - - - - - Text to output when a null is encountered. - - - - Use this value to indicate a null has been encountered while - outputting a string representation of an item. - - - The default value is (null). This value can be overridden by specifying - a value for the log4net.NullText appSetting in the application's - .config file. - - - - - - Text to output when an unsupported feature is requested. - - - - Use this value when an unsupported feature is requested. - - - The default value is NOT AVAILABLE. This value can be overridden by specifying - a value for the log4net.NotAvailableText appSetting in the application's - .config file. - - - - - - Utility class that represents a format string. - - - - Utility class that represents a format string. - - - Nicko Cadell - - - - Initialise the - - An that supplies culture-specific formatting information. - A containing zero or more format items. - An array containing zero or more objects to format. - - - - Format the string and arguments - - the formatted string - - - - Replaces the format item in a specified with the text equivalent - of the value of a corresponding instance in a specified array. - A specified parameter supplies culture-specific formatting information. - - An that supplies culture-specific formatting information. - A containing zero or more format items. - An array containing zero or more objects to format. - - A copy of format in which the format items have been replaced by the - equivalent of the corresponding instances of in args. - - - - This method does not throw exceptions. If an exception thrown while formatting the result the - exception and arguments are returned in the result string. - - - - - - Process an error during StringFormat - - - - - Dump the contents of an array into a string builder - - - - - Dump an object to a string - - - - - Implementation of Properties collection for the - - - - Class implements a collection of properties that is specific to each thread. - The class is not synchronized as each thread has its own . - - - Nicko Cadell - - - - The thread local data slot to use to store a PropertiesDictionary. - - - - - Internal constructor - - - - Initializes a new instance of the class. - - - - - - Remove a property - - the key for the entry to remove - - - Remove a property - - - - - - Clear all properties - - - - Clear all properties - - - - - - Get the PropertiesDictionary for this thread. - - create the dictionary if it does not exist, otherwise return null if is does not exist - the properties for this thread - - - The collection returned is only to be used on the calling thread. If the - caller needs to share the collection between different threads then the - caller must clone the collection before doing so. - - - - - - 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 - - - - - - Implementation of Stack for the - - - - Implementation of Stack for the - - - Nicko Cadell - - - - The stack store. - - - - - Internal constructor - - - - Initializes a new instance of the class. - - - - - - Clears all the contextual information held in this stack. - - - - Clears all the contextual information held in this stack. - Only call this if you think that this tread is being reused after - a previous call execution which may not have completed correctly. - You do not need to use this method if you always guarantee to call - the method of the - returned from even in exceptional circumstances, - for example by using the using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message")) - syntax. - - - - - - Removes the top context from this stack. - - The message in the context that was removed from the top of this stack. - - - Remove the top context from this stack, and return - it to the caller. If this stack is empty then an - empty string (not ) is returned. - - - - - - Pushes a new context message into this stack. - - The new context message. - - An that can be used to clean up the context stack. - - - - Pushes a new context onto this stack. An - is returned that can be used to clean up this stack. This - can be easily combined with the using keyword to scope the - context. - - - Simple example of using the Push method with the using keyword. - - using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message")) - { - log.Warn("This should have an ThreadContext Stack message"); - } - - - - - - Gets the current context information for this stack. - - The current context information. - - - - Gets the current context information for this stack. - - Gets the current context information - - - Gets the current context information for this stack. - - - - - - Get a portable version of this object - - the portable instance of this object - - - Get a cross thread portable version of this object - - - - - - The number of messages in the stack - - - The current number of messages in the stack - - - - The current number of messages in the stack. That is - the number of times has been called - minus the number of times has been called. - - - - - - Gets and sets the internal stack used by this - - The internal storage stack - - - This property is provided only to support backward compatability - of the . Tytpically the internal stack should not - be modified. - - - - - - Inner class used to represent a single context frame in the stack. - - - - Inner class used to represent a single context frame in the stack. - - - - - - Constructor - - The message for this context. - The parent context in the chain. - - - Initializes a new instance of the class - with the specified message and parent context. - - - - - - Get the message. - - The message. - - - Get the message. - - - - - - Gets the full text of the context down to the root level. - - - The full text of the context down to the root level. - - - - Gets the full text of the context down to the root level. - - - - - - Struct returned from the method. - - - - This struct implements the and is designed to be used - with the pattern to remove the stack frame at the end of the scope. - - - - - - The ThreadContextStack internal stack - - - - - The depth to trim the stack to when this instance is disposed - - - - - Constructor - - The internal stack used by the ThreadContextStack. - The depth to return the stack to when this object is disposed. - - - Initializes a new instance of the class with - the specified stack and return depth. - - - - - - Returns the stack to the correct depth. - - - - Returns the stack to the correct depth. - - - - - - Implementation of Stacks collection for the - - - - Implementation of Stacks collection for the - - - Nicko Cadell - - - - Internal constructor - - - - Initializes a new instance of the class. - - - - - - Gets the named thread context stack - - - The named stack - - - - Gets the named thread context stack - - - - - - Utility class for transforming strings. - - - - Utility class for transforming strings. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to prevent instantiation of this class. - - - - - - Write a string to an - - the writer to write to - the string to write - The string to replace non XML compliant chars with - - - The test is escaped either using XML escape entities - or using CDATA sections. - - - - - - Replace invalid XML characters in text string - - the XML text input string - the string to use in place of invalid characters - A string that does not contain invalid XML characters. - - - Certain Unicode code points are not allowed in the XML InfoSet, for - details see: http://www.w3.org/TR/REC-xml/#charsets. - - - This method replaces any illegal characters in the input string - with the mask string specified. - - - - - - Count the number of times that the substring occurs in the text - - the text to search - the substring to find - the number of times the substring occurs in the text - - - The substring is assumed to be non repeating within itself. - - - - - - Impersonate a Windows Account - - - - This impersonates a Windows account. - - - How the impersonation is done depends on the value of . - This allows the context to either impersonate a set of user credentials specified - using username, domain name and password or to revert to the process credentials. - - - - - - Default constructor - - - - Default constructor - - - - - - Initialize the SecurityContext based on the options set. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - The security context will try to Logon the specified user account and - capture a primary token for impersonation. - - - The required , - or properties were not specified. - - - - Impersonate the Windows account specified by the and properties. - - caller provided state - - An instance that will revoke the impersonation of this SecurityContext - - - - Depending on the property either - impersonate a user using credentials supplied or revert - to the process credentials. - - - - - - Create a given the userName, domainName and password. - - the user name - the domain name - the password - the for the account specified - - - Uses the Windows API call LogonUser to get a principal token for the account. This - token is used to initialize the WindowsIdentity. - - - - - - Gets or sets the impersonation mode for this security context - - - The impersonation mode for this security context - - - - Impersonate either a user with user credentials or - revert this thread to the credentials of the process. - The value is one of the - enum. - - - The default value is - - - When the mode is set to - the user's credentials are established using the - , and - values. - - - When the mode is set to - no other properties need to be set. If the calling thread is - impersonating then it will be reverted back to the process credentials. - - - - - - Gets or sets the Windows username for this security context - - - The Windows username for this security context - - - - This property must be set if - is set to (the default setting). - - - - - - Gets or sets the Windows domain name for this security context - - - The Windows domain name for this security context - - - - The default value for is the local machine name - taken from the property. - - - This property must be set if - is set to (the default setting). - - - - - - Sets the password for the Windows account specified by the and properties. - - - The password for the Windows account specified by the and properties. - - - - This property must be set if - is set to (the default setting). - - - - - - The impersonation modes for the - - - - See the property for - details. - - - - - - Impersonate a user using the credentials supplied - - - - - Revert this the thread to the credentials of the process - - - - - Adds to - - - - Helper class to expose the - through the interface. - - - - - - Constructor - - the impersonation context being wrapped - - - Constructor - - - - - - Revert the impersonation - - - - Revert the impersonation - - - - - - The log4net Global Context. - - - - The GlobalContext provides a location for global debugging - information to be stored. - - - The global context has a properties map and these properties can - be included in the output of log messages. The - supports selecting and outputing these properties. - - - By default the log4net:HostName property is set to the name of - the current machine. - - - - - GlobalContext.Properties["hostname"] = Environment.MachineName; - - - - Nicko Cadell - - - - Private Constructor. - - - Uses a private access modifier to prevent instantiation of this class. - - - - - The global context properties instance - - - - - The global properties map. - - - The global properties map. - - - - The global properties map. - - - - - - The log4net Logical Thread Context. - - - - The LogicalThreadContext provides a location for specific debugging - information to be stored. - The LogicalThreadContext properties override any or - properties with the same name. - - - The Logical Thread Context has a properties map and a stack. - The properties and stack can - be included in the output of log messages. The - supports selecting and outputting these properties. - - - The Logical Thread Context provides a diagnostic context for the current call context. - This is an instrument for distinguishing interleaved log - output from different sources. Log output is typically interleaved - when a server handles multiple clients near-simultaneously. - - - The Logical Thread Context is managed on a per basis. - - - Example of using the thread context properties to store a username. - - LogicalThreadContext.Properties["user"] = userName; - log.Info("This log message has a LogicalThreadContext Property called 'user'"); - - - Example of how to push a message into the context stack - - using(LogicalThreadContext.Stacks["LDC"].Push("my context message")) - { - log.Info("This log message has a LogicalThreadContext Stack message that includes 'my context message'"); - - } // at the end of the using block the message is automatically popped - - - - Nicko Cadell - - - - Private Constructor. - - - - Uses a private access modifier to prevent instantiation of this class. - - - - - - The thread context properties instance - - - - - The thread context stacks instance - - - - - The thread properties map - - - The thread properties map - - - - The LogicalThreadContext properties override any - or properties with the same name. - - - - - - The thread stacks - - - stack map - - - - The logical thread stacks. - - - - - - This class is used by client applications to request logger instances. - - - - This class has static methods that are used by a client to request - a logger instance. The method is - used to retrieve a logger. - - - See the interface for more details. - - - Simple example of logging messages - - ILog log = LogManager.GetLogger("application-log"); - - log.Info("Application Start"); - log.Debug("This is a debug message"); - - if (log.IsDebugEnabled) - { - log.Debug("This is another debug message"); - } - - - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - Uses a private access modifier to prevent instantiation of this class. - - - - Returns the named logger if it exists. - - Returns the named logger if it exists. - - - - If the named logger exists (in the default repository) then it - returns a reference to the logger, otherwise it returns null. - - - The fully qualified logger name to look for. - The logger found, or null if no logger could be found. - - - - Returns the named logger if it exists. - - - - If the named logger exists (in the specified repository) then it - returns a reference to the logger, otherwise it returns - null. - - - The repository to lookup in. - The fully qualified logger name to look for. - - The logger found, or null if the logger doesn't exist in the specified - repository. - - - - - Returns the named logger if it exists. - - - - If the named logger exists (in the repository for the specified assembly) then it - returns a reference to the logger, otherwise it returns - null. - - - The assembly to use to lookup the repository. - The fully qualified logger name to look for. - - The logger, or null if the logger doesn't exist in the specified - assembly's repository. - - - - Get the currently defined loggers. - - Returns all the currently defined loggers in the default repository. - - - The root logger is not included in the returned array. - - All the defined loggers. - - - - Returns all the currently defined loggers in the specified repository. - - The repository to lookup in. - - The root logger is not included in the returned array. - - All the defined loggers. - - - - Returns all the currently defined loggers in the specified assembly's repository. - - The assembly to use to lookup the repository. - - The root logger is not included in the returned array. - - All the defined loggers. - - - Get or create a logger. - - Retrieves or creates a named logger. - - - - Retrieves a logger named as the - parameter. If the named logger already exists, then the - existing instance will be returned. Otherwise, a new instance is - created. - - By default, loggers do not have a set level but inherit - it from the hierarchy. This is one of the central features of - log4net. - - - The name of the logger to retrieve. - The logger with the name specified. - - - - Retrieves or creates a named logger. - - - - Retrieve a logger named as the - parameter. If the named logger already exists, then the - existing instance will be returned. Otherwise, a new instance is - created. - - - By default, loggers do not have a set level but inherit - it from the hierarchy. This is one of the central features of - log4net. - - - The repository to lookup in. - The name of the logger to retrieve. - The logger with the name specified. - - - - Retrieves or creates a named logger. - - - - Retrieve a logger named as the - parameter. If the named logger already exists, then the - existing instance will be returned. Otherwise, a new instance is - created. - - - By default, loggers do not have a set level but inherit - it from the hierarchy. This is one of the central features of - log4net. - - - The assembly to use to lookup the repository. - The name of the logger to retrieve. - The logger with the name specified. - - - - Shorthand for . - - - Get the logger for the fully qualified name of the type specified. - - The full name of will be used as the name of the logger to retrieve. - The logger with the name specified. - - - - Shorthand for . - - - Gets the logger for the fully qualified name of the type specified. - - The repository to lookup in. - The full name of will be used as the name of the logger to retrieve. - The logger with the name specified. - - - - Shorthand for . - - - Gets the logger for the fully qualified name of the type specified. - - The assembly to use to lookup the repository. - The full name of will be used as the name of the logger to retrieve. - The logger with the name specified. - - - - Shuts down the log4net system. - - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in all the - default repositories. - - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - Shutdown a logger repository. - - Shuts down the default repository. - - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in the - default repository. - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - - Shuts down the repository for the repository specified. - - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in the - specified. - - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - The repository to shutdown. - - - - Shuts down the repository specified. - - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in the - repository. The repository is looked up using - the specified. - - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - The assembly to use to lookup the repository. - - - Reset the configuration of a repository - - Resets all values contained in this repository instance to their defaults. - - - - Resets all values contained in the repository instance to their - defaults. This removes all appenders from all loggers, sets - the level of all non-root loggers to null, - sets their additivity flag to true and sets the level - of the root logger to . Moreover, - message disabling is set to its default "off" value. - - - - - - Resets all values contained in this repository instance to their defaults. - - - - Reset all values contained in the repository instance to their - defaults. This removes all appenders from all loggers, sets - the level of all non-root loggers to null, - sets their additivity flag to true and sets the level - of the root logger to . Moreover, - message disabling is set to its default "off" value. - - - The repository to reset. - - - - Resets all values contained in this repository instance to their defaults. - - - - Reset all values contained in the repository instance to their - defaults. This removes all appenders from all loggers, sets - the level of all non-root loggers to null, - sets their additivity flag to true and sets the level - of the root logger to . Moreover, - message disabling is set to its default "off" value. - - - The assembly to use to lookup the repository to reset. - - - Get the logger repository. - - Returns the default instance. - - - - Gets the for the repository specified - by the callers assembly (). - - - The instance for the default repository. - - - - Returns the default instance. - - The default instance. - - - Gets the for the repository specified - by the argument. - - - The repository to lookup in. - - - - Returns the default instance. - - The default instance. - - - Gets the for the repository specified - by the argument. - - - The assembly to use to lookup the repository. - - - Get a logger repository. - - Returns the default instance. - - - - Gets the for the repository specified - by the callers assembly (). - - - The instance for the default repository. - - - - Returns the default instance. - - The default instance. - - - Gets the for the repository specified - by the argument. - - - The repository to lookup in. - - - - Returns the default instance. - - The default instance. - - - Gets the for the repository specified - by the argument. - - - The assembly to use to lookup the repository. - - - Create a domain - - Creates a repository with the specified repository type. - - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - The created will be associated with the repository - specified such that a call to will return - the same repository instance. - - - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - Create a logger repository. - - Creates a repository with the specified repository type. - - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - The created will be associated with the repository - specified such that a call to will return - the same repository instance. - - - - - - Creates a repository with the specified name. - - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - Creates the default type of which is a - object. - - - The name must be unique. Repositories cannot be redefined. - An will be thrown if the repository already exists. - - - The name of the repository, this must be unique amongst repositories. - The created for the repository. - The specified repository already exists. - - - - Creates a repository with the specified name. - - - - Creates the default type of which is a - object. - - - The name must be unique. Repositories cannot be redefined. - An will be thrown if the repository already exists. - - - The name of the repository, this must be unique amongst repositories. - The created for the repository. - The specified repository already exists. - - - - Creates a repository with the specified name and repository type. - - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - The name must be unique. Repositories cannot be redefined. - An will be thrown if the repository already exists. - - - The name of the repository, this must be unique to the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - The specified repository already exists. - - - - Creates a repository with the specified name and repository type. - - - - The name must be unique. Repositories cannot be redefined. - An will be thrown if the repository already exists. - - - The name of the repository, this must be unique to the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - The specified repository already exists. - - - - Creates a repository for the specified assembly and repository type. - - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - The created will be associated with the repository - specified such that a call to with the - same assembly specified will return the same repository instance. - - - The assembly to use to get the name of the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - - Creates a repository for the specified assembly and repository type. - - - - The created will be associated with the repository - specified such that a call to with the - same assembly specified will return the same repository instance. - - - The assembly to use to get the name of the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - - Gets the list of currently defined repositories. - - - - Get an array of all the objects that have been created. - - - An array of all the known objects. - - - - Looks up the wrapper object for the logger specified. - - The logger to get the wrapper for. - The wrapper for the logger specified. - - - - Looks up the wrapper objects for the loggers specified. - - The loggers to get the wrappers for. - The wrapper objects for the loggers specified. - - - - Create the objects used by - this manager. - - The logger to wrap. - The wrapper for the logger specified. - - - - The wrapper map to use to hold the objects. - - - - - Implementation of Mapped Diagnostic Contexts. - - - - - The MDC is deprecated and has been replaced by the . - The current MDC implementation forwards to the ThreadContext.Properties. - - - - The MDC class is similar to the class except that it is - based on a map instead of a stack. It provides mapped - diagnostic contexts. A Mapped Diagnostic Context, or - MDC in short, is an instrument for distinguishing interleaved log - output from different sources. Log output is typically interleaved - when a server handles multiple clients near-simultaneously. - - - The MDC is managed on a per thread basis. - - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - Uses a private access modifier to prevent instantiation of this class. - - - - - Gets the context value identified by the parameter. - - The key to lookup in the MDC. - The string value held for the key, or a null reference if no corresponding value is found. - - - - The MDC is deprecated and has been replaced by the . - The current MDC implementation forwards to the ThreadContext.Properties. - - - - If the parameter does not look up to a - previously defined context then null will be returned. - - - - - - Add an entry to the MDC - - The key to store the value under. - The value to store. - - - - The MDC is deprecated and has been replaced by the . - The current MDC implementation forwards to the ThreadContext.Properties. - - - - Puts a context value (the parameter) as identified - with the parameter into the current thread's - context map. - - - If a value is already defined for the - specified then the value will be replaced. If the - is specified as null then the key value mapping will be removed. - - - - - - Removes the key value mapping for the key specified. - - The key to remove. - - - - The MDC is deprecated and has been replaced by the . - The current MDC implementation forwards to the ThreadContext.Properties. - - - - Remove the specified entry from this thread's MDC - - - - - - Clear all entries in the MDC - - - - - The MDC is deprecated and has been replaced by the . - The current MDC implementation forwards to the ThreadContext.Properties. - - - - Remove all the entries from this thread's MDC - - - - - - Implementation of Nested Diagnostic Contexts. - - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - A Nested Diagnostic Context, or NDC in short, is an instrument - to distinguish interleaved log output from different sources. Log - output is typically interleaved when a server handles multiple - clients near-simultaneously. - - - Interleaved log output can still be meaningful if each log entry - from different contexts had a distinctive stamp. This is where NDCs - come into play. - - - Note that NDCs are managed on a per thread basis. The NDC class - is made up of static methods that operate on the context of the - calling thread. - - - How to push a message into the context - - using(NDC.Push("my context message")) - { - ... all log calls will have 'my context message' included ... - - } // at the end of the using block the message is automatically removed - - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - Uses a private access modifier to prevent instantiation of this class. - - - - - Clears all the contextual information held on the current thread. - - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - Clears the stack of NDC data held on the current thread. - - - - - - Creates a clone of the stack of context information. - - A clone of the context info for this thread. - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - The results of this method can be passed to the - method to allow child threads to inherit the context of their - parent thread. - - - - - - Inherits the contextual information from another thread. - - The context stack to inherit. - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - This thread will use the context information from the stack - supplied. This can be used to initialize child threads with - the same contextual information as their parent threads. These - contexts will NOT be shared. Any further contexts that - are pushed onto the stack will not be visible to the other. - Call to obtain a stack to pass to - this method. - - - - - - Removes the top context from the stack. - - - The message in the context that was removed from the top - of the stack. - - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - Remove the top context from the stack, and return - it to the caller. If the stack is empty then an - empty string (not null) is returned. - - - - - - Pushes a new context message. - - The new context message. - - An that can be used to clean up - the context stack. - - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - Pushes a new context onto the context stack. An - is returned that can be used to clean up the context stack. This - can be easily combined with the using keyword to scope the - context. - - - Simple example of using the Push method with the using keyword. - - using(log4net.NDC.Push("NDC_Message")) - { - log.Warn("This should have an NDC message"); - } - - - - - - Removes the context information for this thread. It is - not required to call this method. - - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - This method is not implemented. - - - - - - Forces the stack depth to be at most . - - The maximum depth of the stack - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - Forces the stack depth to be at most . - This may truncate the head of the stack. This only affects the - stack in the current thread. Also it does not prevent it from - growing, it only sets the maximum depth at the time of the - call. This can be used to return to a known context depth. - - - - - - Gets the current context depth. - - The current context depth. - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - The number of context values pushed onto the context stack. - - - Used to record the current depth of the context. This can then - be restored using the method. - - - - - - - The log4net Thread Context. - - - - The ThreadContext provides a location for thread specific debugging - information to be stored. - The ThreadContext properties override any - properties with the same name. - - - The thread context has a properties map and a stack. - The properties and stack can - be included in the output of log messages. The - supports selecting and outputting these properties. - - - The Thread Context provides a diagnostic context for the current thread. - This is an instrument for distinguishing interleaved log - output from different sources. Log output is typically interleaved - when a server handles multiple clients near-simultaneously. - - - The Thread Context is managed on a per thread basis. - - - Example of using the thread context properties to store a username. - - ThreadContext.Properties["user"] = userName; - log.Info("This log message has a ThreadContext Property called 'user'"); - - - Example of how to push a message into the context stack - - using(ThreadContext.Stacks["NDC"].Push("my context message")) - { - log.Info("This log message has a ThreadContext Stack message that includes 'my context message'"); - - } // at the end of the using block the message is automatically popped - - - - Nicko Cadell - - - - Private Constructor. - - - - Uses a private access modifier to prevent instantiation of this class. - - - - - - The thread context properties instance - - - - - The thread context stacks instance - - - - - The thread properties map - - - The thread properties map - - - - The ThreadContext properties override any - properties with the same name. - - - - - - The thread stacks - - - stack map - - - - The thread local stacks. - - - - - diff --git a/Include/Tanshu.Common.dll b/Include/Tanshu.Common.dll index 118ec94..621f5d3 100644 Binary files a/Include/Tanshu.Common.dll and b/Include/Tanshu.Common.dll differ diff --git a/Include/Tanshu.Data.dll b/Include/Tanshu.Data.dll index 0b51f90..e2e3cdb 100644 Binary files a/Include/Tanshu.Data.dll and b/Include/Tanshu.Data.dll differ diff --git a/Sql/DB.sql b/Sql/DB.sql deleted file mode 100644 index 4b5823e..0000000 Binary files a/Sql/DB.sql and /dev/null differ diff --git a/Sql/Remove Companies.sql b/Sql/Remove Companies.sql deleted file mode 100644 index 60cc7ff..0000000 --- a/Sql/Remove Companies.sql +++ /dev/null @@ -1,675 +0,0 @@ -BEGIN TRANSACTION -GO -ALTER TABLE dbo.BasicTransactions - DROP CONSTRAINT FK_BasicTransactions_Companies -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.BasicTransactions - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.CostCenters - DROP CONSTRAINT FK_CostCenters_Companies -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.CostCenters - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Customers - DROP CONSTRAINT FK_Customers_Companies -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Customers - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Employees - DROP CONSTRAINT FK_Employees_Companies -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Employees - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Inventory - DROP CONSTRAINT FK_Inventory_Companies -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Inventory - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Ledgers - DROP CONSTRAINT FK_Ledgers_Companies -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Ledgers - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Products - DROP CONSTRAINT FK_Products_Companies -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Products - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.ProductTypes - DROP CONSTRAINT FK_ProductTypes_Companies -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.ProductTypes - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Roles - DROP CONSTRAINT FK_Roles_Companies -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Roles - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Tax - DROP CONSTRAINT FK_Tax_Companies -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Tax - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -DROP TABLE dbo.TransactionContra -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.TransactionSale - DROP CONSTRAINT FK_TransactionSale_Companies -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.TransactionSale - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.UserRoles - DROP CONSTRAINT IX_UserRoles -GO -ALTER TABLE dbo.UserRoles ADD CONSTRAINT - IX_UserRoles UNIQUE NONCLUSTERED - ( - UserID, - Role - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -GO -ALTER TABLE dbo.UserRoles - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Users - DROP CONSTRAINT FK_Users_Companies -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Users - DROP COLUMN CompanyID -GO -COMMIT - -BEGIN TRANSACTION -GO -DROP TABLE Companies -GO -COMMIT - -BEGIN TRANSACTION -GO -CREATE TABLE dbo.Waiters - ( - WaiterID uniqueidentifier NOT NULL, - Name nvarchar(200) NOT NULL, - timestamp timestamp NOT NULL - ) ON [PRIMARY] -GO -ALTER TABLE dbo.Waiters ADD CONSTRAINT - PK_Waiters PRIMARY KEY CLUSTERED - ( - WaiterID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -GO -CREATE NONCLUSTERED INDEX IX_Waiters_Name ON dbo.Waiters - ( - Name - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO -COMMIT - -INSERT INTO Waiters (WaiterID, Name) -SELECT l.LedgerID, l.Name FROM Ledgers l INNER JOIN Employees e ON l.LedgerID = e.LedgerID ORDER BY Name - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.TransactionSale - DROP CONSTRAINT FK_TransactionSale_Employees -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.TransactionSale ADD CONSTRAINT - FK_TransactionSale_Waiters FOREIGN KEY - ( - WaiterID - ) REFERENCES dbo.Waiters - ( - WaiterID - ) ON UPDATE NO ACTION - ON DELETE NO ACTION - -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.CashPayments - DROP CONSTRAINT FK_CashPayments_Employees -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.CashPayments ADD CONSTRAINT - FK_CashPayments_Users FOREIGN KEY - ( - CashierID - ) REFERENCES dbo.Users - ( - UserID - ) ON UPDATE NO ACTION - ON DELETE NO ACTION - -GO -COMMIT - -DROP TABLE CashPayments - -DROP TABLE Employees -DELETE FROM Ledgers WHERE Type = 'S' - - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.BasicTransactions - DROP CONSTRAINT FK_BasicTransactions_Users_PosterID -GO -COMMIT -BEGIN TRANSACTION -GO -EXECUTE sp_rename N'dbo.BasicTransactions', N'Vouchers', 'OBJECT' -GO -EXECUTE sp_rename N'dbo.Vouchers.TransactionID', N'VoucherID', 'COLUMN' -GO -ALTER TABLE dbo.Vouchers - DROP COLUMN Posted, Review, PosterID, Autolocked -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Inventory - DROP CONSTRAINT FK_Inventory_BasicTransactions -GO -ALTER TABLE dbo.TransactionSale - DROP CONSTRAINT FK_TransactionSale_BasicTransactions -GO -ALTER TABLE dbo.Vouchers - DROP CONSTRAINT IX_BasicTransactions_Code_Type -GO -ALTER TABLE dbo.Vouchers - DROP CONSTRAINT PK_BasicTransactions -GO -ALTER TABLE dbo.Vouchers ADD CONSTRAINT - PK_Vouchers PRIMARY KEY CLUSTERED - ( - VoucherID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -GO -ALTER TABLE dbo.Vouchers ADD CONSTRAINT - IX_Vouchers_Code_Type UNIQUE NONCLUSTERED - ( - Code, - Type - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.TransactionSale ADD CONSTRAINT - FK_TransactionSale_BasicTransactions FOREIGN KEY - ( - TransactionID - ) REFERENCES dbo.Vouchers - ( - VoucherID - ) ON UPDATE NO ACTION - ON DELETE NO ACTION - -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Inventory ADD CONSTRAINT - FK_Inventory_BasicTransactions FOREIGN KEY - ( - TransactionID - ) REFERENCES dbo.Vouchers - ( - VoucherID - ) ON UPDATE NO ACTION - ON DELETE NO ACTION - -GO -COMMIT - - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.TransactionSale - DROP CONSTRAINT FK_TransactionSale_BasicTransactions -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.TransactionSale - DROP CONSTRAINT FK_TransactionSale_Waiters -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.TransactionSale - DROP CONSTRAINT FK_TransactionSale_Customers -GO -COMMIT -BEGIN TRANSACTION -GO -EXECUTE sp_rename N'dbo.TransactionSale', N'SaleVoucher', 'OBJECT' -GO -EXECUTE sp_rename N'dbo.SaleVoucher.TransactionID', N'VoucherID', 'COLUMN' -GO -ALTER TABLE dbo.SaleVoucher ADD CONSTRAINT - FK_SaleVoucher_Customers FOREIGN KEY - ( - CustomerID - ) REFERENCES dbo.Customers - ( - CustomerID - ) ON UPDATE NO ACTION - ON DELETE NO ACTION - -GO -ALTER TABLE dbo.SaleVoucher ADD CONSTRAINT - FK_SaleVoucher_Waiters FOREIGN KEY - ( - WaiterID - ) REFERENCES dbo.Waiters - ( - WaiterID - ) ON UPDATE NO ACTION - ON DELETE NO ACTION - -GO -ALTER TABLE dbo.SaleVoucher ADD CONSTRAINT - FK_SaleVoucher_Vouchers FOREIGN KEY - ( - VoucherID - ) REFERENCES dbo.Vouchers - ( - VoucherID - ) ON UPDATE NO ACTION - ON DELETE NO ACTION - -GO -COMMIT - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Inventory - DROP CONSTRAINT FK_Inventory_BasicTransactions -GO -COMMIT -BEGIN TRANSACTION -GO -EXECUTE sp_rename N'dbo.Inventory.TransactionID', N'VoucherID', 'COLUMN' -GO -ALTER TABLE dbo.Inventory ADD CONSTRAINT - FK_Inventory_Vouchers FOREIGN KEY - ( - VoucherID - ) REFERENCES dbo.Vouchers - ( - VoucherID - ) ON UPDATE NO ACTION - ON DELETE NO ACTION - -GO -COMMIT -GO - -DROP PROCEDURE [dbo].[BasicTransactions_Insert] -DROP PROCEDURE [dbo].[BasicTransactions_Update] -GO - --- Product Sorting -UPDATE Products -SET SortOrder = inv.Sort -FROM (SELECT ProductID, Count(*) AS Sort FROM Inventory GROUP BY ProductID) AS inv -WHERE Products.ProductID = inv.ProductID -GO - -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Vouchers - DROP CONSTRAINT DF_BasicTransactions_TransactionID -GO -COMMIT -GO -DROP TRIGGER [dbo].[BasicTransactions_Update_Auto] -GO -DROP TRIGGER [dbo].[BasicTransactions_Insert_Auto] -GO -DROP PROCEDURE [dbo].[TransactionSale_Update] -GO -DROP PROCEDURE [dbo].[TransactionSale_Insert] -GO -CREATE PROCEDURE [dbo].[SaleVoucher_Update] -( - @VoucherID uniqueidentifier, - @BillID nvarchar(10) OUTPUT, - @TableID nvarchar(10), - @WaiterID uniqueidentifier, - @CustomerID uniqueidentifier, - @Paid bit, - @Void bit, - @VoidReason nvarchar(50), - @Printed bit OUTPUT, - @Alarm datetime, - @KotID nvarchar(10) OUTPUT, - @CreditCard bit, - @IsImportant bit, - @timestamp timestamp OUTPUT - ) -AS -BEGIN - IF @Printed = 1 AND (SELECT Printed FROM SaleVoucher WHERE VoucherID = @VoucherID) = 0 - BEGIN - SELECT @BillID = ISNULL(CAST(MAX(CAST(REPLACE(BillID, '-', '') AS int)) + 1 AS nvarchar(9)), '010001') FROM SaleVoucher WHERE BillID LIKE '__-____' - IF LEN(@BillID) = 5 - SET @BillID = '0' + @BillID - SET @BillID = SUBSTRING(@BillID, 1, 2) + '-' + SUBSTRING(@BillID, 3, 7) - IF SUBSTRING(@BillID,3,7) = '-0000' - SET @BillID = SUBSTRING(@BillID, 1, 2) + '-0001' - END - ELSE - BEGIN - SELECT @BillID = BillID FROM SaleVoucher WHERE VoucherID = @VoucherID - END - IF @TableID = '' - BEGIN - SELECT @TableID = 'C' + CAST(ISNULL(MAX(CAST(SUBSTRING(TableID, 2, 10) AS int)), 0) + 1 AS nvarchar(10)) FROM SaleVoucher WHERE TableID LIKE 'C%' AND Paid = 0 AND Void = 0 - END - IF (SELECT Printed FROM SaleVoucher WHERE VoucherID = @VoucherID) = 1 - SET @Printed = 1 - UPDATE [dbo].[SaleVoucher] SET - [BillID] = @BillID, - [TableID] = @TableID, - [WaiterID] = @WaiterID, - [CustomerID] = @CustomerID, - [Paid] = @Paid, - [Void] = @Void, - [VoidReason] = @VoidReason, - [Printed] = @Printed, - [Alarm] = @Alarm, - [CreditCard] = @CreditCard, - [IsImportant] = @IsImportant - WHERE VoucherID = @VoucherID - - UPDATE Vouchers SET LastEditDate = GETDATE() WHERE VoucherID = @VoucherID - - SELECT @timestamp = timestamp, @KotID = KotID FROM [dbo].[SaleVoucher] WHERE VoucherID = @VoucherID -END - -GO - -CREATE PROCEDURE [dbo].[SaleVoucher_Insert] -( - @VoucherID uniqueidentifier, - @BillID nvarchar(10) OUTPUT, - @TableID nvarchar(10), - @WaiterID uniqueidentifier, - @CustomerID uniqueidentifier, - @Paid bit, - @Void bit, - @VoidReason nvarchar(50), - @Printed bit, - @Alarm datetime, - @KotID nvarchar(10) OUTPUT, - @CreditCard bit, - @IsImportant bit, - @timestamp timestamp OUTPUT - ) -AS -BEGIN - SELECT @KotID = ISNULL('K-' + CAST(MAX(CAST(SUBSTRING(KotID, 3,8) AS int)) + 1 AS nvarchar(8)), 'K-1') FROM [dbo].[SaleVoucher] - IF @Printed = 1 - BEGIN - SELECT @BillID = ISNULL(CAST(MAX(CAST(REPLACE(BillID, '-', '') AS int)) + 1 AS nvarchar(9)), '010001') FROM SaleVoucher WHERE BillID LIKE '__-____' - IF LEN(@BillID) = 5 - SET @BillID = '0' + @BillID - SET @BillID = SUBSTRING(@BillID, 1, 2) + '-' + SUBSTRING(@BillID, 3, 7) - IF SUBSTRING(@BillID,3,7) = '-0000' - SET @BillID = SUBSTRING(@BillID, 1, 2) + '-0001' - END - ELSE - BEGIN - SET @BillID = @KotID - END - IF @TableID = '' - BEGIN - SELECT @TableID = 'C' + CAST(ISNULL(MAX(CAST(SUBSTRING(TableID, 2, 10) AS int)), 0) + 1 AS nvarchar(10)) FROM SaleVoucher WHERE TableID LIKE 'C%' AND Paid = 0 AND Void = 0 - END - INSERT INTO [dbo].[SaleVoucher] ([VoucherID], [BillID], [TableID], [WaiterID], [CustomerID], [Paid], [Void], [VoidReason], [Printed], [Alarm], [KotID], [CreditCard] ,[IsImportant]) - VALUES (@VoucherID, @BillID, @TableID, @WaiterID, @CustomerID, @Paid, @Void, @VoidReason, @Printed, @Alarm, @KotID, @CreditCard, @IsImportant) - SELECT @timestamp = timestamp FROM [dbo].[SaleVoucher] WHERE VoucherID = @VoucherID -END -GO - --- Waiters -BEGIN TRANSACTION -GO -CREATE TABLE dbo.Tmp_Waiters - ( - WaiterID uniqueidentifier NOT NULL, - Code int NULL, - Name nvarchar(200) NOT NULL, - timestamp timestamp NOT NULL - ) ON [PRIMARY] -GO -IF EXISTS(SELECT * FROM dbo.Waiters) - EXEC('INSERT INTO dbo.Tmp_Waiters (WaiterID, Name) - SELECT WaiterID, Name FROM dbo.Waiters WITH (HOLDLOCK TABLOCKX)') -GO -ALTER TABLE dbo.SaleVoucher - DROP CONSTRAINT FK_SaleVoucher_Waiters -GO -DROP TABLE dbo.Waiters -GO -EXECUTE sp_rename N'dbo.Tmp_Waiters', N'Waiters', 'OBJECT' -GO -ALTER TABLE dbo.Waiters ADD CONSTRAINT - PK_Waiters PRIMARY KEY CLUSTERED - ( - WaiterID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -GO -CREATE NONCLUSTERED INDEX IX_Waiters_Name ON dbo.Waiters - ( - Name - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.SaleVoucher ADD CONSTRAINT - FK_SaleVoucher_Waiters FOREIGN KEY - ( - WaiterID - ) REFERENCES dbo.Waiters - ( - WaiterID - ) ON UPDATE NO ACTION - ON DELETE NO ACTION - -GO -COMMIT - --- Add Waiter -DECLARE @Code int -SELECT @Code = 1 -UPDATE Waiters SET @Code = Code = @Code + 1 - -INSERT INTO Waiters (WaiterID, Code, Name) -VALUES (NEWID(), 1, 'Waiter'); - -BEGIN TRANSACTION -GO -CREATE TABLE dbo.Tmp_Waiters - ( - WaiterID uniqueidentifier NOT NULL, - Code int NOT NULL, - Name nvarchar(200) NOT NULL, - timestamp timestamp NOT NULL - ) ON [PRIMARY] -GO -IF EXISTS(SELECT * FROM dbo.Waiters) - EXEC('INSERT INTO dbo.Tmp_Waiters (WaiterID, Code, Name) - SELECT WaiterID, Code, Name FROM dbo.Waiters WITH (HOLDLOCK TABLOCKX)') -GO -ALTER TABLE dbo.SaleVoucher - DROP CONSTRAINT FK_SaleVoucher_Waiters -GO -DROP TABLE dbo.Waiters -GO -EXECUTE sp_rename N'dbo.Tmp_Waiters', N'Waiters', 'OBJECT' -GO -ALTER TABLE dbo.Waiters ADD CONSTRAINT - PK_Waiters PRIMARY KEY CLUSTERED - ( - WaiterID - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - -GO -CREATE NONCLUSTERED INDEX IX_Waiters_Name ON dbo.Waiters - ( - Name - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO -CREATE UNIQUE NONCLUSTERED INDEX IX_Waiters ON dbo.Waiters - ( - Code - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO -COMMIT -BEGIN TRANSACTION -GO -ALTER TABLE dbo.SaleVoucher ADD CONSTRAINT - FK_SaleVoucher_Waiters FOREIGN KEY - ( - WaiterID - ) REFERENCES dbo.Waiters - ( - WaiterID - ) ON UPDATE NO ACTION - ON DELETE NO ACTION - -GO -COMMIT - --- Waiter Role -INSERT INTO Roles (Role, Description) VALUES ('Waiter/Master', 'Add / Edit / Delete Waiters') ---INSERT INTO Roles (Role, Description) VALUES ('Log/View', 'View the event Log') - - ----- User Modification -BEGIN TRANSACTION -GO -ALTER TABLE dbo.Users - DROP CONSTRAINT DF_Users_CreationDate -GO -ALTER TABLE dbo.Users - DROP COLUMN Email, Approved, Question, Answer, Comment, CreationDate, LastLoginDate, LastActivityDate, LastPasswordChangedDate, LastLockoutDate -GO -COMMIT diff --git a/Sql/generate_inserts_2005.SQL b/Sql/generate_inserts_2005.SQL deleted file mode 100644 index e5e7005..0000000 --- a/Sql/generate_inserts_2005.SQL +++ /dev/null @@ -1,481 +0,0 @@ -SET NOCOUNT ON -GO - -PRINT 'Using Master database' -USE AccFF -GO - -PRINT 'Checking for the existence of this procedure' -IF (SELECT OBJECT_ID('ScriptInserts','P')) IS NOT NULL --means, the procedure already exists - BEGIN - PRINT 'Procedure already exists. So, dropping it' - DROP PROC ScriptInserts - END -GO - -CREATE PROC ScriptInserts -( - @table_name varchar(776), -- The table/view for which the INSERT statements will be generated using the existing data - @target_table varchar(776) = NULL, -- Use this parameter to specify a different table name into which the data will be inserted - @include_column_list bit = 1, -- Use this parameter to include/ommit column list in the generated INSERT statement - @from varchar(800) = NULL, -- Use this parameter to filter the rows based on a filter condition (using WHERE) - @include_timestamp bit = 0, -- Specify 1 for this parameter, if you want to include the TIMESTAMP/ROWVERSION column's data in the INSERT statement - @debug_mode bit = 0, -- If @debug_mode is set to 1, the SQL statements constructed by this procedure will be printed for later examination - @owner varchar(64) = NULL, -- Use this parameter if you are not the owner of the table - @ommit_images bit = 0, -- Use this parameter to generate INSERT statements by omitting the 'image' columns - @ommit_identity bit = 0, -- Use this parameter to ommit the identity columns - @top int = NULL, -- Use this parameter to generate INSERT statements only for the TOP n rows - @cols_to_include varchar(8000) = NULL, -- List of columns to be included in the INSERT statement - @cols_to_exclude varchar(8000) = NULL, -- List of columns to be excluded from the INSERT statement - @disable_constraints bit = 0, -- When 1, disables foreign key constraints and enables them after the INSERT statements - @ommit_computed_cols bit = 0 -- When 1, computed columns will not be included in the INSERT statement - -) -AS -BEGIN - -/*********************************************************************************************************** -Procedure: sp_generate_inserts (Build 22) - (Copyright © 2002 Narayana Vyas Kondreddi. All rights reserved.) - -Purpose: To generate INSERT statements from existing data. - These INSERTS can be executed to regenerate the data at some other location. - This procedure is also useful to create a database setup, where in you can - script your data along with your table definitions. - -Written by: Narayana Vyas Kondreddi - http://vyaskn.tripod.com - -Acknowledgements: - Divya Kalra -- For beta testing - Mark Charsley -- For reporting a problem with scripting uniqueidentifier columns with NULL values - Artur Zeygman -- For helping me simplify a bit of code for handling non-dbo owned tables - Joris Laperre -- For reporting a regression bug in handling text/ntext columns - -Tested on: SQL Server 7.0 and SQL Server 2000 and SQL Server 2005 - -Date created: January 17th 2001 21:52 GMT - -Date modified: May 1st 2002 19:50 GMT - -Email: vyaskn@hotmail.com - -NOTE: This procedure may not work with tables with too many columns. - Results can be unpredictable with huge text columns or SQL Server 2000's sql_variant data types - Whenever possible, Use @include_column_list parameter to ommit column list in the INSERT statement, for better results - IMPORTANT: This procedure is not tested with internation data (Extended characters or Unicode). If needed - you might want to convert the datatypes of character variables in this procedure to their respective unicode counterparts - like nchar and nvarchar - - ALSO NOTE THAT THIS PROCEDURE IS NOT UPDATED TO WORK WITH NEW DATA TYPES INTRODUCED IN SQL SERVER 2005 / YUKON - - -Example 1: To generate INSERT statements for table 'titles': - - EXEC sp_generate_inserts 'titles' - -Example 2: To ommit the column list in the INSERT statement: (Column list is included by default) - IMPORTANT: If you have too many columns, you are advised to ommit column list, as shown below, - to avoid erroneous results - - EXEC sp_generate_inserts 'titles', @include_column_list = 0 - -Example 3: To generate INSERT statements for 'titlesCopy' table from 'titles' table: - - EXEC sp_generate_inserts 'titles', 'titlesCopy' - -Example 4: To generate INSERT statements for 'titles' table for only those titles - which contain the word 'Computer' in them: - NOTE: Do not complicate the FROM or WHERE clause here. It's assumed that you are good with T-SQL if you are using this parameter - - EXEC sp_generate_inserts 'titles', @from = "from titles where title like '%Computer%'" - -Example 5: To specify that you want to include TIMESTAMP column's data as well in the INSERT statement: - (By default TIMESTAMP column's data is not scripted) - - EXEC sp_generate_inserts 'titles', @include_timestamp = 1 - -Example 6: To print the debug information: - - EXEC sp_generate_inserts 'titles', @debug_mode = 1 - -Example 7: If you are not the owner of the table, use @owner parameter to specify the owner name - To use this option, you must have SELECT permissions on that table - - EXEC sp_generate_inserts Nickstable, @owner = 'Nick' - -Example 8: To generate INSERT statements for the rest of the columns excluding images - When using this otion, DO NOT set @include_column_list parameter to 0. - - EXEC sp_generate_inserts imgtable, @ommit_images = 1 - -Example 9: To generate INSERT statements excluding (ommiting) IDENTITY columns: - (By default IDENTITY columns are included in the INSERT statement) - - EXEC sp_generate_inserts mytable, @ommit_identity = 1 - -Example 10: To generate INSERT statements for the TOP 10 rows in the table: - - EXEC sp_generate_inserts mytable, @top = 10 - -Example 11: To generate INSERT statements with only those columns you want: - - EXEC sp_generate_inserts titles, @cols_to_include = "'title','title_id','au_id'" - -Example 12: To generate INSERT statements by omitting certain columns: - - EXEC sp_generate_inserts titles, @cols_to_exclude = "'title','title_id','au_id'" - -Example 13: To avoid checking the foreign key constraints while loading data with INSERT statements: - - EXEC sp_generate_inserts titles, @disable_constraints = 1 - -Example 14: To exclude computed columns from the INSERT statement: - EXEC sp_generate_inserts MyTable, @ommit_computed_cols = 1 -***********************************************************************************************************/ - -SET NOCOUNT ON - ---Making sure user only uses either @cols_to_include or @cols_to_exclude -IF ((@cols_to_include IS NOT NULL) AND (@cols_to_exclude IS NOT NULL)) - BEGIN - RAISERROR('Use either @cols_to_include or @cols_to_exclude. Do not use both the parameters at once',16,1) - RETURN -1 --Failure. Reason: Both @cols_to_include and @cols_to_exclude parameters are specified - END - ---Making sure the @cols_to_include and @cols_to_exclude parameters are receiving values in proper format -IF ((@cols_to_include IS NOT NULL) AND (PATINDEX('''%''',@cols_to_include) = 0)) - BEGIN - RAISERROR('Invalid use of @cols_to_include property',16,1) - PRINT 'Specify column names surrounded by single quotes and separated by commas' - PRINT 'Eg: EXEC ScriptInserts titles, @cols_to_include = "''title_id'',''title''"' - RETURN -1 --Failure. Reason: Invalid use of @cols_to_include property - END - -IF ((@cols_to_exclude IS NOT NULL) AND (PATINDEX('''%''',@cols_to_exclude) = 0)) - BEGIN - RAISERROR('Invalid use of @cols_to_exclude property',16,1) - PRINT 'Specify column names surrounded by single quotes and separated by commas' - PRINT 'Eg: EXEC ScriptInserts titles, @cols_to_exclude = "''title_id'',''title''"' - RETURN -1 --Failure. Reason: Invalid use of @cols_to_exclude property - END - - ---Checking to see if the database name is specified along wih the table name ---Your database context should be local to the table for which you want to generate INSERT statements ---specifying the database name is not allowed -IF (PARSENAME(@table_name,3)) IS NOT NULL - BEGIN - RAISERROR('Do not specify the database name. Be in the required database and just specify the table name.',16,1) - RETURN -1 --Failure. Reason: Database name is specified along with the table name, which is not allowed - END - ---Checking for the existence of 'user table' or 'view' ---This procedure is not written to work on system tables ---To script the data in system tables, just create a view on the system tables and script the view instead - -IF @owner IS NULL - BEGIN - IF ((OBJECT_ID(@table_name,'U') IS NULL) AND (OBJECT_ID(@table_name,'V') IS NULL)) - BEGIN - RAISERROR('User table or view not found.',16,1) - PRINT 'You may see this error, if you are not the owner of this table or view. In that case use @owner parameter to specify the owner name.' - PRINT 'Make sure you have SELECT permission on that table or view.' - RETURN -1 --Failure. Reason: There is no user table or view with this name - END - END -ELSE - BEGIN - IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = @table_name AND (TABLE_TYPE = 'BASE TABLE' OR TABLE_TYPE = 'VIEW') AND TABLE_SCHEMA = @owner) - BEGIN - RAISERROR('User table or view not found.',16,1) - PRINT 'You may see this error, if you are not the owner of this table. In that case use @owner parameter to specify the owner name.' - PRINT 'Make sure you have SELECT permission on that table or view.' - RETURN -1 --Failure. Reason: There is no user table or view with this name - END - END - ---Variable declarations -DECLARE @Column_ID int, - @Column_List varchar(8000), - @Column_Name varchar(128), - @Start_Insert varchar(786), - @Data_Type varchar(128), - @Actual_Values varchar(8000), --This is the string that will be finally executed to generate INSERT statements - @IDN varchar(128) --Will contain the IDENTITY column's name in the table - ---Variable Initialization -SET @IDN = '' -SET @Column_ID = 0 -SET @Column_Name = '' -SET @Column_List = '' -SET @Actual_Values = '' - -IF @owner IS NULL - BEGIN - SET @Start_Insert = 'INSERT INTO ' + '[' + RTRIM(COALESCE(@target_table,@table_name)) + ']' - END -ELSE - BEGIN - SET @Start_Insert = 'INSERT ' + '[' + LTRIM(RTRIM(@owner)) + '].' + '[' + RTRIM(COALESCE(@target_table,@table_name)) + ']' - END - - ---To get the first column's ID - -SELECT @Column_ID = MIN(ORDINAL_POSITION) -FROM INFORMATION_SCHEMA.COLUMNS (NOLOCK) -WHERE TABLE_NAME = @table_name AND -(@owner IS NULL OR TABLE_SCHEMA = @owner) - - - ---Loop through all the columns of the table, to get the column names and their data types -WHILE @Column_ID IS NOT NULL - BEGIN - SELECT @Column_Name = QUOTENAME(COLUMN_NAME), - @Data_Type = DATA_TYPE - FROM INFORMATION_SCHEMA.COLUMNS (NOLOCK) - WHERE ORDINAL_POSITION = @Column_ID AND - TABLE_NAME = @table_name AND - (@owner IS NULL OR TABLE_SCHEMA = @owner) - - - - IF @cols_to_include IS NOT NULL --Selecting only user specified columns - BEGIN - IF CHARINDEX( '''' + SUBSTRING(@Column_Name,2,LEN(@Column_Name)-2) + '''',@cols_to_include) = 0 - BEGIN - GOTO SKIP_LOOP - END - END - - IF @cols_to_exclude IS NOT NULL --Selecting only user specified columns - BEGIN - IF CHARINDEX( '''' + SUBSTRING(@Column_Name,2,LEN(@Column_Name)-2) + '''',@cols_to_exclude) <> 0 - BEGIN - GOTO SKIP_LOOP - END - END - - --Making sure to output SET IDENTITY_INSERT ON/OFF in case the table has an IDENTITY column - IF (SELECT COLUMNPROPERTY( OBJECT_ID(QUOTENAME(COALESCE(@owner,USER_NAME())) + '.' + @table_name),SUBSTRING(@Column_Name,2,LEN(@Column_Name) - 2),'IsIdentity')) = 1 - BEGIN - IF @ommit_identity = 0 --Determing whether to include or exclude the IDENTITY column - SET @IDN = @Column_Name - ELSE - GOTO SKIP_LOOP - END - - --Making sure whether to output computed columns or not - IF @ommit_computed_cols = 1 - BEGIN - IF (SELECT COLUMNPROPERTY( OBJECT_ID(QUOTENAME(COALESCE(@owner,USER_NAME())) + '.' + @table_name),SUBSTRING(@Column_Name,2,LEN(@Column_Name) - 2),'IsComputed')) = 1 - BEGIN - GOTO SKIP_LOOP - END - END - - --Tables with columns of IMAGE data type are not supported for obvious reasons - IF(@Data_Type in ('image')) - BEGIN - IF (@ommit_images = 0) - BEGIN - RAISERROR('Tables with image columns are not supported.',16,1) - PRINT 'Use @ommit_images = 1 parameter to generate INSERTs for the rest of the columns.' - PRINT 'DO NOT ommit Column List in the INSERT statements. If you ommit column list using @include_column_list=0, the generated INSERTs will fail.' - RETURN -1 --Failure. Reason: There is a column with image data type - END - ELSE - BEGIN - GOTO SKIP_LOOP - END - END - - --Determining the data type of the column and depending on the data type, the VALUES part of - --the INSERT statement is generated. Care is taken to handle columns with NULL values. Also - --making sure, not to lose any data from flot, real, money, smallmomey, datetime columns - SET @Actual_Values = @Actual_Values + - CASE - WHEN @Data_Type IN ('char','varchar','nchar','nvarchar') - THEN - 'COALESCE('''''''' + REPLACE(RTRIM(' + @Column_Name + '),'''''''','''''''''''')+'''''''',''NULL'')' - WHEN @Data_Type IN ('datetime','smalldatetime') - THEN - 'COALESCE('''''''' + RTRIM(CONVERT(char,' + @Column_Name + ',109))+'''''''',''NULL'')' - WHEN @Data_Type IN ('uniqueidentifier') - THEN - 'COALESCE('''''''' + REPLACE(CONVERT(char(255),RTRIM(' + @Column_Name + ')),'''''''','''''''''''')+'''''''',''NULL'')' - WHEN @Data_Type IN ('text','ntext') - THEN - 'COALESCE('''''''' + REPLACE(CONVERT(char(8000),' + @Column_Name + '),'''''''','''''''''''')+'''''''',''NULL'')' - WHEN @Data_Type IN ('binary','varbinary') - THEN - 'COALESCE(RTRIM(CONVERT(char,' + 'CONVERT(int,' + @Column_Name + '))),''NULL'')' - WHEN @Data_Type IN ('timestamp','rowversion') - THEN - CASE - WHEN @include_timestamp = 0 - THEN - '''DEFAULT''' - ELSE - 'COALESCE(RTRIM(CONVERT(char,' + 'CONVERT(int,' + @Column_Name + '))),''NULL'')' - END - WHEN @Data_Type IN ('float','real','money','smallmoney') - THEN - 'COALESCE(LTRIM(RTRIM(' + 'CONVERT(char, ' + @Column_Name + ',2)' + ')),''NULL'')' - ELSE - 'COALESCE(LTRIM(RTRIM(' + 'CONVERT(char, ' + @Column_Name + ')' + ')),''NULL'')' - END + '+' + ''',''' + ' + ' - - --Generating the column list for the INSERT statement - SET @Column_List = @Column_List + @Column_Name + ',' - - SKIP_LOOP: --The label used in GOTO - - SELECT @Column_ID = MIN(ORDINAL_POSITION) - FROM INFORMATION_SCHEMA.COLUMNS (NOLOCK) - WHERE TABLE_NAME = @table_name AND - ORDINAL_POSITION > @Column_ID AND - (@owner IS NULL OR TABLE_SCHEMA = @owner) - - - --Loop ends here! - END - ---To get rid of the extra characters that got concatenated during the last run through the loop -SET @Column_List = LEFT(@Column_List,len(@Column_List) - 1) -SET @Actual_Values = LEFT(@Actual_Values,len(@Actual_Values) - 6) - -IF LTRIM(@Column_List) = '' - BEGIN - RAISERROR('No columns to select. There should at least be one column to generate the output',16,1) - RETURN -1 --Failure. Reason: Looks like all the columns are ommitted using the @cols_to_exclude parameter - END - ---Forming the final string that will be executed, to output the INSERT statements -IF (@include_column_list <> 0) - BEGIN - SET @Actual_Values = - 'SELECT ' + - CASE WHEN @top IS NULL OR @top < 0 THEN '' ELSE ' TOP ' + LTRIM(STR(@top)) + ' ' END + - '''' + RTRIM(@Start_Insert) + - ' ''+' + '''(' + RTRIM(@Column_List) + '''+' + ''')''' + - ' +''VALUES(''+ ' + @Actual_Values + '+'')''' + ' ' + - COALESCE(@from,' FROM ' + CASE WHEN @owner IS NULL THEN '' ELSE '[' + LTRIM(RTRIM(@owner)) + '].' END + '[' + rtrim(@table_name) + ']' + '(NOLOCK)') - END -ELSE IF (@include_column_list = 0) - BEGIN - SET @Actual_Values = - 'SELECT ' + - CASE WHEN @top IS NULL OR @top < 0 THEN '' ELSE ' TOP ' + LTRIM(STR(@top)) + ' ' END + - '''' + RTRIM(@Start_Insert) + - ' '' +''VALUES(''+ ' + @Actual_Values + '+'')''' + ' ' + - COALESCE(@from,' FROM ' + CASE WHEN @owner IS NULL THEN '' ELSE '[' + LTRIM(RTRIM(@owner)) + '].' END + '[' + rtrim(@table_name) + ']' + '(NOLOCK)') - END - ---Determining whether to ouput any debug information -IF @debug_mode =1 - BEGIN - PRINT '/*****START OF DEBUG INFORMATION*****' - PRINT 'Beginning of the INSERT statement:' - PRINT @Start_Insert - PRINT '' - PRINT 'The column list:' - PRINT @Column_List - PRINT '' - PRINT 'The SELECT statement executed to generate the INSERTs' - PRINT @Actual_Values - PRINT '' - PRINT '*****END OF DEBUG INFORMATION*****/' - PRINT '' - END - -PRINT '--INSERTs generated by ''ScriptInserts'' stored procedure written by Vyas' -PRINT '--Build number: 22' -PRINT '--Problems/Suggestions? Contact Vyas @ vyaskn@hotmail.com' -PRINT '--http://vyaskn.tripod.com' -PRINT '' -PRINT 'SET NOCOUNT ON' -PRINT '' - - ---Determining whether to print IDENTITY_INSERT or not -IF (@IDN <> '') - BEGIN - PRINT 'SET IDENTITY_INSERT ' + QUOTENAME(COALESCE(@owner,USER_NAME())) + '.' + QUOTENAME(@table_name) + ' ON' - PRINT 'GO' - PRINT '' - END - - -IF @disable_constraints = 1 AND (OBJECT_ID(QUOTENAME(COALESCE(@owner,USER_NAME())) + '.' + @table_name, 'U') IS NOT NULL) - BEGIN - IF @owner IS NULL - BEGIN - SELECT 'ALTER TABLE ' + QUOTENAME(COALESCE(@target_table, @table_name)) + ' NOCHECK CONSTRAINT ALL' AS '--Code to disable constraints temporarily' - END - ELSE - BEGIN - SELECT 'ALTER TABLE ' + QUOTENAME(@owner) + '.' + QUOTENAME(COALESCE(@target_table, @table_name)) + ' NOCHECK CONSTRAINT ALL' AS '--Code to disable constraints temporarily' - END - - PRINT 'GO' - END - -PRINT '' -PRINT 'PRINT ''Inserting values into ' + '[' + RTRIM(COALESCE(@target_table,@table_name)) + ']' + '''' - - ---All the hard work pays off here!!! You'll get your INSERT statements, when the next line executes! -EXEC (@Actual_Values) - -PRINT 'PRINT ''Done''' -PRINT '' - - -IF @disable_constraints = 1 AND (OBJECT_ID(QUOTENAME(COALESCE(@owner,USER_NAME())) + '.' + @table_name, 'U') IS NOT NULL) - BEGIN - IF @owner IS NULL - BEGIN - SELECT 'ALTER TABLE ' + QUOTENAME(COALESCE(@target_table, @table_name)) + ' CHECK CONSTRAINT ALL' AS '--Code to enable the previously disabled constraints' - END - ELSE - BEGIN - SELECT 'ALTER TABLE ' + QUOTENAME(@owner) + '.' + QUOTENAME(COALESCE(@target_table, @table_name)) + ' CHECK CONSTRAINT ALL' AS '--Code to enable the previously disabled constraints' - END - - PRINT 'GO' - END - -PRINT '' -IF (@IDN <> '') - BEGIN - PRINT 'SET IDENTITY_INSERT ' + QUOTENAME(COALESCE(@owner,USER_NAME())) + '.' + QUOTENAME(@table_name) + ' OFF' - PRINT 'GO' - END - -PRINT 'SET NOCOUNT OFF' - - -SET NOCOUNT OFF -RETURN 0 --Success. We are done! -END - -GO - -PRINT 'Created the procedure' -GO - - ---Mark procedure as system object -EXEC sys.sp_MS_marksystemobject ScriptInserts -GO - -PRINT 'Granting EXECUTE permission on ScriptInserts to all users' -GRANT EXEC ON ScriptInserts TO public - -SET NOCOUNT OFF -GO - -PRINT 'Done' \ No newline at end of file diff --git a/Tanshu.Accounts.BI/AdvanceBI.cs b/Tanshu.Accounts.BI/AdvanceBI.cs deleted file mode 100644 index 5d34f7a..0000000 --- a/Tanshu.Accounts.BI/AdvanceBI.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.DAOFactory; -using System.Data.SqlClient; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public class AdvanceBI : IAdvanceBI - { - public void Insert(AdvanceBO advance) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IAdvanceDAO dao = factory.GetAdvanceDAO(connection)) - { - dao.Insert(advance); - } - } - } - public List GetAdvances(DateTime fromDate, DateTime toDate, bool all) - { - fromDate = Convert.ToDateTime(string.Format("{0:dd-MMM-yyyy} 00:00:00", fromDate)); - toDate = Convert.ToDateTime(string.Format("{0:dd-MMM-yyyy} 23:59:59", toDate)); - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IAdvanceDAO dao = factory.GetAdvanceDAO(connection)) - { - return dao.GetAdvances(fromDate, toDate, all); - } - } - } - public void Adjust(Guid advanceID, Guid userID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IAdvanceDAO dao = factory.GetAdvanceDAO(connection)) - { - - dao.Adjust(advanceID, userID); - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/CheckoutBI.cs b/Tanshu.Accounts.BI/CheckoutBI.cs deleted file mode 100644 index 28cdc97..0000000 --- a/Tanshu.Accounts.BI/CheckoutBI.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; -using System.Collections.Generic; -//using System.Linq; -using System.Text; -using System.Threading; -using System.Data.SqlClient; -using Tanshu.Accounts.DAOFactory; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public class CheckoutBI - { - #region Properties - public decimal Opening { get; private set; } - public decimal Receipts { get; private set; } - public decimal AdvanceReceipts { get; private set; } - public decimal CCReceipts { get; private set; } - public decimal AdvanceAdjusted { get; private set; } - public decimal CashPayments { get; private set; } - public decimal AdditionalVoids { get; private set; } - public decimal VoidsInSystem { get; private set; } - public decimal PendingBills { get; private set; } - public decimal NetSales { get; private set; } - public decimal ClosingBalance { get; private set; } - public decimal RetainedOvernight { get; private set; } - public decimal CashDeposited { get; private set; } // - public decimal Excess { get; private set; } // - public string Status { get; private set; } // - public string Cashiers { get; private set; } // - public Guid CashierID { get; private set; } // - public string Cashier { get; private set; } // - - public decimal OldPending { get; private set; } - public decimal OldReceipts { get; private set; } - public decimal OldVoided { get; private set; } - - public DateTime StartDate { get; private set; } // - public DateTime FinishDate { get; private set; } // - - private string pendingString; - public string PendingString - { - get { return pendingString; } - } - private string cCString; - public string CCString - { - get { return cCString; } - } - private string voidsString; - public string VoidsString - { - get { return voidsString; } - } - private string discountString; - public string DiscountString - { - get { return discountString; } - } - - //public string PendingString { get; private set; } // - //public string CCString { get; private set; } // - //public string VoidsString { get; private set; } - //public string DiscountString { get; private set; } - - public string PaymentString { get; private set; } // - public string Manager - { - get { return Thread.CurrentPrincipal.Identity.Name; } - } - #endregion - - public CheckoutBI(Guid cashier, DateTime startDate, DateTime finishDate) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ICheckoutDAO dao = factory.GetCheckoutDAO(startDate, finishDate, cashier, connection)) - { - //Actual Closing - this.CashierID = cashier; - this.StartDate = Convert.ToDateTime(string.Format("{0:dd-MMM-yyyy} 00:00:00", startDate)); - this.FinishDate = Convert.ToDateTime(string.Format("{0:dd-MMM-yyyy} 23:59:59", finishDate)); - - Cashier = new UserBI().GetUser(CashierID).Name; - PendingBills = dao.GetPending(ref pendingString); - CCReceipts = dao.GetCreditCard(ref cCString); - VoidsInSystem = dao.GetVoids(ref voidsString); - Opening = dao.GetOpenings(); - Receipts = dao.GetReceipts(); - CashPayments = dao.GetPayments(); - AdditionalVoids = dao.GetAdditionalVoids(); - RetainedOvernight = dao.GetRetainedOvernight(); - AdvanceReceipts = dao.GetAdvancesReceived(); - AdvanceAdjusted = dao.GetAdvancesAdjusted(); - PaymentString = dao.GetPaymentString(); - - OldPending = dao.GetOldPending(); - OldReceipts = dao.GetOldReceipts(); - OldVoided = dao.GetOldVoided(); - - - Cashiers = dao.GetActiveCashiers(); - NetSales = dao.GetNetSales(); - dao.GetDiscountsBills(ref discountString); - ClosingBalance = Opening - + Receipts - + AdvanceReceipts - - CCReceipts - - AdvanceAdjusted - - CashPayments - - AdditionalVoids - + NetSales; - } - } - } - public void Calculate(decimal cashDeposited, decimal retainedOvernight) - { - this.CashDeposited = cashDeposited; - this.RetainedOvernight = retainedOvernight; - Excess = CashDeposited - ClosingBalance; - Status = string.Format("{0:Extra Cash Rs #,##0.00; Cash Short Rs #,##0.00;Cash Perfect}", Excess); - } - } - -} diff --git a/Tanshu.Accounts.BI/CustomerBI.cs b/Tanshu.Accounts.BI/CustomerBI.cs deleted file mode 100644 index e9ca547..0000000 --- a/Tanshu.Accounts.BI/CustomerBI.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Collections.Generic; -//using System.Linq; -using System.Text; -using Tanshu.Accounts.Contracts; -using System.Data.SqlClient; -using Tanshu.Accounts.DAOFactory; -using Tanshu.Data.DAO; - - -namespace Tanshu.Accounts.BI -{ - public class CustomerBI : ICustomerBI - { - - public List GetCustomerLedgers() - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ICustomerDAO dao = factory.GetCustomerDAO(connection)) - { - return dao.GetCustomerLedgers(); - } - } - } - public CustomerBO GetCustomer(Guid customerID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ICustomerDAO dao = factory.GetCustomerDAO(connection)) - { - return dao.GetCustomer(customerID); - } - } - - } - public List GetFilteredCustomers(Dictionary filter) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ICustomerDAO dao = factory.GetCustomerDAO(connection)) - { - return dao.GetFilteredCustomers(filter); - } - } - } - public List GetCustomers() - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ICustomerDAO dao = factory.GetCustomerDAO(connection)) - { - return dao.GetCustomers(); - } - } - } - public List GetSingleCustomers(Guid customerID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ICustomerDAO dao = factory.GetCustomerDAO(connection)) - { - return dao.GetCustomers(customerID); - } - } - } - public bool Update(CustomerBO customer) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ICustomerDAO dao = factory.GetCustomerDAO(connection)) - { - dao.Update(customer); - return true; - } - } - } - public bool Delete(Guid customerID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ICustomerDAO dao = factory.GetCustomerDAO(connection)) - { - dao.Delete(customerID); - return true; - } - } - } - public bool Insert(CustomerBO customer) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ICustomerDAO dao = factory.GetCustomerDAO(connection)) - { - dao.Insert(customer); - return true; - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/FoodTableBI.cs b/Tanshu.Accounts.BI/FoodTableBI.cs deleted file mode 100644 index 84dacbd..0000000 --- a/Tanshu.Accounts.BI/FoodTableBI.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.DAOFactory; -using System.Data.SqlClient; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public class FoodTableBI : IFoodTableBI - { - public void Insert(FoodTableBO foodTable) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IFoodTableDAO dao = factory.GetFoodTableDAO(connection)) - { - dao.Insert(foodTable); - } - } - } - public void Update(FoodTableBO foodTable) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IFoodTableDAO dao = factory.GetFoodTableDAO(connection)) - { - dao.Update(foodTable); - } - } - } - public bool Delete(int tableID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IFoodTableDAO dao = factory.GetFoodTableDAO(connection)) - { - return dao.Delete(tableID); - } - } - } - public FoodTableBO GetFoodTable(int tableID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IFoodTableDAO dao = factory.GetFoodTableDAO(connection)) - { - return dao.GetFoodTable(tableID); - } - } - } - public List GetFoodTables() - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IFoodTableDAO dao = factory.GetFoodTableDAO(connection)) - { - return dao.GetFoodTables(); - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/LedgerBI.cs b/Tanshu.Accounts.BI/LedgerBI.cs deleted file mode 100644 index f6f99c9..0000000 --- a/Tanshu.Accounts.BI/LedgerBI.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.DAOFactory; -using System.Data.SqlClient; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public class LedgerBI : ILedgerBI - { - public LedgerBO GetLedger(Guid ledgerID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ILedgerDAO dao = factory.GetLedgerDAO(connection)) - { - return dao.GetLedger(ledgerID); - } - } - } - public LedgerBO GetLedgerByName(string name) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ILedgerDAO dao = factory.GetLedgerDAO(connection)) - { - return dao.GetLedger(name); - } - } - } - public bool Insert(LedgerBO ledger) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ILedgerDAO dao = factory.GetLedgerDAO(connection)) - { - return dao.Insert(ledger); - } - } - } - public bool Update(LedgerBO ledger) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ILedgerDAO dao = factory.GetLedgerDAO(connection)) - { - return dao.Update(ledger); - } - } - } - public List GetLedgers() - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ILedgerDAO dao = factory.GetLedgerDAO(connection)) - { - return dao.GetLedgers(); - } - } - } - public List GetLedgersOfType(char type) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ILedgerDAO dao = factory.GetLedgerDAO(connection)) - { - return dao.GetLedgers(type); - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/ManagementBI.cs b/Tanshu.Accounts.BI/ManagementBI.cs deleted file mode 100644 index 556f2af..0000000 --- a/Tanshu.Accounts.BI/ManagementBI.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Data.SqlClient; -using Tanshu.Accounts.DAOFactory; -using Tanshu.Accounts.Contracts; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public class ManagementBI - { - public decimal GetBalance(decimal? tax, DateTime startDate, DateTime endDate) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IManagementDAO dao = factory.GetManagementDAO(startDate, endDate, connection)) - { - return dao.GetBalance(tax); - } - } - } - public List GetUpdateBillList(decimal tax, bool voided, bool paid, bool creditCard, DateTime startDate, DateTime endDate) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IManagementDAO dao = factory.GetManagementDAO(startDate, endDate, connection)) - { - return dao.GetUpdateBillList(tax, voided, paid, creditCard); - } - } - } - public decimal Update(Guid voucherID, decimal tax, DateTime startDate, DateTime endDate) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IManagementDAO dao = factory.GetManagementDAO(startDate, endDate, connection)) - { - return dao.Update(voucherID, tax); - } - } - } - - public void Reorder(DateTime startDate, DateTime endDate, ShowProgessDelegate showProgressDelegate) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IManagementDAO dao = factory.GetManagementDAO(startDate, endDate, connection)) - { - dao.Reorder(showProgressDelegate); - } - } - } - - - public bool MergeData(DateTime startDate, DateTime endDate, string sourceDB, string targetDB) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IManagementDAO dao = factory.GetManagementDAO(startDate, endDate, connection)) - { - return dao.MergeData(sourceDB, targetDB); - } - } - } - public List GetPaidBills(DateTime startDate, DateTime finishDate) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IManagementDAO dao = factory.GetManagementDAO(startDate, finishDate, connection)) - { - return dao.GetPaidBills(); - } - } - } - } -} - - - diff --git a/Tanshu.Accounts.BI/MembershipBI.cs b/Tanshu.Accounts.BI/MembershipBI.cs deleted file mode 100644 index 3390e29..0000000 --- a/Tanshu.Accounts.BI/MembershipBI.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using System.Collections.Generic; -//using System.Linq; -using System.Text; -using System.Data.SqlClient; -using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.DAOFactory; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public class MembershipBI : IMembershipBI - { - public bool ValidateUser(string name, string password) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IMembershipDAO dao = factory.GetMembershipDAO(connection)) - { - return dao.ValidateUser(name, password); - } - } - } - - public void AddUsersToRoles(string[] usernames, string[] roleNames) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IMembershipDAO dao = factory.GetMembershipDAO(connection)) - { - dao.AddUsersToRoles(usernames, roleNames); - } - } - } - - public string[] GetAllRoles() - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IMembershipDAO dao = factory.GetMembershipDAO(connection)) - { - return dao.GetAllRoles(); - } - } - } - - public string[] GetRolesForUser(string username) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IMembershipDAO dao = factory.GetMembershipDAO(connection)) - { - return dao.GetRolesForUser(username); - } - } - } - - public bool IsUserInRole(string username, string roleName) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IMembershipDAO dao = factory.GetMembershipDAO(connection)) - { - if (!dao.RoleExists(roleName)) - throw new Exception(string.Format("Role {0} does not exist in the database", roleName)); - return dao.IsUserInRole(username, roleName); - } - } - } - - public bool IsUserInRole(Guid userID, string roleName) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IMembershipDAO dao = factory.GetMembershipDAO(connection)) - { - if (!dao.RoleExists(roleName)) - throw new Exception(string.Format("Role {0} does not exist in the database", roleName)); - return dao.IsUserInRole(userID, roleName); - } - } - } - - public void RemoveUsersFromRoles(string[] usernames, string[] roleNames) - { - if ((roleNames.Length > 0) || (usernames.Length > 0)) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IMembershipDAO dao = factory.GetMembershipDAO(connection)) - { - dao.RemoveUsersFromRoles(usernames, roleNames); - } - } - } - } - - public UserBO GetUserFromName(string name) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IMembershipDAO dao = factory.GetMembershipDAO(connection)) - { - return dao.GetUserFromName(name); - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/ModifierBI.cs b/Tanshu.Accounts.BI/ModifierBI.cs deleted file mode 100644 index 9f21888..0000000 --- a/Tanshu.Accounts.BI/ModifierBI.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using Tanshu.Accounts.DAOFactory; -using Tanshu.Data.DAO; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.BI -{ - public static class ModifierBI - { - public static void Insert(ModifierBO modifier) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IModifierDAO dao = factory.GetModifierDAO(connection)) - { - dao.Insert(modifier); - } - } - } - //public void Update(ModifierBO modifier) - //{ - // GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - // using (IConnectionDAO connection = factory.Connection) - // { - // using (var dao = factory.GetModifierDAO(connection)) - // { - // dao.Update(modifier); - // } - // } - //} - public static void Delete(string modifierID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IModifierDAO dao = factory.GetModifierDAO(connection)) - { - dao.Delete(modifierID); - } - } - } - public static ModifierBO GetModifier(string modifierID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IModifierDAO dao = factory.GetModifierDAO(connection)) - { - return dao.GetModifier(modifierID); - } - } - } - public static List GetModifiers() - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IModifierDAO dao = factory.GetModifierDAO(connection)) - { - return dao.GetModifiers(); - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/PaymentBI.cs b/Tanshu.Accounts.BI/PaymentBI.cs deleted file mode 100644 index c6c4124..0000000 --- a/Tanshu.Accounts.BI/PaymentBI.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.DAOFactory; -using System.Data.SqlClient; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public class PaymentBI : IPaymentBI - { - public void Insert(PaymentBO payment) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IPaymentDAO dao = factory.GetPaymentDAO(connection)) - { - dao.Insert(payment); - } - } - } - public List GetPayments(Guid? userID, DateTime fromDate, DateTime toDate) - { - fromDate = Convert.ToDateTime(string.Format("{0:dd-MMM-yyyy} 00:00:00", fromDate)); - toDate = Convert.ToDateTime(string.Format("{0:dd-MMM-yyyy} 23:59:59", toDate)); - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IPaymentDAO dao = factory.GetPaymentDAO(connection)) - { - return dao.GetPayments(userID, fromDate, toDate); - } - } - } - public void Delete(Guid paymentID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IPaymentDAO dao = factory.GetPaymentDAO(connection)) - { - dao.Delete(paymentID); - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/PrintLocationBI.cs b/Tanshu.Accounts.BI/PrintLocationBI.cs deleted file mode 100644 index b82f92c..0000000 --- a/Tanshu.Accounts.BI/PrintLocationBI.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.DAOFactory; -using System.Data.SqlClient; -using Tanshu.Data.DAO; -using System.Configuration; - -namespace Tanshu.Accounts.BI -{ - public class PrintLocationBI : IPrintLocationBI - { - public void Insert(PrintLocationBO printLocation) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IPrintLocationDAO dao = factory.GetPrintLocationDAO(connection)) - { - dao.Insert(printLocation); - } - } - } - public void Update(PrintLocationBO printLocation) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IPrintLocationDAO dao = factory.GetPrintLocationDAO(connection)) - { - dao.Update(printLocation); - } - } - } - public bool Delete(int tableID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IPrintLocationDAO dao = factory.GetPrintLocationDAO(connection)) - { - return dao.Delete(tableID); - } - } - } - public PrintLocationBO GetPrintLocation(int printLocationID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IPrintLocationDAO dao = factory.GetPrintLocationDAO(connection)) - { - return dao.GetPrintLocation(printLocationID); - } - } - } - public PrintLocationBO GetPrintLocation(Guid productTypeID, string location) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IPrintLocationDAO dao = factory.GetPrintLocationDAO(connection)) - { - return dao.GetPrintLocation(productTypeID, location); - } - } - } - public PrintLocationBO GetPrintLocation(string location) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IPrintLocationDAO dao = factory.GetPrintLocationDAO(connection)) - { - return dao.GetPrintLocation(null, location); - } - } - } - public static PrintLocationBO BasePrinter - { - get - { - string location = ConfigurationManager.AppSettings["Location"].ToLowerInvariant(); - return new PrintLocationBI().GetPrintLocation(location); - } - } - public static PrintLocationBO KotPrinter(Guid productTypeID) - { - string location = ConfigurationManager.AppSettings["Location"].ToLowerInvariant(); - PrintLocationBO p = new PrintLocationBI().GetPrintLocation(productTypeID, location); - if (p == null) - p = new PrintLocationBI().GetPrintLocation(location); - return p; - } - } -} diff --git a/Tanshu.Accounts.BI/ProductBI.cs b/Tanshu.Accounts.BI/ProductBI.cs deleted file mode 100644 index 0b0b0c5..0000000 --- a/Tanshu.Accounts.BI/ProductBI.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.DAOFactory; -using System.Data.SqlClient; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public static class ProductBI - { - public static bool Insert(ProductBO product) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductDAO dao = factory.GetProductDAO(connection)) - { - return dao.Insert(product); - } - } - } - public static bool Update(ProductBO product) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductDAO dao = factory.GetProductDAO(connection)) - { - return dao.Update(product); - } - } - } - public static bool Delete(Guid productID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductDAO dao = factory.GetProductDAO(connection)) - { - return dao.Delete(productID); - } - } - } - public static ProductBO GetProductFromName(string nameAndUnits) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductDAO dao = factory.GetProductDAO(connection)) - { - return dao.GetProduct(nameAndUnits); - } - } - } - public static ProductBO GetProduct(Guid productID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductDAO dao = factory.GetProductDAO(connection)) - { - return dao.GetProduct(productID); - } - } - } - public static decimal GetProductStock(DateTime date, Guid productID, Guid? voucherID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductDAO dao = factory.GetProductDAO(connection)) - { - return dao.GetProductStock(date, productID, voucherID); - } - } - } - public static List GetProducts() - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductDAO dao = factory.GetProductDAO(connection)) - { - return dao.GetProducts(); - } - } - } - - public static List GetFilteredProducts(Dictionary filter) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductDAO dao = factory.GetProductDAO(connection)) - { - return dao.GetFilteredProducts(filter); - } - } - } - - public static void UpdateShortName() - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductDAO dao = factory.GetProductDAO(connection)) - { - dao.UpdateShortName(); - } - } - } - - public static List GetUnFilteredProducts() - { - Dictionary filter = new Dictionary(); - filter.Add("Name", ""); - filter.Add("Type", ""); - return GetFilteredProducts(filter); - } - public static List GetProducts(Guid productTypeID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductDAO dao = factory.GetProductDAO(connection)) - { - return dao.GetProducts(productTypeID); - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/ProductGroupBI.cs b/Tanshu.Accounts.BI/ProductGroupBI.cs deleted file mode 100644 index c2126c5..0000000 --- a/Tanshu.Accounts.BI/ProductGroupBI.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.DAOFactory; -using System.Data.SqlClient; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public class ProductGroupBI : IProductGroupBI - { - public ProductGroupBO GetProductGroup(Guid productGroupID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (var dao = factory.GetProductGroupDAO(connection)) - { - return dao.GetProductGroup(productGroupID); - } - } - } - public ProductGroupBO GetProductGroupByName(string name) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (var dao = factory.GetProductGroupDAO(connection)) - { - return dao.GetProductGroup(name); - } - } - } - public bool Insert(ProductGroupBO productGroup) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (var dao = factory.GetProductGroupDAO(connection)) - { - return dao.Insert(productGroup); - } - } - } - public bool Update(ProductGroupBO productGroup) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (var dao = factory.GetProductGroupDAO(connection)) - { - return dao.Update(productGroup); - } - } - } - public List GetProductGroups() - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (var dao = factory.GetProductGroupDAO(connection)) - { - return dao.GetProductGroups(); - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/ProductGroupModifierBI.cs b/Tanshu.Accounts.BI/ProductGroupModifierBI.cs deleted file mode 100644 index 8f3d695..0000000 --- a/Tanshu.Accounts.BI/ProductGroupModifierBI.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.DAOFactory; -using System.Data.SqlClient; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public static class ProductGroupModifierBI - { - public static bool Insert(ProductGroupModifierBO productGroupModifier) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductGroupModifierDAO dao = factory.GetProductGroupModifierDAO(connection)) - { - return dao.Insert(productGroupModifier); - } - } - } - public static bool Update(ProductGroupModifierBO productGroupModifier) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductGroupModifierDAO dao = factory.GetProductGroupModifierDAO(connection)) - { - return dao.Update(productGroupModifier); - } - } - } - public static bool Delete(int productGroupModifierID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductGroupModifierDAO dao = factory.GetProductGroupModifierDAO(connection)) - { - return dao.Delete(productGroupModifierID); - } - } - } - public static List GetProductGroupModifiers() - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductGroupModifierDAO dao = factory.GetProductGroupModifierDAO(connection)) - { - return dao.GetProductGroupModifiers(); - } - } - } - - public static List GetProductGroupModifiers(Guid productGroupID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductGroupModifierDAO dao = factory.GetProductGroupModifierDAO(connection)) - { - return dao.GetProductGroupModifiers(productGroupID); - } - } - } - public static bool HasCompulsoryModifier(Guid productGroupID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IProductGroupModifierDAO dao = factory.GetProductGroupModifierDAO(connection)) - { - return dao.HasCompulsoryModifier(productGroupID); - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/Properties/AssemblyInfo.cs b/Tanshu.Accounts.BI/Properties/AssemblyInfo.cs deleted file mode 100644 index 8854534..0000000 --- a/Tanshu.Accounts.BI/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Tanshu.Accounts.LiteDBService")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Tanshu.Accounts.LiteDBService")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("70c26187-076c-49a3-8cf1-faa4ba15fc82")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Tanshu.Accounts.BI/SaleVoucherBI.cs b/Tanshu.Accounts.BI/SaleVoucherBI.cs deleted file mode 100644 index e481aa1..0000000 --- a/Tanshu.Accounts.BI/SaleVoucherBI.cs +++ /dev/null @@ -1,224 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.SqlClient; -using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.DAOFactory; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public class SaleVoucherBI : ISaleVoucherBI - { - public SalesBillItemBO GetDefaultSaleBillItem(Guid productID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISaleVoucherMixDAO dao = factory.GetSaleVoucherMixDAO(connection)) - { - return dao.GetDefaultSaleBillItem(productID); - } - } - } - public decimal GetProductDiscountLimit(Guid productID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISaleVoucherMixDAO dao = factory.GetSaleVoucherMixDAO(connection)) - { - return dao.GetProductDiscountLimit(productID); - } - } - } - public bool IsBillPrinted(Guid voucherID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISaleVoucherMixDAO dao = factory.GetSaleVoucherMixDAO(connection)) - { - return dao.IsBillPrinted(voucherID); - } - } - } - public bool Insert(SaleVoucherBO saleVoucher, List inventory) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IVoucherDAO vdao = factory.GetVoucherDAO(connection)) - { - using (ISaleVoucherDAO svdao = factory.GetSaleVoucherDAO(connection)) - { - using (IInventoryDAO idao = factory.GetInventoryDAO(connection)) - { - connection.BeginTransaction(); - #region Voucher - VoucherBO myVoucher = (VoucherBO)saleVoucher; - myVoucher.Date = null; - vdao.Insert(myVoucher); - #endregion - #region Transaction Sale - svdao.Insert(saleVoucher); - #endregion - #region Inventory - foreach (InventoryBO i in inventory) - { - i.VoucherID = saleVoucher.VoucherID; - InventoryBO myInventory = i; - idao.Insert(myInventory); - } - #endregion - connection.CommitTransaction(); - return true; - } - } - } - } - } - public bool Update(SaleVoucherBO saleVoucher, List inventory) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IVoucherDAO vdao = factory.GetVoucherDAO(connection)) - { - using (ISaleVoucherDAO svdao = factory.GetSaleVoucherDAO(connection)) - { - using (IInventoryDAO idao = factory.GetInventoryDAO(connection)) - { - connection.BeginTransaction(); - #region Voucher - VoucherBO myVoucher = (VoucherBO)saleVoucher; - vdao.Update(myVoucher); - #endregion - #region Transaction Sale - svdao.Update(saleVoucher); - #endregion - #region Inventory - idao.Delete(saleVoucher.VoucherID); - foreach (InventoryBO i in inventory) - { - i.VoucherID = saleVoucher.VoucherID; - InventoryBO myInventory = i; - idao.Insert(myInventory); - } - #endregion - connection.CommitTransaction(); - return true; - } - } - } - } - } - public bool GetSaleVoucher(Guid voucherID, ref SaleVoucherBO voucherSale, ref List iList) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISaleVoucherDAO svdao = factory.GetSaleVoucherDAO(connection)) - { - using (IInventoryDAO idao = factory.GetInventoryDAO(connection)) - { - voucherSale = svdao.GetVoucherSale(voucherID); - iList = idao.GetInventories(voucherID); - return true; - } - } - } - } - - public List GetPendingBills(PendingType list) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISaleVoucherMixDAO dao = factory.GetSaleVoucherMixDAO(connection)) - { - return dao.GetPendingBills(list); - } - } - } - - public Guid? GetPendingVoucherID(string tableID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISaleVoucherMixDAO dao = factory.GetSaleVoucherMixDAO(connection)) - { - return dao.GetPendingVoucherID(tableID); - } - } - } - public List SaleInventory(Dictionary.ValueCollection list, Guid? voucherID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISaleVoucherMixDAO dao = factory.GetSaleVoucherMixDAO(connection)) - { - return dao.SaleInventory(list, voucherID); - } - } - } - public void GetComplexBillInformation(Guid voucherID, Guid complexProductID, ref decimal rate, ref decimal quantity, ref string name) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISaleVoucherMixDAO dao = factory.GetSaleVoucherMixDAO(connection)) - { - dao.GetComplexBillInformation(voucherID, complexProductID, ref rate, ref quantity, ref name); - } - } - } - public void SetAlarm(Guid voucherID, DateTime? alarmTime) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISaleVoucherDAO dao = factory.GetSaleVoucherDAO(connection)) - { - dao.SetAlarm(voucherID, alarmTime); - } - } - } - public void VoidBill(Guid voucherID, string reason) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISaleVoucherDAO dao = factory.GetSaleVoucherDAO(connection)) - { - dao.VoidBill(voucherID, reason); - } - } - } - - public void DeclareBillsPaid(Guid userID, List billList, bool creditCard) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISaleVoucherMixDAO dao = factory.GetSaleVoucherMixDAO(connection)) - { - dao.DeclareBillsPaid(userID, billList, creditCard); - } - } - } - - public void ToggleImportant(Guid voucherID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISaleVoucherMixDAO dao = factory.GetSaleVoucherMixDAO(connection)) - { - dao.ToggleImportant(voucherID); - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/SalesAnalysisBI.cs b/Tanshu.Accounts.BI/SalesAnalysisBI.cs deleted file mode 100644 index a170a14..0000000 --- a/Tanshu.Accounts.BI/SalesAnalysisBI.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -//using System.Linq; -using System.Text; -using System.Data.SqlClient; -using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.DAOFactory; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public class SalesAnalysisBI : ISalesAnalysisBI - { - public List GetSaleDetail(DateTime startDate, DateTime finishDate, Guid costCenterID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISalesAnalysisDAO dao = factory.GetSalesAnalysisDAO(connection)) - { - return dao.GetSaleDetail(startDate, finishDate, costCenterID); - } - } - } - public List GetSale(DateTime startDate, DateTime finishDate) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISalesAnalysisDAO dao = factory.GetSalesAnalysisDAO(connection)) - { - return dao.GetSale(startDate, finishDate); - } - } - } - public void GetAdditionalInfo(ref decimal freeSale, ref decimal voids, ref decimal pending, ref decimal net, ref decimal tax, DateTime startDate, DateTime finishDate) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISalesAnalysisDAO dao = factory.GetSalesAnalysisDAO(connection)) - { - dao.GetAdditionalInfo(ref freeSale, ref voids, ref pending, ref net, ref tax, startDate, finishDate); - } - } - } - public List GetSalesTaxReturn(DateTime startDate, DateTime finishDate, ref decimal freeSale, ref decimal voids, ref decimal pending, ref decimal net, ref decimal tax) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (ISalesAnalysisDAO dao = factory.GetSalesAnalysisDAO(connection)) - { - return dao.GetSalesTaxReturn(startDate, finishDate, ref freeSale, ref voids, ref pending, ref net, ref tax); - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/Tanshu.Accounts.BI.csproj b/Tanshu.Accounts.BI/Tanshu.Accounts.BI.csproj deleted file mode 100644 index 0c68bb6..0000000 --- a/Tanshu.Accounts.BI/Tanshu.Accounts.BI.csproj +++ /dev/null @@ -1,112 +0,0 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {0B43ECD4-3701-4CD3-82EC-617D7D590BBB} - Library - Properties - Tanshu.Accounts.BI - Tanshu.Accounts.BI - {3D9AD99F-2412-4246-B90B-4EAA41C64699};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - /client:"WcfTestClient.exe" - v3.5 - - - true - full - false - ..\Bin\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\Bin\ - TRACE - prompt - 4 - - - - - - 3.5 - - - - 3.0 - - - 3.0 - - - - - 3.5 - - - False - ..\Include\Tanshu.Common.dll - - - False - ..\Include\Tanshu.Data.dll - - - False - ..\Include\Tanshu.Logging.dll - - - - - - - - - - - - - - - - - - - - - - - - - - {59A6F8B8-12EE-4D8E-BEBB-61CB665A2C17} - Tanshu.Accounts.Contracts - - - {AC7AA7C5-4712-4992-B733-092D703E7AA9} - Tanshu.Accounts.DAOFactory - - - - - - - - - True - - - - - \ No newline at end of file diff --git a/Tanshu.Accounts.BI/Tanshu.Accounts.BI.csproj.user b/Tanshu.Accounts.BI/Tanshu.Accounts.BI.csproj.user deleted file mode 100644 index 303b350..0000000 --- a/Tanshu.Accounts.BI/Tanshu.Accounts.BI.csproj.user +++ /dev/null @@ -1,17 +0,0 @@ - - - ProjectFiles - - - - - - RunFiles - - - False - - - - - \ No newline at end of file diff --git a/Tanshu.Accounts.BI/UserBI.cs b/Tanshu.Accounts.BI/UserBI.cs deleted file mode 100644 index 2957bc8..0000000 --- a/Tanshu.Accounts.BI/UserBI.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System; -using System.Collections.Generic; -//using System.Linq; -using System.Text; -using Tanshu.Accounts.Contracts; -using System.Data.SqlClient; -using Tanshu.Accounts.DAOFactory; -using Tanshu.Data.DAO; - - -namespace Tanshu.Accounts.BI -{ - public class UserBI : IUserBI - { - public UserBO GetUser(Guid userID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IUserDAO dao = factory.GetUserDAO(connection)) - { - return dao.GetUser(userID); - } - } - } - public bool ChangePassword(UserBO userData, string newPassword) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IUserDAO dao = factory.GetUserDAO(connection)) - { - return dao.ChangePassword(userData, newPassword); - } - } - } - public List GetUsers() - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IUserDAO dao = factory.GetUserDAO(connection)) - { - return dao.GetUsers(); - } - } - } - public List GetFilteredUsers(Dictionary filter) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IUserDAO dao = factory.GetUserDAO(connection)) - { - return dao.GetFilteredUsers(filter); - } - } - } - public bool UserExists(string userName) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IUserDAO dao = factory.GetUserDAO(connection)) - { - return dao.UserExists(userName); - } - } - } - public bool Insert(UserBO user) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IUserDAO dao = factory.GetUserDAO(connection)) - { - return dao.Insert(user); - } - } - } - - public bool Update(UserBO user) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IUserDAO dao = factory.GetUserDAO(connection)) - { - return dao.Update(user); - } - } - } - - public bool Delete(Guid userID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IUserDAO dao = factory.GetUserDAO(connection)) - { - return dao.Delete(userID); - } - } - - } - } -} diff --git a/Tanshu.Accounts.BI/WaiterBI.cs b/Tanshu.Accounts.BI/WaiterBI.cs deleted file mode 100644 index e9194ca..0000000 --- a/Tanshu.Accounts.BI/WaiterBI.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Tanshu.Accounts.Contracts; -using System.Data.SqlClient; -using Tanshu.Accounts.DAOFactory; -using Tanshu.Data.DAO; - -namespace Tanshu.Accounts.BI -{ - public class WaiterBI : IWaiterBI - { - public bool Insert(WaiterBO waiter) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IWaiterDAO dao = factory.GetWaiterDAO(connection)) - { - - return dao.Insert(waiter); - } - } - } - public bool Update(WaiterBO waiter) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IWaiterDAO dao = factory.GetWaiterDAO(connection)) - { - - return dao.Update(waiter); - } - } - } - public bool Delete(Guid waiterID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IWaiterDAO dao = factory.GetWaiterDAO(connection)) - { - - return dao.Delete(waiterID); - } - } - } - - public WaiterBO GetWaiter(Guid waiterID) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IWaiterDAO dao = factory.GetWaiterDAO(connection)) - { - - return dao.GetWaiter(waiterID); - } - } - } - public WaiterBO GetWaiter(int code) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IWaiterDAO dao = factory.GetWaiterDAO(connection)) - { - - return dao.GetWaiter(code); - } - } - } - public List GetWaiters() - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IWaiterDAO dao = factory.GetWaiterDAO(connection)) - { - - return dao.GetWaiters(); - } - } - } - public List GetFilteredWaiters(Dictionary filter) - { - GetFactory factory = GetFactory.GetDAOFactory(Database.GetFactoryType); - using (IConnectionDAO connection = factory.Connection) - { - using (IWaiterDAO dao = factory.GetWaiterDAO(connection)) - { - - return dao.GetFilteredWaiters(filter); - } - } - } - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/AdvanceDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/AdvanceDAO.cs deleted file mode 100644 index ee70851..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/AdvanceDAO.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IAdvanceDAO :IDisposable - { - void Insert(AdvanceBO advance); - List GetAdvances(DateTime fromDate, DateTime toDate, bool all); - void Adjust(Guid advanceID, Guid userID); - - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/CheckoutDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/CheckoutDAO.cs deleted file mode 100644 index 32f3c68..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/CheckoutDAO.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface ICheckoutDAO :IDisposable - { - decimal GetPending(ref string info); - decimal GetCreditCard(ref string info); - decimal GetVoids(ref string info); - decimal GetOpenings(); - decimal GetReceipts(); - decimal GetPayments(); - decimal GetAdditionalVoids(); - decimal GetRetainedOvernight(); - decimal GetAdvancesReceived(); - decimal GetAdvancesAdjusted(); - string GetPaymentString(); - string GetActiveCashiers(); - decimal GetNetSales(); - decimal GetDiscountsBills(ref string info); - - decimal GetOldPending(); - decimal GetOldReceipts(); - decimal GetOldVoided(); - - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/CustomerDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/CustomerDAO.cs deleted file mode 100644 index a0cd817..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/CustomerDAO.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface ICustomerDAO :IDisposable - { - void Insert(CustomerBO customer); - void Update(CustomerBO customer); - void Delete(Guid customerID); - - CustomerBO GetCustomer(Guid customerID); - List GetFilteredCustomers(Dictionary filter); - List GetCustomerLedgers(); - List GetCustomers(); - List GetCustomers(Guid customerID); - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/FoodTableDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/FoodTableDAO.cs deleted file mode 100644 index a4052bb..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/FoodTableDAO.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IFoodTableDAO : IDisposable - { - void Insert(FoodTableBO foodTable); - void Update(FoodTableBO foodTable); - bool Delete(int tableID); - FoodTableBO GetFoodTable(int tableID); - List GetFoodTables(); - } -} \ No newline at end of file diff --git a/Tanshu.Accounts.Contracts/DAOFactory/InventoryDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/InventoryDAO.cs deleted file mode 100644 index e4333ce..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/InventoryDAO.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IInventoryDAO : IDisposable - { - bool Insert(InventoryBO inventory); - bool Update(InventoryBO inventory); - bool Delete(Guid voucherID); - bool Delete(Guid voucherID, Guid productID); - - List GetInventories(Guid voucherID); - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/LedgerDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/LedgerDAO.cs deleted file mode 100644 index acc99c2..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/LedgerDAO.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface ILedgerDAO : IDisposable - { - bool Insert(LedgerBO ledger); - LedgerBO GetLedger(Guid ledgerID); - LedgerBO GetLedger(string name); - List GetLedgers(char type); - bool Delete(Guid ledgerID); - bool Update(LedgerBO ledger); - List GetLedgers(); - - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/ManagementDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/ManagementDAO.cs deleted file mode 100644 index d2bfdc1..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/ManagementDAO.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using Tanshu.Accounts.Contracts; -using System.Collections.Generic; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IManagementDAO : IDisposable - { - decimal GetBalance(decimal? tax); - List GetUpdateBillList(decimal tax, bool voided, bool paid, bool creditCard); - decimal Update(Guid voucherID, decimal tax); - - List GetPaidBills(); - - void Reorder(ShowProgessDelegate showProgressDelegate); - - bool MergeData(string sourceDB, string targetDB); - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/MembershipDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/MembershipDAO.cs deleted file mode 100644 index 05abffd..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/MembershipDAO.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IMembershipDAO : IDisposable - { - bool ValidateUser(string name, string password); - - bool IsUserInRole(string username, string roleName); - - bool IsUserInRole(Guid userID, string roleName); - - string[] GetRolesForUser(string username); - - UserBO GetUserFromName(string name); - - string[] GetAllRoles(); - - void AddUsersToRoles(string[] usernames, string[] roleNames); - - void RemoveUsersFromRoles(string[] usernames, string[] roleNames); - - bool RoleExists(string roleID); - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/ModifierDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/ModifierDAO.cs deleted file mode 100644 index b4f382a..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/ModifierDAO.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IModifierDAO : IDisposable - { - void Insert(ModifierBO modifier); - //void Update(ModifierBO modifier); - void Delete(string modifierID); - ModifierBO GetModifier(string modifierID); - List GetModifiers(); - } -} \ No newline at end of file diff --git a/Tanshu.Accounts.Contracts/DAOFactory/PaymentDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/PaymentDAO.cs deleted file mode 100644 index bcfb22c..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/PaymentDAO.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IPaymentDAO : IDisposable - { - void Insert(PaymentBO payment); - List GetPayments(Guid? userID, DateTime fromDate, DateTime toDate); - void Delete(Guid paymentID); - } -} \ No newline at end of file diff --git a/Tanshu.Accounts.Contracts/DAOFactory/PrintLocationDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/PrintLocationDAO.cs deleted file mode 100644 index 9fda4be..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/PrintLocationDAO.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IPrintLocationDAO : IDisposable - { - void Insert(PrintLocationBO printLocation); - void Update(PrintLocationBO printLocation); - bool Delete(int tableID); - PrintLocationBO GetPrintLocation(int printLocationID); - PrintLocationBO GetPrintLocation(Guid? productTypeID, string location); - } -} \ No newline at end of file diff --git a/Tanshu.Accounts.Contracts/DAOFactory/ProductDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/ProductDAO.cs deleted file mode 100644 index 6399661..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/ProductDAO.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IProductDAO : IDisposable - { - bool Insert(ProductBO product); - ProductBO GetProduct(Guid productID); - bool Delete(Guid productID); - bool Update(ProductBO product); - ProductBO GetProduct(string nameAndUnits); - decimal GetProductStock(DateTime date, Guid productID, Guid? voucherID); - - List GetProducts(); - - void UpdateShortName(); - - List GetFilteredProducts(Dictionary filter); - - List GetProducts(string name, int skip, int count); - - List GetProducts(Guid productTypeID); - - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/ProductGroupDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/ProductGroupDAO.cs deleted file mode 100644 index 106f6fc..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/ProductGroupDAO.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IProductGroupDAO : IDisposable - { - bool Insert(ProductGroupBO productType); - ProductGroupBO GetProductGroup(Guid productGroupID); - ProductGroupBO GetProductGroup(string name); - bool Delete(Guid productGroupID); - bool Update(ProductGroupBO productGroup); - List GetProductGroups(); - - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/ProductGroupModifierDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/ProductGroupModifierDAO.cs deleted file mode 100644 index 4b1cb96..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/ProductGroupModifierDAO.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IProductGroupModifierDAO : IDisposable - { - bool Insert(ProductGroupModifierBO productGroupModifier); - bool Delete(int productGroupModifierID); - bool Update(ProductGroupModifierBO productGroupModifier); - List GetProductGroupModifiers(Guid productGroupID); - List GetProductGroupModifiers(); - bool HasCompulsoryModifier(Guid productGroupID); - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/SaleVoucherDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/SaleVoucherDAO.cs deleted file mode 100644 index ba6ab90..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/SaleVoucherDAO.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface ISaleVoucherDAO : IDisposable - { - bool Insert(SaleVoucherBO saleVoucher); - bool Update(SaleVoucherBO saleVoucher); - void SetAlarm(Guid voucherID, DateTime? alarmTime); - void VoidBill(Guid voucherID, string reason); - SaleVoucherBO GetVoucherSale(Guid voucherID); - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/SaleVoucherMixDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/SaleVoucherMixDAO.cs deleted file mode 100644 index fdada20..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/SaleVoucherMixDAO.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface ISaleVoucherMixDAO : IDisposable - { - SalesBillItemBO GetDefaultSaleBillItem(Guid productID); - decimal GetProductDiscountLimit(Guid productID); - bool IsBillPrinted(Guid voucherID); - - List GetPendingBills(PendingType list); - Nullable GetPendingVoucherID(string tableID); - List SaleInventory(Dictionary.ValueCollection list, Guid? voucherID); - void GetComplexBillInformation(Guid voucherID, Guid complexProductID, ref decimal rate, ref decimal quantity, ref string name); - - void DeclareBillsPaid(Guid userID, List billList, bool creditCard); - - void ToggleImportant(Guid voucherID); - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/SalesAnalysisDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/SalesAnalysisDAO.cs deleted file mode 100644 index ca2e72b..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/SalesAnalysisDAO.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface ISalesAnalysisDAO : IDisposable - { - List GetSalesTaxReturn(DateTime startDate, DateTime finishDate, ref decimal freeSale, ref decimal voids, ref decimal pending, ref decimal net, ref decimal tax); - void GetAdditionalInfo(ref decimal freeSale, ref decimal voids, ref decimal pending, ref decimal net, ref decimal tax, DateTime startDate, DateTime finishDate); - List GetSaleDetail(DateTime startDate, DateTime finishDate, Guid costCenterID); - List GetSale(DateTime startDate, DateTime finishDate); - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/TaxDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/TaxDAO.cs deleted file mode 100644 index 64317c9..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/TaxDAO.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface ITaxDAO : IDisposable - { - List GetTaxes(); - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/UserDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/UserDAO.cs deleted file mode 100644 index 2dbaf07..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/UserDAO.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IUserDAO : IDisposable - { - UserBO GetUser(Guid userID); - List GetUsers(); - List GetFilteredUsers(Dictionary filter); - bool UserExists(string userName); - bool Insert(UserBO user); - - bool ChangePassword(UserBO userData, string newPassword); - - bool Update(UserBO user); - - bool Delete(Guid userID); - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/VoucherDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/VoucherDAO.cs deleted file mode 100644 index 344a944..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/VoucherDAO.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IVoucherDAO : IDisposable - { - bool Insert(VoucherBO voucher); - VoucherBO GetVoucher(Guid voucherID); - bool Delete(Guid voucherID); - bool Update(VoucherBO voucher); - } -} diff --git a/Tanshu.Accounts.Contracts/DAOFactory/WaiterDAO.cs b/Tanshu.Accounts.Contracts/DAOFactory/WaiterDAO.cs deleted file mode 100644 index 01b459b..0000000 --- a/Tanshu.Accounts.Contracts/DAOFactory/WaiterDAO.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.DAOFactory -{ - public interface IWaiterDAO : IDisposable - { - bool Insert(WaiterBO waiter); - bool Update(WaiterBO waiter); - bool Delete(Guid waiterID); - - WaiterBO GetWaiter(Guid waiterID); - WaiterBO GetWaiter(int code); - - List GetWaiters(); - List GetFilteredWaiters(Dictionary filter); - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/SalesBillItemBO.cs b/Tanshu.Accounts.Contracts/Data Contracts Display/BillInventoryBO.cs similarity index 74% rename from Tanshu.Accounts.Contracts/Data Contracts/SalesBillItemBO.cs rename to Tanshu.Accounts.Contracts/Data Contracts Display/BillInventoryBO.cs index 752f929..c473592 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/SalesBillItemBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts Display/BillInventoryBO.cs @@ -1,36 +1,30 @@ using System; using System.Runtime.Serialization; +using Tanshu.Accounts.Entities; +using System.Collections.Generic; namespace Tanshu.Accounts.Contracts { - public class SalesBillItemBO + public class BillInventory { - public Guid productID; + public int ProductID { get; set; } + public string Name { get; set; } + private decimal price; - private decimal quantity; - private decimal discount; - private decimal printed; - - public SalesBillItemBO() - { - quantity = 1; - discount = 0; - printed = 0; - serviceCharge = 0.1M; - } - public decimal Price { get { return price; } set { - if (value < 0) + if (value <= 0) throw new ArgumentException("Price has to be non-negative greater than zero."); else price = value; } } + + private decimal quantity = 1; public decimal Quantity { get { return quantity; } @@ -43,6 +37,7 @@ namespace Tanshu.Accounts.Contracts } } + private decimal discount = 0; public decimal Discount { get { return discount; } @@ -58,38 +53,23 @@ namespace Tanshu.Accounts.Contracts } public decimal Tax { get; set; } - - private decimal serviceCharge; - public decimal ServiceCharge - { - get { return serviceCharge; } - set - { - if (value < 0) - throw new ArgumentException("Service Charge has to be non-negative greater than or equal to zero."); - else if (value > 1) - throw new ArgumentException("Service Charge has to be less than one."); - else - serviceCharge = value; - } - - } - - #region Calculated Amounts - public decimal ServiceChargeAmount - { - get - { - return quantity * price * (1 - discount) * serviceCharge; - } - } public decimal TaxAmount { get { - return quantity * price * (1 - discount) * (1 + serviceCharge) * Tax; + return quantity * price * (1 - discount) * (1 + ServiceCharge) * Tax; } } + + public decimal ServiceCharge { get; set; } + public decimal ServiceChargeAmount + { + get + { + return quantity * price * (1 - discount) * ServiceCharge; + } + } + public decimal DiscountAmount { get @@ -97,6 +77,7 @@ namespace Tanshu.Accounts.Contracts return quantity * price * discount; } } + public decimal GrossAmount { get @@ -104,15 +85,8 @@ namespace Tanshu.Accounts.Contracts return quantity * price * (1 - discount); } } - public decimal Value - { - get - { - return price * quantity * (1 - discount) * (1 + serviceCharge) * (1 + Tax); - } - } - #endregion + private decimal printed; public decimal Printed { get { return printed; } @@ -125,7 +99,13 @@ namespace Tanshu.Accounts.Contracts } } - + public decimal Value + { + get + { + return price * quantity * (1 - discount) * (1 + ServiceCharge) * (1 + Tax); + } + } public decimal Additional { get @@ -134,7 +114,7 @@ namespace Tanshu.Accounts.Contracts } } - public bool isNew = true; + public bool isNew; public string Display { @@ -146,5 +126,12 @@ namespace Tanshu.Accounts.Contracts return output; } } + public IList Modifiers { get; set; } + public BillInventory() + { + printed = 0; + isNew = true; + Modifiers = new List(); + } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/BillItemKey.cs b/Tanshu.Accounts.Contracts/Data Contracts Display/BillItemKey.cs similarity index 81% rename from Tanshu.Accounts.Contracts/Data Contracts/BillItemKey.cs rename to Tanshu.Accounts.Contracts/Data Contracts Display/BillItemKey.cs index 19d39f1..2076513 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/BillItemKey.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts Display/BillItemKey.cs @@ -5,13 +5,13 @@ namespace Tanshu.Accounts.Contracts { public class BillItemKey { - public BillItemKey(Guid productID, bool isNew) + public BillItemKey(int productID, bool isNew) { ProductID = productID; IsNew = isNew; } - public Guid ProductID + public int ProductID { get; private set; @@ -23,7 +23,7 @@ namespace Tanshu.Accounts.Contracts } public override int GetHashCode() { - return string.Format("{0} - {1}", ProductID, IsNew).GetHashCode(); + return ProductID.GetHashCode() ^ IsNew.GetHashCode(); } public override bool Equals(object obj) { @@ -39,6 +39,9 @@ namespace Tanshu.Accounts.Contracts public static bool operator ==(BillItemKey a, BillItemKey b) { + if (object.ReferenceEquals(null, a)) + return object.ReferenceEquals(null, b); + if (!(a is BillItemKey)) return false; if (!(b is BillItemKey)) diff --git a/Tanshu.Accounts.Contracts/Data Contracts Display/PendingBillsBO.cs b/Tanshu.Accounts.Contracts/Data Contracts Display/PendingBillsBO.cs new file mode 100644 index 0000000..2168111 --- /dev/null +++ b/Tanshu.Accounts.Contracts/Data Contracts Display/PendingBillsBO.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using FluentNHibernate.Mapping; + +namespace Tanshu.Accounts.Contracts +{ + public enum PendingType + { + Today = 0, + Week = 1, + All = 2, + Important = 4, + Alarms = 8 + } + + public class PendingBills + { + public virtual Guid voucherID { get; set; } + public virtual string BillNo { get; set; } + public virtual string Kot { get; set; } + public virtual string TableID { get; set; } + public virtual decimal Amount { get; set; } + public virtual bool Important { get; set; } + public virtual bool Alarm { get; set; } + public virtual DateTime BookingTime { get; set; } + public virtual DateTime LastEdited { get; set; } + public virtual string Waiter { get; set; } + public virtual string Cashier { get; set; } + public virtual bool Printed { get; set; } + public virtual Nullable AlarmTime { get; set; } + } +} diff --git a/Tanshu.Accounts.Contracts/Data Contracts Display/ProductDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts Display/ProductDisplayBO.cs new file mode 100644 index 0000000..d6d01df --- /dev/null +++ b/Tanshu.Accounts.Contracts/Data Contracts Display/ProductDisplayBO.cs @@ -0,0 +1,13 @@ +using System; +using System.Runtime.Serialization; +using FluentNHibernate.Mapping; +using Tanshu.Accounts.Entities; + +namespace Tanshu.Accounts.Contracts +{ + public class ProductDisplay : Product + { + public virtual decimal Price { get; set; } + public virtual string Group { get; set; } + } +} diff --git a/Tanshu.Accounts.Contracts/Data Contracts Display/ProductDisplaySmallBO.cs b/Tanshu.Accounts.Contracts/Data Contracts Display/ProductDisplaySmallBO.cs new file mode 100644 index 0000000..d150b4d --- /dev/null +++ b/Tanshu.Accounts.Contracts/Data Contracts Display/ProductDisplaySmallBO.cs @@ -0,0 +1,15 @@ +using System; +using System.Runtime.Serialization; +using FluentNHibernate.Mapping; + +namespace Tanshu.Accounts.Contracts +{ + public class ProductDisplaySmall + { + public virtual int Code { get; set; } + public virtual string Name { get; set; } + public virtual decimal Price { get; set; } + public virtual string Category { get; set; } + public virtual int ProductID { get; set; } + } +} diff --git a/Tanshu.Accounts.Contracts/Data Contracts Display/SalesAnalysisBO.cs b/Tanshu.Accounts.Contracts/Data Contracts Display/SalesAnalysisBO.cs new file mode 100644 index 0000000..43cb002 --- /dev/null +++ b/Tanshu.Accounts.Contracts/Data Contracts Display/SalesAnalysisBO.cs @@ -0,0 +1,23 @@ +using System; +using System.Runtime.Serialization; +using FluentNHibernate.Mapping; + +namespace Tanshu.Accounts.Contracts +{ + public class SalesAnalysis + { + public virtual int TypeID { get; set; } + public virtual string Section { get; set; } + public virtual decimal Quantity { get; set; } + public virtual decimal Gross { get; set; } + public virtual decimal Net { get; set; } + } + + public class SalesAnalysisDetail + { + public virtual string Section { get; set; } + public virtual string Product { get; set; } + public virtual decimal Quantity { get; set; } + public virtual decimal Amount { get; set; } + } +} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/AdvanceBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/AdvanceBO.cs index 0c4b4de..fd31af8 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/AdvanceBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/AdvanceBO.cs @@ -1,24 +1,18 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; +using Tanshu.Accounts.Entities.Auth; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - [DataContract] - public class AdvanceBO + public class Advance { - [DataMember] - public Guid AdvanceID { get; set; } - [DataMember] - public decimal Amount { get; set; } - [DataMember] - public string Narration { get; set; } - [DataMember] - public Guid CashierIn { get; set; } - [DataMember] - public DateTime DateIn { get; set; } - [DataMember] - public Guid? CashierOut { get; set; } - [DataMember] - public DateTime? DateOut { get; set; } + public virtual int AdvanceID { get; private set; } + public virtual decimal Amount { get; set; } + public virtual string Narration { get; set; } + public virtual User CashierIn { get; set; } + public virtual DateTime DateIn { get; set; } + public virtual User CashierOut { get; set; } + public virtual DateTime? DateOut { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/AdvanceDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/AdvanceDisplayBO.cs deleted file mode 100644 index b3ae081..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/AdvanceDisplayBO.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class AdvanceDisplayBO : AdvanceBO - { - [DataMember] - public string Cashier { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/Auth/Group.cs b/Tanshu.Accounts.Contracts/Data Contracts/Auth/Group.cs new file mode 100644 index 0000000..e3fdf59 --- /dev/null +++ b/Tanshu.Accounts.Contracts/Data Contracts/Auth/Group.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.Serialization; +using FluentNHibernate.Mapping; +using System.Collections.Generic; + +namespace Tanshu.Accounts.Entities.Auth +{ + public class Group + { + public virtual int GroupID { get; set; } + public virtual string Name { get; set; } + public virtual IList RoleGroups { get; set; } + public virtual IList UserGroups { get; set; } + public Group() + { + RoleGroups = new List(); + UserGroups = new List(); + } + } +} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/Auth/Role.cs b/Tanshu.Accounts.Contracts/Data Contracts/Auth/Role.cs new file mode 100644 index 0000000..7bacaa5 --- /dev/null +++ b/Tanshu.Accounts.Contracts/Data Contracts/Auth/Role.cs @@ -0,0 +1,19 @@ +using System; +using System.Runtime.Serialization; +using FluentNHibernate.Mapping; +using System.Collections.Generic; + +namespace Tanshu.Accounts.Entities.Auth +{ + public class Role + { + public virtual int RoleID { get; set; } + public virtual string Name { get; set; } + public virtual IList Groups { get; set; } + + public Role() + { + Groups = new List(); + } + } +} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/Auth/RoleGroup.cs b/Tanshu.Accounts.Contracts/Data Contracts/Auth/RoleGroup.cs new file mode 100644 index 0000000..a61b436 --- /dev/null +++ b/Tanshu.Accounts.Contracts/Data Contracts/Auth/RoleGroup.cs @@ -0,0 +1,13 @@ +using System; +using System.Runtime.Serialization; +using FluentNHibernate.Mapping; + +namespace Tanshu.Accounts.Entities.Auth +{ + public class RoleGroup + { + public virtual int RoleGroupID { get; set; } + public virtual Role Role { get; set; } + public virtual Group Group { get; set; } + } +} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/Auth/UserBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/Auth/UserBO.cs new file mode 100644 index 0000000..7b25ea4 --- /dev/null +++ b/Tanshu.Accounts.Contracts/Data Contracts/Auth/UserBO.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.Serialization; +using FluentNHibernate.Mapping; +using System.Collections.Generic; + +namespace Tanshu.Accounts.Entities.Auth +{ + public class User + { + public virtual int UserID { get; set; } + public virtual string Name { get; set; } + public virtual string Password { get; set; } + public virtual bool LockedOut { get; set; } + public virtual IList Groups { get; set; } + public User() + { + Groups = new List(); + } + } +} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/Auth/UserGroup.cs b/Tanshu.Accounts.Contracts/Data Contracts/Auth/UserGroup.cs new file mode 100644 index 0000000..5121c1d --- /dev/null +++ b/Tanshu.Accounts.Contracts/Data Contracts/Auth/UserGroup.cs @@ -0,0 +1,13 @@ +using System; +using System.Runtime.Serialization; +using FluentNHibernate.Mapping; + +namespace Tanshu.Accounts.Entities.Auth +{ + public class UserGroup + { + public virtual int UserGroupID { get; set; } + public virtual User User { get; set; } + public virtual Group Group { get; set; } + } +} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/CostCenterBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/CostCenterBO.cs deleted file mode 100644 index 38d3562..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/CostCenterBO.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class CostCenterBO - { - [DataMember] - public Guid CostCenterID { get; set; } - [DataMember] - public int Code { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public byte[] timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/CustomerBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/CustomerBO.cs index da5bc1b..bf46bd8 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/CustomerBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/CustomerBO.cs @@ -1,29 +1,17 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - [DataContract] - public class CustomerBO + public class Customer { - [DataMember] - public Guid CustomerID { get; set; } - [DataMember] - public int Code { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public Guid LedgerID { get; set; } - [DataMember] - public string Address { get; set; } - [DataMember] - public bool Important { get; set; } - [DataMember] - public string Phone { get; set; } - [DataMember] - public string Remarks { get; set; } - [DataMember] - public byte[] timestamp { get; set; } - + public virtual int CustomerID { get; set; } + public virtual int Code { get; set; } + public virtual string Name { get; set; } + public virtual string Address { get; set; } + public virtual bool Important { get; set; } + public virtual string Phone { get; set; } + public virtual string Remarks { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/FoodTableBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/FoodTableBO.cs index 6f248de..17f83fd 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/FoodTableBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/FoodTableBO.cs @@ -1,11 +1,13 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - public class FoodTableBO + public class FoodTable { - public virtual int TableID { get; set; } + public virtual int FoodTableID { get; set; } public virtual string Name { get; set; } + public virtual string Location { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/InventoryBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/InventoryBO.cs index f34a2f4..6fc15b7 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/InventoryBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/InventoryBO.cs @@ -1,22 +1,18 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; +using System.Collections.Generic; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - [DataContract] - public class InventoryBO + public class Inventory { - [DataMember] - public Guid InventoryID { get; set; } - [DataMember] - public Guid VoucherID { get; set; } - [DataMember] - public Guid ProductID { get; set; } - [DataMember] - public Guid? ComplexProductID { get; set; } + public virtual int InventoryID { get; set; } + public virtual Voucher Voucher { get; set; } + public virtual Product Product { get; set; } + private decimal quantity; - [DataMember] - public decimal Quantity + public virtual decimal Quantity { get { return quantity; } set @@ -26,9 +22,9 @@ namespace Tanshu.Accounts.Contracts CalculateAmount(); } } + private decimal rate; - [DataMember] - public decimal Rate + public virtual decimal Rate { get { return rate; } set @@ -38,33 +34,48 @@ namespace Tanshu.Accounts.Contracts CalculateAmount(); } } + decimal tax; - [DataMember] - public decimal Tax + public virtual decimal Tax { get { return tax; } set { - tax = value; if (amount != null) + tax = value; + if (amount != null) CalculateAmount(); } } - decimal discount; - [DataMember] - public decimal Discount + decimal discount; + public virtual decimal Discount { get { return discount; } set { - discount = value; if (amount != null) + discount = value; + if (amount != null) CalculateAmount(); } } + + private decimal serviceCharge; + public virtual decimal ServiceCharge + { + get { return serviceCharge; } + set + { + discount = value; + if (amount != null) + CalculateAmount(); + } + + } + + public virtual IList InventoryModifier { get; set; } + decimal? amount; - - [DataMember] - public decimal Amount + public virtual decimal Amount { get { @@ -72,19 +83,17 @@ namespace Tanshu.Accounts.Contracts CalculateAmount(); return amount.Value; } + set + { } } - private void CalculateAmount() + + protected void CalculateAmount() { - amount = quantity * rate * (1 + tax) * (1 - discount); + amount = quantity * rate * (1 + tax) * (1 + serviceCharge) * (1 - discount); } - [DataMember] - public bool IsRateFinal { get; set; } - [DataMember] - public bool RateFinal + public Inventory() { - get { return IsRateFinal; } + InventoryModifier = new List(); } - [DataMember] - public byte[] timestamp { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/InventoryDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/InventoryDisplayBO.cs deleted file mode 100644 index 8ca836c..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/InventoryDisplayBO.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class InventoryDisplayBO : InventoryBO - { - [DataMember] - public string ProductName { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/InventoryModifierBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/InventoryModifierBO.cs new file mode 100644 index 0000000..193b5b3 --- /dev/null +++ b/Tanshu.Accounts.Contracts/Data Contracts/InventoryModifierBO.cs @@ -0,0 +1,13 @@ +using System; +using System.Runtime.Serialization; +using FluentNHibernate.Mapping; + +namespace Tanshu.Accounts.Entities +{ + public class InventoryModifier + { + public virtual int InventoryModifierID { get; set; } + public virtual Inventory Inventory { get; set; } + public virtual Modifier Modifier { get; set; } + } +} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/JournalBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/JournalBO.cs deleted file mode 100644 index ddbd45a..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/JournalBO.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class JournalBO - { - [DataMember] - public Guid JournalID { get; set; } - [DataMember] - public Guid VoucherID { get; set; } - [DataMember] - public Guid LedgerID { get; set; } - [DataMember] - public Guid CostCenterID { get; set; } - [DataMember] - public decimal Amount { get; set; } - private int debit; - [DataMember] - public int Debit - { - get { return debit; } - set - { - if ((value == 1) || (value == -1)) - debit = value; - else - throw new ArgumentException("Debit can only be -1 or 1"); - } - } - [DataMember] - public decimal SignedAmount - { - get { return Amount * Debit; } - } - [DataMember] - public byte[] timestamp { get; set; } - - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/JournalDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/JournalDisplayBO.cs deleted file mode 100644 index e0225e4..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/JournalDisplayBO.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class JournalDisplayBO : JournalBO - { - [DataMember] - public string LedgerName { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/LedgerBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/LedgerBO.cs deleted file mode 100644 index 3e5faf2..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/LedgerBO.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class LedgerBO - { - [DataMember] - public Guid LedgerID { get; set; } - [DataMember] - public int Code { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public virtual char Type { get; set; } - [DataMember] - public Guid ParentLedgerID { get; set; } - [DataMember] - public Guid CostCenterID { get; set; } - [DataMember] - public bool IsActive { get; set; } - [DataMember] - public byte[] timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/LedgerDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/LedgerDisplayBO.cs deleted file mode 100644 index a3c6c95..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/LedgerDisplayBO.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class LedgerDisplayBO : LedgerBO - { - [DataMember] - public string CostCenter { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/LedgerTypeBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/LedgerTypeBO.cs deleted file mode 100644 index 5cea3f1..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/LedgerTypeBO.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class LedgerTypeBO - { - [DataMember] - public char TypeID { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public int SortOrder { get; set; } - [DataMember] - public short Debit { get; set; } - [DataMember] - public byte Location { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/ModifierBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/ModifierBO.cs index 7c6ea60..d57a716 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/ModifierBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/ModifierBO.cs @@ -1,10 +1,45 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - public class ModifierBO + public class Modifier { - public string ModifierID { get; set; } + public virtual int ModifierID { get; set; } + public virtual string Name { get; set; } + + public override int GetHashCode() + { + return ModifierID.GetHashCode() ^ Name.GetHashCode(); + } + public override bool Equals(object obj) + { + if (obj is Modifier) + return (this == (Modifier)obj); + else + return false; + } + public override string ToString() + { + return string.Format("{0} - {1}", ModifierID, Name); + } + public static bool operator ==(Modifier a, Modifier b) + { + if (object.ReferenceEquals(null, a)) + return object.ReferenceEquals(null, b); + + if (!(a is Modifier)) + return false; + if (!(b is Modifier)) + return false; + + return a.ModifierID == b.ModifierID && a.Name == b.Name; + } + public static bool operator !=(Modifier a, Modifier b) + { + return !(a == b); + } + } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/PaymentBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/PaymentBO.cs index b9b45ac..7e231d2 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/PaymentBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/PaymentBO.cs @@ -1,23 +1,18 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; +using Tanshu.Accounts.Entities.Auth; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - [DataContract] - public class PaymentBO + public class Payment { - [DataMember] - public Guid PaymentID { get; set; } - [DataMember] - public DateTime Date { get; set; } - [DataMember] - public string Type { get; set; } - [DataMember] - public Guid CashierID { get; set; } - [DataMember] - public decimal Amount { get; set; } - [DataMember] - public string Narration { get; set; } - + public virtual int PaymentID { get; set; } + public virtual DateTime Date { get; set; } + public virtual string Type { get; set; } + public virtual User Cashier { get; set; } + public virtual decimal Amount { get; set; } + public virtual string Narration { get; set; } + } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/PaymentDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/PaymentDisplayBO.cs deleted file mode 100644 index f13ce59..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/PaymentDisplayBO.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class PaymentDisplayBO : PaymentBO - { - [DataMember] - public string Cashier { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/PaymentGroupBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/PaymentGroupBO.cs new file mode 100644 index 0000000..bb44e1e --- /dev/null +++ b/Tanshu.Accounts.Contracts/Data Contracts/PaymentGroupBO.cs @@ -0,0 +1,12 @@ +using System; +using System.Runtime.Serialization; +using FluentNHibernate.Mapping; + +namespace Tanshu.Accounts.Entities +{ + public class PaymentGroup + { + public virtual int PaymentGroupID { get; set; } + public virtual string Name { get; set; } + } +} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/PaymentSheetBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/PaymentSheetBO.cs deleted file mode 100644 index 6d49ef0..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/PaymentSheetBO.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class PaymentSheetBO - { - [DataMember] - public Guid SalaryPaymentID { get; set; } - [DataMember] - public Guid LedgerID { get; set; } - [DataMember] - public Guid VoucherID { get; set; } - [DataMember] - public decimal Opening { get; set; } - [DataMember] - public decimal Salary { get; set; } - [DataMember] - public decimal Total - { - get { return Opening + Salary; } - } - [DataMember] - public int Paid { get; set; } - [DataMember] - public decimal Closing - { - get { return (Opening + Salary) - Paid; } - } - [DataMember] - public byte[] timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/PaymentSheetDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/PaymentSheetDisplayBO.cs deleted file mode 100644 index 4e6325f..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/PaymentSheetDisplayBO.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class PaymentSheetDisplayBO : PaymentSheetBO - { - [DataMember] - public string Name { get; set; } - [DataMember] - public string Department { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/PendingBillsBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/PendingBillsBO.cs deleted file mode 100644 index 3ec0073..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/PendingBillsBO.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public enum PendingType - { - [EnumMember] - Today = 0, - [EnumMember] - Week = 1, - [EnumMember] - All = 2, - [EnumMember] - Important = 4, - [EnumMember] - Alarms = 8 - } - - [DataContract] - public class PendingBillsBO - { - [DataMember] - public Guid voucherID { get; set; } - [DataMember] - public string BillNo { get; set; } - [DataMember] - public string Kot { get; set; } - [DataMember] - public string TableID { get; set; } - [DataMember] - public decimal Amount { get; set; } - [DataMember] - public bool Important { get; set; } - [DataMember] - public bool Alarm { get; set; } - [DataMember] - public DateTime BookingTime { get; set; } - [DataMember] - public DateTime LastEdited { get; set; } - [DataMember] - public string Waiter { get; set; } - [DataMember] - public string Cashier { get; set; } - [DataMember] - public bool Printed { get; set; } - [DataMember] - public Nullable AlarmTime { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/PrintLocationBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/PrintLocationBO.cs index e205ef0..102230d 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/PrintLocationBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/PrintLocationBO.cs @@ -1,12 +1,13 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - public class PrintLocationBO + public class PrintLocation { public int PrintLocationID { get; set; } - public Guid ProductTypeID { get; set; } + public ProductGroup ProductGroup { get; set; } public string Location { get; set; } public string Printer { get; set; } public int Copies { get; set; } @@ -14,51 +15,10 @@ namespace Tanshu.Accounts.Contracts public override bool Equals(System.Object obj) { - // If parameter is null return false. - if (obj == null) - { + if (obj is PrintLocation) + return (this == (PrintLocation)obj); + else return false; - } - - // If parameter cannot be cast to Point return false. - PrintLocationBO p = obj as PrintLocationBO; - if ((System.Object)p == null) - { - return false; - } - - // Return true if the fields match: - //return (PrintLocationID == p.PrintLocationID) - // && (ProductTypeID == p.ProductTypeID) - // && (Location == p.Location) - // && (Printer == p.Printer) - // && (Copies == p.Copies) - // && (CutCode == p.CutCode); - return (Location == p.Location) - && (Printer == p.Printer) - && (Copies == p.Copies) - && (CutCode == p.CutCode); - } - - public bool Equals(PrintLocationBO p) - { - // If parameter is null return false: - if ((object)p == null) - { - return false; - } - - // Return true if the fields match: - //return (PrintLocationID == p.PrintLocationID) - // && (ProductTypeID == p.ProductTypeID) - // && (Location == p.Location) - // && (Printer == p.Printer) - // && (Copies == p.Copies) - // && (CutCode == p.CutCode); - return (Location == p.Location) - && (Printer == p.Printer) - && (Copies == p.Copies) - && (CutCode == p.CutCode); } public override int GetHashCode() @@ -66,6 +26,24 @@ namespace Tanshu.Accounts.Contracts //return PrintLocationID.GetHashCode() ^ ProductTypeID.GetHashCode() ^ Location.GetHashCode() ^ Printer.GetHashCode() ^ Copies.GetHashCode() ^ CutCode.GetHashCode(); return Location.GetHashCode() ^ Printer.GetHashCode() ^ Copies.GetHashCode() ^ CutCode.GetHashCode(); } + public static bool operator ==(PrintLocation a, PrintLocation b) + { + if (object.ReferenceEquals(null, a)) + return object.ReferenceEquals(null, b); + if (!(a is PrintLocation)) + return false; + if (!(b is PrintLocation)) + return false; + + return (a.Location == b.Location) + && (a.Printer == b.Printer) + && (a.Copies == b.Copies) + && (a.CutCode == b.CutCode); + } + public static bool operator !=(PrintLocation a, PrintLocation b) + { + return !(a == b); + } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/ProductBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/ProductBO.cs index e378387..2c493c0 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/ProductBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/ProductBO.cs @@ -1,42 +1,22 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - [DataContract] - public class ProductBO + public class Product { - [DataMember] - public Guid ProductID { get; set; } - [DataMember] - public int Code { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public string Units { get; set; } - [DataMember] - public Guid ProductGroupID { get; set; } - [DataMember] - public Guid SaleLedgerID { get; set; } - [DataMember] - public Guid SaleTaxID { get; set; } - [DataMember] - public decimal SalePrice { get; set; } - [DataMember] - public Guid PurchaseLedgerID { get; set; } - [DataMember] - public Guid PurchaseTaxID { get; set; } - [DataMember] - public decimal PurchasePrice { get; set; } - [DataMember] - public bool Discontinued { get; set; } - [DataMember] - public decimal MinimumLevel { get; set; } - [DataMember] - public decimal MaximumLevel { get; set; } - [DataMember] - public byte[] timestamp { get; set; } - [DataMember] - public int SortOrder { get; set; } + public virtual int ProductID { get; set; } + public virtual int Code { get; set; } + public virtual string Name { get; set; } + public virtual string Units { get; set; } + public virtual ProductGroup ProductGroup { get; set; } + public virtual Tax Tax { get; set; } + public virtual decimal ServiceCharge { get; set; } + public virtual decimal SalePrice { get; set; } + public virtual bool Discontinued { get; set; } + public virtual decimal MinimumLevel { get; set; } + public virtual decimal MaximumLevel { get; set; } + public virtual int SortOrder { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplayBO.cs deleted file mode 100644 index 4f630e4..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplayBO.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class ProductDisplayBO : ProductBO - { - [DataMember] - public decimal Price { get; set; } - [DataMember] - public string Group { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplaySmallBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplaySmallBO.cs deleted file mode 100644 index 21fca42..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplaySmallBO.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class ProductDisplaySmallBO - { - [DataMember] - public int Code { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public decimal Price { get; set; } - [DataMember] - public string Category { get; set; } - [DataMember] - public Guid ProductID { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/ProductGroupBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/ProductGroupBO.cs index de40ba3..437d6d4 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/ProductGroupBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/ProductGroupBO.cs @@ -1,13 +1,20 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; +using System.Collections.Generic; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - public class ProductGroupBO + public class ProductGroup { - public Guid ProductGroupID { get; set; } - public string Name { get; set; } - public decimal DiscountLimit { get; set; } - public bool IsModifierCompulsory { get; set; } + public virtual int ProductGroupID { get; set; } + public virtual string Name { get; set; } + public virtual decimal DiscountLimit { get; set; } + public virtual bool IsModifierCompulsory { get; set; } + public virtual IList Products { get; set; } + public ProductGroup() + { + Products = new List(); + } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/ProductGroupModifierBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/ProductGroupModifierBO.cs index 7bc7c93..033accb 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/ProductGroupModifierBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/ProductGroupModifierBO.cs @@ -1,13 +1,14 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - public class ProductGroupModifierBO + public class ProductGroupModifier { public virtual int ProductGroupModifierID { get; set; } - public virtual Guid? ProductGroupID { get; set; } - public virtual string ModifierID { get; set; } + public virtual ProductGroup ProductGroup { get; set; } + public virtual Modifier Modifier { get; set; } public virtual bool ShowAutomatically { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/RequirementBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/RequirementBO.cs deleted file mode 100644 index a58f6ab..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/RequirementBO.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class RequirementBO - { - [DataMember] - public Guid RequirementID { get; set; } - [DataMember] - public Guid LedgerID { get; set; } - [DataMember] - public DateTime Date { get; set; } - [DataMember] - public Guid ProductID { get; set; } - [DataMember] - public decimal Requirement { get; set; } - [DataMember] - public string Remarks { get; set; } - [DataMember] - public byte Status { get; set; } - // Status 0 - Pending, 1 - Ordered, 2 - Cancelled, 3 - Fulfilled - [DataMember] - public DateTime StatusDate { get; set; } - [DataMember] - public decimal Stock { get; set; } - [DataMember] - public decimal Price { get; set; } - [DataMember] - public decimal Ordered { get; set; } - [DataMember] - public decimal OrderRate { get; set; } - [DataMember] - public decimal OrderAmount - { - get - { - return Ordered * OrderRate; - } - } - [DataMember] - public byte[] timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/RequirementDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/RequirementDisplayBO.cs deleted file mode 100644 index 6becbf1..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/RequirementDisplayBO.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class RequirementDisplayBO : RequirementBO - { - [DataMember] - public string Product { get; set; } - [DataMember] - public string Ledger { get; set; } - [DataMember] - public string StatusDisplay - { - get - { - if (base.Status == 0) - return "Pending"; - else if (base.Status == 1) - return "Ordered"; - else if (base.Status == 2) - return "Cancelled"; - else if (base.Status == 3) - return "Fulfilled"; - else - throw new ArgumentException("Status message is invalid"); - } - } - [DataMember] - public decimal OrderTotal { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetBO.cs deleted file mode 100644 index 2abab05..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetBO.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class SalarySheetBO - { - [DataMember] - public Guid SalarySheetID { get; set; } - [DataMember] - public Guid VoucherID { get; set; } - [DataMember] - public Guid LedgerID { get; set; } - [DataMember] - public int Salary { get; set; } - [DataMember] - public decimal WorkingDays { get; set; } - [DataMember] - public decimal Present { get; set; } - [DataMember] - public decimal Offs { get; set; } - [DataMember] - public decimal Overtime { get; set; } - [DataMember] - public int Deductions { get; set; } - [DataMember] - public int TotalSalary - { - get - { - decimal amount = 0; - - // Salary - amount = (Present + Offs + Overtime) * Salary / WorkingDays; - - // Less Deductions - amount -= Deductions; - - // Roundoff - amount = Math.Round(amount); - - return Convert.ToInt32(amount); - } - - } - [DataMember] - public string Remarks { get; set; } - [DataMember] - public byte[] timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetDisplayBO.cs deleted file mode 100644 index d1bef2e..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetDisplayBO.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class SalarySheetDisplayBO : SalarySheetBO - { - [DataMember] - public int Code { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public string CostCenter { get; set; } - [DataMember] - public int CurrentSalary { get; set; } - [DataMember] - public bool IsComputed { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/SaleVoucherBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/SaleVoucherBO.cs index e5492ec..5bc98b6 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/SaleVoucherBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/SaleVoucherBO.cs @@ -1,36 +1,21 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; +using Tanshu.Accounts.Contracts; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - [DataContract] - public class SaleVoucherBO : VoucherBO + public class SaleVoucher : Voucher { - [DataMember] - public string BillID { get; set; } - [DataMember] - public string TableID { get; set; } - [DataMember] - public Guid WaiterID { get; set; } - [DataMember] - public Guid CustomerID { get; set; } - [DataMember] - public bool Paid { get; set; } - [DataMember] - public bool Void { get; set; } - [DataMember] - public string VoidReason { get; set; } - [DataMember] - public bool Printed { get; set; } - [DataMember] - public DateTime? Alarm { get; set; } - [DataMember] - public string KotID { get; set; } - [DataMember] - public bool CreditCard { get; set; } - [DataMember] - public bool IsImportant { get; set; } - [DataMember] - public byte[] SaleTimestamp { get; set; } + public virtual string BillID { get; set; } + public virtual string TableID { get; set; } + public virtual Waiter Waiter { get; set; } + public virtual Customer Customer { get; set; } + public virtual SettleOption Settled { get; set; } + public virtual bool Void { get; set; } + public virtual string VoidReason { get; set; } + public virtual bool Printed { get; set; } + public virtual string KotID { get; set; } + public virtual PaymentGroup PaymentGroup { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/SalesAnalysisBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/SalesAnalysisBO.cs deleted file mode 100644 index 2951930..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/SalesAnalysisBO.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class SalesAnalysisBO - { - [DataMember] - public Guid TypeID { get; set; } - [DataMember] - public string Section { get; set; } - [DataMember] - public decimal Quantity { get; set; } - [DataMember] - public decimal Gross { get; set; } - [DataMember] - public decimal Net { get; set; } - } - - [DataContract] - public class SalesAnalysisDetailBO - { - [DataMember] - public string Section { get; set; } - [DataMember] - public string Product { get; set; } - [DataMember] - public decimal Quantity { get; set; } - [DataMember] - public decimal Amount { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/SettleOption.cs b/Tanshu.Accounts.Contracts/Data Contracts/SettleOption.cs new file mode 100644 index 0000000..098f536 --- /dev/null +++ b/Tanshu.Accounts.Contracts/Data Contracts/SettleOption.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Tanshu.Accounts.Entities +{ + public class SettleOption + { + public int SettleOptionID { get; set; } + public string Name { get; set; } + + public override bool Equals(System.Object obj) + { + if (obj is SettleOption) + return (this == (SettleOption)obj); + else + return false; + } + + public override int GetHashCode() + { + return SettleOptionID.GetHashCode() ^ Name.GetHashCode(); + } + public static bool operator ==(SettleOption a, SettleOption b) + { + if (object.ReferenceEquals(null, a)) + return object.ReferenceEquals(null, b); + + if (!(a is SettleOption)) + return false; + if (!(b is SettleOption)) + return false; + + return (a.SettleOptionID == b.SettleOptionID) + && (a.Name == b.Name); + } + public static bool operator !=(SettleOption a, SettleOption b) + { + return !(a == b); + } + //public enum SettleOption + //{ + // Unsettled = 0, + // Cash = 1, + // CreditCard = 2, + // NoCharge = 3, + // BillToCompany = 4, + // Staff = 5 + //} + //public class SettleOption + //{ + // public static readonly SettleOption Unsettled = new SettleOption(0); + // public static readonly SettleOption Cash = new SettleOption(1); + // public static readonly SettleOption CreditCard = new SettleOption(2); + // public static readonly SettleOption NoCharge = new SettleOption(3); + // public static readonly SettleOption BillToCompany = new SettleOption(4); + // public static readonly SettleOption Staff = new SettleOption(5); + + // public int SettleOptionID { get; private set; } + + // private SettleOption(int settleOption) + // { + // this.SettleOptionID = settleOption; + // } + //} + } +} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/TaxBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/TaxBO.cs index 52b5fd6..b008aab 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/TaxBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/TaxBO.cs @@ -1,20 +1,13 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - [DataContract] - public class TaxBO + public class Tax { - [DataMember] - public Guid TaxID { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public decimal Rate { get; set; } - [DataMember] - public char Type { get; set; } - [DataMember] - private byte[] timestamp { get; set; } + public virtual int TaxID { get; set; } + public virtual string Name { get; set; } + public virtual decimal Rate { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/UserBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/UserBO.cs deleted file mode 100644 index 42c3c95..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/UserBO.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class UserBO - { - [DataMember] - public Guid UserID { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public string Password { get; set; } - [DataMember] - public bool LockedOut { get; set; } - [DataMember] - public byte[] timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/VerificationBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/VerificationBO.cs deleted file mode 100644 index 68083c8..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/VerificationBO.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class VerificationBO - { - [DataMember] - public Guid VerificationID { get; set; } - [DataMember] - public Guid VoucherID { get; set; } - [DataMember] - public Guid ProductID { get; set; } - [DataMember] - public decimal ActualQuantity { get; set; } - [DataMember] - public decimal ComputedQuantity { get; set; } - [DataMember] - public decimal LostQuantity - { - get { return ComputedQuantity - ActualQuantity; } - } - [DataMember] - public byte[] Timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/VerificationDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/VerificationDisplayBO.cs deleted file mode 100644 index bb46713..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/VerificationDisplayBO.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class VerificationDisplayBO : VerificationBO - { - [DataMember] - public string ProductName { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/VoucherBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/VoucherBO.cs index 415f2f4..44fe5ca 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/VoucherBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/VoucherBO.cs @@ -1,30 +1,26 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; +using Tanshu.Accounts.Entities.Auth; +using System.Collections.Generic; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - [DataContract] - public class VoucherBO + public class Voucher { - [DataMember] - public Guid VoucherID { get; set; } - [DataMember] - public int Code { get; set; } - [DataMember] - public string Ref { get; set; } - [DataMember] - public DateTime? Date { get; set; } - [DataMember] - public string Narration { get; set; } - [DataMember] - public Guid UserID { get; set; } - [DataMember] - public DateTime CreationDate { get; set; } - [DataMember] - public DateTime LastEditDate { get; set; } - [DataMember] - public char Type { get; set; } - [DataMember] - public byte[] timestamp { get; set; } + public virtual int VoucherID { get; set; } + public virtual int Code { get; set; } + public virtual string Ref { get; set; } + public virtual DateTime? Date { get; set; } + public virtual string Narration { get; set; } + public virtual User User { get; set; } + public virtual DateTime CreationDate { get; set; } + public virtual DateTime LastEditDate { get; set; } + public virtual char Type { get; set; } + public virtual IList Inventories { get; set; } + public Voucher() + { + Inventories = new List(); + } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/WaiterBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/WaiterBO.cs index 1eb2c81..d394084 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/WaiterBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/WaiterBO.cs @@ -1,18 +1,12 @@ using System; using System.Runtime.Serialization; +using FluentNHibernate.Mapping; -namespace Tanshu.Accounts.Contracts +namespace Tanshu.Accounts.Entities { - [DataContract] - public class WaiterBO + public class Waiter { - [DataMember] - public Guid WaiterID { get; set; } - [DataMember] - public int Code { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public byte[] timestamp { get; set; } + public virtual int WaiterID { get; set; } + public virtual string Name { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Communication/Delegates.cs b/Tanshu.Accounts.Contracts/Delegates.cs similarity index 69% rename from Tanshu.Accounts.Contracts/Communication/Delegates.cs rename to Tanshu.Accounts.Contracts/Delegates.cs index 165f23f..30bf3f9 100644 --- a/Tanshu.Accounts.Contracts/Communication/Delegates.cs +++ b/Tanshu.Accounts.Contracts/Delegates.cs @@ -6,5 +6,5 @@ using System.Text; namespace Tanshu.Accounts.Contracts { public delegate void ShowProgessDelegate(decimal mininum, decimal maximum, decimal current, string message); - //public delegate UserBO IsInRole(bool authenticated, decimal maximum, decimal current, string message); + //public delegate User IsInRole(bool authenticated, decimal maximum, decimal current, string message); } diff --git a/Tanshu.Accounts.Contracts/Roles.cs b/Tanshu.Accounts.Contracts/RolesConstants.cs similarity index 96% rename from Tanshu.Accounts.Contracts/Roles.cs rename to Tanshu.Accounts.Contracts/RolesConstants.cs index 540c29c..1033296 100644 --- a/Tanshu.Accounts.Contracts/Roles.cs +++ b/Tanshu.Accounts.Contracts/RolesConstants.cs @@ -5,7 +5,7 @@ using System.Text; namespace Tanshu.Accounts.Contracts { - public static class Roles + public static class RolesConstants { public const string SALES_CHECKOUT = "Sales/Checkout"; public const string SALES_SALES_BILL = "Sales/SalesBill"; diff --git a/Tanshu.Accounts.Contracts/Service Contracts/AdvanceBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/AdvanceBI.cs deleted file mode 100644 index 45fb870..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/AdvanceBI.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface IAdvanceBI - { - [OperationContract] - void Insert(AdvanceBO advance); - [OperationContract] - List GetAdvances(DateTime fromDate, DateTime toDate, bool all); - [OperationContract] - void Adjust(Guid advanceID, Guid userID); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/CheckoutBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/CheckoutBI.cs deleted file mode 100644 index b618016..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/CheckoutBI.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using System.Data.SqlClient; -using System.ServiceModel; -using System.Runtime.Serialization; - - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface ICheckoutBI - { - #region Properties - [DataMember] - decimal Opening { get; } - [DataMember] - decimal Receipts { get; } - [DataMember] - decimal AdvanceReceipts { get; } - [DataMember] - decimal CCReceipts { get; } - [DataMember] - decimal AdvanceAdjusted { get; } - [DataMember] - decimal CashPayments { get; } - [DataMember] - decimal AdditionalVoids { get; } - [DataMember] - decimal VoidsInSystem { get; } - [DataMember] - decimal PendingBills { get; } - [DataMember] - decimal NetSales { get; } - [DataMember] - decimal ClosingBalance { get; } - [DataMember] - decimal RetainedOvernight { get; } - [DataMember] - decimal CashDeposited { get; } // - [DataMember] - decimal Excess { get; } // - [DataMember] - string Status { get; } // - [DataMember] - string Cashiers { get; } // - [DataMember] - Guid CashierID { get; } // - [DataMember] - string Cashier { get; } // - [DataMember] - DateTime StartDate { get; } // - [DataMember] - DateTime FinishDate { get; } // - - [DataMember] - string PendingString { get; } - [DataMember] - string CCString { get; } - [DataMember] - string VoidsString { get; } - [DataMember] - string DiscountString { get; } - [DataMember] - string Manager { get; } - #endregion - - [OperationContract] - void Init(Guid cashier, DateTime startDate, DateTime finishDate); - [OperationContract] - void Calculate(decimal cashDeposited, decimal retainedOvernight); - } - -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/CustomerBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/CustomerBI.cs deleted file mode 100644 index f3f32da..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/CustomerBI.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -//using System.Linq; -using System.Text; -using System.ServiceModel; -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface ICustomerBI - { - [OperationContract] - List GetCustomerLedgers(); - [OperationContract] - CustomerBO GetCustomer(Guid customerID); - [OperationContract] - List GetFilteredCustomers(Dictionary filter); - [OperationContract] - List GetCustomers(); - [OperationContract] - List GetSingleCustomers(Guid customerID); - [OperationContract] - bool Update(CustomerBO customer); - [OperationContract] - bool Delete(Guid customerID); - [OperationContract] - bool Insert(CustomerBO customer); - } - -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/FoodTableBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/FoodTableBI.cs deleted file mode 100644 index df31a2a..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/FoodTableBI.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; - -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - public interface IFoodTableBI - { - void Insert(FoodTableBO foodTable); - void Update(FoodTableBO foodTable); - bool Delete(int tableID); - FoodTableBO GetFoodTable(int tableID); - List GetFoodTables(); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/LedgerBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/LedgerBI.cs deleted file mode 100644 index c06df99..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/LedgerBI.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; - -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface ILedgerBI - { - [OperationContract] - LedgerBO GetLedger(Guid ledgerID); - [OperationContract] - LedgerBO GetLedgerByName(string name); - [OperationContract] - bool Insert(LedgerBO ledger); - [OperationContract] - bool Update(LedgerBO ledger); - [OperationContract] - List GetLedgers(); - [OperationContract] - List GetLedgersOfType(char type); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/MembershipBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/MembershipBI.cs deleted file mode 100644 index 7c9761b..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/MembershipBI.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -//using System.Linq; -using System.Text; -using System.Data.SqlClient; -using System.ServiceModel; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface IMembershipBI - { - [OperationContract] - bool ValidateUser(string name, string password); - [OperationContract] - void AddUsersToRoles(string[] usernames, string[] roleNames); - [OperationContract] - string[] GetAllRoles(); - [OperationContract] - string[] GetRolesForUser(string username); - [OperationContract] - bool IsUserInRole(string username, string roleName); - [OperationContract] - void RemoveUsersFromRoles(string[] usernames, string[] roleNames); - [OperationContract] - UserBO GetUserFromName(string name); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/PaymentBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/PaymentBI.cs deleted file mode 100644 index ea9a9cc..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/PaymentBI.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; - -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface IPaymentBI - { - [OperationContract] - void Insert(PaymentBO payment); - [OperationContract] - List GetPayments(Guid? userID, DateTime fromDate, DateTime toDate); - [OperationContract] - void Delete(Guid paymentID); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/PrintLocationBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/PrintLocationBI.cs deleted file mode 100644 index f10b4e9..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/PrintLocationBI.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; - -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - public interface IPrintLocationBI - { - void Insert(PrintLocationBO printLocation); - void Update(PrintLocationBO printLocation); - bool Delete(int tableID); - PrintLocationBO GetPrintLocation(int printLocationID); - PrintLocationBO GetPrintLocation(Guid productTypeID, string location); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/ProductGroupBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/ProductGroupBI.cs deleted file mode 100644 index 5ea2f35..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/ProductGroupBI.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; - -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - public interface IProductGroupBI - { - ProductGroupBO GetProductGroup(Guid productGroupID); - ProductGroupBO GetProductGroupByName(string name); - bool Insert(ProductGroupBO productGroup); - bool Update(ProductGroupBO productGroup); - List GetProductGroups(); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/SaleVoucherBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/SaleVoucherBI.cs deleted file mode 100644 index c3a5658..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/SaleVoucherBI.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.SqlClient; -using System.ServiceModel; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface ISaleVoucherBI - { - [OperationContract] - SalesBillItemBO GetDefaultSaleBillItem(Guid productID); - [OperationContract] - decimal GetProductDiscountLimit(Guid productID); - [OperationContract] - bool IsBillPrinted(Guid voucherID); - [OperationContract] - bool Insert(SaleVoucherBO saleVoucher, List inventory); - [OperationContract] - bool Update(SaleVoucherBO saleVoucher, List inventory); - [OperationContract] - bool GetSaleVoucher(Guid voucherID, ref SaleVoucherBO voucherSale, ref List iList); - - [OperationContract] - List GetPendingBills(PendingType list); - [OperationContract] - Guid? GetPendingVoucherID(string tableID); - [OperationContract] - List SaleInventory(Dictionary.ValueCollection list, Guid? voucherID); - [OperationContract] - void GetComplexBillInformation(Guid voucherID, Guid complexProductID, ref decimal rate, ref decimal quantity, ref string name); - [OperationContract] - void SetAlarm(Guid voucherID, DateTime? alarmTime); - [OperationContract] - void VoidBill(Guid voucherID, string reason); - [OperationContract] - void DeclareBillsPaid(Guid userID, List billList, bool creditCard); - [OperationContract] - void ToggleImportant(Guid voucherID); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/SalesAnalysisBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/SalesAnalysisBI.cs deleted file mode 100644 index 44120ab..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/SalesAnalysisBI.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -//using System.Linq; -using System.Text; -using System.Data.SqlClient; -using System.ServiceModel; - - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface ISalesAnalysisBI - { - [OperationContract] - List GetSaleDetail(DateTime startDate, DateTime finishDate, Guid costCenterID); - [OperationContract] - List GetSale(DateTime startDate, DateTime finishDate); - [OperationContract] - void GetAdditionalInfo(ref decimal freeSale, ref decimal voids, ref decimal pending, ref decimal net, ref decimal tax, DateTime startDate, DateTime finishDate); - [OperationContract] - List GetSalesTaxReturn(DateTime startDate, DateTime finishDate, ref decimal freeSale, ref decimal voids, ref decimal pending, ref decimal net, ref decimal tax); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/UserBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/UserBI.cs deleted file mode 100644 index 25e78bf..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/UserBI.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface IUserBI - { - [OperationContract] - UserBO GetUser(Guid userID); - [OperationContract] - bool ChangePassword(UserBO userData, string newPassword); - [OperationContract] - List GetUsers(); - [OperationContract] - bool UserExists(string userName); - [OperationContract] - bool Insert(UserBO user); - [OperationContract] - bool Update(UserBO user); - [OperationContract] - bool Delete(Guid userID); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/WaiterBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/WaiterBI.cs deleted file mode 100644 index 7a11979..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/WaiterBI.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface IWaiterBI - { - [OperationContract] - bool Insert(WaiterBO waiter); - [OperationContract] - bool Update(WaiterBO waiter); - [OperationContract] - WaiterBO GetWaiter(Guid waiterID); - [OperationContract] - bool Delete(Guid waiterID); - [OperationContract] - List GetWaiters(); - } -} diff --git a/Tanshu.Accounts.Contracts/Tanshu.Accounts.Contracts.csproj b/Tanshu.Accounts.Contracts/Tanshu.Accounts.Contracts.csproj index d1187c7..5375232 100644 --- a/Tanshu.Accounts.Contracts/Tanshu.Accounts.Contracts.csproj +++ b/Tanshu.Accounts.Contracts/Tanshu.Accounts.Contracts.csproj @@ -33,6 +33,38 @@ 4 + + False + ..\Include\Fluent\Antlr3.Runtime.dll + + + False + ..\Include\Fluent\Castle.Core.dll + + + False + ..\Include\Fluent\Castle.DynamicProxy2.dll + + + False + ..\Include\Fluent\FluentNHibernate.dll + + + False + ..\Include\Fluent\Iesi.Collections.dll + + + False + ..\Include\Fluent\log4net.dll + + + False + ..\Include\Fluent\NHibernate.dll + + + False + ..\Include\Fluent\NHibernate.ByteCode.Castle.dll + 3.5 @@ -53,81 +85,40 @@ - - - - - - - - - - - - - - - - - - - - - - + + Code + + + + + + + + + - - - - - - - - - - - - - - - - - - - + - - + + + - - + + - + - - - - - - - - - - - - - - + - \ No newline at end of file diff --git a/Tanshu.Accounts.Helpers/ControlFactory.cs b/Tanshu.Accounts.Helpers/ControlFactory.cs index ad674ff..416c7ea 100644 --- a/Tanshu.Accounts.Helpers/ControlFactory.cs +++ b/Tanshu.Accounts.Helpers/ControlFactory.cs @@ -5,12 +5,112 @@ using System.Text; using System.Windows.Forms; using System.Drawing; using Tanshu.Accounts.Contracts; +using Tanshu.Accounts.Entities; +using System.Collections; namespace Tanshu.Accounts.Helpers { + public delegate void ButtonClickDelegate(object sender, EventArgs e); + public static class ControlFactory { - public static void GenerateButtons(ref Panel panel, ref List
private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); this.chkImportant = new System.Windows.Forms.CheckBox(); this.txtRemarks = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); @@ -37,8 +36,6 @@ this.txtPhone = new System.Windows.Forms.TextBox(); this.txtAddress = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); - this.cmbLedger = new System.Windows.Forms.ComboBox(); - this.bsLedgers = new System.Windows.Forms.BindingSource(this.components); this.label2 = new System.Windows.Forms.Label(); this.txtName = new System.Windows.Forms.TextBox(); this.btnSave = new System.Windows.Forms.Button(); @@ -46,7 +43,6 @@ this.btnCancel = new System.Windows.Forms.Button(); this.Label1 = new System.Windows.Forms.Label(); this.txtUniqueID = new System.Windows.Forms.TextBox(); - ((System.ComponentModel.ISupportInitialize)(this.bsLedgers)).BeginInit(); this.SuspendLayout(); // // chkImportant @@ -112,28 +108,10 @@ // // label3 // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(35, 67); + this.label3.Location = new System.Drawing.Point(0, 0); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(40, 13); - this.label3.TabIndex = 10; - this.label3.Text = "Ledger"; - // - // cmbLedger - // - this.cmbLedger.DataSource = this.bsLedgers; - this.cmbLedger.DisplayMember = "Name"; - this.cmbLedger.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbLedger.FormattingEnabled = true; - this.cmbLedger.Location = new System.Drawing.Point(81, 64); - this.cmbLedger.Name = "cmbLedger"; - this.cmbLedger.Size = new System.Drawing.Size(292, 21); - this.cmbLedger.TabIndex = 15; - this.cmbLedger.ValueMember = "LedgerID"; - // - // bsLedgers - // - this.bsLedgers.DataSource = typeof(Tanshu.Accounts.Contracts.LedgerBO); + this.label3.Size = new System.Drawing.Size(100, 23); + this.label3.TabIndex = 15; // // label2 // @@ -172,6 +150,7 @@ // btnCancel // this.btnCancel.AccessibleName = "Done"; + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.Location = new System.Drawing.Point(301, 315); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(72, 24); @@ -221,7 +200,6 @@ this.Controls.Add(this.txtPhone); this.Controls.Add(this.txtAddress); this.Controls.Add(this.label3); - this.Controls.Add(this.cmbLedger); this.Controls.Add(this.label2); this.Controls.Add(this.txtName); this.MaximizeBox = false; @@ -230,7 +208,6 @@ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Customers"; this.Load += new System.EventHandler(this.CustomersForm_Load); - ((System.ComponentModel.ISupportInitialize)(this.bsLedgers)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -246,13 +223,11 @@ private System.Windows.Forms.TextBox txtPhone; private System.Windows.Forms.TextBox txtAddress; private System.Windows.Forms.Label label3; - private System.Windows.Forms.ComboBox cmbLedger; private System.Windows.Forms.Label label2; private System.Windows.Forms.TextBox txtName; internal System.Windows.Forms.Button btnSave; internal System.Windows.Forms.Button btnDelete; internal System.Windows.Forms.Button btnCancel; - private System.Windows.Forms.BindingSource bsLedgers; internal System.Windows.Forms.Label Label1; internal System.Windows.Forms.TextBox txtUniqueID; } diff --git a/Tanshu.Accounts.PointOfSale/Sales/CustomersForm.cs b/Tanshu.Accounts.PointOfSale/Sales/CustomersForm.cs index 1b5f646..e50c0ff 100644 --- a/Tanshu.Accounts.PointOfSale/Sales/CustomersForm.cs +++ b/Tanshu.Accounts.PointOfSale/Sales/CustomersForm.cs @@ -4,18 +4,20 @@ using System.ComponentModel; using System.Linq; using System.Windows.Forms; using Tanshu.Accounts.Helpers; -using Tanshu.Accounts.BI; +using Tanshu.Accounts.Repository; using Tanshu.Accounts.Contracts; +using Tanshu.Accounts.Entities; +using Tanshu.Accounts.Entities.Auth; namespace Tanshu.Accounts.PointOfSale { public partial class CustomersForm : Form { - private Guid? customerID; - private CustomerBO customer; + private int? customerID; + private Customer customer; private string phone; #region Form Load - public CustomersForm(Guid? customerID, string phone) + public CustomersForm(int? customerID, string phone) { InitializeComponent(); this.customerID = customerID; @@ -23,13 +25,11 @@ namespace Tanshu.Accounts.PointOfSale } private void CustomersForm_Load(object sender, EventArgs e) { - bsLedgers.DataSource = new CustomerBI().GetCustomerLedgers(); if (customerID.HasValue) { customer = new CustomerBI().GetCustomer(customerID.Value); btnDelete.Enabled = true; txtName.Text = customer.Name; - cmbLedger.SelectedValue = customer.LedgerID; txtPhone.Text = customer.Phone; txtAddress.Text = customer.Address; txtRemarks.Text = customer.Remarks; @@ -71,38 +71,32 @@ namespace Tanshu.Accounts.PointOfSale private bool ValidateValues() { bool returnType = true; - if (txtName.Text.Trim().Length > 0) - { - if (cmbLedger.SelectedValue == null) - return false; - } - else + if (txtName.Text.Trim().Length == 0) return false; return returnType; } private void Save() { if (customer == null) - customer = new CustomerBO(); - UserBO user = Session.User; + customer = new Customer(); + User user = Session.User; customer.Name = txtName.Text; - customer.LedgerID = (Guid)cmbLedger.SelectedValue; customer.Phone = txtPhone.Text; customer.Address = txtAddress.Text; customer.Remarks = txtRemarks.Text; customer.Important = chkImportant.Checked; - if (customer.CustomerID == new Guid()) + if (customer.CustomerID == 0) new CustomerBI().Insert(customer); else new CustomerBI().Update(customer); } - private bool Delete(Guid customerID) + private bool Delete(int customerID) { return new CustomerBI().Delete(customerID); } #endregion - public CustomerBO Customer + public Customer Customer { get { return customer; } } diff --git a/Tanshu.Accounts.PointOfSale/Sales/CustomersForm.resx b/Tanshu.Accounts.PointOfSale/Sales/CustomersForm.resx index cb9f9cf..19dc0dd 100644 --- a/Tanshu.Accounts.PointOfSale/Sales/CustomersForm.resx +++ b/Tanshu.Accounts.PointOfSale/Sales/CustomersForm.resx @@ -117,10 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17, 17 - - - 17, 17 - \ No newline at end of file diff --git a/Tanshu.Accounts.PointOfSale/Sales/ModifierForm.Designer.cs b/Tanshu.Accounts.PointOfSale/Sales/ModifierForm.Designer.cs new file mode 100644 index 0000000..89413fb --- /dev/null +++ b/Tanshu.Accounts.PointOfSale/Sales/ModifierForm.Designer.cs @@ -0,0 +1,79 @@ +namespace Tanshu.Accounts.PointOfSale +{ + partial class ModifierForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.flpModifier = new System.Windows.Forms.FlowLayoutPanel(); + this.btnClose = new System.Windows.Forms.Button(); + this.flpModifier.SuspendLayout(); + this.SuspendLayout(); + // + // flpModifier + // + this.flpModifier.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flpModifier.Controls.Add(this.btnClose); + this.flpModifier.Dock = System.Windows.Forms.DockStyle.Fill; + this.flpModifier.Location = new System.Drawing.Point(0, 0); + this.flpModifier.Name = "flpModifier"; + this.flpModifier.Size = new System.Drawing.Size(486, 408); + this.flpModifier.TabIndex = 6; + // + // btnClose + // + this.btnClose.Location = new System.Drawing.Point(3, 3); + this.btnClose.Name = "btnClose"; + this.btnClose.Size = new System.Drawing.Size(480, 75); + this.btnClose.TabIndex = 6; + this.btnClose.Text = "Close"; + this.btnClose.UseVisualStyleBackColor = true; + this.btnClose.Click += new System.EventHandler(this.btnClose_Click); + // + // ModifierForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(486, 408); + this.ControlBox = false; + this.Controls.Add(this.flpModifier); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.MaximizeBox = false; + this.Name = "ModifierForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Modifier"; + this.Load += new System.EventHandler(this.ModifierForm_Load); + this.flpModifier.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel flpModifier; + private System.Windows.Forms.Button btnClose; + } +} \ No newline at end of file diff --git a/Tanshu.Accounts.PointOfSale/Sales/ModifierForm.cs b/Tanshu.Accounts.PointOfSale/Sales/ModifierForm.cs new file mode 100644 index 0000000..f1573c3 --- /dev/null +++ b/Tanshu.Accounts.PointOfSale/Sales/ModifierForm.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using Tanshu.Accounts.Entities; +using Tanshu.Accounts.Contracts; +using Tanshu.Accounts.SqlDAO; +using Tanshu.Accounts.Helpers; + +namespace Tanshu.Accounts.PointOfSale +{ + public partial class ModifierForm : Form + { + private IList selection; + private IList source; + private IList list; + public ModifierForm(IList source, IList selection) + { + InitializeComponent(); + this.selection = selection; + this.source = source; + list = new List(); + } + + private void button_Click(object sender, EventArgs e) + { + CheckBox button = sender as CheckBox; + if (button == null) + return; + if (button.CheckState == CheckState.Checked) + selection.Add((Modifier)button.Tag); + else + selection.Remove((Modifier)button.Tag); + } + public IList Selection + { + get + { + return selection; + } + } + + private void btnClose_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void ModifierForm_Load(object sender, EventArgs e) + { + ControlFactory.GenerateModifiers(ref flpModifier, ref list, selection, new Point(75, 75), 30, source, new ButtonClickDelegate(button_Click)); + } + + } +} diff --git a/Tanshu.Accounts.PointOfSale/Updates/AutoUpdateForm.resx b/Tanshu.Accounts.PointOfSale/Sales/ModifierForm.resx similarity index 100% rename from Tanshu.Accounts.PointOfSale/Updates/AutoUpdateForm.resx rename to Tanshu.Accounts.PointOfSale/Sales/ModifierForm.resx diff --git a/Tanshu.Accounts.PointOfSale/Sales/PaymentForm.Designer.cs b/Tanshu.Accounts.PointOfSale/Sales/PaymentForm.Designer.cs deleted file mode 100644 index cb4f3b4..0000000 --- a/Tanshu.Accounts.PointOfSale/Sales/PaymentForm.Designer.cs +++ /dev/null @@ -1,318 +0,0 @@ -namespace Tanshu.Accounts.PointOfSale -{ - partial class PaymentForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.btnAdd = new System.Windows.Forms.Button(); - this.Label7 = new System.Windows.Forms.Label(); - this.txtNarration = new System.Windows.Forms.TextBox(); - this.Label6 = new System.Windows.Forms.Label(); - this.txtAmount = new System.Windows.Forms.TextBox(); - this.lblAmount = new System.Windows.Forms.Label(); - this.txtCashier = new System.Windows.Forms.TextBox(); - this.Label3 = new System.Windows.Forms.Label(); - this.Label2 = new System.Windows.Forms.Label(); - this.Label1 = new System.Windows.Forms.Label(); - this.cmbType = new System.Windows.Forms.ComboBox(); - this.dtpTo = new System.Windows.Forms.DateTimePicker(); - this.dtpFrom = new System.Windows.Forms.DateTimePicker(); - this.dgvPayments = new System.Windows.Forms.DataGridView(); - this.dateDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.typeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.amountDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Narration = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Cashier = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.bindingSource = new System.Windows.Forms.BindingSource(this.components); - this.btnDelete = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize)(this.dgvPayments)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit(); - this.SuspendLayout(); - // - // btnAdd - // - this.btnAdd.Location = new System.Drawing.Point(68, 117); - this.btnAdd.Name = "btnAdd"; - this.btnAdd.Size = new System.Drawing.Size(75, 21); - this.btnAdd.TabIndex = 108; - this.btnAdd.Text = "&Add"; - this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click); - // - // Label7 - // - this.Label7.AutoSize = true; - this.Label7.Location = new System.Drawing.Point(12, 94); - this.Label7.Name = "Label7"; - this.Label7.Size = new System.Drawing.Size(50, 13); - this.Label7.TabIndex = 107; - this.Label7.Text = "Narration"; - // - // txtNarration - // - this.txtNarration.Location = new System.Drawing.Point(68, 91); - this.txtNarration.Name = "txtNarration"; - this.txtNarration.Size = new System.Drawing.Size(322, 20); - this.txtNarration.TabIndex = 106; - // - // Label6 - // - this.Label6.AutoSize = true; - this.Label6.Location = new System.Drawing.Point(195, 67); - this.Label6.Name = "Label6"; - this.Label6.Size = new System.Drawing.Size(44, 13); - this.Label6.TabIndex = 104; - this.Label6.Text = "Reason"; - // - // txtAmount - // - this.txtAmount.Location = new System.Drawing.Point(68, 64); - this.txtAmount.Name = "txtAmount"; - this.txtAmount.Size = new System.Drawing.Size(121, 20); - this.txtAmount.TabIndex = 103; - // - // lblAmount - // - this.lblAmount.AutoSize = true; - this.lblAmount.Location = new System.Drawing.Point(12, 67); - this.lblAmount.Name = "lblAmount"; - this.lblAmount.Size = new System.Drawing.Size(43, 13); - this.lblAmount.TabIndex = 102; - this.lblAmount.Text = "Amount"; - // - // txtCashier - // - this.txtCashier.Location = new System.Drawing.Point(68, 38); - this.txtCashier.Name = "txtCashier"; - this.txtCashier.ReadOnly = true; - this.txtCashier.Size = new System.Drawing.Size(322, 20); - this.txtCashier.TabIndex = 101; - // - // Label3 - // - this.Label3.AutoSize = true; - this.Label3.Location = new System.Drawing.Point(12, 41); - this.Label3.Name = "Label3"; - this.Label3.Size = new System.Drawing.Size(42, 13); - this.Label3.TabIndex = 100; - this.Label3.Text = "Cashier"; - // - // Label2 - // - this.Label2.AutoSize = true; - this.Label2.Location = new System.Drawing.Point(219, 16); - this.Label2.Name = "Label2"; - this.Label2.Size = new System.Drawing.Size(20, 13); - this.Label2.TabIndex = 97; - this.Label2.Text = "To"; - // - // Label1 - // - this.Label1.AutoSize = true; - this.Label1.Location = new System.Drawing.Point(12, 16); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(30, 13); - this.Label1.TabIndex = 95; - this.Label1.Text = "From"; - // - // cmbType - // - this.cmbType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbType.Items.AddRange(new object[] { - "Opening", - "Receipt", - "Payment", - "Additional Void", - "Retained at Night", - "Own in Pocket"}); - this.cmbType.Location = new System.Drawing.Point(245, 64); - this.cmbType.Name = "cmbType"; - this.cmbType.Size = new System.Drawing.Size(145, 21); - this.cmbType.TabIndex = 105; - // - // dtpTo - // - this.dtpTo.CustomFormat = "dd-MMM-yyyy"; - this.dtpTo.Format = System.Windows.Forms.DateTimePickerFormat.Custom; - this.dtpTo.Location = new System.Drawing.Point(245, 12); - this.dtpTo.Name = "dtpTo"; - this.dtpTo.Size = new System.Drawing.Size(145, 20); - this.dtpTo.TabIndex = 98; - this.dtpTo.ValueChanged += new System.EventHandler(this.dtpTo_ValueChanged); - // - // dtpFrom - // - this.dtpFrom.CustomFormat = "dd-MMM-yyyy"; - this.dtpFrom.Format = System.Windows.Forms.DateTimePickerFormat.Custom; - this.dtpFrom.Location = new System.Drawing.Point(68, 12); - this.dtpFrom.Name = "dtpFrom"; - this.dtpFrom.Size = new System.Drawing.Size(132, 20); - this.dtpFrom.TabIndex = 96; - this.dtpFrom.ValueChanged += new System.EventHandler(this.dtpFrom_ValueChanged); - // - // dgvPayments - // - this.dgvPayments.AllowUserToAddRows = false; - this.dgvPayments.AllowUserToDeleteRows = false; - this.dgvPayments.AllowUserToResizeRows = false; - this.dgvPayments.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.dgvPayments.AutoGenerateColumns = false; - this.dgvPayments.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells; - this.dgvPayments.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dgvPayments.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.dateDataGridViewTextBoxColumn, - this.typeDataGridViewTextBoxColumn, - this.amountDataGridViewTextBoxColumn, - this.Narration, - this.Cashier}); - this.dgvPayments.DataSource = this.bindingSource; - this.dgvPayments.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; - this.dgvPayments.Location = new System.Drawing.Point(12, 144); - this.dgvPayments.Name = "dgvPayments"; - this.dgvPayments.ReadOnly = true; - this.dgvPayments.RowHeadersVisible = false; - this.dgvPayments.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dgvPayments.Size = new System.Drawing.Size(378, 380); - this.dgvPayments.TabIndex = 110; - // - // dateDataGridViewTextBoxColumn - // - this.dateDataGridViewTextBoxColumn.DataPropertyName = "Date"; - this.dateDataGridViewTextBoxColumn.HeaderText = "Date"; - this.dateDataGridViewTextBoxColumn.Name = "dateDataGridViewTextBoxColumn"; - this.dateDataGridViewTextBoxColumn.ReadOnly = true; - this.dateDataGridViewTextBoxColumn.Width = 55; - // - // typeDataGridViewTextBoxColumn - // - this.typeDataGridViewTextBoxColumn.DataPropertyName = "Type"; - this.typeDataGridViewTextBoxColumn.HeaderText = "Type"; - this.typeDataGridViewTextBoxColumn.Name = "typeDataGridViewTextBoxColumn"; - this.typeDataGridViewTextBoxColumn.ReadOnly = true; - this.typeDataGridViewTextBoxColumn.Width = 56; - // - // amountDataGridViewTextBoxColumn - // - this.amountDataGridViewTextBoxColumn.DataPropertyName = "Amount"; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - dataGridViewCellStyle1.Format = "N2"; - dataGridViewCellStyle1.NullValue = "-"; - this.amountDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle1; - this.amountDataGridViewTextBoxColumn.HeaderText = "Amount"; - this.amountDataGridViewTextBoxColumn.Name = "amountDataGridViewTextBoxColumn"; - this.amountDataGridViewTextBoxColumn.ReadOnly = true; - this.amountDataGridViewTextBoxColumn.Width = 68; - // - // Narration - // - this.Narration.DataPropertyName = "Narration"; - this.Narration.HeaderText = "Narration"; - this.Narration.Name = "Narration"; - this.Narration.ReadOnly = true; - this.Narration.Width = 75; - // - // Cashier - // - this.Cashier.DataPropertyName = "Cashier"; - this.Cashier.HeaderText = "Cashier"; - this.Cashier.Name = "Cashier"; - this.Cashier.ReadOnly = true; - this.Cashier.Width = 67; - // - // bindingSource - // - this.bindingSource.DataSource = typeof(Tanshu.Accounts.Contracts.PaymentDisplayBO); - // - // btnDelete - // - this.btnDelete.Location = new System.Drawing.Point(315, 117); - this.btnDelete.Name = "btnDelete"; - this.btnDelete.Size = new System.Drawing.Size(75, 21); - this.btnDelete.TabIndex = 109; - this.btnDelete.Text = "&Delete"; - this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); - // - // PaymentFrom - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(402, 536); - this.Controls.Add(this.dgvPayments); - this.Controls.Add(this.btnDelete); - this.Controls.Add(this.btnAdd); - this.Controls.Add(this.Label7); - this.Controls.Add(this.txtNarration); - this.Controls.Add(this.Label6); - this.Controls.Add(this.txtAmount); - this.Controls.Add(this.lblAmount); - this.Controls.Add(this.txtCashier); - this.Controls.Add(this.Label3); - this.Controls.Add(this.Label2); - this.Controls.Add(this.Label1); - this.Controls.Add(this.cmbType); - this.Controls.Add(this.dtpTo); - this.Controls.Add(this.dtpFrom); - this.MaximizeBox = false; - this.Name = "PaymentFrom"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Payments"; - this.Load += new System.EventHandler(this.PaymentForm_Load); - ((System.ComponentModel.ISupportInitialize)(this.dgvPayments)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - internal System.Windows.Forms.Button btnAdd; - internal System.Windows.Forms.Label Label7; - internal System.Windows.Forms.TextBox txtNarration; - internal System.Windows.Forms.Label Label6; - internal System.Windows.Forms.TextBox txtAmount; - internal System.Windows.Forms.Label lblAmount; - internal System.Windows.Forms.TextBox txtCashier; - internal System.Windows.Forms.Label Label3; - internal System.Windows.Forms.Label Label2; - internal System.Windows.Forms.Label Label1; - internal System.Windows.Forms.ComboBox cmbType; - internal System.Windows.Forms.DateTimePicker dtpTo; - internal System.Windows.Forms.DateTimePicker dtpFrom; - private System.Windows.Forms.DataGridView dgvPayments; - private System.Windows.Forms.BindingSource bindingSource; - internal System.Windows.Forms.Button btnDelete; - private System.Windows.Forms.DataGridViewTextBoxColumn dateDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn typeDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn amountDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn Narration; - private System.Windows.Forms.DataGridViewTextBoxColumn Cashier; - } -} \ No newline at end of file diff --git a/Tanshu.Accounts.PointOfSale/Sales/PaymentForm.cs b/Tanshu.Accounts.PointOfSale/Sales/PaymentForm.cs deleted file mode 100644 index 7f927c7..0000000 --- a/Tanshu.Accounts.PointOfSale/Sales/PaymentForm.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Windows.Forms; -using Tanshu.Accounts.BI; -using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.Helpers; - -namespace Tanshu.Accounts.PointOfSale -{ - public partial class PaymentForm : Form - { - List paymentList = new List(); - public PaymentForm() - { - InitializeComponent(); - } - private void btnAdd_Click(object sender, EventArgs e) - { - UserBO user = Session.User; - if (txtAmount.Text == "0" || cmbType.Text == "") - { - System.Windows.Forms.MessageBox.Show("Amount can't be blank", "Blank not Allowed"); - } - else - { - PaymentBO paymentEntry = new PaymentBO(); - paymentEntry.Date = DateTime.Now; - paymentEntry.Type = cmbType.Text; - paymentEntry.CashierID = user.UserID; - paymentEntry.Amount = Convert.ToDecimal(txtAmount.Text); - paymentEntry.Narration = txtNarration.Text; - new PaymentBI().Insert(paymentEntry); - } - GridBind(); - } - - private void PaymentForm_Load(object sender, EventArgs e) - { - UserBO user = Session.User; - dtpFrom.Value = DateTime.Today; - dtpTo.Value = DateTime.Today; - GridBind(); - txtCashier.Text = user.Name; - txtCashier.Tag = user.UserID; - } - private void btnDelete_Click(object sender, EventArgs e) - { - if (!Thread.CurrentPrincipal.IsInRole("Payment/Delete")) - MessageBox.Show("You are not authorized to access"); - else - { - UserBO user = Session.User; - if (dgvPayments.SelectedRows.Count <= 0) - return; - Guid paymentID = ((PaymentDisplayBO)bindingSource.Current).PaymentID; - new PaymentBI().Delete(paymentID); - GridBind(); - } - } - private void GridBind() - { - Guid? userID; - if (!Thread.CurrentPrincipal.IsInRole("Payment/SeeAll")) - userID = null; - else - { - userID = Session.User.UserID; - } - paymentList = new PaymentBI().GetPayments(userID, dtpFrom.Value, dtpTo.Value); - bindingSource.DataSource = paymentList; - } - - private void dtpFrom_ValueChanged(object sender, EventArgs e) - { - GridBind(); - } - - private void dtpTo_ValueChanged(object sender, EventArgs e) - { - GridBind(); - } - } -} diff --git a/Tanshu.Accounts.PointOfSale/Sales/PaymentForm.resx b/Tanshu.Accounts.PointOfSale/Sales/PaymentForm.resx deleted file mode 100644 index 8d369f1..0000000 --- a/Tanshu.Accounts.PointOfSale/Sales/PaymentForm.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - True - - - 17, 17 - - \ No newline at end of file diff --git a/Tanshu.Accounts.PointOfSale/Sales/RecieveAdvanceForm.cs b/Tanshu.Accounts.PointOfSale/Sales/RecieveAdvanceForm.cs index e9ba1f2..ed53d0e 100644 --- a/Tanshu.Accounts.PointOfSale/Sales/RecieveAdvanceForm.cs +++ b/Tanshu.Accounts.PointOfSale/Sales/RecieveAdvanceForm.cs @@ -4,7 +4,8 @@ using System.Windows.Forms; using Tanshu.Accounts.Helpers; using Tanshu.Accounts.Print; using Tanshu.Accounts.Contracts; -using Tanshu.Accounts.BI; +using Tanshu.Accounts.Repository; +using Tanshu.Accounts.Entities; namespace Tanshu.Accounts.PointOfSale { @@ -20,10 +21,10 @@ namespace Tanshu.Accounts.PointOfSale { if (Convert.ToDecimal(txtAmount.Text) == 0) return; - AdvanceBO adv = new AdvanceBO(); + Advance adv = new Advance(); adv.Narration = txtNarration.Text; adv.Amount = Convert.ToDecimal(txtAmount.Text.Trim()); - adv.CashierIn = new Guid(txtCashier.Tag.ToString()); + adv.CashierIn = UserBI.GetUser((int)txtCashier.Tag); adv.DateIn = DateTime.Now; new AdvanceBI().Insert(adv); GridBind(); @@ -47,7 +48,7 @@ namespace Tanshu.Accounts.PointOfSale private void GridBind() { - List advance = new AdvanceBI().GetAdvances(dtpFrom.Value, dtpTo.Value, true); + var advance = new AdvanceBI().GetAdvances(dtpFrom.Value, dtpTo.Value, true); dgExpenses.DataSource = advance; } diff --git a/Tanshu.Accounts.PointOfSale/Sales/SaleAnalysisForm.cs b/Tanshu.Accounts.PointOfSale/Sales/SaleAnalysisForm.cs index 6eb28e6..9000e03 100644 --- a/Tanshu.Accounts.PointOfSale/Sales/SaleAnalysisForm.cs +++ b/Tanshu.Accounts.PointOfSale/Sales/SaleAnalysisForm.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Windows.Forms; -using Tanshu.Accounts.BI; +using Tanshu.Accounts.Repository; using Tanshu.Accounts.Contracts; using Tanshu.Accounts.Helpers; @@ -9,13 +9,13 @@ namespace Tanshu.Accounts.PointOfSale { public partial class frmSaleAnalysisForm : Form { - Guid? details = null; - List det; - private static readonly Tanshu.Logging.SqlLogger log = new Tanshu.Logging.SqlLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + int? details = null; + IList det; + //private static readonly Tanshu.Logging.SqlLogger log = new Tanshu.Logging.SqlLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); public frmSaleAnalysisForm() { InitializeComponent(); - log.Warn(string.Format("Sales Analysis by: {0}", Session.User.Name)); + //log.Warn(string.Format("Sales Analysis by: {0}", Session.User.Name)); } private void dtpStart_ValueChanged(object sender, EventArgs e) @@ -30,7 +30,7 @@ namespace Tanshu.Accounts.PointOfSale if (details.HasValue) { - List list = new SalesAnalysisBI().GetSaleDetail(startDate, finishDate, details.Value); + var list = new SalesAnalysisBI().GetSaleDetail(startDate, finishDate, details.Value); dgvSale.AutoGenerateColumns = true; dgvSale.DataSource = list; dgvSale.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; @@ -76,7 +76,7 @@ namespace Tanshu.Accounts.PointOfSale try { if (!details.HasValue) - details = ((SalesAnalysisBO)dgvSale.SelectedRows[0].DataBoundItem).TypeID; + details = ((SalesAnalysis)dgvSale.SelectedRows[0].DataBoundItem).TypeID; else details = null; ShowStatement(); diff --git a/Tanshu.Accounts.PointOfSale/Sales/SalesForm.Designer.cs b/Tanshu.Accounts.PointOfSale/Sales/SalesForm.Designer.cs index 58c3310..e4ea45d 100644 --- a/Tanshu.Accounts.PointOfSale/Sales/SalesForm.Designer.cs +++ b/Tanshu.Accounts.PointOfSale/Sales/SalesForm.Designer.cs @@ -29,8 +29,8 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); this.label7 = new System.Windows.Forms.Label(); this.txtDiscount = new System.Windows.Forms.TextBox(); this.Label12 = new System.Windows.Forms.Label(); @@ -45,12 +45,10 @@ this.additionalDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.bindingSource = new System.Windows.Forms.BindingSource(this.components); this.pnlBilling = new System.Windows.Forms.Panel(); + this.btnSettle = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); this.txtServiceCharge = new System.Windows.Forms.TextBox(); - this.btnNext = new System.Windows.Forms.Button(); - this.btnPrevious = new System.Windows.Forms.Button(); this.btnWaiter = new System.Windows.Forms.Button(); - this.txtCode = new System.Windows.Forms.TextBox(); this.btnClear = new System.Windows.Forms.Button(); this.btnRate = new System.Windows.Forms.Button(); this.btnPrintKot = new System.Windows.Forms.Button(); @@ -73,12 +71,16 @@ this.btnCustomer = new System.Windows.Forms.Button(); this.bsWaiter = new System.Windows.Forms.BindingSource(this.components); this.bsPending = new System.Windows.Forms.BindingSource(this.components); - this.btnSettle = new System.Windows.Forms.Button(); + this.btnModifier = new System.Windows.Forms.Button(); + this.flpActions = new System.Windows.Forms.FlowLayoutPanel(); + this.flpGroup = new System.Windows.Forms.FlowLayoutPanel(); + this.flpMain = new System.Windows.Forms.FlowLayoutPanel(); ((System.ComponentModel.ISupportInitialize)(this.dgvProducts)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit(); this.pnlBilling.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.bsWaiter)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bsPending)).BeginInit(); + this.flpActions.SuspendLayout(); this.SuspendLayout(); // // label7 @@ -210,8 +212,8 @@ // printedDataGridViewTextBoxColumn // this.printedDataGridViewTextBoxColumn.DataPropertyName = "Printed"; - dataGridViewCellStyle1.Format = "N2"; - this.printedDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle5.Format = "N2"; + this.printedDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle5; this.printedDataGridViewTextBoxColumn.HeaderText = "Printed"; this.printedDataGridViewTextBoxColumn.Name = "printedDataGridViewTextBoxColumn"; this.printedDataGridViewTextBoxColumn.ReadOnly = true; @@ -220,9 +222,9 @@ // additionalDataGridViewTextBoxColumn // this.additionalDataGridViewTextBoxColumn.DataPropertyName = "Additional"; - dataGridViewCellStyle2.Format = "N2"; - dataGridViewCellStyle2.NullValue = null; - this.additionalDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle6.Format = "N2"; + dataGridViewCellStyle6.NullValue = null; + this.additionalDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle6; this.additionalDataGridViewTextBoxColumn.HeaderText = "Additional"; this.additionalDataGridViewTextBoxColumn.Name = "additionalDataGridViewTextBoxColumn"; this.additionalDataGridViewTextBoxColumn.ReadOnly = true; @@ -230,26 +232,17 @@ // // bindingSource // - this.bindingSource.DataSource = typeof(Tanshu.Accounts.Contracts.SalesBillItemBO); + this.bindingSource.DataSource = typeof(Tanshu.Accounts.Contracts.BillInventory); // // pnlBilling // this.pnlBilling.AutoSize = true; this.pnlBilling.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.pnlBilling.Controls.Add(this.btnSettle); + this.pnlBilling.Controls.Add(this.flpMain); + this.pnlBilling.Controls.Add(this.flpGroup); + this.pnlBilling.Controls.Add(this.flpActions); this.pnlBilling.Controls.Add(this.label1); this.pnlBilling.Controls.Add(this.txtServiceCharge); - this.pnlBilling.Controls.Add(this.btnNext); - this.pnlBilling.Controls.Add(this.btnPrevious); - this.pnlBilling.Controls.Add(this.btnWaiter); - this.pnlBilling.Controls.Add(this.txtCode); - this.pnlBilling.Controls.Add(this.btnClear); - this.pnlBilling.Controls.Add(this.btnRate); - this.pnlBilling.Controls.Add(this.btnPrintKot); - this.pnlBilling.Controls.Add(this.btnPrintBill); - this.pnlBilling.Controls.Add(this.btnVoid); - this.pnlBilling.Controls.Add(this.btnDiscount); - this.pnlBilling.Controls.Add(this.btnQuantity); this.pnlBilling.Controls.Add(this.txtTableID); this.pnlBilling.Controls.Add(this.label11); this.pnlBilling.Controls.Add(this.label9); @@ -278,6 +271,16 @@ this.pnlBilling.Size = new System.Drawing.Size(982, 688); this.pnlBilling.TabIndex = 121; // + // btnSettle + // + this.btnSettle.Location = new System.Drawing.Point(732, 3); + this.btnSettle.Name = "btnSettle"; + this.btnSettle.Size = new System.Drawing.Size(75, 75); + this.btnSettle.TabIndex = 155; + this.btnSettle.Text = "Settle Bill"; + this.btnSettle.UseVisualStyleBackColor = true; + this.btnSettle.Click += new System.EventHandler(this.btnSettle_Click); + // // label1 // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -299,29 +302,9 @@ this.txtServiceCharge.TabIndex = 153; this.txtServiceCharge.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; // - // btnNext - // - this.btnNext.Location = new System.Drawing.Point(890, 596); - this.btnNext.Name = "btnNext"; - this.btnNext.Size = new System.Drawing.Size(80, 80); - this.btnNext.TabIndex = 152; - this.btnNext.Text = "Next"; - this.btnNext.UseVisualStyleBackColor = true; - this.btnNext.Click += new System.EventHandler(this.btnNext_Click); - // - // btnPrevious - // - this.btnPrevious.Location = new System.Drawing.Point(890, 12); - this.btnPrevious.Name = "btnPrevious"; - this.btnPrevious.Size = new System.Drawing.Size(80, 80); - this.btnPrevious.TabIndex = 151; - this.btnPrevious.Text = "Previous"; - this.btnPrevious.UseVisualStyleBackColor = true; - this.btnPrevious.Click += new System.EventHandler(this.btnPrevious_Click); - // // btnWaiter // - this.btnWaiter.Location = new System.Drawing.Point(255, 610); + this.btnWaiter.Location = new System.Drawing.Point(327, 3); this.btnWaiter.Name = "btnWaiter"; this.btnWaiter.Size = new System.Drawing.Size(75, 75); this.btnWaiter.TabIndex = 150; @@ -329,16 +312,9 @@ this.btnWaiter.UseVisualStyleBackColor = true; this.btnWaiter.Click += new System.EventHandler(this.btnWaiter_Click); // - // txtCode - // - this.txtCode.Location = new System.Drawing.Point(489, 54); - this.txtCode.Name = "txtCode"; - this.txtCode.Size = new System.Drawing.Size(312, 20); - this.txtCode.TabIndex = 149; - // // btnClear // - this.btnClear.Location = new System.Drawing.Point(174, 610); + this.btnClear.Location = new System.Drawing.Point(570, 3); this.btnClear.Name = "btnClear"; this.btnClear.Size = new System.Drawing.Size(75, 75); this.btnClear.TabIndex = 148; @@ -348,7 +324,7 @@ // // btnRate // - this.btnRate.Location = new System.Drawing.Point(336, 610); + this.btnRate.Location = new System.Drawing.Point(84, 3); this.btnRate.Name = "btnRate"; this.btnRate.Size = new System.Drawing.Size(75, 75); this.btnRate.TabIndex = 146; @@ -358,7 +334,7 @@ // // btnPrintKot // - this.btnPrintKot.Location = new System.Drawing.Point(93, 610); + this.btnPrintKot.Location = new System.Drawing.Point(408, 3); this.btnPrintKot.Name = "btnPrintKot"; this.btnPrintKot.Size = new System.Drawing.Size(75, 75); this.btnPrintKot.TabIndex = 145; @@ -368,7 +344,7 @@ // // btnPrintBill // - this.btnPrintBill.Location = new System.Drawing.Point(12, 610); + this.btnPrintBill.Location = new System.Drawing.Point(489, 3); this.btnPrintBill.Name = "btnPrintBill"; this.btnPrintBill.Size = new System.Drawing.Size(75, 75); this.btnPrintBill.TabIndex = 144; @@ -378,19 +354,19 @@ // // btnVoid // - this.btnVoid.Location = new System.Drawing.Point(417, 610); + this.btnVoid.Location = new System.Drawing.Point(651, 3); this.btnVoid.Name = "btnVoid"; this.btnVoid.Size = new System.Drawing.Size(75, 75); this.btnVoid.TabIndex = 143; - this.btnVoid.Text = "Cancel Current Bill"; + this.btnVoid.Text = "Void Bill"; this.btnVoid.UseVisualStyleBackColor = true; this.btnVoid.Click += new System.EventHandler(this.btnVoid_Click); // // btnDiscount // - this.btnDiscount.Location = new System.Drawing.Point(663, 514); + this.btnDiscount.Location = new System.Drawing.Point(165, 3); this.btnDiscount.Name = "btnDiscount"; - this.btnDiscount.Size = new System.Drawing.Size(104, 23); + this.btnDiscount.Size = new System.Drawing.Size(75, 75); this.btnDiscount.TabIndex = 142; this.btnDiscount.Text = "Discount - F3"; this.btnDiscount.UseVisualStyleBackColor = true; @@ -398,9 +374,9 @@ // // btnQuantity // - this.btnQuantity.Location = new System.Drawing.Point(663, 537); + this.btnQuantity.Location = new System.Drawing.Point(3, 3); this.btnQuantity.Name = "btnQuantity"; - this.btnQuantity.Size = new System.Drawing.Size(104, 23); + this.btnQuantity.Size = new System.Drawing.Size(75, 75); this.btnQuantity.TabIndex = 141; this.btnQuantity.Text = "Quantity - F2"; this.btnQuantity.UseVisualStyleBackColor = true; @@ -521,21 +497,57 @@ // // bsWaiter // - this.bsWaiter.DataSource = typeof(Tanshu.Accounts.Contracts.WaiterBO); + this.bsWaiter.DataSource = typeof(Tanshu.Accounts.Entities.Waiter); // // bsPending // - this.bsPending.DataSource = typeof(Tanshu.Accounts.Contracts.PendingBillsBO); + this.bsPending.DataSource = typeof(Tanshu.Accounts.Contracts.PendingBills); // - // btnSettle + // btnModifier // - this.btnSettle.Location = new System.Drawing.Point(498, 610); - this.btnSettle.Name = "btnSettle"; - this.btnSettle.Size = new System.Drawing.Size(75, 75); - this.btnSettle.TabIndex = 155; - this.btnSettle.Text = "Settle Bill"; - this.btnSettle.UseVisualStyleBackColor = true; - this.btnSettle.Click += new System.EventHandler(this.btnSettle_Click); + this.btnModifier.Location = new System.Drawing.Point(246, 3); + this.btnModifier.Name = "btnModifier"; + this.btnModifier.Size = new System.Drawing.Size(75, 75); + this.btnModifier.TabIndex = 156; + this.btnModifier.Text = "Modifier"; + this.btnModifier.UseVisualStyleBackColor = true; + this.btnModifier.Click += new System.EventHandler(this.btnModifier_Click); + // + // flpActions + // + this.flpActions.Controls.Add(this.btnQuantity); + this.flpActions.Controls.Add(this.btnRate); + this.flpActions.Controls.Add(this.btnDiscount); + this.flpActions.Controls.Add(this.btnModifier); + this.flpActions.Controls.Add(this.btnWaiter); + this.flpActions.Controls.Add(this.btnPrintKot); + this.flpActions.Controls.Add(this.btnPrintBill); + this.flpActions.Controls.Add(this.btnClear); + this.flpActions.Controls.Add(this.btnVoid); + this.flpActions.Controls.Add(this.btnSettle); + this.flpActions.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flpActions.Location = new System.Drawing.Point(0, 607); + this.flpActions.Name = "flpActions"; + this.flpActions.Size = new System.Drawing.Size(982, 81); + this.flpActions.TabIndex = 157; + // + // flpGroup + // + this.flpGroup.Dock = System.Windows.Forms.DockStyle.Right; + this.flpGroup.Location = new System.Drawing.Point(901, 0); + this.flpGroup.Name = "flpGroup"; + this.flpGroup.Size = new System.Drawing.Size(81, 607); + this.flpGroup.TabIndex = 158; + // + // flpMain + // + this.flpMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flpMain.Location = new System.Drawing.Point(390, 54); + this.flpMain.Name = "flpMain"; + this.flpMain.Size = new System.Drawing.Size(511, 552); + this.flpMain.TabIndex = 159; // // SalesForm // @@ -557,6 +569,7 @@ this.pnlBilling.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.bsWaiter)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.bsPending)).EndInit(); + this.flpActions.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -597,16 +610,17 @@ private System.Windows.Forms.Button btnVoid; private System.Windows.Forms.Button btnRate; private System.Windows.Forms.Button btnClear; - private System.Windows.Forms.TextBox txtCode; private System.Windows.Forms.DataGridViewTextBoxColumn Display; private System.Windows.Forms.DataGridViewTextBoxColumn printedDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn additionalDataGridViewTextBoxColumn; private System.Windows.Forms.Button btnWaiter; - private System.Windows.Forms.Button btnNext; - private System.Windows.Forms.Button btnPrevious; internal System.Windows.Forms.Label label1; internal System.Windows.Forms.TextBox txtServiceCharge; private System.Windows.Forms.Button btnSettle; + private System.Windows.Forms.FlowLayoutPanel flpActions; + private System.Windows.Forms.Button btnModifier; + private System.Windows.Forms.FlowLayoutPanel flpGroup; + private System.Windows.Forms.FlowLayoutPanel flpMain; } } diff --git a/Tanshu.Accounts.PointOfSale/Sales/SalesForm.cs b/Tanshu.Accounts.PointOfSale/Sales/SalesForm.cs index 6217ab0..8daba03 100644 --- a/Tanshu.Accounts.PointOfSale/Sales/SalesForm.cs +++ b/Tanshu.Accounts.PointOfSale/Sales/SalesForm.cs @@ -5,10 +5,11 @@ using System.Globalization; using System.Linq; using System.Threading; using System.Windows.Forms; -using Tanshu.Accounts.BI; +using Tanshu.Accounts.Repository; using Tanshu.Accounts.Contracts; using Tanshu.Accounts.Helpers; using Tanshu.Common; +using Tanshu.Accounts.Entities; namespace Tanshu.Accounts.PointOfSale @@ -28,7 +29,7 @@ namespace Tanshu.Accounts.PointOfSale billController.InitGui(this); } - public SalesForm(Guid voucherID, BillController billController) + public SalesForm(int voucherID, BillController billController) : this(billController) { billController.SetNewBillID(voucherID); @@ -45,7 +46,9 @@ namespace Tanshu.Accounts.PointOfSale case Keys.F2: { if (dgvProducts.Rows.Count > 0) - billController.SetQuantity(billController.CurrentProduct(dgvProducts.CurrentRow.Index), bindingSource, 0, false, true); + { + billController.SetQuantity(billController.CurrentProduct, 0, false, true); + } break; } case Keys.F3: @@ -70,7 +73,7 @@ namespace Tanshu.Accounts.PointOfSale { selectProduct.ShowDialog(); if (selectProduct.SelectedItem != null) - billController.AddProductToGrid(selectProduct.SelectedItem.ProductID, bindingSource); + billController.AddProductToGrid(selectProduct.SelectedItem.ProductID); } break; } @@ -82,7 +85,9 @@ namespace Tanshu.Accounts.PointOfSale case Keys.F9: { if (dgvProducts.Rows.Count > 0) - billController.SetAmount(billController.CurrentProduct(dgvProducts.CurrentRow.Index), bindingSource, -1); + { + billController.SetAmount(billController.CurrentProduct, -1); + } break; } case Keys.F11: @@ -98,19 +103,19 @@ namespace Tanshu.Accounts.PointOfSale case Keys.Delete: { if (dgvProducts.Rows.Count > 0) - billController.ProductRemove(billController.CurrentProduct(dgvProducts.CurrentRow.Index)); + billController.ProductRemove(billController.CurrentProduct); break; } case Keys.Add: { if (dgvProducts.Rows.Count > 0) - billController.SetQuantity(billController.CurrentProduct(dgvProducts.CurrentRow.Index), bindingSource, 1, false, false); + billController.SetQuantity(billController.CurrentProduct, 1, false, false); break; } case Keys.Subtract: { if (dgvProducts.Rows.Count > 0) - billController.SetQuantity(billController.CurrentProduct(dgvProducts.CurrentRow.Index), bindingSource, -1, false, false); + billController.SetQuantity(billController.CurrentProduct, -1, false, false); break; } case Keys.Up: @@ -134,7 +139,7 @@ namespace Tanshu.Accounts.PointOfSale } #region Helper Functions - public void ClearBill(Dictionary bill) + public void ClearBill(OrderedDictionary bill) { this.txtBillID.Text = ""; this.txtKotID.Text = ""; @@ -162,59 +167,77 @@ namespace Tanshu.Accounts.PointOfSale buttonHeads = new List