diff --git a/Balancer/.nuget/NuGet.Config b/Balancer/.nuget/NuGet.Config
new file mode 100644
index 0000000..67f8ea0
--- /dev/null
+++ b/Balancer/.nuget/NuGet.Config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Balancer/.nuget/NuGet.exe b/Balancer/.nuget/NuGet.exe
new file mode 100644
index 0000000..8dd7e45
Binary files /dev/null and b/Balancer/.nuget/NuGet.exe differ
diff --git a/Balancer/.nuget/NuGet.targets b/Balancer/.nuget/NuGet.targets
new file mode 100644
index 0000000..3f8c37b
--- /dev/null
+++ b/Balancer/.nuget/NuGet.targets
@@ -0,0 +1,144 @@
+
+
+
+ $(MSBuildProjectDirectory)\..\
+
+
+ false
+
+
+ false
+
+
+ true
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+ $([System.IO.Path]::Combine($(SolutionDir), ".nuget"))
+
+
+
+
+ $(SolutionDir).nuget
+
+
+
+ $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config
+ $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config
+
+
+
+ $(MSBuildProjectDirectory)\packages.config
+ $(PackagesProjectConfig)
+
+
+
+
+ $(NuGetToolsPath)\NuGet.exe
+ @(PackageSource)
+
+ "$(NuGetExePath)"
+ mono --runtime=v4.0.30319 "$(NuGetExePath)"
+
+ $(TargetDir.Trim('\\'))
+
+ -RequireConsent
+ -NonInteractive
+
+ "$(SolutionDir) "
+ "$(SolutionDir)"
+
+
+ $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)
+ $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols
+
+
+
+ RestorePackages;
+ $(BuildDependsOn);
+
+
+
+
+ $(BuildDependsOn);
+ BuildPackage;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ProxyToHashServer/App.config b/Balancer/App.config
similarity index 100%
rename from ProxyToHashServer/App.config
rename to Balancer/App.config
diff --git a/Balancer/Listener.cs b/Balancer/Listener.cs
new file mode 100644
index 0000000..8a8faab
--- /dev/null
+++ b/Balancer/Listener.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
+using log4net;
+
+namespace ProxyToHashServer
+{
+ public class Listener
+ {
+ private HttpListener listener;
+
+ public Listener(int port, string suffix, Func callbackAsync)
+ {
+ ThreadPool.SetMinThreads(8, 8);
+ CallbackAsync = callbackAsync;
+ listener = new HttpListener();
+ listener.Prefixes.Add(string.Format("http://+:{0}{1}/", port, suffix != null ? "/" + suffix.TrimStart('/') : ""));
+ }
+
+ public void Start()
+ {
+ listener.Start();
+ StartListen();
+ }
+
+ public async void StartListen()
+ {
+ while (true)
+ {
+ var context = await listener.GetContextAsync();
+
+ Task.Run(
+ async () =>
+ {
+ var ctx = context;
+ try
+ {
+ await CallbackAsync(ctx);
+ }
+ finally
+ {
+ ctx.Response.Close();
+ }
+ }
+ );
+ }
+ }
+
+ private Func CallbackAsync { get; set; }
+
+ private static readonly ILog log = LogManager.GetLogger(typeof(Program));
+ }
+}
diff --git a/ProxyToHashServer/Program.cs b/Balancer/Program.cs
similarity index 54%
rename from ProxyToHashServer/Program.cs
rename to Balancer/Program.cs
index 1f3585c..54ec0ef 100644
--- a/ProxyToHashServer/Program.cs
+++ b/Balancer/Program.cs
@@ -1,10 +1,10 @@
-using HashServer;
-using log4net;
+using log4net;
using log4net.Config;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
+using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Text;
@@ -17,17 +17,15 @@ static class Program
{
private static readonly Random rand = new Random();
private const int defaultPort = 20000;
+ private const int timeout = 1500;
private static readonly ILog log = LogManager.GetLogger(typeof(Program));
private static readonly string[] hashServers = //пока это будет тут, потом перенесу в файл, если нужно будет.
new string[]
{
- "127.0.0.1:21612",
- "127.0.0.1:21613",
- "127.0.0.1:21614",
- "127.0.0.1:21615",
- "127.0.0.1:21616",
+ "127.0.0.1:22722",
+ "127.0.0.1:22723",
};
static void Main(string[] args)
@@ -59,21 +57,54 @@ private static async Task OnContextAsync(HttpListenerContext context)
log.InfoFormat("{0}: received {1} from {2}", requestId, query, remoteEndPoint);
context.Request.InputStream.Close();
MemoryStream ms = null;
+ var usableServers = hashServers.ToList();
+ string server = null;
while (ms == null)
{
try
{
- ms = await DownloadWebPageAsync(hashServers[rand.Next(hashServers.Length)], query);
+ if (usableServers.Count == 0)
+ {
+ log.InfoFormat("All servers unavailible");
+ context.Response.StatusCode = 500;
+ context.Response.Close();
+ return;
+ }
+ var tasks = new Task[2];
+ server = usableServers[rand.Next(usableServers.Count)];
+ tasks[0] = Task.Run(async () =>
+ {
+ await Task.Delay(timeout);
+ return (MemoryStream)null;
+ });
+ tasks[1] = DownloadWebPageAsync(server, query);
+ var task = await Task.WhenAny(tasks);
+ ms = task.Result;
+ if (ms == null)
+ {
+ usableServers.Remove(server);
+ log.InfoFormat("server request timed out");
+ }
}
- catch (Exception)
+ catch (Exception e)
{
+ usableServers.Remove(server);
log.InfoFormat("Server down");
+ log.InfoFormat(((AggregateException)e).InnerExceptions[0].GetType().ToString());
}
}
- var encryptedBytes = ms.ToArray();
-
- await context.Response.OutputStream.WriteAsync(encryptedBytes, 0, encryptedBytes.Length);
- context.Response.OutputStream.Close();
+ var encryptedBytes = ms.ToArray();
+ var encodings = context.Request.Headers.GetValues("Accept-Encoding");
+ var stream = context.Response.OutputStream;
+ Console.WriteLine(encodings.Count());
+ if (encodings != null && encodings.Contains("deflate"))
+ {
+ context.Response.AddHeader("Content-Encoding", "deflate");
+ stream = new DeflateStream(stream, CompressionLevel.Optimal);
+ log.InfoFormat("data encoded");
+ }
+ await stream.WriteAsync(encryptedBytes, 0, encryptedBytes.Length);
+ stream.Close();
log.InfoFormat("{0}: {1} sent back to {2}", requestId, Encoding.UTF8.GetString(encryptedBytes), remoteEndPoint);
}
@@ -87,6 +118,7 @@ public static async Task DownloadWebPageAsync(string ipAndPortOfSe
{
await stream.CopyToAsync(ms);
Console.WriteLine("Got {0} bytes in {1} ms", ms.Position, sw.ElapsedMilliseconds);
+ log.InfoFormat("Got {0} bytes in {1} ms", ms.Position, sw.ElapsedMilliseconds);
}
return ms;
}
diff --git a/ProxyToHashServer/Properties/AssemblyInfo.cs b/Balancer/Properties/AssemblyInfo.cs
similarity index 100%
rename from ProxyToHashServer/Properties/AssemblyInfo.cs
rename to Balancer/Properties/AssemblyInfo.cs
diff --git a/ProxyToHashServer/ProxyToHashServer.csproj b/Balancer/ProxyToHashServer.csproj
similarity index 93%
rename from ProxyToHashServer/ProxyToHashServer.csproj
rename to Balancer/ProxyToHashServer.csproj
index 7f1d274..8d480db 100644
--- a/ProxyToHashServer/ProxyToHashServer.csproj
+++ b/Balancer/ProxyToHashServer.csproj
@@ -46,6 +46,7 @@
+
@@ -55,12 +56,6 @@
-
-
- {26e99604-5e67-4f52-8c0e-63879569c3b0}
- HashServer
-
-
of the
+ log message.
+
+
+
+
+ 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 .
+
+
+
+
+
+ The fully qualified type of the IdentityPatternConverter class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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 .
+
+
+
+
+
+ The fully qualified type of the ProcessIdPatternConverter class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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 .
+
+
+
+
+
+ The fully qualified type of the RandomStringPatternConverter class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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 .
+
+
+
+
+
+ The fully qualified type of the UserNamePatternConverter class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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.
+
+
+
+
+
+
+ The fully qualified type of the UtcDatePatternConverter class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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.
+
+
+
+
+
+ The fully qualified type of the ConverterRegistry class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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
+
+
+
+
+ The fully qualified type of the AppenderAttachedImpl class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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
+
+
+
+
+
+ Wrapper class used to map converter names to converter types
+
+
+
+ Pattern converter info class used during configuration by custom
+ PatternString and PatternLayer converters.
+
+
+
+
+
+ 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.
+
+
+
+
+
+
+
+
+
+
+ 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.
+
+
+
+
+
+ The static class ILogExtensions contains a set of widely used
+ methods that ease the interaction with the ILog interface implementations.
+
+
+
+ This class contains methods for logging at different levels and checks the
+ properties for determining if those logging levels are enabled in the current
+ configuration.
+
+
+ Simple example of logging messages
+
+ using log4net.Util;
+
+ ILog log = LogManager.GetLogger("application-log");
+
+ log.InfoExt("Application Start");
+ log.DebugExt("This is a debug message");
+
+
+
+
+
+ The fully qualified type of the Logger class.
+
+
+
+
+ Log a message object with the level.
+
+ The logger on which the message is logged.
+ The lambda expression that gets the object to log.
+
+
+ This method first checks if this logger is INFO
+ enabled by reading the value property.
+ This check happens always and does not depend on the
+ implementation. If this logger is INFO enabled, then it converts
+ the message object (retrieved by invocation of the provided callback) 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 logger on which the message is logged.
+ The lambda expression that gets the object to log.
+ The exception to log, including its stack trace.
+
+
+ See the form for more detailed information.
+
+
+
+
+
+
+ Log a message object with the level. //TODO
+
+ Log a message object with the level.
+
+ The logger on which the message is logged.
+ The message object to log.
+
+
+ This method first checks if this logger is INFO
+ enabled by reading the value property.
+ This check happens always and does not depend on the
+ implementation. 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.
+
+
+
+
+
+
+
+ Log a message object with the level including
+ the stack trace of the passed
+ as a parameter.
+
+ The logger on which the message is logged.
+ The message object to log.
+ The exception to log, including its stack trace.
+
+
+ See the form for more detailed information.
+
+
+
+
+
+
+
+ Logs a formatted message string with the level.
+
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+ An that supplies culture-specific formatting information
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+
+
+
+
+
+
+ Log a message object with the level.
+
+ The logger on which the message is logged.
+ The lambda expression that gets the object to log.
+
+
+ This method first checks if this logger is INFO
+ enabled by reading the value property.
+ This check happens always and does not depend on the
+ implementation. If this logger is INFO enabled, then it converts
+ the message object (retrieved by invocation of the provided callback) 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 logger on which the message is logged.
+ The lambda expression that gets the object to log.
+ The exception to log, including its stack trace.
+
+
+ See the form for more detailed information.
+
+
+
+
+
+
+ Log a message object with the level. //TODO
+
+ Log a message object with the level.
+
+ The logger on which the message is logged.
+ The message object to log.
+
+
+ This method first checks if this logger is INFO
+ enabled by reading the value property.
+ This check happens always and does not depend on the
+ implementation. 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.
+
+
+
+
+
+
+
+ Log a message object with the level including
+ the stack trace of the passed
+ as a parameter.
+
+ The logger on which the message is logged.
+ The message object to log.
+ The exception to log, including its stack trace.
+
+
+ See the form for more detailed information.
+
+
+
+
+
+
+
+ Logs a formatted message string with the level.
+
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+ An that supplies culture-specific formatting information
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+
+
+
+
+
+
+ Log a message object with the level.
+
+ The logger on which the message is logged.
+ The lambda expression that gets the object to log.
+
+
+ This method first checks if this logger is WARN
+ enabled by reading the value property.
+ This check happens always and does not depend on the
+ implementation. If this logger is WARN enabled, then it converts
+ the message object (retrieved by invocation of the provided callback) 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 logger on which the message is logged.
+ The lambda expression that gets the object to log.
+ The exception to log, including its stack trace.
+
+
+ See the form for more detailed information.
+
+
+
+
+
+
+ Log a message object with the level. //TODO
+
+ Log a message object with the level.
+
+ The logger on which the message is logged.
+ The message object to log.
+
+
+ This method first checks if this logger is WARN
+ enabled by reading the value property.
+ This check happens always and does not depend on the
+ implementation. 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.
+
+
+
+
+
+
+
+ Log a message object with the level including
+ the stack trace of the passed
+ as a parameter.
+
+ The logger on which the message is logged.
+ The message object to log.
+ The exception to log, including its stack trace.
+
+
+ See the form for more detailed information.
+
+
+
+
+
+
+
+ Logs a formatted message string with the level.
+
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+ An that supplies culture-specific formatting information
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+
+
+
+
+
+
+ Log a message object with the level.
+
+ The logger on which the message is logged.
+ The lambda expression that gets the object to log.
+
+
+ This method first checks if this logger is ERROR
+ enabled by reading the value property.
+ This check happens always and does not depend on the
+ implementation. If this logger is ERROR enabled, then it converts
+ the message object (retrieved by invocation of the provided callback) 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 logger on which the message is logged.
+ The lambda expression that gets the object to log.
+ The exception to log, including its stack trace.
+
+
+ See the form for more detailed information.
+
+
+
+
+
+
+ Log a message object with the level. //TODO
+
+ Log a message object with the level.
+
+ The logger on which the message is logged.
+ The message object to log.
+
+
+ This method first checks if this logger is ERROR
+ enabled by reading the value property.
+ This check happens always and does not depend on the
+ implementation. 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 logger on which the message is logged.
+ The message object to log.
+ The exception to log, including its stack trace.
+
+
+ See the form for more detailed information.
+
+
+
+
+
+
+
+ Logs a formatted message string with the level.
+
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+ An that supplies culture-specific formatting information
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+
+
+
+
+
+
+ Log a message object with the level.
+
+ The logger on which the message is logged.
+ The lambda expression that gets the object to log.
+
+
+ This method first checks if this logger is FATAL
+ enabled by reading the value property.
+ This check happens always and does not depend on the
+ implementation. If this logger is FATAL enabled, then it converts
+ the message object (retrieved by invocation of the provided callback) 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 logger on which the message is logged.
+ The lambda expression that gets the object to log.
+ The exception to log, including its stack trace.
+
+
+ See the form for more detailed information.
+
+
+
+
+
+
+ Log a message object with the level. //TODO
+
+ Log a message object with the level.
+
+ The logger on which the message is logged.
+ The message object to log.
+
+
+ This method first checks if this logger is FATAL
+ enabled by reading the value property.
+ This check happens always and does not depend on the
+ implementation. 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.
+
+
+
+
+
+
+
+ Log a message object with the level including
+ the stack trace of the passed
+ as a parameter.
+
+ The logger on which the message is logged.
+ The message object to log.
+ The exception to log, including its stack trace.
+
+
+ See the form for more detailed information.
+
+
+
+
+
+
+
+ Logs a formatted message string with the level.
+
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+ An that supplies culture-specific formatting information
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+ The logger on which the message is logged.
+ 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.
+
+
+
+
+
+
+
+ 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 .
+
+
+ This class stores its properties in a slot on the named
+ log4net.Util.LogicalThreadContextProperties.
+
+
+ The requires a link time
+ for the
+ .
+ If the calling code does not have this permission then this context will be disabled.
+ It will not store any property values set on it.
+
+
+ Nicko Cadell
+
+
+
+ Flag used to disable this context if we don't have permission to access the CallContext.
+
+
+
+
+ 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 the call context get data.
+
+ The peroperties dictionary stored in the call context
+
+ The method has a
+ security link demand, therfore we must put the method call in a seperate method
+ that we can wrap in an exception handler.
+
+
+
+
+ Sets the call context data.
+
+ The properties.
+
+ The method has a
+ security link demand, therfore we must put the method call in a seperate method
+ that we can wrap in an exception handler.
+
+
+
+
+ The fully qualified type of the LogicalThreadContextProperties class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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
+
+
+
+ Formats Prefix, Source, and Message in the same format as the value
+ sent to Console.Out and Trace.Write.
+
+
+
+
+
+ Initializes a new instance of the 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.
+
+
+
+
+
+ Raises the LogReceived event when an internal messages is received.
+
+
+
+
+
+
+
+
+ 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 Type that generated this message.
+ 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 Type that generated this message.
+ 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 Type that generated this message.
+ 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 Type that generated this message.
+ 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 Type that generated this message.
+ 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.
+
+
+
+
+ The event raised when an internal message has been received.
+
+
+
+
+ The Type that generated the internal message.
+
+
+
+
+ The DateTime stamp of when the internal message was received.
+
+
+
+
+ A string indicating the severity of the internal message.
+
+
+ "log4net: ",
+ "log4net:ERROR ",
+ "log4net:WARN "
+
+
+
+
+ The internal log message.
+
+
+
+
+ The Exception related to the message.
+
+
+ Optional. Will be null if no Exception was passed.
+
+
+
+
+ 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.
+
+
+
+
+
+ Subscribes to the LogLog.LogReceived event and stores messages
+ to the supplied IList instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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 processed using the LogLog sub-system by default.
+
+
+ This policy aims at protecting an otherwise working application
+ from being flooded with error messages when logging fails.
+
+
+ Nicko Cadell
+ Gert Driesen
+ Ron Grabowski
+
+
+
+ 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.
+
+
+
+
+
+ Reset the error handler back to its initial disabled state.
+
+
+
+
+ Log an Error
+
+ The error message.
+ The exception.
+ The internal error code.
+
+
+ Invokes if and only if this is the first error or the first error after has been called.
+
+
+
+
+
+ Log the very first error
+
+ The error message.
+ The exception.
+ The internal error code.
+
+
+ Sends the error information to 's Error method.
+
+
+
+
+
+ Log an Error
+
+ The error message.
+ The exception.
+
+
+ Invokes if and only if this is the first error or the first error after has been called.
+
+
+
+
+
+ Log an error
+
+ The error message.
+
+
+ Invokes if and only if this is the first error or the first error after has been called.
+
+
+
+
+
+ The date the error was recorded.
+
+
+
+
+ Flag to indicate if it is the first error
+
+
+
+
+ The message recorded during the first error.
+
+
+
+
+ The exception recorded during the first error.
+
+
+
+
+ The error code recorded during the first error.
+
+
+
+
+ String to prefix each message with
+
+
+
+
+ The fully qualified type of the OnlyOnceErrorHandler class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ Is error logging enabled
+
+
+
+ Is error logging enabled. Logging is only enabled for the
+ first error delivered to the .
+
+
+
+
+
+ The date the first error that trigged this error handler occured.
+
+
+
+
+ The message from the first error that trigged this error handler.
+
+
+
+
+ The exception from the first error that trigged this error handler.
+
+
+ May be .
+
+
+
+
+ The error code from the first error that trigged this error handler.
+
+
+ Defaults to
+
+
+
+
+ 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 .
+
+
+
+ The fully qualified type of the OptionConverter class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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.
+
+
+
+
+
+ The fully qualified type of the PatternParser class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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 current date and time 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.
+
+
+
+
+
+ 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 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.
+
+
+
+
+
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+
+
+ The fully qualified type of the SystemInfo class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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
+
+
+
+
+ The fully qualified type of the SystemStringFormat class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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
+
+
+
+ Each thread will automatically have its instance.
+
+
+
+
+ Internal constructor
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+
+ Remove a property
+
+ the key for the entry to remove
+
+
+ Remove a property
+
+
+
+
+
+ Get the keys stored in the properties.
+
+
+ Gets the keys stored in the properties.
+
+ a set of the defined keys
+
+
+
+ Clear all properties
+
+
+
+ Clear all properties
+
+
+
+
+
+ Get the PropertiesDictionary for this thread.
+
+ create the dictionary if it does not exist, otherwise return null if 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.
+
+
+
+
+
+ The fully qualified type of the ThreadContextStacks class.
+
+
+ Used by the internal logger to record the Type of the
+ log message.
+
+
+
+
+ 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.
+
+
+
+
+
+ Characters illegal in XML 1.0
+
+
+
+
+ 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.
+
+
+
+
+
+ Provides information about the environment the assembly has
+ been built for.
+
+
+
+ Version of the assembly
+
+
+ Version of the framework targeted
+
+
+ Type of framework targeted
+
+
+ Does it target a client profile?
+
+
+
+ Identifies the version and target for this assembly.
+
+
+
+
+ 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.
+
+
+ The requires a link time
+ for the
+ .
+ If the calling code does not have this permission then this context will be disabled.
+ It will not store any property values set on it.
+
+
+ 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/Balancer/packages/log4net.2.0.3/log4net.2.0.3.nupkg b/Balancer/packages/log4net.2.0.3/log4net.2.0.3.nupkg
new file mode 100644
index 0000000..14dc7db
Binary files /dev/null and b/Balancer/packages/log4net.2.0.3/log4net.2.0.3.nupkg differ
diff --git a/HashServer/Program.cs b/HashServer/Program.cs
index 92938ad..8a81324 100644
--- a/HashServer/Program.cs
+++ b/HashServer/Program.cs
@@ -15,15 +15,15 @@ class Program
static void Main(string[] args)
{
+ if (args.Length < 1)
+ throw new ArgumentException();
+ port = int.Parse(args[0]);
XmlConfigurator.Configure();
try
{
var listener = new Listener(port, "method", OnContextAsync);
listener.Start();
- var listenerSync = new ListenerSync(port, "methodSync", OnContext);
- listenerSync.Start();
-
log.InfoFormat("Server started!");
Console.WriteLine("Enter server delay in ms");
while (true)
@@ -86,7 +86,7 @@ private static byte[] CalcHash(byte[] data)
return hasher.ComputeHash(data);
}
- private const int port = 20000;
+ private static int port = 20000;
private static readonly byte[] Key = Encoding.UTF8.GetBytes("Контур.Шпора");
private static readonly ILog log = LogManager.GetLogger(typeof(Program));
}
diff --git a/Kontur.Shpora.MT.v11.suo b/Kontur.Shpora.MT.v11.suo
index a161e4e..70621fa 100644
Binary files a/Kontur.Shpora.MT.v11.suo and b/Kontur.Shpora.MT.v11.suo differ