Skip to content

Commit

Permalink
chore: package updates and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamranjan committed Jul 30, 2024
1 parent 3d64c44 commit 72315fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 39 deletions.
6 changes: 3 additions & 3 deletions dotnet-etcd/dotnet-etcd.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Your applications can read and write data into etcd. A simple use-case is to sto
Advanced uses take advantage of the consistency guarantees to implement database leader elections or do distributed locking across a cluster of workers.</Description>
<PackageTags>etcd grpc etcdv3 etcd3</PackageTags>
<SignAssembly>false</SignAssembly>
<Version>7.0.0</Version>
<Version>7.1.0</Version>
<AutoGenerateBindingRedirects>False</AutoGenerateBindingRedirects>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIconUrl />
Expand All @@ -49,8 +49,8 @@ Advanced uses take advantage of the consistency guarantees to implement database
<ItemGroup>
<PackageReference Include="Google.Api.CommonProtos" Version="2.15.0" />
<PackageReference Include="Google.Protobuf" Version="3.27.2" />
<PackageReference Include="Grpc.Net.Client" Version="2.63.0" />
<PackageReference Include="Grpc.Tools" Version="2.64.0">
<PackageReference Include="Grpc.Net.Client" Version="2.65.0" />
<PackageReference Include="Grpc.Tools" Version="2.65.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
36 changes: 0 additions & 36 deletions dotnet-etcd/electionClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ public CampaignResponse Campaign(
DateTime? deadline = null,
CancellationToken cancellationToken = default)
=> CallEtcd((connection) => connection.ElectionClient.Campaign(
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
request ?? throw new ArgumentNullException(nameof(request)),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
headers,
deadline,
cancellationToken));
Expand All @@ -62,10 +60,8 @@ public CampaignResponse Campaign(
=> CallEtcd((connection) => connection.ElectionClient.Campaign(
new CampaignRequest()
{
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
Name = ByteString.CopyFromUtf8(name ?? throw new ArgumentNullException(nameof(name))),
Value = value == null ? null : ByteString.CopyFromUtf8(value),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
},
headers,
deadline,
Expand All @@ -88,9 +84,7 @@ public async Task<CampaignResponse> CampaignAsync(
DateTime? deadline = null,
CancellationToken cancellationToken = default)
=> await CallEtcdAsync(async (connection) => await connection.ElectionClient.CampaignAsync(
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
request ?? throw new ArgumentNullException(nameof(request)),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
headers,
deadline,
cancellationToken)).ConfigureAwait(false);
Expand All @@ -116,10 +110,8 @@ public async Task<CampaignResponse> CampaignAsync(
=> await CallEtcdAsync(async (connection) => await connection.ElectionClient.CampaignAsync(
new CampaignRequest()
{
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
Name = ByteString.CopyFromUtf8(name ?? throw new ArgumentNullException(nameof(name))),
Value = value == null ? null : ByteString.CopyFromUtf8(value),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
},
headers,
deadline,
Expand All @@ -139,9 +131,7 @@ public ProclaimResponse Proclaim(
DateTime? deadline = null,
CancellationToken cancellationToken = default)
=> CallEtcd((connection) => connection.ElectionClient.Proclaim(
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
request ?? throw new ArgumentNullException(nameof(request)),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
headers,
deadline,
cancellationToken));
Expand All @@ -164,10 +154,8 @@ public ProclaimResponse Proclaim(
=> CallEtcd((connection) => connection.ElectionClient.Proclaim(
new ProclaimRequest
{
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
Leader = leader ?? throw new ArgumentNullException(nameof(leader)),
Value = ByteString.CopyFromUtf8(value ?? throw new ArgumentNullException(nameof(value))),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
},
headers,
deadline,
Expand All @@ -187,9 +175,7 @@ public async Task<ProclaimResponse> ProclaimAsync(
DateTime? deadline = null,
CancellationToken cancellationToken = default)
=> await CallEtcdAsync(async (connection) => await connection.ElectionClient.ProclaimAsync(
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
request ?? throw new ArgumentNullException(nameof(request)),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
headers,
deadline,
cancellationToken)).ConfigureAwait(false);
Expand All @@ -212,10 +198,8 @@ public async Task<ProclaimResponse> ProclaimAsync(
=> await CallEtcdAsync(async (connection) => await connection.ElectionClient.ProclaimAsync(
new ProclaimRequest
{
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
Leader = leader ?? throw new ArgumentNullException(nameof(leader)),
Value = ByteString.CopyFromUtf8(value ?? throw new ArgumentNullException(nameof(value))),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
},
headers,
deadline,
Expand All @@ -235,9 +219,7 @@ public LeaderResponse Leader(
DateTime? deadline = null,
CancellationToken cancellationToken = default)
=> CallEtcd((connection) => connection.ElectionClient.Leader(
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
request ?? throw new ArgumentNullException(nameof(request)),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
headers,
deadline,
cancellationToken));
Expand All @@ -258,9 +240,7 @@ public LeaderResponse Leader(
=> CallEtcd((connection) => connection.ElectionClient.Leader(
new LeaderRequest
{
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
Name = ByteString.CopyFromUtf8(name ?? throw new ArgumentNullException(nameof(name)))
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
},
headers,
deadline,
Expand All @@ -280,9 +260,7 @@ public async Task<LeaderResponse> LeaderAsync(
DateTime? deadline = null,
CancellationToken cancellationToken = default)
=> await CallEtcdAsync(async (connection) => await connection.ElectionClient.LeaderAsync(
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
request ?? throw new ArgumentNullException(nameof(request)),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
headers,
deadline,
cancellationToken)).ConfigureAwait(false);
Expand All @@ -303,9 +281,7 @@ public async Task<LeaderResponse> LeaderAsync(
=> await CallEtcdAsync(async (connection) => await connection.ElectionClient.LeaderAsync(
new LeaderRequest
{
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
Name = ByteString.CopyFromUtf8(name ?? throw new ArgumentNullException(nameof(name)))
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
},
headers,
deadline,
Expand All @@ -326,9 +302,7 @@ public AsyncServerStreamingCall<LeaderResponse> Observe(
DateTime? deadline = null,
CancellationToken cancellationToken = default)
=> CallEtcd((connection) => connection.ElectionClient.Observe(
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
request ?? throw new ArgumentNullException(nameof(request)),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
headers,
deadline,
cancellationToken));
Expand All @@ -350,9 +324,7 @@ public AsyncServerStreamingCall<LeaderResponse> Observe(
=> CallEtcd((connection) => connection.ElectionClient.Observe(
new LeaderRequest
{
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
Name = ByteString.CopyFromUtf8(name ?? throw new ArgumentNullException(nameof(name)))
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
},
headers,
deadline,
Expand Down Expand Up @@ -432,9 +404,7 @@ public ResignResponse Resign(
DateTime? deadline = null,
CancellationToken cancellationToken = default)
=> CallEtcd((connection) => connection.ElectionClient.Resign(
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
request ?? throw new ArgumentNullException(nameof(request)),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
headers,
deadline,
cancellationToken));
Expand All @@ -456,9 +426,7 @@ public ResignResponse Resign(
=> CallEtcd((connection) => connection.ElectionClient.Resign(
new ResignRequest
{
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
Leader = leader ?? throw new ArgumentNullException(nameof(leader))
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
},
headers,
deadline,
Expand All @@ -479,9 +447,7 @@ public async Task<ResignResponse> ResignAsync(
DateTime? deadline = null,
CancellationToken cancellationToken = default)
=> await CallEtcdAsync(async (connection) => await connection.ElectionClient.ResignAsync(
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
request ?? throw new ArgumentNullException(nameof(request)),
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
headers,
deadline,
cancellationToken)).ConfigureAwait(false);
Expand All @@ -503,9 +469,7 @@ public async Task<ResignResponse> ResignAsync(
=> await CallEtcdAsync(async (connection) => await connection.ElectionClient.ResignAsync(
new ResignRequest
{
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
Leader = leader ?? throw new ArgumentNullException(nameof(leader))
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
},
headers,
deadline,
Expand Down

0 comments on commit 72315fe

Please sign in to comment.