Skip to content

Commit f558c59

Browse files
authored
Finalise for 0.3.0 by addressing some open issues (#41)
* Simplify namespace and add missing license headers * Naming clarification * Update CI SDK version * Update gitignore * Update to net 6.0 * Update tooling
1 parent a527d53 commit f558c59

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+74
-51
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727
git tag --list
2828
- uses: actions/setup-dotnet@v1
2929
with:
30-
dotnet-version: '5.0.100'
30+
dotnet-version: |
31+
5.0.x
32+
6.0.x
3133
source-url: https://nuget.pkg.github.com/elastic/index.json
3234
env:
3335
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,5 @@ project.lock.json
7878
/src/.vs/restore.dg
7979
src/packages/
8080
BenchmarkDotNet.Artifacts
81+
82+
/.ionide/symbolCache.db

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Location: https://www.elastic.co/community/codeofconduct

Directory.Build.props

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@
1616

1717
<DefineConstants Condition="'$(TargetFramework)'=='net461'">$(DefineConstants);FULLFRAMEWORK</DefineConstants>
1818
<DefineConstants Condition="$(DefineConstants.Contains(FULLFRAMEWORK)) == False">$(DefineConstants);DOTNETCORE</DefineConstants>
19-
<DefineConstants Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net5.0'))">$(DefineConstants);NET5_COMPATIBLE</DefineConstants>
2019
</PropertyGroup>
2120
<PropertyGroup Condition="">
2221
</PropertyGroup>
2322
<ItemGroup>
24-
<PackageReference Include="MinVer" Version="2.3.1" PrivateAssets="all" />
25-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.0" PrivateAssets="all"/>
23+
<PackageReference Include="MinVer" Version="2.5.0" PrivateAssets="all" />
24+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.2" PrivateAssets="all"/>
2625
</ItemGroup>
2726
</Project>

benchmarks/Elastic.Transport.Benchmarks/Elastic.Transport.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<IsPackable>false</IsPackable>
6-
<TargetFramework>net5.0</TargetFramework>
6+
<TargetFramework>net6.0</TargetFramework>
77
<LangVersion>9.0</LangVersion>
88
</PropertyGroup>
99

benchmarks/Elastic.Transport.Profiling/Elastic.Transport.Profiling.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net5.0</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

build/scripts/Targets.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let private restoreTools = lazy(exec "dotnet" ["tool"; "restore"])
2121
let private currentVersion =
2222
lazy(
2323
restoreTools.Value |> ignore
24-
let r = Proc.Start("dotnet", "minver", "-d", "canary", "-m", "0.1")
24+
let r = Proc.Start("dotnet", "minver", "--default-pre-release-phase", "canary", "-m", "0.1")
2525
let o = r.ConsoleOut |> Seq.find (fun l -> not(l.Line.StartsWith("MinVer:")))
2626
o.Line
2727
)

dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"minver-cli": {
6-
"version": "2.3.1",
6+
"version": "2.5.0",
77
"commands": [
88
"minver"
99
]
@@ -21,7 +21,7 @@
2121
]
2222
},
2323
"nupkg-validator": {
24-
"version": "0.4.0",
24+
"version": "0.5.0",
2525
"commands": [
2626
"nupkg-validator"
2727
]

src/Elastic.Transport.VirtualizedCluster/Components/VirtualClusterConnection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Func<TRule, byte[]> successResponse
187187
if (always)
188188
return Always<TResponse, TRule>(requestData, timeout, beforeReturn, successResponse, rule);
189189

190-
if (rule.Executed > times) continue;
190+
if (rule.ExecuteCount > times) continue;
191191

192192
return Sometimes<TResponse, TRule>(requestData, timeout, beforeReturn, successResponse, rule);
193193
}
@@ -198,7 +198,7 @@ Func<TRule, byte[]> successResponse
198198
if (always)
199199
return Always<TResponse, TRule>(requestData, timeout, beforeReturn, successResponse, rule);
200200

201-
if (rule.Executed > times) continue;
201+
if (rule.ExecuteCount > times) continue;
202202

203203
return Sometimes<TResponse, TRule>(requestData, timeout, beforeReturn, successResponse, rule);
204204
}

src/Elastic.Transport.VirtualizedCluster/Rules/RuleBase.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface IRule
3434
RuleOption<TimesHelper.AllTimes, int> Times { get; set; }
3535

3636
/// <summary> The amount of times this rule has been executed</summary>
37-
int Executed { get; }
37+
int ExecuteCount { get; }
3838

3939
/// <summary> Mark a rule as executed </summary>
4040
void RecordExecuted();
@@ -43,7 +43,7 @@ public interface IRule
4343
public abstract class RuleBase<TRule> : IRule
4444
where TRule : RuleBase<TRule>, IRule
4545
{
46-
private int _executed;
46+
private int _executeCount;
4747
RuleOption<Exception, int> IRule.AfterSucceeds { get; set; }
4848
int? IRule.OnPort { get; set; }
4949
RuleOption<Exception, int> IRule.Return { get; set; }
@@ -54,9 +54,9 @@ public abstract class RuleBase<TRule> : IRule
5454
TimeSpan? IRule.Takes { get; set; }
5555
RuleOption<TimesHelper.AllTimes, int> IRule.Times { get; set; }
5656

57-
int IRule.Executed => _executed;
57+
int IRule.ExecuteCount => _executeCount;
5858

59-
void IRule.RecordExecuted() => Interlocked.Increment(ref _executed);
59+
void IRule.RecordExecuted() => Interlocked.Increment(ref _executeCount);
6060

6161
public TRule OnPort(int port)
6262
{

0 commit comments

Comments
 (0)