Skip to content

Commit

Permalink
update dependencies version and custom options (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
catcherwong authored Mar 23, 2023
1 parent 07e2f04 commit bb8c0a9
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 34 deletions.
26 changes: 14 additions & 12 deletions build/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<PropertyGroup>
<!-- DtmCommon -->
<DapperPackageVersion>2.0.123</DapperPackageVersion>
<SystemTextJsonPackageVersion6>6.0.2</SystemTextJsonPackageVersion6>
<SystemTextJsonPackageVersion6>6.0.7</SystemTextJsonPackageVersion6>
<MicrosoftExtensionsConfigurationNET6>6.0.0</MicrosoftExtensionsConfigurationNET6>
<MicrosoftExtensionsHttpNET6>6.0.0</MicrosoftExtensionsHttpNET6>
<MicrosoftExtensionsOptionsConfigurationExtensionsNET6>6.0.0</MicrosoftExtensionsOptionsConfigurationExtensionsNET6>
<SystemTextJsonPackageVersion7>7.0.0</SystemTextJsonPackageVersion7>
<SystemTextJsonPackageVersion7>7.0.2</SystemTextJsonPackageVersion7>
<MicrosoftExtensionsConfigurationNET7>7.0.0</MicrosoftExtensionsConfigurationNET7>
<MicrosoftExtensionsHttpNET7>7.0.0</MicrosoftExtensionsHttpNET7>
<MicrosoftExtensionsOptionsConfigurationExtensionsNET7>7.0.0</MicrosoftExtensionsOptionsConfigurationExtensionsNET7>
Expand All @@ -16,25 +16,27 @@
<MicrosoftExtensionsOptionsConfigurationExtensionsNSD21>6.0.0</MicrosoftExtensionsOptionsConfigurationExtensionsNSD21>

<!-- Dtmgrpc -->
<GoogleProtobufPackageVersion>3.21.9</GoogleProtobufPackageVersion>
<GrpcNetClientFactoryPackageVersion>2.50.0</GrpcNetClientFactoryPackageVersion>
<GrpcToolsPackageVersion>2.50.0</GrpcToolsPackageVersion>
<GoogleProtobufPackageVersion>3.22.1</GoogleProtobufPackageVersion>
<GrpcNetClientFactoryPackageVersion>2.52.0</GrpcNetClientFactoryPackageVersion>
<GrpcToolsPackageVersion>2.52.0</GrpcToolsPackageVersion>

<!-- Barrier Extension -->
<MongoDBDriverPackageVersion>2.18.0</MongoDBDriverPackageVersion>
<StackExchangeRedisPackageVersion>2.5.61</StackExchangeRedisPackageVersion>
<MongoDBDriverPackageVersion>2.19.0</MongoDBDriverPackageVersion>
<StackExchangeRedisPackageVersion>2.6.96</StackExchangeRedisPackageVersion>


<!-- TEST -->
<GrpcAspNetCorePackageVersion>2.50.0</GrpcAspNetCorePackageVersion>
<MySqlConnectorPackageVersion>2.2.1</MySqlConnectorPackageVersion>
<MicrosoftNETTestSdkPackageVersion>17.4.0</MicrosoftNETTestSdkPackageVersion>
<MoqPackageVersion>4.18.2</MoqPackageVersion>
<!-- TEST And Samples -->
<GrpcAspNetCorePackageVersion>2.52.0</GrpcAspNetCorePackageVersion>
<MySqlConnectorPackageVersion>2.2.5</MySqlConnectorPackageVersion>
<MicrosoftNETTestSdkPackageVersion>17.5.0</MicrosoftNETTestSdkPackageVersion>
<MoqPackageVersion>4.18.4</MoqPackageVersion>
<XunitPackageVersion>2.4.2</XunitPackageVersion>
<XunitRunnerVisualstudioPackageVersion>2.4.5</XunitRunnerVisualstudioPackageVersion>
<CoverletCollectorPackageVersion>3.2.0</CoverletCollectorPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>7.0.0</MicrosoftExtensionsDependencyInjectionPackageVersion>
<DbMockerPackageVersion>1.22.0</DbMockerPackageVersion>
<MicrosoftDataSqlClientPackageVersion>5.1.0</MicrosoftDataSqlClientPackageVersion>
<SwashbuckleAspNetCorePackageVersion>6.5.0</SwashbuckleAspNetCorePackageVersion>

</PropertyGroup>
</Project>
8 changes: 4 additions & 4 deletions samples/DtmOnDaprSample/DtmOnDaprSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
<PackageReference Include="MySqlConnector" Version="2.2.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="Dapper" Version="$(DapperPackageVersion)" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="$(MicrosoftDataSqlClientPackageVersion)" />
<PackageReference Include="MySqlConnector" Version="$(MySqlConnectorPackageVersion)" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="$(SwashbuckleAspNetCorePackageVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions samples/DtmSample/DtmSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
<PackageReference Include="MySqlConnector" Version="2.2.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="Dapper" Version="$(DapperPackageVersion)" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="$(MicrosoftDataSqlClientPackageVersion)" />
<PackageReference Include="MySqlConnector" Version="$(MySqlConnectorPackageVersion)" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="$(SwashbuckleAspNetCorePackageVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/DtmCommon/DtmCommon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1' OR '$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonPackageVersion6)" />
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonPackageVersion7)" />
<PackageReference Include="Microsoft.CSharp" Version="$(MicrosoftCSharpNSD21)" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="$(MicrosoftExtensionsConfigurationNSD21)" />
<PackageReference Include="Microsoft.Extensions.Http" Version="$(MicrosoftExtensionsHttpNSD21)" />
Expand Down
4 changes: 2 additions & 2 deletions src/Dtmcli/Msg/Msg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public async Task Prepare(string queryPrepared, CancellationToken cancellationTo

public async Task Submit(CancellationToken cancellationToken = default)
{
this.BuildCustimOptions();
this.BuildCustomOptions();
await this._dtmClient.TransCallDtm(this._transBase, this._transBase, Constant.Request.OPERATION_SUBMIT, cancellationToken);
}

Expand Down Expand Up @@ -153,7 +153,7 @@ public Msg SetDelay(long delay)
return this;
}

