Skip to content

Commit

Permalink
Fixed issue #1, added support for async usage
Browse files Browse the repository at this point in the history
  • Loading branch information
zorgoz committed Aug 4, 2018
1 parent 1afb375 commit 47077ea
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 96 deletions.
82 changes: 0 additions & 82 deletions zorgoz.Nlog4LinqPad/LinqPadExtensions.cs

This file was deleted.

14 changes: 9 additions & 5 deletions zorgoz.Nlog4LinqPad/LinqPadHtmlTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ public LinqPadHtmlTarget()

public TargetStyling Styling { get; set; } = TargetStyling.Default;

public string Prepend { get; set; }
public string Append { get; set; }
public string ItemNode { get; set; } = "span";
public string RowNode { get; set; } = "div";
public string PanelName { get; set; }
Expand All @@ -46,14 +44,20 @@ public override Layout Layout

protected override void InitializeTarget()
{
Util.RawHtml(@"<!DOCTYPE HTML><html><head><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8""/><meta http-equiv=""X-UA-Compatible"" content=""IE=edge""/>").DumpToPanel(PanelName);
Util.RawHtml(GetHtmlStyleTag()).DumpToPanel(PanelName);
Util.RawHtml("</head><body>").DumpToPanel(PanelName);
if (string.IsNullOrWhiteSpace(PanelName))
{
Util.RawHtml(GetHtmlStyleTag()).Dump();
}
else
{
GetHtmlStyleTag().InitPanel(PanelName);
}
}

protected override void CloseTarget()
{
Util.RawHtml("</body></html>").DumpToPanel(PanelName);
PanelHelper.End();
}

private bool HasRowStyle => !string.IsNullOrWhiteSpace(Styling.Row);
Expand Down
1 change: 1 addition & 0 deletions zorgoz.Nlog4LinqPad/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.5.6" targetFramework="net47" />
<package id="System.Reactive" version="4.0.0" targetFramework="net46" />
</packages>
14 changes: 7 additions & 7 deletions zorgoz.Nlog4LinqPad/zorgoz.Nlog4LinqPad.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Reactive, Version=4.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
<HintPath>..\packages\System.Reactive.4.0.0\lib\net46\System.Reactive.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Windows" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="LinqPadExtensions.cs" />
<Compile Include="PanelHelper.cs" />
<Compile Include="LinqPadHtmlTarget.cs" />
<Compile Include="Nlog4LinqPad.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
Expand Down
4 changes: 2 additions & 2 deletions zorgoz.Nlog4LinqPad/zorgoz.Nlog4LinqPad.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package >
<metadata>
<id>$title$</id>
<version>0.5.0</version>
<version>0.6.0</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<licenseUrl>https://github.com/zorgoz/Nlog4LinqPad/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/zorgoz/Nlog4LinqPad</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>NLog logging support for LinqPad</description>
<releaseNotes>Separate panel is using custom writer to optimize DOM. XML comments also added.</releaseNotes>
<releaseNotes>Fixed custom writer to support async usage.</releaseNotes>
<copyright>Copyright 2018</copyright>
<tags>nlog nlog-target linqpad logging utility library</tags>
</metadata>
Expand Down

0 comments on commit 47077ea

Please sign in to comment.