Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.

Commit e01e013

Browse files
authored
Merge pull request #349 from MJMortimer/f-init-params
Initialise Parameters property in XeroHttpClient constructor
2 parents 95346f3 + 8481e9a commit e01e013

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

CoreTests/ApiWrapperTest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ namespace CoreTests
66
{
77
public class ApiWrapperTest
88
{
9+
public ApiWrapperTest()
10+
{
11+
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
12+
}
13+
914
private IXeroCoreApi _api;
1015

1116
protected Account BankAccount { get; set; }

CoreTests/App.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>
55
</startup>
66

77
<appSettings>

CoreTests/CoreTests.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>CoreTests</RootNamespace>
1111
<AssemblyName>CoreTests</AssemblyName>
12-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
1515
<TargetFrameworkProfile />
@@ -24,6 +24,7 @@
2424
<ErrorReport>prompt</ErrorReport>
2525
<WarningLevel>4</WarningLevel>
2626
<LangVersion>5</LangVersion>
27+
<Prefer32Bit>false</Prefer32Bit>
2728
</PropertyGroup>
2829
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2930
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -33,6 +34,7 @@
3334
<DefineConstants>TRACE</DefineConstants>
3435
<ErrorReport>prompt</ErrorReport>
3536
<WarningLevel>4</WarningLevel>
37+
<Prefer32Bit>false</Prefer32Bit>
3638
</PropertyGroup>
3739
<PropertyGroup>
3840
<StartupObject />

Xero.Api/Infrastructure/Http/XeroHttpClient.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ private XeroHttpClient(IJsonObjectMapper jsonMapper, IXmlObjectMapper xmlMapper)
2424
{
2525
JsonMapper = jsonMapper;
2626
XmlMapper = xmlMapper;
27+
Parameters = new NameValueCollection();
2728
}
2829

2930
public XeroHttpClient(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user,

0 commit comments

Comments
 (0)