Skip to content

Commit

Permalink
Fix namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
nblumhardt committed May 1, 2022
1 parent 9aba896 commit 8e4e26a
Show file tree
Hide file tree
Showing 21 changed files with 40 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
Expand Down
12 changes: 6 additions & 6 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ $suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch

echo "build: Version suffix is $suffix"

echo "build: Testing"
& dotnet test -c Release "./test/$projectName.Tests/$projectName.Tests.csproj"
if ($LASTEXITCODE -ne 0) { exit 3 }
if ($LASTEXITCODE -ne 0) { throw "dotnet test failed" }

echo "build: Publishing and packing"
$src = "./src/$projectName"

& dotnet build -c Release --version-suffix=$suffix "$src/$projectName.csproj"
if ($LASTEXITCODE -ne 0) { throw "dotnet build failed" }

if ($suffix) {
& dotnet publish -c Release -o "$src/obj/publish" --version-suffix=$suffix "$src/$projectName.csproj"
& dotnet pack -c Release -o ./artifacts --no-build --version-suffix=$suffix "$src/$projectName.csproj"
} else {
& dotnet publish -c Release -o "$src/obj/publish" "$src/$projectName.csproj"
& dotnet pack -c Release -o ./artifacts --no-build "$src/$projectName.csproj"
}
if ($LASTEXITCODE -ne 0) { exit 1 }
if ($LASTEXITCODE -ne 0) { throw "dotnet pack failed" }

Pop-Location
1 change: 0 additions & 1 deletion global.json

This file was deleted.

9 changes: 5 additions & 4 deletions serilog-sinks-applicationinsights.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ VisualStudioVersion = 15.0.26621.2
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{037440DE-440B-4129-9F7A-09B42D00397E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5E1-DEB9-4A04-8BAB-24EC7240ADAF}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "files", "files", "{E9D1B5E1-DEB9-4A04-8BAB-24EC7240ADAF}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
appveyor.yml = appveyor.yml
Build.ps1 = Build.ps1
assets\CommonAssemblyInfo.cs = assets\CommonAssemblyInfo.cs
README.md = README.md
assets\Serilog.snk = assets\Serilog.snk
.gitattributes = .gitattributes
.gitignore = .gitignore
CHANGES.md = CHANGES.md
LICENSE = LICENSE
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Sinks.ApplicationInsights", "src\Serilog.Sinks.ApplicationInsights\Serilog.Sinks.ApplicationInsights.csproj", "{B572E129-3568-435F-A8E9-366AD7014D8E}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
using Serilog.Configuration;
using Serilog.Events;
using Serilog.Sinks.ApplicationInsights;
using Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters;
using Serilog.Sinks.ApplicationInsights.TelemetryConverters;

namespace Serilog
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<Description>Serilog sink for Application Insights.</Description>
<VersionPrefix>3.1.1</VersionPrefix>
<VersionPrefix>4.0.0</VersionPrefix>
<Authors>Joerg Battermann, Ivan Gavryliuk, contributors</Authors>
<TargetFrameworks>net452;net46;netstandard2.0;net6.0</TargetFrameworks>
<TargetFrameworks>net4.6.2;netstandard2.0;net6.0</TargetFrameworks>
<AssemblyName>Serilog.Sinks.ApplicationInsights</AssemblyName>
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
Expand All @@ -17,22 +17,14 @@
<RepositoryUrl>https://github.com/serilog-contrib/serilog-sinks-applicationinsights</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net452|AnyCPU'">
<DocumentationFile></DocumentationFile>
<RootNamespace>Serilog</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Serilog" Version="2.11.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.20.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\assets\icon.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using Microsoft.ApplicationInsights.Channel;
using Serilog.Core;
using Serilog.Events;
using Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters;
using Serilog.Sinks.ApplicationInsights.TelemetryConverters;

namespace Serilog.Sinks.ApplicationInsights
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Serilog.Debugging;
using Serilog.Events;

namespace Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.Formatters
namespace Serilog.Sinks.ApplicationInsights.Formatters
{
public class ApplicationInsightsDottedValueFormatter : IValueFormatter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Serilog.Events;
using Serilog.Formatting.Json;

namespace Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.Formatters
namespace Serilog.Sinks.ApplicationInsights.Formatters
{
public class ApplicationInsightsJsonValueFormatter : IValueFormatter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Serilog.Events;
using System.Collections.Generic;
using System.Collections.Generic;
using Serilog.Events;

namespace Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.Formatters
namespace Serilog.Sinks.ApplicationInsights.Formatters
{
public interface IValueFormatter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Microsoft.ApplicationInsights.DataContracts;
using Serilog.Events;

namespace Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters
namespace Serilog.Sinks.ApplicationInsights.TelemetryConverters
{
public class EventTelemetryConverter : TelemetryConverterBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
using Microsoft.ApplicationInsights.Channel;
using Serilog.Events;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights.Channel;
using Serilog.Events;

namespace Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters
namespace Serilog.Sinks.ApplicationInsights.TelemetryConverters
{
public interface ITelemetryConverter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.DataContracts;
using Serilog.Events;
using Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.Formatters;
using Serilog.Sinks.ApplicationInsights.Formatters;

namespace Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters
namespace Serilog.Sinks.ApplicationInsights.TelemetryConverters
{
/// <summary>
/// Base class for telemetry converters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Microsoft.ApplicationInsights.DataContracts;
using Serilog.Events;

namespace Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters
namespace Serilog.Sinks.ApplicationInsights.TelemetryConverters
{
public class TraceTelemetryConverter : TelemetryConverterBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters;
using Serilog.Sinks.ApplicationInsights.TelemetryConverters;

namespace Serilog
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.ApplicationInsights.Extensibility;
using Serilog.Events;
using Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Serilog.Sinks.ApplicationInsights.TelemetryConverters;

namespace Serilog.Sinks.ApplicationInsights.Tests
{
Expand All @@ -34,8 +30,7 @@ protected ApplicationInsightsTest(ITelemetryConverter converter = null)

protected TraceTelemetry LastSubmittedTraceTelemetry =>
_channel.SubmittedTelemetry
.Where(t => t is TraceTelemetry)
.Select(t => (TraceTelemetry)t)
.OfType<TraceTelemetry>()
.LastOrDefault();

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.DataContracts;
using Serilog.Events;
using Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters;
using System;
using System.Collections.Generic;
using System.Linq;
using Serilog.Sinks.ApplicationInsights.TelemetryConverters;
using Xunit;

namespace Serilog.Sinks.ApplicationInsights.Tests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.ApplicationInsights.DataContracts;
using Serilog.Events;
using Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters;
using Serilog.Sinks.ApplicationInsights.TelemetryConverters;

namespace Serilog.Sinks.ApplicationInsights.Tests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Text;
using Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.Formatters;
using Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters;
using Serilog.Sinks.ApplicationInsights.Formatters;
using Serilog.Sinks.ApplicationInsights.TelemetryConverters;
using Xunit;

namespace Serilog.Sinks.ApplicationInsights.Tests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net6.0;net4.8</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.DataContracts;
using Serilog.Events;
using Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters;
using System;
using System.Collections.Generic;
using System.Linq;
using Serilog.Sinks.ApplicationInsights.TelemetryConverters;
using Xunit;

namespace Serilog.Sinks.ApplicationInsights.Tests
Expand Down

0 comments on commit 8e4e26a

Please sign in to comment.