Skip to content

Commit

Permalink
Merge pull request #7 from NLog/xmldoc
Browse files Browse the repository at this point in the history
Added XML docs
  • Loading branch information
304NotModified committed Jan 4, 2016
2 parents 0e65600 + b649038 commit ac7d476
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions NLog.ManualFlush/ManualFlushWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,27 @@

namespace NLog.ManualFlush
{
/// <summary>
/// Wrapper target for manual controlling of flush behavior.
/// </summary>
[Target("ManualFlush")]
public class ManualFlushWrapper : WrapperTargetBase
{
private readonly IList<AsyncLogEventInfo> logs = new List<AsyncLogEventInfo>();

/// <summary>
/// Write the event.
/// </summary>
/// <param name="logEvent">Event to be written.</param>
protected override void Write(AsyncLogEventInfo logEvent)
{
logs.Add(logEvent);
}

/// <summary>
/// Flush and clear events.
/// </summary>
/// <param name="asyncContinuation"></param>
protected override void FlushAsync(AsyncContinuation asyncContinuation)
{
foreach (var log in logs)
Expand All @@ -26,6 +37,9 @@ protected override void FlushAsync(AsyncContinuation asyncContinuation)
base.FlushAsync(asyncContinuation);
}

/// <summary>
/// Clear the current events.
/// </summary>
public void EmptyLogs()
{
logs.Clear();
Expand Down
4 changes: 4 additions & 0 deletions NLog.ManualFlush/NLog.ManualFlush.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\NLog.ManualFlush.XML</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -28,6 +30,8 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\Release\NLog.ManualFlush.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
Expand Down

0 comments on commit ac7d476

Please sign in to comment.