diff --git a/.gitignore b/.gitignore
index dc64607..4ee83f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -250,3 +250,5 @@ paket-files/
# JetBrains Rider
.idea/
*.sln.iml
+
+.vscode/
diff --git a/Build.ps1 b/Build.ps1
index 035b540..ff877e2 100644
--- a/Build.ps1
+++ b/Build.ps1
@@ -10,6 +10,7 @@ if(Test-Path .\artifacts) {
}
& dotnet restore --no-cache
+if($LASTEXITCODE -ne 0) { exit 1 }
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
@@ -32,6 +33,17 @@ foreach ($src in ls src/*) {
Pop-Location
}
+foreach ($test in ls test/*.Tests) {
+ Push-Location $test
+
+ echo "build: Testing project in $test"
+
+ & dotnet test -c Release
+ if($LASTEXITCODE -ne 0) { exit 3 }
+
+ Pop-Location
+}
+
foreach ($test in ls test/*.Benchmarks) {
Push-Location $test
@@ -43,13 +55,13 @@ foreach ($test in ls test/*.Benchmarks) {
Pop-Location
}
-foreach ($test in ls test/*.Tests) {
- Push-Location $test
+foreach ($sample in ls example/*) {
+ Push-Location $sample
- echo "build: Testing project in $test"
+ echo "build: Building sample project in $sample"
- & dotnet test -c Release
- if($LASTEXITCODE -ne 0) { exit 3 }
+ & dotnet build -c Release
+ if($LASTEXITCODE -ne 0) { exit 2 }
Pop-Location
}
diff --git a/example/SeqTail/Program.cs b/example/SeqTail/Program.cs
index b3a13b6..1504705 100644
--- a/example/SeqTail/Program.cs
+++ b/example/SeqTail/Program.cs
@@ -30,7 +30,7 @@ static void Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Verbose()
- .WriteTo.LiterateConsole()
+ .WriteTo.Console()
.CreateLogger();
TaskScheduler.UnobservedTaskException += (s,e) => Log.Fatal(e.Exception, "Unobserved task exception");
diff --git a/example/SeqTail/SeqTail.csproj b/example/SeqTail/SeqTail.csproj
index 2405320..c5676ab 100644
--- a/example/SeqTail/SeqTail.csproj
+++ b/example/SeqTail/SeqTail.csproj
@@ -19,10 +19,10 @@
-
+
-
-
+
+
diff --git a/src/Seq.Api/ResourceGroups/EntityResourceGroup.cs b/src/Seq.Api/ResourceGroups/EntityResourceGroup.cs
index e1e51da..6bee541 100644
--- a/src/Seq.Api/ResourceGroups/EntityResourceGroup.cs
+++ b/src/Seq.Api/ResourceGroups/EntityResourceGroup.cs
@@ -13,9 +13,21 @@ internal EntityResourceGroup(string name, ISeqConnection connection) : base(name
protected async Task GroupCreateAsync(TEntity entity,
IDictionary parameters = null) where TEntity : ILinked
{
- var link = entity.Links.ContainsKey("Create") ? "Create" : "Items";
- var group = await LoadGroupAsync().ConfigureAwait(false);
- return await Client.PostAsync(group, link, entity, parameters).ConfigureAwait(false);
+ ILinked resource;
+ string link;
+
+ if (entity.Links.ContainsKey("Create"))
+ {
+ resource = entity;
+ link = "Create";
+ }
+ else
+ {
+ resource = await LoadGroupAsync().ConfigureAwait(false);
+ link = "Items";
+ }
+
+ return await Client.PostAsync(resource, link, entity, parameters).ConfigureAwait(false);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Seq.Api/Seq.Api.csproj b/src/Seq.Api/Seq.Api.csproj
index f28982b..c8f5e03 100644
--- a/src/Seq.Api/Seq.Api.csproj
+++ b/src/Seq.Api/Seq.Api.csproj
@@ -1,7 +1,7 @@
-
+
Client library for the Seq HTTP API.
- 4.2.0
+ 4.2.1
Datalust;Contributors
netstandard1.3;net452
$(NoWarn);CS1591
@@ -34,4 +34,4 @@
-
\ No newline at end of file
+
diff --git a/test/Seq.Api.Tests/Seq.Api.Tests.csproj b/test/Seq.Api.Tests/Seq.Api.Tests.csproj
index a59242f..397fd34 100644
--- a/test/Seq.Api.Tests/Seq.Api.Tests.csproj
+++ b/test/Seq.Api.Tests/Seq.Api.Tests.csproj
@@ -17,9 +17,9 @@
-
-
-
+
+
+