Skip to content

Commit 64c4765

Browse files
Bump RestSharp from 108.0.1 to 112.0.0 in /src/GregClient (#110)
* Bump RestSharp from 108.0.1 to 112.0.0 in /src/GregClient Bumps [RestSharp](https://github.com/restsharp/RestSharp) from 108.0.1 to 112.0.0. - [Release notes](https://github.com/restsharp/RestSharp/releases) - [Commits](restsharp/RestSharp@108.0.1...112.0.0) --- updated-dependencies: - dependency-name: RestSharp dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Update TimeOut assignment --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Aaron (Qilong) <[email protected]>
1 parent 52952e4 commit 64c4765

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/GregClient/GregClient.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ private RestResponse ExecuteInternal(Request m)
5454
if (timeoutSetting != null)
5555
{
5656
// Timeout App Settings is in seconds.
57-
// RestRequest.Timeout is in milliseconds.
57+
// RestRequest.Timeout is now timespan object for clarity from RestSharp 112.0.0
5858
var userVal = Convert.ToInt32(timeoutSetting);
5959
// Sanity check.
6060
if (userVal >= 0 && userVal < 86400/*24 hours*/)
6161
{
62-
req.Timeout = Convert.ToInt32(timeoutSetting) * 1000;// get milliseconds
62+
req.Timeout = TimeSpan.FromSeconds(userVal);
6363
}
6464
}
6565
}

src/GregClient/GregClient.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</PropertyGroup>
2727

2828
<ItemGroup Label="Common package dependencies">
29-
<PackageReference Include="RestSharp" Version="108.0.1" />
29+
<PackageReference Include="RestSharp" Version="112.0.0" />
3030
</ItemGroup>
3131
<ItemGroup>
3232
<None Include="..\..\CHANGELOG.md">

src/GregClient/Requests/JSONRequest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public abstract class JsonRequest : Request
1414
// Ex: Timeout property
1515
internal void InitReqParams(ref RestRequest request)
1616
{
17-
request.Timeout = Timeout;
17+
request.Timeout = TimeSpan.FromMilliseconds(Timeout);
1818
}
1919

2020
internal override void Build(ref RestRequest request)

0 commit comments

Comments
 (0)