Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed asset/getseq_net.ico
Binary file not shown.
14 changes: 0 additions & 14 deletions example/SeqQuery/App.config

This file was deleted.

4 changes: 0 additions & 4 deletions example/SeqQuery/SeqQuery.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<None Include="App.config" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Seq.Api\Seq.Api.csproj" />
</ItemGroup>
Expand Down
Binary file removed example/SeqQuery/getseq_net.ico
Binary file not shown.
14 changes: 0 additions & 14 deletions example/SeqTail/App.config

This file was deleted.

4 changes: 0 additions & 4 deletions example/SeqTail/SeqTail.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<None Include="App.config" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Seq.Api\Seq.Api.csproj" />
</ItemGroup>
Expand Down
Binary file removed example/SeqTail/getseq_net.ico
Binary file not shown.
14 changes: 0 additions & 14 deletions example/SignalCopy/App.config

This file was deleted.

4 changes: 0 additions & 4 deletions example/SignalCopy/SignalCopy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<None Include="App.config" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Seq.Api\Seq.Api.csproj" />
</ItemGroup>
Expand Down
Binary file removed example/SignalCopy/getseq_net.ico
Binary file not shown.
12 changes: 5 additions & 7 deletions seq-api.sln
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
4 changes: 3 additions & 1 deletion seq-api.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AD/@EntryIndexedValue">AD</s:String></wpf:ResourceDictionary>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AD/@EntryIndexedValue">AD</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Permalinks/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Workspaces/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
5 changes: 1 addition & 4 deletions src/Seq.Api/Seq.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@
<NoWarn>$(NoWarn);CS1591</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Seq.Api</AssemblyName>
<PackageId>Seq.Api</PackageId>
<PackageTags>seq</PackageTags>
<Copyright>Copyright © 2014-2019 Datalust Pty Ltd and Contributors</Copyright>
<PackageIconUrl>https://datalust.co/images/seq-nuget.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/datalust/seq-api</PackageProjectUrl>
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
<RootNamespace>Seq.Api</RootNamespace>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<ItemGroup>
Expand Down
15 changes: 13 additions & 2 deletions src/Seq.Api/SeqConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,20 @@ public SeqConnection(string serverUrl, string apiKey = null, bool useDefaultCred

public WorkspacesResourceGroup Workspaces => new WorkspacesResourceGroup(this);

public async Task<ResourceGroup> LoadResourceGroupAsync(string name, CancellationToken cancellationToken = default)
public Task<ResourceGroup> 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<ResourceGroup> ResourceGroupFactory(string name, CancellationToken cancellationToken = default)
Expand Down