Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
On .net45 framework, Restsharp version is updated to 106.10.1 Otherwi…
…se, it stays on version 105.1.0
  • Loading branch information
Olivier Leonard committed Apr 7, 2020
commit 7e061d7f2c5613ce3350833d96f1cc3f7cee26c7
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ public void processOpts() {
setSupportsAsync(Boolean.FALSE);
} else {
additionalProperties.put(MCS_NET_VERSION_KEY, "4.5.2-api");
additionalProperties.put("isNet45", true);
setTargetFrameworkNuget("net45");
setSupportsAsync(Boolean.TRUE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ namespace {{packageName}}.Client
{{/netStandard}}
{{^netStandard}}
{{^supportsUWP}}
request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType);
request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName{{#isNet45}}, param.Value.ContentLength{{/isNet45}}, param.Value.ContentType);
{{/supportsUWP}}
{{#supportsUWP}}
byte[] paramWriter = null;
param.Value.Writer = delegate (Stream stream) { paramWriter = ToByteArray(stream); };
request.AddFile(param.Value.Name, paramWriter, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType);
request.AddFile(param.Value.Name, paramWriter, param.Value.FileName, param.Value.ContentType);
{{/supportsUWP}}
{{/netStandard}}
}
Expand Down Expand Up @@ -215,7 +215,7 @@ namespace {{packageName}}.Client
{{/supportsUWP}}
{{#supportsUWP}}
// Using async method to perform sync call (uwp-only)
var response = RestClient.ExecuteAsync(request).Result;
var response = RestClient.ExecuteTaskAsync(request).Result;
{{/supportsUWP}}
{{/netStandard}}
InterceptResponse(request, response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,24 @@
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\JsonSubTypes.1.6.0\lib\{{targetFrameworkNuget}}\JsonSubTypes.dll</HintPath>
</Reference>
<Reference Include="RestSharp">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.106.10.1\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.106.10.1\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.106.10.1\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll</HintPath>
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\RestSharp.106.10.1\lib\{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}\RestSharp.dll</HintPath>
{{#isNet45}}
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.106.10.1\lib\net452\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.106.10.1\lib\net452\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.106.10.1\lib\net452\RestSharp.dll</HintPath>
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\RestSharp.106.10.1\lib\net452\RestSharp.dll</HintPath>
{{/isNet45}}
{{#isNet40}}
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll</HintPath>
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\RestSharp.105.1.0\lib\net4\RestSharp.dll</HintPath>
{{/isNet40}}
{{^isNet45}}{{^isNet40}}
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
<HintPath Condition="Exists('{{binRelativePath}}')">{{binRelativePath}}\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll</HintPath>
{{/isNet40}}{{/isNet45}}
</Reference>
{{#generatePropertyChanged}}
<Reference Include="PropertyChanged">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@
<PackageReference Include="FubarCoder.RestSharp.Portable.HttpClient" Version="4.0.7" />
{{/netStandard}}
{{^netStandard}}
{{#isNet45}}
<PackageReference Include="RestSharp" Version="106.10.1" />
{{/isNet45}}
{{^isNet45}}
<PackageReference Include="RestSharp" Version="105.1.0" />
{{/isNet45}}
{{/netStandard}}
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="JsonSubTypes" Version="1.6.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
<PackageReference Include="FubarCoder.RestSharp.Portable.Core" Version="4.0.7" />
{{/netStandard}}
{{^netStandard}}
{{#isNet45}}
<PackageReference Include="RestSharp" Version="106.10.1" />
{{/isNet45}}
{{^isNet45}}
<PackageReference Include="RestSharp" Version="105.1.0" />
{{/isNet45}}
{{/netStandard}}
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="JsonSubTypes" Version="1.6.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="RestSharp" version="106.10.1" targetFramework="{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}" developmentDependency="true" />
{{#isNet45}}
<package id="RestSharp" version="106.10.1" targetFramework="net452" developmentDependency="true" />
{{/isNet45}}
{{#isNet40}}
<package id="RestSharp" version="105.1.0" targetFramework="net4" developmentDependency="true" />
{{/isNet40}}
{{^isNet45}}{{^isNet40}}
<package id="RestSharp" version="105.1.0" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
{{/isNet40}}{{/isNet45}}
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
<package id="JsonSubTypes" version="1.6.0" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
{{#generatePropertyChanged}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.11.0" targetFramework="{{#isNet40}}net4{{/isNet40}}{{^isNet40}}net452{{/isNet40}}" />
<package id="RestSharp" version="106.10.1" targetFramework="{{#isNet40}}net4{{/isNet40}}{{^isNet40}}{{targetFrameworkNuget}}{{/isNet40}}" developmentDependency="true" />
{{#isNet45}}
<package id="RestSharp" version="106.10.1" targetFramework="net452" developmentDependency="true" />
{{/isNet45}}
{{#isNet40}}
<package id="RestSharp" version="105.1.0" targetFramework="net4" developmentDependency="true" />
{{/isNet40}}
{{^isNet45}}{{^isNet40}}
<package id="RestSharp" version="105.1.0" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
{{/isNet40}}{{/isNet45}}
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
<package id="JsonSubTypes" version="1.6.0" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
</packages>