diff --git a/asset/getseq_net.ico b/asset/getseq_net.ico
deleted file mode 100644
index 34b3b9f..0000000
Binary files a/asset/getseq_net.ico and /dev/null differ
diff --git a/example/SeqQuery/App.config b/example/SeqQuery/App.config
deleted file mode 100644
index 8277a73..0000000
--- a/example/SeqQuery/App.config
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/example/SeqQuery/SeqQuery.csproj b/example/SeqQuery/SeqQuery.csproj
index 40bca25..ea3a4f4 100644
--- a/example/SeqQuery/SeqQuery.csproj
+++ b/example/SeqQuery/SeqQuery.csproj
@@ -6,10 +6,6 @@
Exe
-
-
-
-
diff --git a/example/SeqQuery/getseq_net.ico b/example/SeqQuery/getseq_net.ico
deleted file mode 100644
index 34b3b9f..0000000
Binary files a/example/SeqQuery/getseq_net.ico and /dev/null differ
diff --git a/example/SeqTail/App.config b/example/SeqTail/App.config
deleted file mode 100644
index 8277a73..0000000
--- a/example/SeqTail/App.config
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/example/SeqTail/SeqTail.csproj b/example/SeqTail/SeqTail.csproj
index 3ceeb51..ac34313 100644
--- a/example/SeqTail/SeqTail.csproj
+++ b/example/SeqTail/SeqTail.csproj
@@ -6,10 +6,6 @@
Exe
-
-
-
-
diff --git a/example/SeqTail/getseq_net.ico b/example/SeqTail/getseq_net.ico
deleted file mode 100644
index 34b3b9f..0000000
Binary files a/example/SeqTail/getseq_net.ico and /dev/null differ
diff --git a/example/SignalCopy/App.config b/example/SignalCopy/App.config
deleted file mode 100644
index 8277a73..0000000
--- a/example/SignalCopy/App.config
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/example/SignalCopy/SignalCopy.csproj b/example/SignalCopy/SignalCopy.csproj
index 3f1644b..9b9700e 100644
--- a/example/SignalCopy/SignalCopy.csproj
+++ b/example/SignalCopy/SignalCopy.csproj
@@ -6,10 +6,6 @@
Exe
-
-
-
-
diff --git a/example/SignalCopy/getseq_net.ico b/example/SignalCopy/getseq_net.ico
deleted file mode 100644
index 34b3b9f..0000000
Binary files a/example/SignalCopy/getseq_net.ico and /dev/null differ
diff --git a/seq-api.sln b/seq-api.sln
index 9abcb17..0c8feca 100644
--- a/seq-api.sln
+++ b/seq-api.sln
@@ -1,17 +1,12 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26403.3
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29230.47
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B36BE973-6D5B-4DAA-BF42-F1CF11D6F18E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "example", "example", "{1C66E116-DC21-4C8F-833E-A4C2DDF58487}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "asset", "asset", "{233C7E7D-26DE-452A-A415-44F99CBA18E7}"
- ProjectSection(SolutionItems) = preProject
- asset\getseq_net.ico = asset\getseq_net.ico
- EndProjectSection
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "global", "global", "{7DCED657-7E83-4E6F-AB14-5753E044304D}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
@@ -69,4 +64,7 @@ Global
{42CEBFBA-208F-40F1-AC95-13F05F6D5412} = {1C66E116-DC21-4C8F-833E-A4C2DDF58487}
{E8CDDE17-8E29-4EB4-A4BB-38BCE346A752} = {1C66E116-DC21-4C8F-833E-A4C2DDF58487}
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {20BAB483-FB94-4373-8E4C-0F846B6DBFFC}
+ EndGlobalSection
EndGlobal
diff --git a/seq-api.sln.DotSettings b/seq-api.sln.DotSettings
index d50635d..832d668 100644
--- a/seq-api.sln.DotSettings
+++ b/seq-api.sln.DotSettings
@@ -1,2 +1,4 @@
- AD
\ No newline at end of file
+ AD
+ True
+ True
\ No newline at end of file
diff --git a/src/Seq.Api/Seq.Api.csproj b/src/Seq.Api/Seq.Api.csproj
index 86307f7..11f7d45 100644
--- a/src/Seq.Api/Seq.Api.csproj
+++ b/src/Seq.Api/Seq.Api.csproj
@@ -7,14 +7,11 @@
$(NoWarn);CS1591
true
true
- Seq.Api
- Seq.Api
seq
Copyright © 2014-2019 Datalust Pty Ltd and Contributors
https://datalust.co/images/seq-nuget.png
https://github.com/datalust/seq-api
- http://www.apache.org/licenses/LICENSE-2.0
- Seq.Api
+ Apache-2.0
7.3
diff --git a/src/Seq.Api/SeqConnection.cs b/src/Seq.Api/SeqConnection.cs
index 6d3e722..487aa20 100644
--- a/src/Seq.Api/SeqConnection.cs
+++ b/src/Seq.Api/SeqConnection.cs
@@ -60,9 +60,20 @@ public SeqConnection(string serverUrl, string apiKey = null, bool useDefaultCred
public WorkspacesResourceGroup Workspaces => new WorkspacesResourceGroup(this);
- public async Task LoadResourceGroupAsync(string name, CancellationToken cancellationToken = default)
+ public Task LoadResourceGroupAsync(string name, CancellationToken cancellationToken = default)
{
- return await _resourceGroups.GetOrAdd(name, s => ResourceGroupFactory(s, cancellationToken)).ConfigureAwait(false);
+ // Initially, we want to put an incomplete task into the cache so that any concurrent attempts to load the
+ // same resource group will wait on the same pending call.
+ var cached = _resourceGroups.GetOrAdd(name, s => ResourceGroupFactory(s, cancellationToken));
+
+ if (!cached.IsFaulted && !cached.IsCanceled)
+ return cached;
+
+ // If the cached task failed (ideally a rare situation), clobber it and return a new task (less worried about
+ // overlapping/concurrent calls on this path).
+ return _resourceGroups.AddOrUpdate(name,
+ s => ResourceGroupFactory(s, cancellationToken),
+ (s, _) => ResourceGroupFactory(s, cancellationToken));
}
async Task ResourceGroupFactory(string name, CancellationToken cancellationToken = default)