Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support .NET Standard 2.0 #74

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 8 additions & 4 deletions Source/CurrencyCloud.sln
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32112.339
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CurrencyCloud", "CurrencyCloud\CurrencyCloud.csproj", "{E2C08EFF-8A14-4C77-ABD3-C9E193AE81E8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CurrencyCloud", "CurrencyCloud\CurrencyCloud.csproj", "{E2C08EFF-8A14-4C77-ABD3-C9E193AE81E8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CurrencyCloud.Tests", "CurrencyCloud.Tests\CurrencyCloud.Tests.csproj", "{051CB67F-AD6C-46B7-B038-0DA6C0F248BC}"
EndProject
Expand All @@ -24,4 +25,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A9D40999-5F06-4FCD-BA07-07000D5C2718}
EndGlobalSection
EndGlobal
263 changes: 91 additions & 172 deletions Source/CurrencyCloud/CurrencyCloud.csproj
Original file line number Diff line number Diff line change
@@ -1,173 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E2C08EFF-8A14-4C77-ABD3-C9E193AE81E8}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CurrencyCloud</RootNamespace>
<AssemblyName>CurrencyCloud</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<LangVersion>6</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\CurrencyCloud.XML</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Polly, Version=7.0.0.0, Culture=neutral, PublicKeyToken=c8a3ffc3f8f825cc">
<HintPath>..\packages\Polly.7.1.0\lib\netstandard1.1\Polly.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="Client.cs" />
<Compile Include="Credentials.cs" />
<Compile Include="Entity\BankDetails.cs" />
<Compile Include="Entity\ConversionDateChangeDetails.cs" />
<Compile Include="Entity\ConversionProfitAndLoss.cs" />
<Compile Include="Entity\ConversionSplitDetails.cs" />
<Compile Include="Entity\ConversionSplitHistory.cs" />
<Compile Include="Entity\DetailedRates.cs" />
<Compile Include="Entity\Entity.cs" />
<Compile Include="Entity\Find\AccountFindParameters.cs" />
<Compile Include="Entity\Find\BalanceFindParameters.cs" />
<Compile Include="Entity\Find\BeneficiaryFindParameters.cs" />
<Compile Include="Entity\Find\ContactFindParameters.cs" />
<Compile Include="Entity\Find\ConversionFindParameters.cs" />
<Compile Include="Entity\Find\ConversionProfitAndLossFindParameters.cs" />
<Compile Include="Entity\Find\FindParameters.cs" />
<Compile Include="Entity\Find\FundingAccountFindParameters.cs" />
<Compile Include="Entity\Find\IbanFindParameters.cs" />
<Compile Include="Entity\Find\PaymentFindParameters.cs" />
<Compile Include="Entity\Find\ReportRequestFindParameters.cs" />
<Compile Include="Entity\Find\SettlementFindParameters.cs" />
<Compile Include="Entity\Find\TransactionFindParameters.cs" />
<Compile Include="Entity\Find\TransferFindParameters.cs" />
<Compile Include="Entity\Find\VirtualAccountFindParameters.cs" />
<Compile Include="Entity\FundingAccount.cs" />
<Compile Include="Entity\Iban.cs" />
<Compile Include="Entity\List\PayerDetailsList.cs" />
<Compile Include="Entity\List\PaymentAuthorisationsList.cs" />
<Compile Include="Entity\List\PaymentChargesSettingsList.cs" />
<Compile Include="Entity\List\PaymentFeeRulesList.cs" />
<Compile Include="Entity\List\PaymentPurposeCodesList.cs" />
<Compile Include="Entity\MarginBalanceTopUp.cs" />
<Compile Include="Entity\Pagination\PaginatedConversionProfitAndLosses.cs" />
<Compile Include="Entity\Pagination\PaginatedFundingAccounts.cs" />
<Compile Include="Entity\Pagination\PaginatedIbans.cs" />
<Compile Include="Entity\Pagination\PaginatedReportRequests.cs" />
<Compile Include="Entity\Pagination\PaginatedTransactions.cs" />
<Compile Include="Entity\Pagination\PaginatedTransfers.cs" />
<Compile Include="Entity\Pagination\PaginatedVirtualAccounts.cs" />
<Compile Include="Entity\Pagination\PaginatedWithdrawalAccounts.cs" />
<Compile Include="Entity\PaymentChargesSettings.cs" />
<Compile Include="Entity\PaymentConfirmation.cs" />
<Compile Include="Entity\PaymentDeliveryDates.cs" />
<Compile Include="Entity\PaymentSubmission.cs" />
<Compile Include="Entity\PaymentTrackingInfo.cs" />
<Compile Include="Entity\QuotePaymentFee.cs" />
<Compile Include="Entity\ReportParameters.cs" />
<Compile Include="Entity\ReportRequest.cs" />
<Compile Include="Entity\SenderDetails.cs" />
<Compile Include="Entity\SettlementAccount.cs" />
<Compile Include="Entity\Account.cs" />
<Compile Include="Entity\Balance.cs" />
<Compile Include="Entity\List\BeneficiaryDetailsList.cs" />
<Compile Include="Entity\List\ConversionDatesList.cs" />
<Compile Include="Entity\List\CurrenciesList.cs" />
<Compile Include="Entity\List\PaymentDatesList.cs" />
<Compile Include="Entity\List\RatesList.cs" />
<Compile Include="Entity\List\SettlementAccountsList.cs" />
<Compile Include="Entity\Pagination\PaginatedPayments.cs" />
<Compile Include="Entity\Pagination\PaginatedConversions.cs" />
<Compile Include="Entity\Pagination\PaginatedContacts.cs" />
<Compile Include="Entity\Pagination\PaginatedBeneficiaries.cs" />
<Compile Include="Entity\Pagination\PaginatedAccounts.cs" />
<Compile Include="Entity\Pagination\PaginatedBalances.cs" />
<Compile Include="Entity\Beneficiary.cs" />
<Compile Include="Entity\Contact.cs" />
<Compile Include="Entity\Conversion.cs" />
<Compile Include="Entity\Pagination\Pagination.cs" />
<Compile Include="Entity\Payer.cs" />
<Compile Include="Entity\Payment.cs" />
<Compile Include="Entity\Rate.cs" />
<Compile Include="Entity\Transaction.cs" />
<Compile Include="Entity\Transfer.cs" />
<Compile Include="Entity\VirtualAccount.cs" />
<Compile Include="Entity\WithdrawalAccount.cs" />
<Compile Include="Entity\WithdrawalAccountFunds.cs" />
<Compile Include="Environment\ApiServer.cs" />
<Compile Include="Exception\ApiException.cs" />
<Compile Include="Environment\Platform.cs" />
<Compile Include="ParamAttribute.cs" />
<Compile Include="ParamsObject.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Extension\StringExtensions.cs" />
<Compile Include="Entity\ConversionCancellation.cs" />
<Compile Include="Entity\ConversionDateChange.cs" />
<Compile Include="Entity\ConversionSplit.cs" />
<Compile Include="Retry.cs" />
</ItemGroup>
<ItemGroup>
<None Include="package.nuspec" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\NuGet.Build.Tasks.Pack.5.0.0\build\NuGet.Build.Tasks.Pack.targets" Condition="Exists('..\packages\NuGet.Build.Tasks.Pack.5.0.0\build\NuGet.Build.Tasks.Pack.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NuGet.Build.Tasks.Pack.5.0.0\build\NuGet.Build.Tasks.Pack.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NuGet.Build.Tasks.Pack.5.0.0\build\NuGet.Build.Tasks.Pack.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{E2C08EFF-8A14-4C77-ABD3-C9E193AE81E8}</ProjectGuid>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<LangVersion>6</LangVersion>
<AssemblyTitle>Currencycloud</AssemblyTitle>
<Company>Currencycloud</Company>
<Description>The client library which implements Currencycloud's APIs.</Description>
<Copyright>Copyright (c) 2015-2019 Currencycloud</Copyright>
<Version>6.1.0</Version>
<AssemblyVersion>6.1.0</AssemblyVersion>
<FileVersion>6.1.0</FileVersion>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Authors>Currencycloud</Authors>
<PackageId>CurrencyCloud</PackageId>
<PackageProjectUrl>https://github.com/CurrencyCloud/currencycloud-net</PackageProjectUrl>
<PackageTags>Currencycloud API Client</PackageTags>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net45'">
<Compile Remove="**\*.netstandard.cs" />
<None Include="**\*.netstandard.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<Compile Remove="**\*.net45.cs" />
<None Include="**\*.net45.cs" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>full</DebugType>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>pdbonly</DebugType>
<DocumentationFile>bin\$(Configuration)\CurrencyCloud.XML</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="NuGet.Build.Tasks.Pack" Version="5.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NuGet.CommandLine" Version="4.9.4">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Polly" Version="7.1.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net45'">
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
<PackageReference Include="System.Collections" Version="4.3.0" />
<PackageReference Include="System.Collections.Concurrent" Version="4.3.0" />
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
<PackageReference Include="System.Diagnostics.Tools" Version="4.3.0" />
<PackageReference Include="System.Diagnostics.Tracing" Version="4.3.0" />
<PackageReference Include="System.Globalization" Version="4.3.0" />
<PackageReference Include="System.IO" Version="4.3.0" />
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
<PackageReference Include="System.Linq" Version="4.3.0" />
<PackageReference Include="System.Linq.Expressions" Version="4.3.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Net.Primitives" Version="4.3.0" />
<PackageReference Include="System.ObjectModel" Version="4.3.0" />
<PackageReference Include="System.Reflection" Version="4.3.0" />
<PackageReference Include="System.Reflection.Extensions" Version="4.3.0" />
<PackageReference Include="System.Reflection.Primitives" Version="4.3.0" />
<PackageReference Include="System.Resources.ResourceManager" Version="4.3.0" />
<PackageReference Include="System.Runtime" Version="4.3.1" />
<PackageReference Include="System.Runtime.Extensions" Version="4.3.1" />
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageReference Include="System.Runtime.Numerics" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="System.Threading" Version="4.3.0" />
<PackageReference Include="System.Threading.Tasks" Version="4.3.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.Xml.ReaderWriter" Version="4.3.1" />
<PackageReference Include="System.Xml.XDocument" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net45'">
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Web" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace CurrencyCloud.Environment
{
static class Platform
internal static class Platform
{
static Platform()
{
Expand Down
18 changes: 18 additions & 0 deletions Source/CurrencyCloud/Environment/Platform.netstandard.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Reflection;
using System.Runtime.Versioning;

namespace CurrencyCloud.Environment
{
internal static class Platform
{
static Platform()
{
Version = Assembly.GetEntryAssembly()?.GetCustomAttribute<TargetFrameworkAttribute>()?.FrameworkName ?? ".NET";
}

/// <summary>
/// Gets version number of the installed Mono or .NET framework.
/// </summary>
public static readonly string Version;
}
}
25 changes: 0 additions & 25 deletions Source/CurrencyCloud/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,35 +1,10 @@
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Currencycloud")]
[assembly: AssemblyDescription("Currencycloud API client library")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Currencycloud")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("Copyright © Currencycloud 2015-2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e2c08eff-8a14-4c77-abd3-c9e193ae81e8")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("6.1.0")]
[assembly: AssemblyFileVersion("6.1.0")]
24 changes: 0 additions & 24 deletions Source/CurrencyCloud/package.nuspec

This file was deleted.

Loading