summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/.gitignore3
-rw-r--r--src/LocalTestRun.testrunconfig22
-rw-r--r--src/YOURLIBNAME.Test/Logging.config33
-rw-r--r--src/YOURLIBNAME.Test/Properties/AssemblyInfo.cs23
-rw-r--r--src/YOURLIBNAME.Test/TestBase.cs25
-rw-r--r--src/YOURLIBNAME.Test/YOURLIBNAME.Test.csproj75
-rw-r--r--src/YOURLIBNAME.sln35
-rw-r--r--src/YOURLIBNAME.vsmdi6
-rw-r--r--src/YOURLIBNAME/.gitignore4
-rw-r--r--src/YOURLIBNAME/Logger.cs199
-rw-r--r--src/YOURLIBNAME/Loggers/ILog.cs964
-rw-r--r--src/YOURLIBNAME/Loggers/Log4NetLogger.cs203
-rw-r--r--src/YOURLIBNAME/Loggers/NoOpLogger.cs177
-rw-r--r--src/YOURLIBNAME/Loggers/TraceLogger.cs201
-rw-r--r--src/YOURLIBNAME/Properties/AssemblyInfo.cs85
-rw-r--r--src/YOURLIBNAME/Strings.Designer.cs81
-rw-r--r--src/YOURLIBNAME/Strings.resx126
-rw-r--r--src/YOURLIBNAME/Util.cs15
-rw-r--r--src/YOURLIBNAME/YOURLIBNAME.csproj91
-rw-r--r--src/official-build-key.pfxbin0 -> 1764 bytes
-rw-r--r--src/version.txt1
21 files changed, 2369 insertions, 0 deletions
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 0000000..e1aecd5
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1,3 @@
+*.suo
+*.cache
+PrecompiledWeb
diff --git a/src/LocalTestRun.testrunconfig b/src/LocalTestRun.testrunconfig
new file mode 100644
index 0000000..d03f62c
--- /dev/null
+++ b/src/LocalTestRun.testrunconfig
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestRunConfiguration name="Local Test Run" id="abbd81c0-7d7b-4c98-878c-05dbead62c27" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2006">
+ <Description>This is a default test run configuration for a local test run.</Description>
+ <CodeCoverage enabled="true">
+ <Regular>
+ <CodeCoverageItem binaryFile="C:\git\productname\bin\Debug\YOURLIBNAME.dll" pdbFile="C:\git\productname\bin\Debug\ProductName.pdb" instrumentInPlace="true" />
+ </Regular>
+ </CodeCoverage>
+ <TestTypeSpecific>
+ <WebTestRunConfiguration testTypeId="4e7599fa-5ecb-43e9-a887-cd63cf72d207">
+ <Browser name="Internet Explorer 7.0">
+ <Headers>
+ <Header name="User-Agent" value="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" />
+ <Header name="Accept" value="*/*" />
+ <Header name="Accept-Language" value="{{$IEAcceptLanguage}}" />
+ <Header name="Accept-Encoding" value="GZIP" />
+ </Headers>
+ </Browser>
+ <Network Name="LAN" BandwidthInKbps="0" />
+ </WebTestRunConfiguration>
+ </TestTypeSpecific>
+</TestRunConfiguration> \ No newline at end of file
diff --git a/src/YOURLIBNAME.Test/Logging.config b/src/YOURLIBNAME.Test/Logging.config
new file mode 100644
index 0000000..a1d675b
--- /dev/null
+++ b/src/YOURLIBNAME.Test/Logging.config
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<log4net>
+ <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
+ <file value="Testing.log" />
+ <appendToFile value="true" />
+ <rollingStyle value="Size" />
+ <maxSizeRollBackups value="10" />
+ <maximumFileSize value="1024KB" />
+ <staticLogFileName value="true" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
+ </layout>
+ </appender>
+ <appender name="TraceAppender" type="log4net.Appender.TraceAppender">
+ <immediateFlush value="true" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%-5level - %message%newline" />
+ </layout>
+ </appender>
+ <!-- Setup the root category, add the appenders and set the default level -->
+ <root>
+ <level value="Info" />
+ <!--<appender-ref ref="RollingFileAppender" />-->
+ <appender-ref ref="TraceAppender" />
+ </root>
+ <!-- Specify the level for some specific categories -->
+ <logger name="DotNetOpenId">
+ <level value="Off" />
+ </logger>
+ <logger name="DotNetOpenId.Test">
+ <level value="Info" />
+ </logger>
+</log4net>
diff --git a/src/YOURLIBNAME.Test/Properties/AssemblyInfo.cs b/src/YOURLIBNAME.Test/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..d065d7a
--- /dev/null
+++ b/src/YOURLIBNAME.Test/Properties/AssemblyInfo.cs
@@ -0,0 +1,23 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("YOURLIBNAME.Test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("YOURLIBNAME.Test")]
+[assembly: AssemblyCopyright("Copyright © 2008")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM componenets. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("aef0bb13-b79c-4854-a69a-de58b8feb5d1")]
diff --git a/src/YOURLIBNAME.Test/TestBase.cs b/src/YOURLIBNAME.Test/TestBase.cs
new file mode 100644
index 0000000..3c9788f
--- /dev/null
+++ b/src/YOURLIBNAME.Test/TestBase.cs
@@ -0,0 +1,25 @@
+using System.Reflection;
+using log4net;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace YOURLIBNAME.Test {
+ public class TestBase {
+ internal readonly static ILog Logger = LogManager.GetLogger("YOURLIBNAME.Test");
+
+ /// <summary>
+ /// Gets or sets the test context which provides
+ /// information about and functionality for the current test run.
+ /// </summary>
+ public TestContext TestContext { get; set; }
+
+ [TestInitialize]
+ public virtual void SetUp() {
+ log4net.Config.XmlConfigurator.Configure(Assembly.GetExecutingAssembly().GetManifestResourceStream("YOURLIBNAME.Test.Logging.config"));
+ }
+
+ [TestCleanup]
+ public virtual void Cleanup() {
+ log4net.LogManager.Shutdown();
+ }
+ }
+}
diff --git a/src/YOURLIBNAME.Test/YOURLIBNAME.Test.csproj b/src/YOURLIBNAME.Test/YOURLIBNAME.Test.csproj
new file mode 100644
index 0000000..1dd166f
--- /dev/null
+++ b/src/YOURLIBNAME.Test/YOURLIBNAME.Test.csproj
@@ -0,0 +1,75 @@
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{4376ECC9-C346-4A99-B13C-FA93C0FBD2C9}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>YOURLIBNAME.Test</RootNamespace>
+ <AssemblyName>YOURLIBNAME.Test</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Sign)' == 'true' ">
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>..\official-build-key.pfx</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\log4net.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Runtime.Serialization">
+ <RequiredTargetFramework>3.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Web" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="TestBase.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\YOURLIBNAME\YOURLIBNAME.csproj">
+ <Project>{3191B653-F76D-4C1A-9A5A-347BC3AAAAB7}</Project>
+ <Name>YOURLIBNAME</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Logging.config" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="..\..\tools\YOURLIBNAME.Versioning.targets" />
+</Project> \ No newline at end of file
diff --git a/src/YOURLIBNAME.sln b/src/YOURLIBNAME.sln
new file mode 100644
index 0000000..4cb16c4
--- /dev/null
+++ b/src/YOURLIBNAME.sln
@@ -0,0 +1,35 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductName", "ProductName\ProductName.csproj", "{3191B653-F76D-4C1A-9A5A-347BC3AAAAB7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductName.Test", "ProductName.Test\ProductName.Test.csproj", "{4376ECC9-C346-4A99-B13C-FA93C0FBD2C9}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{20B5E173-C3C4-49F8-BD25-E69044075B4D}"
+ ProjectSection(SolutionItems) = preProject
+ ProductName.vsmdi = ProductName.vsmdi
+ LocalTestRun.testrunconfig = LocalTestRun.testrunconfig
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(TestCaseManagementSettings) = postSolution
+ CategoryFile = ProductName.vsmdi
+ EndGlobalSection
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3191B653-F76D-4C1A-9A5A-347BC3AAAAB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3191B653-F76D-4C1A-9A5A-347BC3AAAAB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3191B653-F76D-4C1A-9A5A-347BC3AAAAB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3191B653-F76D-4C1A-9A5A-347BC3AAAAB7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4376ECC9-C346-4A99-B13C-FA93C0FBD2C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4376ECC9-C346-4A99-B13C-FA93C0FBD2C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4376ECC9-C346-4A99-B13C-FA93C0FBD2C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4376ECC9-C346-4A99-B13C-FA93C0FBD2C9}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/src/YOURLIBNAME.vsmdi b/src/YOURLIBNAME.vsmdi
new file mode 100644
index 0000000..027090d
--- /dev/null
+++ b/src/YOURLIBNAME.vsmdi
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestLists xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2006">
+ <TestList name="Lists of Tests" id="8c43106b-9dc1-4907-a29f-aa66a61bf5b6">
+ <RunConfiguration id="abbd81c0-7d7b-4c98-878c-05dbead62c27" name="Local Test Run" storage="localtestrun.testrunconfig" type="Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration, Microsoft.VisualStudio.QualityTools.Common, PublicKeyToken=b03f5f7f11d50a3a" />
+ </TestList>
+</TestLists> \ No newline at end of file
diff --git a/src/YOURLIBNAME/.gitignore b/src/YOURLIBNAME/.gitignore
new file mode 100644
index 0000000..5c901c6
--- /dev/null
+++ b/src/YOURLIBNAME/.gitignore
@@ -0,0 +1,4 @@
+*.user
+bin
+obj
+Bin
diff --git a/src/YOURLIBNAME/Logger.cs b/src/YOURLIBNAME/Logger.cs
new file mode 100644
index 0000000..c8a4ee9
--- /dev/null
+++ b/src/YOURLIBNAME/Logger.cs
@@ -0,0 +1,199 @@
+using System;
+using System.Globalization;
+using YOURLIBNAME.Loggers;
+
+namespace YOURLIBNAME {
+ /// <summary>
+ /// A general logger for the entire YOURLIBNAME library.
+ /// </summary>
+ /// <remarks>
+ /// Because this logger is intended for use with non-localized strings, the
+ /// overloads that take <see cref="CultureInfo"/> have been removed, and
+ /// <see cref="CultureInfo.InvariantCulture"/> is used implicitly.
+ /// </remarks>
+ static class Logger {
+ static ILog facade = initializeFacade();
+
+ static ILog initializeFacade() {
+ ILog result = Log4NetLogger.Initialize() ?? TraceLogger.Initialize() ?? NoOpLogger.Initialize();
+ result.Info(Util.LibraryVersion);
+ return result;
+ }
+
+ #region ILog Members
+ // Although this static class doesn't literally implement the ILog interface,
+ // we implement (mostly) all the same methods in a static way.
+
+ public static void Debug(object message) {
+ facade.Debug(message);
+ }
+
+ public static void Debug(object message, Exception exception) {
+ facade.Debug(message, exception);
+ }
+
+ public static void DebugFormat(string format, params object[] args) {
+ facade.DebugFormat(CultureInfo.InvariantCulture, format, args);
+ }
+
+ public static void DebugFormat(string format, object arg0) {
+ facade.DebugFormat(format, arg0);
+ }
+
+ public static void DebugFormat(string format, object arg0, object arg1) {
+ facade.DebugFormat(format, arg0, arg1);
+ }
+
+ public static void DebugFormat(string format, object arg0, object arg1, object arg2) {
+ facade.DebugFormat(format, arg0, arg1, arg2);
+ }
+
+ /*
+ public static void DebugFormat(IFormatProvider provider, string format, params object[] args) {
+ facade.DebugFormat(provider, format, args);
+ }
+ */
+
+ public static void Info(object message) {
+ facade.Info(message);
+ }
+
+ public static void Info(object message, Exception exception) {
+ facade.Info(message, exception);
+ }
+
+ public static void InfoFormat(string format, params object[] args) {
+ facade.InfoFormat(CultureInfo.InvariantCulture, format, args);
+ }
+
+ public static void InfoFormat(string format, object arg0) {
+ facade.InfoFormat(format, arg0);
+ }
+
+ public static void InfoFormat(string format, object arg0, object arg1) {
+ facade.InfoFormat(format, arg0, arg1);
+ }
+
+ public static void InfoFormat(string format, object arg0, object arg1, object arg2) {
+ facade.InfoFormat(format, arg0, arg1, arg2);
+ }
+
+ /*
+ public static void InfoFormat(IFormatProvider provider, string format, params object[] args) {
+ facade.InfoFormat(provider, format, args);
+ }
+ */
+
+ public static void Warn(object message) {
+ facade.Warn(message);
+ }
+
+ public static void Warn(object message, Exception exception) {
+ facade.Warn(message, exception);
+ }
+
+ public static void WarnFormat(string format, params object[] args) {
+ facade.WarnFormat(CultureInfo.InvariantCulture, format, args);
+ }
+
+ public static void WarnFormat(string format, object arg0) {
+ facade.WarnFormat(format, arg0);
+ }
+
+ public static void WarnFormat(string format, object arg0, object arg1) {
+ facade.WarnFormat(format, arg0, arg1);
+ }
+
+ public static void WarnFormat(string format, object arg0, object arg1, object arg2) {
+ facade.WarnFormat(format, arg0, arg1, arg2);
+ }
+
+ /*
+ public static void WarnFormat(IFormatProvider provider, string format, params object[] args) {
+ facade.WarnFormat(provider, format, args);
+ }
+ */
+
+ public static void Error(object message) {
+ facade.Error(message);
+ }
+
+ public static void Error(object message, Exception exception) {
+ facade.Error(message, exception);
+ }
+
+ public static void ErrorFormat(string format, params object[] args) {
+ facade.ErrorFormat(CultureInfo.InvariantCulture, format, args);
+ }
+
+ public static void ErrorFormat(string format, object arg0) {
+ facade.ErrorFormat(format, arg0);
+ }
+
+ public static void ErrorFormat(string format, object arg0, object arg1) {
+ facade.ErrorFormat(format, arg0, arg1);
+ }
+
+ public static void ErrorFormat(string format, object arg0, object arg1, object arg2) {
+ facade.ErrorFormat(format, arg0, arg1, arg2);
+ }
+
+ /*
+ public static void ErrorFormat(IFormatProvider provider, string format, params object[] args) {
+ facade.ErrorFormat(provider, format, args);
+ }
+ */
+
+ public static void Fatal(object message) {
+ facade.Fatal(message);
+ }
+
+ public static void Fatal(object message, Exception exception) {
+ facade.Fatal(message, exception);
+ }
+
+ public static void FatalFormat(string format, params object[] args) {
+ facade.FatalFormat(CultureInfo.InvariantCulture, format, args);
+ }
+
+ public static void FatalFormat(string format, object arg0) {
+ facade.FatalFormat(format, arg0);
+ }
+
+ public static void FatalFormat(string format, object arg0, object arg1) {
+ facade.FatalFormat(format, arg0, arg1);
+ }
+
+ public static void FatalFormat(string format, object arg0, object arg1, object arg2) {
+ facade.FatalFormat(format, arg0, arg1, arg2);
+ }
+
+ /*
+ public static void FatalFormat(IFormatProvider provider, string format, params object[] args) {
+ facade.FatalFormat(provider, format, args);
+ }
+ */
+
+ public static bool IsDebugEnabled {
+ get { return facade.IsDebugEnabled; }
+ }
+
+ public static bool IsInfoEnabled {
+ get { return facade.IsInfoEnabled; }
+ }
+
+ public static bool IsWarnEnabled {
+ get { return facade.IsWarnEnabled; }
+ }
+
+ public static bool IsErrorEnabled {
+ get { return facade.IsErrorEnabled; }
+ }
+
+ public static bool IsFatalEnabled {
+ get { return facade.IsFatalEnabled; }
+ }
+
+ #endregion
+ }
+}
diff --git a/src/YOURLIBNAME/Loggers/ILog.cs b/src/YOURLIBNAME/Loggers/ILog.cs
new file mode 100644
index 0000000..a88bfd9
--- /dev/null
+++ b/src/YOURLIBNAME/Loggers/ILog.cs
@@ -0,0 +1,964 @@
+#region Copyright & License
+//
+// Copyright 2001-2006 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#endregion
+
+using System;
+using System.Reflection;
+using log4net;
+using log4net.Core;
+
+// This interface is designed to look like log4net's ILog interface.
+// We have this as a facade in front of it to avoid crashing if the
+// hosting web site chooses not to deploy log4net.dll along with
+// dotnetopenid.dll.
+
+namespace YOURLIBNAME.Loggers
+{
+ /// <summary>
+ /// The ILog interface is use by application to log messages into
+ /// the log4net framework.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// Use the <see cref="LogManager"/> to obtain logger instances
+ /// that implement this interface. The <see cref="LogManager.GetLogger(Assembly,Type)"/>
+ /// static method is used to get logger instances.
+ /// </para>
+ /// <para>
+ /// This class contains methods for logging at different levels and also
+ /// has properties for determining if those logging levels are
+ /// enabled in the current configuration.
+ /// </para>
+ /// <para>
+ /// This interface can be implemented in different ways. This documentation
+ /// specifies reasonable behavior that a caller can expect from the actual
+ /// implementation, however different implementations reserve the right to
+ /// do things differently.
+ /// </para>
+ /// </remarks>
+ /// <example>Simple example of logging messages
+ /// <code lang="C#">
+ /// 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");
+ /// }
+ /// </code>
+ /// </example>
+ /// <seealso cref="LogManager"/>
+ /// <seealso cref="LogManager.GetLogger(Assembly, Type)"/>
+ /// <author>Nicko Cadell</author>
+ /// <author>Gert Driesen</author>
+ interface ILog
+ {
+ /// <overloads>Log a message object with the <see cref="Level.Debug"/> level.</overloads>
+ /// <summary>
+ /// Log a message object with the <see cref="Level.Debug"/> level.
+ /// </summary>
+ /// <param name="message">The message object to log.</param>
+ /// <remarks>
+ /// <para>
+ /// This method first checks if this logger is <c>DEBUG</c>
+ /// enabled by comparing the level of this logger with the
+ /// <see cref="Level.Debug"/> level. If this logger is
+ /// <c>DEBUG</c> enabled, then it converts the message object
+ /// (passed as parameter) to a string by invoking the appropriate
+ /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. 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.
+ /// </para>
+ /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/>
+ /// to this method will print the name of the <see cref="Exception"/>
+ /// but no stack trace. To print a stack trace use the
+ /// <see cref="Debug(object,Exception)"/> form instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Debug(object,Exception)"/>
+ /// <seealso cref="IsDebugEnabled"/>
+ void Debug(object message);
+
+ /// <summary>
+ /// Log a message object with the <see cref="Level.Debug"/> level including
+ /// the stack trace of the <see cref="Exception"/> passed
+ /// as a parameter.
+ /// </summary>
+ /// <param name="message">The message object to log.</param>
+ /// <param name="exception">The exception to log, including its stack trace.</param>
+ /// <remarks>
+ /// <para>
+ /// See the <see cref="Debug(object)"/> form for more detailed information.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Debug(object)"/>
+ /// <seealso cref="IsDebugEnabled"/>
+ void Debug(object message, Exception exception);
+
+ /// <overloads>Log a formatted string with the <see cref="Level.Debug"/> level.</overloads>
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Debug"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="args">An Object array containing zero or more objects to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Debug(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Debug(object)"/>
+ /// <seealso cref="IsDebugEnabled"/>
+ void DebugFormat(string format, params object[] args);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Debug"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Debug(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Debug(object)"/>
+ /// <seealso cref="IsDebugEnabled"/>
+ void DebugFormat(string format, object arg0);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Debug"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <param name="arg1">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Debug(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Debug(object)"/>
+ /// <seealso cref="IsDebugEnabled"/>
+ void DebugFormat(string format, object arg0, object arg1);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Debug"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <param name="arg1">An Object to format</param>
+ /// <param name="arg2">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Debug(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Debug(object)"/>
+ /// <seealso cref="IsDebugEnabled"/>
+ void DebugFormat(string format, object arg0, object arg1, object arg2);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Debug"/> level.
+ /// </summary>
+ /// <param name="provider">An <see cref="IFormatProvider"/> that supplies culture-specific formatting information</param>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="args">An Object array containing zero or more objects to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Debug(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Debug(object)"/>
+ /// <seealso cref="IsDebugEnabled"/>
+ void DebugFormat(IFormatProvider provider, string format, params object[] args);
+
+ /// <overloads>Log a message object with the <see cref="Level.Info"/> level.</overloads>
+ /// <summary>
+ /// Logs a message object with the <see cref="Level.Info"/> level.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// This method first checks if this logger is <c>INFO</c>
+ /// enabled by comparing the level of this logger with the
+ /// <see cref="Level.Info"/> level. If this logger is
+ /// <c>INFO</c> enabled, then it converts the message object
+ /// (passed as parameter) to a string by invoking the appropriate
+ /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. 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.
+ /// </para>
+ /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/>
+ /// to this method will print the name of the <see cref="Exception"/>
+ /// but no stack trace. To print a stack trace use the
+ /// <see cref="Info(object,Exception)"/> form instead.
+ /// </para>
+ /// </remarks>
+ /// <param name="message">The message object to log.</param>
+ /// <seealso cref="Info(object,Exception)"/>
+ /// <seealso cref="IsInfoEnabled"/>
+ void Info(object message);
+
+ /// <summary>
+ /// Logs a message object with the <c>INFO</c> level including
+ /// the stack trace of the <see cref="Exception"/> passed
+ /// as a parameter.
+ /// </summary>
+ /// <param name="message">The message object to log.</param>
+ /// <param name="exception">The exception to log, including its stack trace.</param>
+ /// <remarks>
+ /// <para>
+ /// See the <see cref="Info(object)"/> form for more detailed information.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Info(object)"/>
+ /// <seealso cref="IsInfoEnabled"/>
+ void Info(object message, Exception exception);
+
+ /// <overloads>Log a formatted message string with the <see cref="Level.Info"/> level.</overloads>
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Info"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="args">An Object array containing zero or more objects to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Info(object)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Info(object,Exception)"/>
+ /// <seealso cref="IsInfoEnabled"/>
+ void InfoFormat(string format, params object[] args);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Info"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Info(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Info(object)"/>
+ /// <seealso cref="IsInfoEnabled"/>
+ void InfoFormat(string format, object arg0);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Info"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <param name="arg1">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Info(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Info(object)"/>
+ /// <seealso cref="IsInfoEnabled"/>
+ void InfoFormat(string format, object arg0, object arg1);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Info"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <param name="arg1">An Object to format</param>
+ /// <param name="arg2">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Info(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Info(object)"/>
+ /// <seealso cref="IsInfoEnabled"/>
+ void InfoFormat(string format, object arg0, object arg1, object arg2);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Info"/> level.
+ /// </summary>
+ /// <param name="provider">An <see cref="IFormatProvider"/> that supplies culture-specific formatting information</param>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="args">An Object array containing zero or more objects to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Info(object)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Info(object,Exception)"/>
+ /// <seealso cref="IsInfoEnabled"/>
+ void InfoFormat(IFormatProvider provider, string format, params object[] args);
+
+ /// <overloads>Log a message object with the <see cref="Level.Warn"/> level.</overloads>
+ /// <summary>
+ /// Log a message object with the <see cref="Level.Warn"/> level.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// This method first checks if this logger is <c>WARN</c>
+ /// enabled by comparing the level of this logger with the
+ /// <see cref="Level.Warn"/> level. If this logger is
+ /// <c>WARN</c> enabled, then it converts the message object
+ /// (passed as parameter) to a string by invoking the appropriate
+ /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. 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.
+ /// </para>
+ /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/>
+ /// to this method will print the name of the <see cref="Exception"/>
+ /// but no stack trace. To print a stack trace use the
+ /// <see cref="Warn(object,Exception)"/> form instead.
+ /// </para>
+ /// </remarks>
+ /// <param name="message">The message object to log.</param>
+ /// <seealso cref="Warn(object,Exception)"/>
+ /// <seealso cref="IsWarnEnabled"/>
+ void Warn(object message);
+
+ /// <summary>
+ /// Log a message object with the <see cref="Level.Warn"/> level including
+ /// the stack trace of the <see cref="Exception"/> passed
+ /// as a parameter.
+ /// </summary>
+ /// <param name="message">The message object to log.</param>
+ /// <param name="exception">The exception to log, including its stack trace.</param>
+ /// <remarks>
+ /// <para>
+ /// See the <see cref="Warn(object)"/> form for more detailed information.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Warn(object)"/>
+ /// <seealso cref="IsWarnEnabled"/>
+ void Warn(object message, Exception exception);
+
+ /// <overloads>Log a formatted message string with the <see cref="Level.Warn"/> level.</overloads>
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Warn"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="args">An Object array containing zero or more objects to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Warn(object)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Warn(object,Exception)"/>
+ /// <seealso cref="IsWarnEnabled"/>
+ void WarnFormat(string format, params object[] args);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Warn"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Warn(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Warn(object)"/>
+ /// <seealso cref="IsWarnEnabled"/>
+ void WarnFormat(string format, object arg0);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Warn"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <param name="arg1">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Warn(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Warn(object)"/>
+ /// <seealso cref="IsWarnEnabled"/>
+ void WarnFormat(string format, object arg0, object arg1);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Warn"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <param name="arg1">An Object to format</param>
+ /// <param name="arg2">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Warn(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Warn(object)"/>
+ /// <seealso cref="IsWarnEnabled"/>
+ void WarnFormat(string format, object arg0, object arg1, object arg2);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Warn"/> level.
+ /// </summary>
+ /// <param name="provider">An <see cref="IFormatProvider"/> that supplies culture-specific formatting information</param>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="args">An Object array containing zero or more objects to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Warn(object)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Warn(object,Exception)"/>
+ /// <seealso cref="IsWarnEnabled"/>
+ void WarnFormat(IFormatProvider provider, string format, params object[] args);
+
+ /// <overloads>Log a message object with the <see cref="Level.Error"/> level.</overloads>
+ /// <summary>
+ /// Logs a message object with the <see cref="Level.Error"/> level.
+ /// </summary>
+ /// <param name="message">The message object to log.</param>
+ /// <remarks>
+ /// <para>
+ /// This method first checks if this logger is <c>ERROR</c>
+ /// enabled by comparing the level of this logger with the
+ /// <see cref="Level.Error"/> level. If this logger is
+ /// <c>ERROR</c> enabled, then it converts the message object
+ /// (passed as parameter) to a string by invoking the appropriate
+ /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. 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.
+ /// </para>
+ /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/>
+ /// to this method will print the name of the <see cref="Exception"/>
+ /// but no stack trace. To print a stack trace use the
+ /// <see cref="Error(object,Exception)"/> form instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Error(object,Exception)"/>
+ /// <seealso cref="IsErrorEnabled"/>
+ void Error(object message);
+
+ /// <summary>
+ /// Log a message object with the <see cref="Level.Error"/> level including
+ /// the stack trace of the <see cref="Exception"/> passed
+ /// as a parameter.
+ /// </summary>
+ /// <param name="message">The message object to log.</param>
+ /// <param name="exception">The exception to log, including its stack trace.</param>
+ /// <remarks>
+ /// <para>
+ /// See the <see cref="Error(object)"/> form for more detailed information.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Error(object)"/>
+ /// <seealso cref="IsErrorEnabled"/>
+ void Error(object message, Exception exception);
+
+ /// <overloads>Log a formatted message string with the <see cref="Level.Error"/> level.</overloads>
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Error"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="args">An Object array containing zero or more objects to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Error(object)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Error(object,Exception)"/>
+ /// <seealso cref="IsErrorEnabled"/>
+ void ErrorFormat(string format, params object[] args);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Error"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Error(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Error(object)"/>
+ /// <seealso cref="IsErrorEnabled"/>
+ void ErrorFormat(string format, object arg0);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Error"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <param name="arg1">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Error(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Error(object)"/>
+ /// <seealso cref="IsErrorEnabled"/>
+ void ErrorFormat(string format, object arg0, object arg1);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Error"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <param name="arg1">An Object to format</param>
+ /// <param name="arg2">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Error(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Error(object)"/>
+ /// <seealso cref="IsErrorEnabled"/>
+ void ErrorFormat(string format, object arg0, object arg1, object arg2);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Error"/> level.
+ /// </summary>
+ /// <param name="provider">An <see cref="IFormatProvider"/> that supplies culture-specific formatting information</param>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="args">An Object array containing zero or more objects to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Error(object)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Error(object,Exception)"/>
+ /// <seealso cref="IsErrorEnabled"/>
+ void ErrorFormat(IFormatProvider provider, string format, params object[] args);
+
+ /// <overloads>Log a message object with the <see cref="Level.Fatal"/> level.</overloads>
+ /// <summary>
+ /// Log a message object with the <see cref="Level.Fatal"/> level.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// This method first checks if this logger is <c>FATAL</c>
+ /// enabled by comparing the level of this logger with the
+ /// <see cref="Level.Fatal"/> level. If this logger is
+ /// <c>FATAL</c> enabled, then it converts the message object
+ /// (passed as parameter) to a string by invoking the appropriate
+ /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. 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.
+ /// </para>
+ /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/>
+ /// to this method will print the name of the <see cref="Exception"/>
+ /// but no stack trace. To print a stack trace use the
+ /// <see cref="Fatal(object,Exception)"/> form instead.
+ /// </para>
+ /// </remarks>
+ /// <param name="message">The message object to log.</param>
+ /// <seealso cref="Fatal(object,Exception)"/>
+ /// <seealso cref="IsFatalEnabled"/>
+ void Fatal(object message);
+
+ /// <summary>
+ /// Log a message object with the <see cref="Level.Fatal"/> level including
+ /// the stack trace of the <see cref="Exception"/> passed
+ /// as a parameter.
+ /// </summary>
+ /// <param name="message">The message object to log.</param>
+ /// <param name="exception">The exception to log, including its stack trace.</param>
+ /// <remarks>
+ /// <para>
+ /// See the <see cref="Fatal(object)"/> form for more detailed information.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Fatal(object)"/>
+ /// <seealso cref="IsFatalEnabled"/>
+ void Fatal(object message, Exception exception);
+
+ /// <overloads>Log a formatted message string with the <see cref="Level.Fatal"/> level.</overloads>
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Fatal"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="args">An Object array containing zero or more objects to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Fatal(object)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Fatal(object,Exception)"/>
+ /// <seealso cref="IsFatalEnabled"/>
+ void FatalFormat(string format, params object[] args);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Fatal"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Fatal(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Fatal(object)"/>
+ /// <seealso cref="IsFatalEnabled"/>
+ void FatalFormat(string format, object arg0);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Fatal"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <param name="arg1">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Fatal(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Fatal(object)"/>
+ /// <seealso cref="IsFatalEnabled"/>
+ void FatalFormat(string format, object arg0, object arg1);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Fatal"/> level.
+ /// </summary>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="arg0">An Object to format</param>
+ /// <param name="arg1">An Object to format</param>
+ /// <param name="arg2">An Object to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Fatal(object,Exception)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Fatal(object)"/>
+ /// <seealso cref="IsFatalEnabled"/>
+ void FatalFormat(string format, object arg0, object arg1, object arg2);
+
+ /// <summary>
+ /// Logs a formatted message string with the <see cref="Level.Fatal"/> level.
+ /// </summary>
+ /// <param name="provider">An <see cref="IFormatProvider"/> that supplies culture-specific formatting information</param>
+ /// <param name="format">A String containing zero or more format items</param>
+ /// <param name="args">An Object array containing zero or more objects to format</param>
+ /// <remarks>
+ /// <para>
+ /// The message is formatted using the <c>String.Format</c> method. See
+ /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior
+ /// of the formatting.
+ /// </para>
+ /// <para>
+ /// This method does not take an <see cref="Exception"/> object to include in the
+ /// log event. To pass an <see cref="Exception"/> use one of the <see cref="Fatal(object)"/>
+ /// methods instead.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Fatal(object,Exception)"/>
+ /// <seealso cref="IsFatalEnabled"/>
+ void FatalFormat(IFormatProvider provider, string format, params object[] args);
+
+ /// <summary>
+ /// Checks if this logger is enabled for the <see cref="Level.Debug"/> level.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this logger is enabled for <see cref="Level.Debug"/> events, <c>false</c> otherwise.
+ /// </value>
+ /// <remarks>
+ /// <para>
+ /// This function is intended to lessen the computational cost of
+ /// disabled log debug statements.
+ /// </para>
+ /// <para> For some ILog interface <c>log</c>, when you write:</para>
+ /// <code lang="C#">
+ /// log.Debug("This is entry number: " + i );
+ /// </code>
+ /// <para>
+ /// You incur the cost constructing the message, string construction and concatenation in
+ /// this case, regardless of whether the message is logged or not.
+ /// </para>
+ /// <para>
+ /// If you are worried about speed (who isn't), then you should write:
+ /// </para>
+ /// <code lang="C#">
+ /// if (log.IsDebugEnabled)
+ /// {
+ /// log.Debug("This is entry number: " + i );
+ /// }
+ /// </code>
+ /// <para>
+ /// This way you will not incur the cost of parameter
+ /// construction if debugging is disabled for <c>log</c>. On
+ /// the other hand, if the <c>log</c> is debug enabled, you
+ /// will incur the cost of evaluating whether the logger is debug
+ /// enabled twice. Once in <see cref="IsDebugEnabled"/> and once in
+ /// the <see cref="Debug(object)"/>. This is an insignificant overhead
+ /// since evaluating a logger takes about 1% of the time it
+ /// takes to actually log. This is the preferred style of logging.
+ /// </para>
+ /// <para>Alternatively if your logger is available statically then the is debug
+ /// enabled state can be stored in a static variable like this:
+ /// </para>
+ /// <code lang="C#">
+ /// private static readonly bool isDebugEnabled = log.IsDebugEnabled;
+ /// </code>
+ /// <para>
+ /// Then when you come to log you can write:
+ /// </para>
+ /// <code lang="C#">
+ /// if (isDebugEnabled)
+ /// {
+ /// log.Debug("This is entry number: " + i );
+ /// }
+ /// </code>
+ /// <para>
+ /// This way the debug enabled state is only queried once
+ /// when the class is loaded. Using a <c>private static readonly</c>
+ /// variable is the most efficient because it is a run time constant
+ /// and can be heavily optimized by the JIT compiler.
+ /// </para>
+ /// <para>
+ /// Of course if you use a static readonly variable to
+ /// hold the enabled state of the logger then you cannot
+ /// change the enabled state at runtime to vary the logging
+ /// that is produced. You have to decide if you need absolute
+ /// speed or runtime flexibility.
+ /// </para>
+ /// </remarks>
+ /// <seealso cref="Debug(object)"/>
+ /// <seealso cref="DebugFormat(IFormatProvider, string, object[])"/>
+ bool IsDebugEnabled { get; }
+
+ /// <summary>
+ /// Checks if this logger is enabled for the <see cref="Level.Info"/> level.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this logger is enabled for <see cref="Level.Info"/> events, <c>false</c> otherwise.
+ /// </value>
+ /// <remarks>
+ /// For more information see <see cref="ILog.IsDebugEnabled"/>.
+ /// </remarks>
+ /// <seealso cref="Info(object)"/>
+ /// <seealso cref="InfoFormat(IFormatProvider, string, object[])"/>
+ /// <seealso cref="ILog.IsDebugEnabled"/>
+ bool IsInfoEnabled { get; }
+
+ /// <summary>
+ /// Checks if this logger is enabled for the <see cref="Level.Warn"/> level.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this logger is enabled for <see cref="Level.Warn"/> events, <c>false</c> otherwise.
+ /// </value>
+ /// <remarks>
+ /// For more information see <see cref="ILog.IsDebugEnabled"/>.
+ /// </remarks>
+ /// <seealso cref="Warn(object)"/>
+ /// <seealso cref="WarnFormat(IFormatProvider, string, object[])"/>
+ /// <seealso cref="ILog.IsDebugEnabled"/>
+ bool IsWarnEnabled { get; }
+
+ /// <summary>
+ /// Checks if this logger is enabled for the <see cref="Level.Error"/> level.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this logger is enabled for <see cref="Level.Error"/> events, <c>false</c> otherwise.
+ /// </value>
+ /// <remarks>
+ /// For more information see <see cref="ILog.IsDebugEnabled"/>.
+ /// </remarks>
+ /// <seealso cref="Error(object)"/>
+ /// <seealso cref="ErrorFormat(IFormatProvider, string, object[])"/>
+ /// <seealso cref="ILog.IsDebugEnabled"/>
+ bool IsErrorEnabled { get; }
+
+ /// <summary>
+ /// Checks if this logger is enabled for the <see cref="Level.Fatal"/> level.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this logger is enabled for <see cref="Level.Fatal"/> events, <c>false</c> otherwise.
+ /// </value>
+ /// <remarks>
+ /// For more information see <see cref="ILog.IsDebugEnabled"/>.
+ /// </remarks>
+ /// <seealso cref="Fatal(object)"/>
+ /// <seealso cref="FatalFormat(IFormatProvider, string, object[])"/>
+ /// <seealso cref="ILog.IsDebugEnabled"/>
+ bool IsFatalEnabled { get; }
+ }
+}
diff --git a/src/YOURLIBNAME/Loggers/Log4NetLogger.cs b/src/YOURLIBNAME/Loggers/Log4NetLogger.cs
new file mode 100644
index 0000000..fdf9b2f
--- /dev/null
+++ b/src/YOURLIBNAME/Loggers/Log4NetLogger.cs
@@ -0,0 +1,203 @@
+using System;
+using System.Globalization;
+using System.IO;
+using System.Reflection;
+
+namespace YOURLIBNAME.Loggers {
+ class Log4NetLogger : ILog {
+ private log4net.ILog log4netLogger;
+
+ private Log4NetLogger(log4net.ILog logger) {
+ log4netLogger = logger;
+ }
+
+ /// <summary>
+ /// Returns a new log4net logger if it exists, or returns null if the assembly cannot be found.
+ /// </summary>
+ internal static ILog Initialize() {
+ return isLog4NetPresent ? createLogger() : null;
+ }
+
+ static bool isLog4NetPresent {
+ get {
+ try {
+ Assembly.Load("log4net");
+ return true;
+ } catch (FileNotFoundException) {
+ return false;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Creates the log4net.LogManager. Call ONLY once log4net.dll is known to be present.
+ /// </summary>
+ static ILog createLogger() {
+ return new Log4NetLogger(log4net.LogManager.GetLogger("YOURLIBNAME"));
+ }
+
+ #region ILog Members
+
+ public void Debug(object message) {
+ log4netLogger.Debug(message);
+ }
+
+ public void Debug(object message, Exception exception) {
+ log4netLogger.Debug(message, exception);
+ }
+
+ public void DebugFormat(string format, params object[] args) {
+ log4netLogger.DebugFormat(CultureInfo.InvariantCulture, format, args);
+ }
+
+ public void DebugFormat(string format, object arg0) {
+ log4netLogger.DebugFormat(format, arg0);
+ }
+
+ public void DebugFormat(string format, object arg0, object arg1) {
+ log4netLogger.DebugFormat(format, arg0, arg1);
+ }
+
+ public void DebugFormat(string format, object arg0, object arg1, object arg2) {
+ log4netLogger.DebugFormat(format, arg0, arg1, arg2);
+ }
+
+ public void DebugFormat(IFormatProvider provider, string format, params object[] args) {
+ log4netLogger.DebugFormat(provider, format, args);
+ }
+
+ public void Info(object message) {
+ log4netLogger.Info(message);
+ }
+
+ public void Info(object message, Exception exception) {
+ log4netLogger.Info(message, exception);
+ }
+
+ public void InfoFormat(string format, params object[] args) {
+ log4netLogger.InfoFormat(CultureInfo.InvariantCulture, format, args);
+ }
+
+ public void InfoFormat(string format, object arg0) {
+ log4netLogger.InfoFormat(format, arg0);
+ }
+
+ public void InfoFormat(string format, object arg0, object arg1) {
+ log4netLogger.InfoFormat(format, arg0, arg1);
+ }
+
+ public void InfoFormat(string format, object arg0, object arg1, object arg2) {
+ log4netLogger.InfoFormat(format, arg0, arg1, arg2);
+ }
+
+ public void InfoFormat(IFormatProvider provider, string format, params object[] args) {
+ log4netLogger.InfoFormat(provider, format, args);
+ }
+
+ public void Warn(object message) {
+ log4netLogger.Warn(message);
+ }
+
+ public void Warn(object message, Exception exception) {
+ log4netLogger.Warn(message, exception);
+ }
+
+ public void WarnFormat(string format, params object[] args) {
+ log4netLogger.WarnFormat(CultureInfo.InvariantCulture, format, args);
+ }
+
+ public void WarnFormat(string format, object arg0) {
+ log4netLogger.WarnFormat(format, arg0);
+ }
+
+ public void WarnFormat(string format, object arg0, object arg1) {
+ log4netLogger.WarnFormat(format, arg0, arg1);
+ }
+
+ public void WarnFormat(string format, object arg0, object arg1, object arg2) {
+ log4netLogger.WarnFormat(format, arg0, arg1, arg2);
+ }
+
+ public void WarnFormat(IFormatProvider provider, string format, params object[] args) {
+ log4netLogger.WarnFormat(provider, format, args);
+ }
+
+ public void Error(object message) {
+ log4netLogger.Error(message);
+ }
+
+ public void Error(object message, Exception exception) {
+ log4netLogger.Error(message, exception);
+ }
+
+ public void ErrorFormat(string format, params object[] args) {
+ log4netLogger.ErrorFormat(CultureInfo.InvariantCulture, format, args);
+ }
+
+ public void ErrorFormat(string format, object arg0) {
+ log4netLogger.ErrorFormat(format, arg0);
+ }
+
+ public void ErrorFormat(string format, object arg0, object arg1) {
+ log4netLogger.ErrorFormat(format, arg0, arg1);
+ }
+
+ public void ErrorFormat(string format, object arg0, object arg1, object arg2) {
+ log4netLogger.ErrorFormat(format, arg0, arg1, arg2);
+ }
+
+ public void ErrorFormat(IFormatProvider provider, string format, params object[] args) {
+ log4netLogger.ErrorFormat(provider, format, args);
+ }
+
+ public void Fatal(object message) {
+ log4netLogger.Fatal(message);
+ }
+
+ public void Fatal(object message, Exception exception) {
+ log4netLogger.Fatal(message, exception);
+ }
+
+ public void FatalFormat(string format, params object[] args) {
+ log4netLogger.FatalFormat(CultureInfo.InvariantCulture, format, args);
+ }
+
+ public void FatalFormat(string format, object arg0) {
+ log4netLogger.FatalFormat(format, arg0);
+ }
+
+ public void FatalFormat(string format, object arg0, object arg1) {
+ log4netLogger.FatalFormat(format, arg0, arg1);
+ }
+
+ public void FatalFormat(string format, object arg0, object arg1, object arg2) {
+ log4netLogger.FatalFormat(format, arg0, arg1, arg2);
+ }
+
+ public void FatalFormat(IFormatProvider provider, string format, params object[] args) {
+ log4netLogger.FatalFormat(provider, format, args);
+ }
+
+ public bool IsDebugEnabled {
+ get { return log4netLogger.IsDebugEnabled; }
+ }
+
+ public bool IsInfoEnabled {
+ get { return log4netLogger.IsInfoEnabled; }
+ }
+
+ public bool IsWarnEnabled {
+ get { return log4netLogger.IsWarnEnabled; }
+ }
+
+ public bool IsErrorEnabled {
+ get { return log4netLogger.IsErrorEnabled; }
+ }
+
+ public bool IsFatalEnabled {
+ get { return log4netLogger.IsFatalEnabled; }
+ }
+
+ #endregion
+ }
+}
diff --git a/src/YOURLIBNAME/Loggers/NoOpLogger.cs b/src/YOURLIBNAME/Loggers/NoOpLogger.cs
new file mode 100644
index 0000000..b8c62ba
--- /dev/null
+++ b/src/YOURLIBNAME/Loggers/NoOpLogger.cs
@@ -0,0 +1,177 @@
+using System;
+
+namespace YOURLIBNAME.Loggers {
+ class NoOpLogger : ILog {
+
+ /// <summary>
+ /// Returns a new logger that does nothing when invoked.
+ /// </summary>
+ internal static ILog Initialize() {
+ return new NoOpLogger();
+ }
+
+ #region ILog Members
+
+ public void Debug(object message) {
+ return;
+ }
+
+ public void Debug(object message, Exception exception) {
+ return;
+ }
+
+ public void DebugFormat(string format, params object[] args) {
+ return;
+ }
+
+ public void DebugFormat(string format, object arg0) {
+ return;
+ }
+
+ public void DebugFormat(string format, object arg0, object arg1) {
+ return;
+ }
+
+ public void DebugFormat(string format, object arg0, object arg1, object arg2) {
+ return;
+ }
+
+ public void DebugFormat(IFormatProvider provider, string format, params object[] args) {
+ return;
+ }
+
+ public void Info(object message) {
+ return;
+ }
+
+ public void Info(object message, Exception exception) {
+ return;
+ }
+
+ public void InfoFormat(string format, params object[] args) {
+ return;
+ }
+
+ public void InfoFormat(string format, object arg0) {
+ return;
+ }
+
+ public void InfoFormat(string format, object arg0, object arg1) {
+ return;
+ }
+
+ public void InfoFormat(string format, object arg0, object arg1, object arg2) {
+ return;
+ }
+
+ public void InfoFormat(IFormatProvider provider, string format, params object[] args) {
+ return;
+ }
+
+ public void Warn(object message) {
+ return;
+ }
+
+ public void Warn(object message, Exception exception) {
+ return;
+ }
+
+ public void WarnFormat(string format, params object[] args) {
+ return;
+ }
+
+ public void WarnFormat(string format, object arg0) {
+ return;
+ }
+
+ public void WarnFormat(string format, object arg0, object arg1) {
+ return;
+ }
+
+ public void WarnFormat(string format, object arg0, object arg1, object arg2) {
+ return;
+ }
+
+ public void WarnFormat(IFormatProvider provider, string format, params object[] args) {
+ return;
+ }
+
+ public void Error(object message) {
+ return;
+ }
+
+ public void Error(object message, Exception exception) {
+ return;
+ }
+
+ public void ErrorFormat(string format, params object[] args) {
+ return;
+ }
+
+ public void ErrorFormat(string format, object arg0) {
+ return;
+ }
+
+ public void ErrorFormat(string format, object arg0, object arg1) {
+ return;
+ }
+
+ public void ErrorFormat(string format, object arg0, object arg1, object arg2) {
+ return;
+ }
+
+ public void ErrorFormat(IFormatProvider provider, string format, params object[] args) {
+ return;
+ }
+
+ public void Fatal(object message) {
+ return;
+ }
+
+ public void Fatal(object message, Exception exception) {
+ return;
+ }
+
+ public void FatalFormat(string format, params object[] args) {
+ return;
+ }
+
+ public void FatalFormat(string format, object arg0) {
+ return;
+ }
+
+ public void FatalFormat(string format, object arg0, object arg1) {
+ return;
+ }
+
+ public void FatalFormat(string format, object arg0, object arg1, object arg2) {
+ return;
+ }
+
+ public void FatalFormat(IFormatProvider provider, string format, params object[] args) {
+ return;
+ }
+
+ public bool IsDebugEnabled {
+ get { return false; }
+ }
+
+ public bool IsInfoEnabled {
+ get { return false; }
+ }
+
+ public bool IsWarnEnabled {
+ get { return false; }
+ }
+
+ public bool IsErrorEnabled {
+ get { return false; }
+ }
+
+ public bool IsFatalEnabled {
+ get { return false; }
+ }
+
+ #endregion
+ }
+}
diff --git a/src/YOURLIBNAME/Loggers/TraceLogger.cs b/src/YOURLIBNAME/Loggers/TraceLogger.cs
new file mode 100644
index 0000000..83e4aa4
--- /dev/null
+++ b/src/YOURLIBNAME/Loggers/TraceLogger.cs
@@ -0,0 +1,201 @@
+using System;
+using System.Diagnostics;
+using System.Security;
+using System.Security.Permissions;
+
+namespace YOURLIBNAME.Loggers {
+ class TraceLogger : ILog {
+ TraceSwitch traceSwitch = new TraceSwitch("OpenID", "OpenID Trace Switch");
+
+ /// <summary>
+ /// Returns a new logger that uses the <see cref="System.Diagnostics.Trace"/> class
+ /// if sufficient CAS permissions are granted to use it, otherwise returns false.
+ /// </summary>
+ internal static ILog Initialize() {
+ return isSufficientPermissionGranted ? new TraceLogger() : null;
+ }
+
+ static bool isSufficientPermissionGranted {
+ get {
+ PermissionSet permissions = new PermissionSet(PermissionState.None);
+ permissions.AddPermission(new KeyContainerPermission(PermissionState.Unrestricted));
+ permissions.AddPermission(new ReflectionPermission(ReflectionPermissionFlag.MemberAccess));
+ permissions.AddPermission(new RegistryPermission(PermissionState.Unrestricted));
+ permissions.AddPermission(new SecurityPermission(SecurityPermissionFlag.ControlEvidence | SecurityPermissionFlag.UnmanagedCode | SecurityPermissionFlag.ControlThread));
+ var file = new FileIOPermission(PermissionState.None);
+ file.AllFiles = FileIOPermissionAccess.PathDiscovery | FileIOPermissionAccess.Read;
+ permissions.AddPermission(file);
+ try {
+ permissions.Demand();
+ return true;
+ } catch (SecurityException) {
+ return false;
+ }
+ }
+ }
+
+ #region ILog Members
+
+ public void Debug(object message) {
+ Trace.TraceInformation(message.ToString());
+ }
+
+ public void Debug(object message, Exception exception) {
+ Trace.TraceInformation(message + ": " + exception.ToString());
+ }
+
+ public void DebugFormat(string format, params object[] args) {
+ Trace.TraceInformation(format, args);
+ }
+
+ public void DebugFormat(string format, object arg0) {
+ Trace.TraceInformation(format, arg0);
+ }
+
+ public void DebugFormat(string format, object arg0, object arg1) {
+ Trace.TraceInformation(format, arg0, arg1);
+ }
+
+ public void DebugFormat(string format, object arg0, object arg1, object arg2) {
+ Trace.TraceInformation(format, arg0, arg1, arg2);
+ }
+
+ public void DebugFormat(IFormatProvider provider, string format, params object[] args) {
+ Trace.TraceInformation(format, args);
+ }
+
+ public void Info(object message) {
+ Trace.TraceInformation(message.ToString());
+ }
+
+ public void Info(object message, Exception exception) {
+ Trace.TraceInformation(message + ": " + exception.ToString());
+ }
+
+ public void InfoFormat(string format, params object[] args) {
+ Trace.TraceInformation(format, args);
+ }
+
+ public void InfoFormat(string format, object arg0) {
+ Trace.TraceInformation(format, arg0);
+ }
+
+ public void InfoFormat(string format, object arg0, object arg1) {
+ Trace.TraceInformation(format, arg0, arg1);
+ }
+
+ public void InfoFormat(string format, object arg0, object arg1, object arg2) {
+ Trace.TraceInformation(format, arg0, arg1, arg2);
+ }
+
+ public void InfoFormat(IFormatProvider provider, string format, params object[] args) {
+ Trace.TraceInformation(format, args);
+ }
+
+ public void Warn(object message) {
+ Trace.TraceWarning(message.ToString());
+ }
+
+ public void Warn(object message, Exception exception) {
+ Trace.TraceWarning(message + ": " + exception.ToString());
+ }
+
+ public void WarnFormat(string format, params object[] args) {
+ Trace.TraceWarning(format, args);
+ }
+
+ public void WarnFormat(string format, object arg0) {
+ Trace.TraceWarning(format, arg0);
+ }
+
+ public void WarnFormat(string format, object arg0, object arg1) {
+ Trace.TraceWarning(format, arg0, arg1);
+ }
+
+ public void WarnFormat(string format, object arg0, object arg1, object arg2) {
+ Trace.TraceWarning(format, arg0, arg1, arg2);
+ }
+
+ public void WarnFormat(IFormatProvider provider, string format, params object[] args) {
+ Trace.TraceWarning(format, args);
+ }
+
+ public void Error(object message) {
+ Trace.TraceError(message.ToString());
+ }
+
+ public void Error(object message, Exception exception) {
+ Trace.TraceError(message + ": " + exception.ToString());
+ }
+
+ public void ErrorFormat(string format, params object[] args) {
+ Trace.TraceError(format, args);
+ }
+
+ public void ErrorFormat(string format, object arg0) {
+ Trace.TraceError(format, arg0);
+ }
+
+ public void ErrorFormat(string format, object arg0, object arg1) {
+ Trace.TraceError(format, arg0, arg1);
+ }
+
+ public void ErrorFormat(string format, object arg0, object arg1, object arg2) {
+ Trace.TraceError(format, arg0, arg1, arg2);
+ }
+
+ public void ErrorFormat(IFormatProvider provider, string format, params object[] args) {
+ Trace.TraceError(format, args);
+ }
+
+ public void Fatal(object message) {
+ Trace.TraceError(message.ToString());
+ }
+
+ public void Fatal(object message, Exception exception) {
+ Trace.TraceError(message + ": " + exception.ToString());
+ }
+
+ public void FatalFormat(string format, params object[] args) {
+ Trace.TraceError(format, args);
+ }
+
+ public void FatalFormat(string format, object arg0) {
+ Trace.TraceError(format, arg0);
+ }
+
+ public void FatalFormat(string format, object arg0, object arg1) {
+ Trace.TraceError(format, arg0, arg1);
+ }
+
+ public void FatalFormat(string format, object arg0, object arg1, object arg2) {
+ Trace.TraceError(format, arg0, arg1, arg2);
+ }
+
+ public void FatalFormat(IFormatProvider provider, string format, params object[] args) {
+ Trace.TraceError(format, args);
+ }
+
+ public bool IsDebugEnabled {
+ get { return traceSwitch.TraceVerbose; }
+ }
+
+ public bool IsInfoEnabled {
+ get { return traceSwitch.TraceInfo; }
+ }
+
+ public bool IsWarnEnabled {
+ get { return traceSwitch.TraceWarning; }
+ }
+
+ public bool IsErrorEnabled {
+ get { return traceSwitch.TraceError; }
+ }
+
+ public bool IsFatalEnabled {
+ get { return traceSwitch.TraceError; }
+ }
+
+ #endregion
+ }
+}
diff --git a/src/YOURLIBNAME/Properties/AssemblyInfo.cs b/src/YOURLIBNAME/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..3d46464
--- /dev/null
+++ b/src/YOURLIBNAME/Properties/AssemblyInfo.cs
@@ -0,0 +1,85 @@
+// Uncomment this line to build a partially trusted assembly.
+// This has some security bonuses in that if there was a way to
+// hijack this assembly to do something it is not designed to do,
+// it will fail before doing much damage.
+// But a partially trusted assembly's events, handled by the hosting
+// web site, will also be under the partial trust restriction.
+// Also note that http://support.microsoft.com/kb/839300 states a
+// strong-name signed assembly must use AllowPartiallyTrustedCallers
+// to be called from a web page, but defining PARTIAL_TRUST below also
+// accomplishes this.
+//#define PARTIAL_TRUST
+
+// We DON'T put an AssemblyVersionAttribute in here because it is generated in the build.
+
+using System;
+using System.Net;
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Security;
+using System.Security.Permissions;
+using System.Web.UI;
+
+[assembly: TagPrefix("YOURLIBNAME", "oauth")]
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("YOURLIBNAME")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("YOURLIBNAME")]
+[assembly: AssemblyCopyright("Copyright © 2008")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("en-US")]
+[assembly: CLSCompliant(true)]
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("7d73990c-47c0-4256-9f20-a893add9e289")]
+
+#if StrongNameSigned
+// See comment at top of this file. We need this so that strong-naming doesn't
+// keep this assembly from being useful to shared host (medium trust) web sites.
+[assembly: AllowPartiallyTrustedCallers]
+
+[assembly: InternalsVisibleTo("YOURLIBNAME.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100AD093C3765257C89A7010E853F2C7C741FF92FA8ACE06D7B8254702CAD5CF99104447F63AB05F8BB6F51CE0D81C8C93D2FCE8C20AAFF7042E721CBA16EAAE98778611DED11C0ABC8900DC5667F99B50A9DADEC24DBD8F2C91E3E8AD300EF64F1B4B9536CEB16FB440AF939F57624A9B486F867807C649AE4830EAB88C6C03998")]
+#else
+[assembly: InternalsVisibleTo("YOURLIBNAME.Test")]
+#endif
+
+// Specify what permissions are required and optional for the assembly.
+// In order for CAS to remove unnecessary privileges from this assembly (which is desirable
+// for security), we need at least one RequestMinimum and at least one RequestOptional.
+// These permissions were determined using PermCalc.exe
+
+// We need to be allowed to execute code. Besides, it gives a good baseline RequestMinimum permission.
+[assembly: SecurityPermission(SecurityAction.RequestMinimum, Execution = true)]
+// Allows the consumer to call out to the web server. This is unnecessary in provider-only scenarios.
+// Note: we don't use a single demand for https?://.* because the regex pattern must exactly
+// match the one used by hosting providers. Listing them individually seems to be more common.
+[assembly: WebPermission(SecurityAction.RequestMinimum, ConnectPattern = @"http://.*")]
+[assembly: WebPermission(SecurityAction.RequestMinimum, ConnectPattern = @"https://.*")]
+
+#if PARTIAL_TRUST
+// Allows hosting this assembly in an ASP.NET setting. Not all applications
+// will host this using ASP.NET, so this is optional. Besides, we need at least
+// one optional permission to activate CAS permission shrinking.
+[assembly: AspNetHostingPermission(SecurityAction.RequestOptional, Level = AspNetHostingPermissionLevel.Medium)]
+
+// The following are only required for diagnostic logging (Trace.Write, Debug.Assert, etc.).
+#if TRACE || DEBUG
+[assembly: KeyContainerPermission(SecurityAction.RequestOptional, Unrestricted = true)]
+[assembly: ReflectionPermission(SecurityAction.RequestOptional, MemberAccess = true)]
+[assembly: RegistryPermission(SecurityAction.RequestOptional, Unrestricted = true)]
+[assembly: SecurityPermission(SecurityAction.RequestOptional, ControlEvidence = true, UnmanagedCode = true, ControlThread = true)]
+[assembly: FileIOPermission(SecurityAction.RequestOptional, AllFiles = FileIOPermissionAccess.PathDiscovery | FileIOPermissionAccess.Read)]
+#endif
+#endif
diff --git a/src/YOURLIBNAME/Strings.Designer.cs b/src/YOURLIBNAME/Strings.Designer.cs
new file mode 100644
index 0000000..550a346
--- /dev/null
+++ b/src/YOURLIBNAME/Strings.Designer.cs
@@ -0,0 +1,81 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3053
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace YOURLIBNAME {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Strings {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Strings() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("YOURLIBNAME.Strings", typeof(Strings).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to An invalid OAuth message received and discarded..
+ /// </summary>
+ internal static string InvalidIncomingMessage {
+ get {
+ return ResourceManager.GetString("InvalidIncomingMessage", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The request URL query MUST NOT contain any OAuth Protocol Parameters..
+ /// </summary>
+ internal static string RequestUrlMustNotHaveOAuthParameters {
+ get {
+ return ResourceManager.GetString("RequestUrlMustNotHaveOAuthParameters", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/src/YOURLIBNAME/Strings.resx b/src/YOURLIBNAME/Strings.resx
new file mode 100644
index 0000000..6c687d9
--- /dev/null
+++ b/src/YOURLIBNAME/Strings.resx
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="InvalidIncomingMessage" xml:space="preserve">
+ <value>An invalid OAuth message received and discarded.</value>
+ </data>
+ <data name="RequestUrlMustNotHaveOAuthParameters" xml:space="preserve">
+ <value>The request URL query MUST NOT contain any OAuth Protocol Parameters.</value>
+ </data>
+</root> \ No newline at end of file
diff --git a/src/YOURLIBNAME/Util.cs b/src/YOURLIBNAME/Util.cs
new file mode 100644
index 0000000..5c8943d
--- /dev/null
+++ b/src/YOURLIBNAME/Util.cs
@@ -0,0 +1,15 @@
+using System.Globalization;
+using System.Reflection;
+
+namespace YOURLIBNAME {
+ class Util {
+ public static string LibraryVersion {
+ get {
+ string assemblyFullName = Assembly.GetExecutingAssembly().FullName;
+ bool official = assemblyFullName.Contains("PublicKeyToken=2780ccd10d57b246");
+ // We use InvariantCulture since this is used for logging.
+ return string.Format(CultureInfo.InvariantCulture, "{0} ({1})", assemblyFullName, official ? "official" : "private");
+ }
+ }
+ }
+}
diff --git a/src/YOURLIBNAME/YOURLIBNAME.csproj b/src/YOURLIBNAME/YOURLIBNAME.csproj
new file mode 100644
index 0000000..4591d90
--- /dev/null
+++ b/src/YOURLIBNAME/YOURLIBNAME.csproj
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{3191B653-F76D-4C1A-9A5A-347BC3AAAAB7}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>YOURLIBNAME</RootNamespace>
+ <AssemblyName>YOURLIBNAME</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <DocumentationFile>..\..\bin\debug\YOURLIBNAME.xml</DocumentationFile>
+ <RunCodeAnalysis>true</RunCodeAnalysis>
+ <CodeAnalysisRules>-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055</CodeAnalysisRules>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <DocumentationFile>..\..\bin\debug\YOURLIBNAME.xml</DocumentationFile>
+ <RunCodeAnalysis>true</RunCodeAnalysis>
+ <CodeAnalysisRules>-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055</CodeAnalysisRules>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Sign)' == 'true' ">
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>..\official-build-key.pfx</AssemblyOriginatorKeyFile>
+ <DefineConstants>$(DefineConstants);StrongNameSigned</DefineConstants>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\log4net.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Runtime.Serialization">
+ <RequiredTargetFramework>3.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Web" />
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Logger.cs" />
+ <Compile Include="Loggers\ILog.cs" />
+ <Compile Include="Loggers\Log4NetLogger.cs" />
+ <Compile Include="Loggers\NoOpLogger.cs" />
+ <Compile Include="Loggers\TraceLogger.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Strings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Strings.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Util.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Strings.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="..\..\tools\YOURLIBNAME.Versioning.targets" />
+</Project> \ No newline at end of file
diff --git a/src/official-build-key.pfx b/src/official-build-key.pfx
new file mode 100644
index 0000000..87398d2
--- /dev/null
+++ b/src/official-build-key.pfx
Binary files differ
diff --git a/src/version.txt b/src/version.txt
new file mode 100644
index 0000000..6c6aa7c
--- /dev/null
+++ b/src/version.txt
@@ -0,0 +1 @@
+0.1.0 \ No newline at end of file