private void BuildCustimOptions()
private void BuildCustomOptions()
{
if (this._delay > 0)
{
Expand Down
14 changes: 9 additions & 5 deletions src/Dtmcli/Saga/Saga.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ public Saga EnableConcurrent()

public async Task Submit(CancellationToken cancellationToken = default)
{
if (this._concurrent)
{
this._transBase.CustomData = JsonSerializer.Serialize(new { orders = this._orders, concurrent = this._concurrent });
}

this.BuildCustomOptions();
await _dtmClient.TransCallDtm(this._transBase, this._transBase, Constant.Request.OPERATION_SUBMIT, cancellationToken).ConfigureAwait(false);
}

Expand Down Expand Up @@ -107,5 +103,13 @@ public Saga SetRetryLimit(long limit)
this._transBase.RetryLimit = limit;
return this;
}

private void BuildCustomOptions()
{
if (this._concurrent)
{
this._transBase.CustomData = JsonSerializer.Serialize(new { orders = this._orders, concurrent = this._concurrent });
}
}
}
}
4 changes: 2 additions & 2 deletions src/Dtmgrpc/Msg/MsgGrpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public async Task Prepare(string queryPrepared, CancellationToken cancellationTo

public async Task Submit(CancellationToken cancellationToken = default)
{
this.BuildCustimOptions();
this.BuildCustomOptions();
await this._dtmClient.DtmGrpcCall(this._transBase, Constant.Op.Submit);
}

Expand Down Expand Up @@ -164,7 +164,7 @@ public MsgGrpc SetDelay(long delay)
return this;
}

private void BuildCustimOptions()
private void BuildCustomOptions()
{
if (this._delay > 0)
{
Expand Down
13 changes: 9 additions & 4 deletions src/Dtmgrpc/Saga/SagaGrpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ public SagaGrpc EnableConcurrent()

public async Task Submit()
{
if (this._concurrent)
{
this._transBase.CustomData = Utils.ToJsonString(new { orders = this._orders, concurrent = this._concurrent });
}
this.BuildCustimOptions();

await _dtmClient.DtmGrpcCall(this._transBase, Constant.Op.Submit).ConfigureAwait(false);
}
Expand Down Expand Up @@ -110,5 +107,13 @@ public SagaGrpc SetRetryLimit(long limit)
this._transBase.RetryLimit = limit;
return this;
}

private void BuildCustimOptions()
{
if (this._concurrent)
{
this._transBase.CustomData = Utils.ToJsonString(new { orders = this._orders, concurrent = this._concurrent });
}
}
}
}

0 comments on commit bb8c0a9

Please sign in to comment.