From ae0f0c33451e47ffd2b5655ad66e34e812a9ace5 Mon Sep 17 00:00:00 2001 From: Grover Jackson <135006+cdmdotnet@users.noreply.github.com> Date: Thu, 11 Nov 2021 20:19:05 +1300 Subject: [PATCH] Added clean support for .net standard 2.0... thus .NET CORE --- MYOB.API.SDK.sln | 6 + MYOB.API.SDK/SDK.FULL/SDK.FULL.csproj | 523 ++++++++++++++++++ MYOB.API.SDK/SDK.NET35/SDK.NET35.csproj | 4 +- MYOB.API.SDK/SDK.NET40/SDK.NET40.csproj | 4 +- .../Banking/SpendMoneyAttachmentData.cs | 6 + .../Banking/SpendMoneyAttachmentWrapper.cs | 6 + .../Version2/Purchase/BillAttachmentData.cs | 6 + .../Purchase/BillAttachmentWrapper.cs | 6 + .../Version2/Purchase/BillAttachmentsData.cs | 6 + .../BalanceSheetSummary.cs | 46 -- MYOB.API.SDK/SDK.NET45/SDK.NET45.csproj | 4 +- .../Banking/SpendMoneyAttachmentService.cs | 22 +- .../Version2/Inventory/LocationService.cs | 6 + .../Purchase/BillAttachmentsDataService.cs | 6 + .../Purchase/ItemBillAttachmentService.cs | 6 + .../MiscellaneousBillAttachmentService.cs | 6 + .../ProfessionalBillAttachmentService.cs | 6 + .../Purchase/ServiceBillAttachmentService.cs | 6 + .../BalanceSheetSummaryService.cs | 8 +- 19 files changed, 622 insertions(+), 61 deletions(-) create mode 100644 MYOB.API.SDK/SDK.FULL/SDK.FULL.csproj delete mode 100644 MYOB.API.SDK/SDK.NET45/Contracts/Version2/Report/BalanceSheetSummary/BalanceSheetSummary.cs diff --git a/MYOB.API.SDK.sln b/MYOB.API.SDK.sln index 9e48d28..a42d2dd 100644 --- a/MYOB.API.SDK.sln +++ b/MYOB.API.SDK.sln @@ -26,6 +26,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution MYOB.API.SDK\SDK.Package\Package.nuspec = MYOB.API.SDK\SDK.Package\Package.nuspec EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDK.FULL", "MYOB.API.SDK\SDK.FULL\SDK.FULL.csproj", "{4BAA30E0-3CBA-4150-A478-71306B659E6E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -52,6 +54,10 @@ Global {33DD5156-E3B7-47FC-913D-5216019146A7}.Debug|Any CPU.Build.0 = Debug|Any CPU {33DD5156-E3B7-47FC-913D-5216019146A7}.Release|Any CPU.ActiveCfg = Release|Any CPU {33DD5156-E3B7-47FC-913D-5216019146A7}.Release|Any CPU.Build.0 = Release|Any CPU + {4BAA30E0-3CBA-4150-A478-71306B659E6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BAA30E0-3CBA-4150-A478-71306B659E6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BAA30E0-3CBA-4150-A478-71306B659E6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BAA30E0-3CBA-4150-A478-71306B659E6E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/MYOB.API.SDK/SDK.FULL/SDK.FULL.csproj b/MYOB.API.SDK/SDK.FULL/SDK.FULL.csproj new file mode 100644 index 0000000..754380e --- /dev/null +++ b/MYOB.API.SDK/SDK.FULL/SDK.FULL.csproj @@ -0,0 +1,523 @@ + + + + netstandard2.0;NET45;NET40;NET35 + false + MYOB.AccountRight.SDK + MYOB.AccountRight.SDK + + + + + + TRACE;ASYNC + + + TRACE;ASYNC; COMPRESSION + + + + TRACE;ASYNC + + + TRACE;ASYNC; COMPRESSION + + + + TRACE;ASYNC + + + TRACE;ASYNC; COMPRESSION + + + + TRACE + + + TRACE;COMPRESSION + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET35/SDK.NET35.csproj b/MYOB.API.SDK/SDK.NET35/SDK.NET35.csproj index fa9e41f..9f578c1 100644 --- a/MYOB.API.SDK/SDK.NET35/SDK.NET35.csproj +++ b/MYOB.API.SDK/SDK.NET35/SDK.NET35.csproj @@ -22,7 +22,7 @@ full false $(SolutionDir)\Artefacts\SDK\Ship\NET35\ - TRACE;DEBUG + TRACE;DEBUG;NET35 prompt 4 $(SolutionDir)\Artefacts\SDK\Ship\NET35\MYOB.AccountRight.SDK.XML @@ -31,7 +31,7 @@ pdbonly true $(SolutionDir)\Artefacts\SDK\Ship\NET35\ - TRACE;COMPRESSION + TRACE;NET35;COMPRESSION prompt 4 $(SolutionDir)\Artefacts\SDK\Ship\NET35\MYOB.AccountRight.SDK.XML diff --git a/MYOB.API.SDK/SDK.NET40/SDK.NET40.csproj b/MYOB.API.SDK/SDK.NET40/SDK.NET40.csproj index a5c2e32..f988275 100644 --- a/MYOB.API.SDK/SDK.NET40/SDK.NET40.csproj +++ b/MYOB.API.SDK/SDK.NET40/SDK.NET40.csproj @@ -22,7 +22,7 @@ full false $(SolutionDir)\Artefacts\SDK\Ship\NET40\ - TRACE;DEBUG;ASYNC + TRACE;DEBUG;ASYNC;NET40 prompt 4 $(SolutionDir)\Artefacts\SDK\Ship\NET40\MYOB.AccountRight.SDK.XML @@ -31,7 +31,7 @@ pdbonly true $(SolutionDir)\Artefacts\SDK\Ship\NET40\ - TRACE;ASYNC, COMPRESSION + TRACE;ASYNC;NET40, COMPRESSION prompt 4 $(SolutionDir)\Artefacts\SDK\Ship\NET40\MYOB.AccountRight.SDK.XML diff --git a/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Banking/SpendMoneyAttachmentData.cs b/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Banking/SpendMoneyAttachmentData.cs index 2c3c8ae..5e0bd1f 100644 --- a/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Banking/SpendMoneyAttachmentData.cs +++ b/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Banking/SpendMoneyAttachmentData.cs @@ -1,3 +1,7 @@ +#if NET35 +#else +#if NET40 +#else namespace MYOB.AccountRight.SDK.Contracts.Version2.Banking { /// @@ -26,3 +30,5 @@ public class SpendMoneyAttachmentData : BaseEntity public string FileBase64Content { get; set; } } } +#endif +#endif \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Banking/SpendMoneyAttachmentWrapper.cs b/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Banking/SpendMoneyAttachmentWrapper.cs index 9e5aa88..4c16faa 100644 --- a/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Banking/SpendMoneyAttachmentWrapper.cs +++ b/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Banking/SpendMoneyAttachmentWrapper.cs @@ -1,3 +1,7 @@ +#if NET35 +#else +#if NET40 +#else using System; using System.Collections.Generic; @@ -14,3 +18,5 @@ public class SpendMoneyAttachmentWrapper : BaseEntity public List Attachments; } } +#endif +#endif \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Purchase/BillAttachmentData.cs b/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Purchase/BillAttachmentData.cs index 52de38f..4845a66 100644 --- a/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Purchase/BillAttachmentData.cs +++ b/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Purchase/BillAttachmentData.cs @@ -1,3 +1,7 @@ +#if NET35 +#else +#if NET40 +#else namespace MYOB.AccountRight.SDK.Contracts.Version2.Purchase { /// @@ -26,3 +30,5 @@ public class BillAttachmentData : BaseEntity public string FileBase64Content { get; set; } } } +#endif +#endif \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Purchase/BillAttachmentWrapper.cs b/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Purchase/BillAttachmentWrapper.cs index ac025c0..938f578 100644 --- a/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Purchase/BillAttachmentWrapper.cs +++ b/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Purchase/BillAttachmentWrapper.cs @@ -1,3 +1,7 @@ +#if NET35 +#else +#if NET40 +#else using System; using System.Collections.Generic; @@ -14,3 +18,5 @@ public class BillAttachmentWrapper : BaseEntity public List Attachments; } } +#endif +#endif \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Purchase/BillAttachmentsData.cs b/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Purchase/BillAttachmentsData.cs index 632c98b..7ed5204 100644 --- a/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Purchase/BillAttachmentsData.cs +++ b/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Purchase/BillAttachmentsData.cs @@ -1,3 +1,7 @@ +#if NET35 +#else +#if NET40 +#else using System; using System.Collections.Generic; @@ -24,3 +28,5 @@ public class BillAttachmentsData : BaseEntity public string BillLayout; } } +#endif +#endif \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Report/BalanceSheetSummary/BalanceSheetSummary.cs b/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Report/BalanceSheetSummary/BalanceSheetSummary.cs deleted file mode 100644 index 628ed49..0000000 --- a/MYOB.API.SDK/SDK.NET45/Contracts/Version2/Report/BalanceSheetSummary/BalanceSheetSummary.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using MYOB.AccountRight.SDK.Contracts.Version2.GeneralLedger; -using MYOB.AccountRight.SDK.Contracts.Version2.Report.TaxCodeSummary; - -namespace MYOB.AccountRight.SDK.Contracts.Version2.Report.BalanceSheetSummary -{ - /// - /// Balance Sheet Summary - /// - public class BalanceSheetSummary - { - /// - /// As Of Date of the reporting period - /// - public DateTime AsOfDate { get; set; } - - /// - /// Year end adjustment - /// - public Boolean YearEndAdjust { get; set; } - - /// - /// Accounts Breakdown - /// - public List AccountsBreakdown { get; set; } - - - } - - /// - /// Breakdown of accounts - /// - public class AccountsBreakdown - { - /// - /// Balance - /// - public Decimal AccountTotal { get; set; } - - /// - /// Account information - /// - public AccountLink Account { get; set; } - } -} diff --git a/MYOB.API.SDK/SDK.NET45/SDK.NET45.csproj b/MYOB.API.SDK/SDK.NET45/SDK.NET45.csproj index 069894c..c9f009a 100644 --- a/MYOB.API.SDK/SDK.NET45/SDK.NET45.csproj +++ b/MYOB.API.SDK/SDK.NET45/SDK.NET45.csproj @@ -22,7 +22,7 @@ full false $(SolutionDir)\Artefacts\SDK\Ship\NET45\ - TRACE;DEBUG;ASYNC + TRACE;DEBUG;ASYNC;NET45 prompt 4 false @@ -32,7 +32,7 @@ pdbonly true $(SolutionDir)\Artefacts\SDK\Ship\NET45\ - TRACE;ASYNC, COMPRESSION + TRACE;ASYNC;NET45, COMPRESSION prompt 4 false diff --git a/MYOB.API.SDK/SDK.NET45/Services/Version2/Banking/SpendMoneyAttachmentService.cs b/MYOB.API.SDK/SDK.NET45/Services/Version2/Banking/SpendMoneyAttachmentService.cs index 17d191a..2923a61 100644 --- a/MYOB.API.SDK/SDK.NET45/Services/Version2/Banking/SpendMoneyAttachmentService.cs +++ b/MYOB.API.SDK/SDK.NET45/Services/Version2/Banking/SpendMoneyAttachmentService.cs @@ -1,3 +1,7 @@ +#if NET35 +#else +#if NET40 +#else using System; using MYOB.AccountRight.SDK.Communication; using MYOB.AccountRight.SDK.Contracts; @@ -35,7 +39,7 @@ public override string Route get { return "Banking/SpendMoney/{uid}/Attachment"; } } - #region Insert Operations +#region Insert Operations /// /// Adds an Attachment to a Spend Money @@ -70,9 +74,9 @@ public Task InsertExAsync(CompanyFile cf, SpendMone #endif - #endregion +#endregion - #region Delete Operations +#region Delete Operations /// @@ -106,9 +110,9 @@ public Task DeleteAsync(CompanyFile cf, Guid spendMoneyUid, Guid attachmentUid, } #endif - #endregion +#endregion - #region Get Operations +#region Get Operations /// /// Gets an Spend Money Attachment object @@ -138,9 +142,9 @@ public Task GetAsync(CompanyFile cf, Guid spendMone return MakeApiGetRequestAsync(BuildUri(cf, spendMoneyUid, attachmentUid), credentials, CancellationToken.None, eTag); } - #endregion +#endregion - #region Base Class Overrides +#region Base Class Overrides /// /// DO NOT USE THIS INHERITED MEMBER @@ -573,7 +577,7 @@ public override Task UpdateExAsync(CompanyFile cf, throw new NotImplementedException(); } - #endregion +#endregion /// @@ -602,3 +606,5 @@ public Uri BuildUri(CompanyFile companyFile, Guid spendMoneyUid, Guid? attachmen } } } +#endif +#endif \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET45/Services/Version2/Inventory/LocationService.cs b/MYOB.API.SDK/SDK.NET45/Services/Version2/Inventory/LocationService.cs index 3de02ed..8b0a397 100644 --- a/MYOB.API.SDK/SDK.NET45/Services/Version2/Inventory/LocationService.cs +++ b/MYOB.API.SDK/SDK.NET45/Services/Version2/Inventory/LocationService.cs @@ -1,3 +1,7 @@ +#if NET35 +#else +#if NET40 +#else using MYOB.AccountRight.SDK.Communication; using MYOB.AccountRight.SDK.Contracts.Version2.Inventory; @@ -28,3 +32,5 @@ public override string Route } } } +#endif +#endif \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/BillAttachmentsDataService.cs b/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/BillAttachmentsDataService.cs index 5330216..1b1e6c5 100644 --- a/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/BillAttachmentsDataService.cs +++ b/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/BillAttachmentsDataService.cs @@ -1,3 +1,7 @@ +#if NET35 +#else +#if NET40 +#else using MYOB.AccountRight.SDK.Communication; using MYOB.AccountRight.SDK.Contracts; using MYOB.AccountRight.SDK.Contracts.Version2.Purchase; @@ -262,3 +266,5 @@ private string GenerateQueryString(ErrorLevel errorLevel, bool returnBody = fals } } } +#endif +#endif \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/ItemBillAttachmentService.cs b/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/ItemBillAttachmentService.cs index aa09f65..378728f 100644 --- a/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/ItemBillAttachmentService.cs +++ b/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/ItemBillAttachmentService.cs @@ -1,3 +1,7 @@ +#if NET35 +#else +#if NET40 +#else using MYOB.AccountRight.SDK.Communication; using MYOB.AccountRight.SDK.Contracts; using MYOB.AccountRight.SDK.Contracts.Version2; @@ -623,3 +627,5 @@ public Uri BuildUri(CompanyFile companyFile, Guid billUid, Guid? attachmentUid = } } } +#endif +#endif \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/MiscellaneousBillAttachmentService.cs b/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/MiscellaneousBillAttachmentService.cs index ccf96e2..ecb9685 100644 --- a/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/MiscellaneousBillAttachmentService.cs +++ b/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/MiscellaneousBillAttachmentService.cs @@ -1,3 +1,7 @@ +#if NET35 +#else +#if NET40 +#else using MYOB.AccountRight.SDK.Communication; using MYOB.AccountRight.SDK.Contracts; using MYOB.AccountRight.SDK.Contracts.Version2; @@ -623,3 +627,5 @@ public Uri BuildUri(CompanyFile companyFile, Guid billUid, Guid? attachmentUid = } } } +#endif +#endif \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/ProfessionalBillAttachmentService.cs b/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/ProfessionalBillAttachmentService.cs index a4d658f..c09bda3 100644 --- a/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/ProfessionalBillAttachmentService.cs +++ b/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/ProfessionalBillAttachmentService.cs @@ -1,3 +1,7 @@ +#if NET35 +#else +#if NET40 +#else using MYOB.AccountRight.SDK.Communication; using MYOB.AccountRight.SDK.Contracts; using MYOB.AccountRight.SDK.Contracts.Version2; @@ -623,3 +627,5 @@ public Uri BuildUri(CompanyFile companyFile, Guid billUid, Guid? attachmentUid = } } } +#endif +#endif \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/ServiceBillAttachmentService.cs b/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/ServiceBillAttachmentService.cs index e1c58d8..2d87763 100644 --- a/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/ServiceBillAttachmentService.cs +++ b/MYOB.API.SDK/SDK.NET45/Services/Version2/Purchase/ServiceBillAttachmentService.cs @@ -1,3 +1,7 @@ +#if NET35 +#else +#if NET40 +#else using MYOB.AccountRight.SDK.Communication; using MYOB.AccountRight.SDK.Contracts; using MYOB.AccountRight.SDK.Contracts.Version2; @@ -623,3 +627,5 @@ public Uri BuildUri(CompanyFile companyFile, Guid billUid, Guid? attachmentUid = } } } +#endif +#endif \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET45/Services/Version2/Report/BalanceSheetSummary/BalanceSheetSummaryService.cs b/MYOB.API.SDK/SDK.NET45/Services/Version2/Report/BalanceSheetSummary/BalanceSheetSummaryService.cs index 42c5976..53c8de9 100644 --- a/MYOB.API.SDK/SDK.NET45/Services/Version2/Report/BalanceSheetSummary/BalanceSheetSummaryService.cs +++ b/MYOB.API.SDK/SDK.NET45/Services/Version2/Report/BalanceSheetSummary/BalanceSheetSummaryService.cs @@ -1,4 +1,8 @@ -using MYOB.AccountRight.SDK.Communication; +#if NET35 +#else +#if NET40 +#else +using MYOB.AccountRight.SDK.Communication; using MYOB.AccountRight.SDK.Contracts.Version2.Report.BalanceSheetSummary; namespace MYOB.AccountRight.SDK.Services @@ -28,3 +32,5 @@ public override string Route } } } +#endif +#endif \ No newline at end of file