Skip to content

Commit 1d344a3

Browse files
authored
[PETOSS-609] Make InterceptRequest and InterceptResponse protected virtual (#624)
* [PETOSS-609] Make InterceptRequest and InterceptResponse protected virtual * [PETOSS-609] Add comments to InterceptRequest/Response * [PETOSS-609] Fix whitespace
1 parent f83a534 commit 1d344a3

File tree

12 files changed

+31
-15
lines changed

12 files changed

+31
-15
lines changed

Xero.NetStandard.OAuth2/Client/ApiClient.cs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,24 @@ private HttpRequestMessage NewRequest(
426426
return request;
427427
}
428428

429-
partial void InterceptRequest(HttpRequestMessage req);
430-
partial void InterceptResponse(HttpRequestMessage req, HttpResponseMessage response);
429+
/// <summary>
430+
/// Intercepts the request before it is sent. Override to add custom logic.
431+
/// </summary>
432+
/// <param name="req">The HTTP request message.</param>
433+
protected virtual void InterceptRequest(HttpRequestMessage req)
434+
{
435+
436+
}
437+
438+
/// <summary>
439+
/// Intercepts the response after it is received. Override to add custom logic.
440+
/// </summary>
441+
/// <param name="req">The HTTP request message.</param>
442+
/// <param name="response">The HTTP response message.</param>
443+
protected virtual void InterceptResponse(HttpRequestMessage req, HttpResponseMessage response)
444+
{
445+
446+
}
431447

432448
private async Task<ApiResponse<T>> ToApiResponse<T>(HttpResponseMessage response, object responseData, Uri uri, bool isSuccess = true)
433449
{

Xero.NetStandard.OAuth2/Client/Configuration.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class Configuration : IReadableConfiguration
3131
/// Version of the package.
3232
/// </summary>
3333
/// <value>Version of the package.</value>
34-
public const string Version = "12.1.0";
34+
public const string Version = "12.2.0";
3535

3636
/// <summary>
3737
/// Identifier for ISO 8601 DateTime Format
@@ -103,7 +103,7 @@ public class Configuration : IReadableConfiguration
103103
[System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
104104
public Configuration()
105105
{
106-
UserAgent = "xero-netstandard-12.1.0";
106+
UserAgent = "xero-netstandard-12.2.0";
107107
BasePath = "https://api.xero.com/api.xro/2.0";
108108
DefaultHeader = new ConcurrentDictionary<string, string>();
109109
ApiKey = new ConcurrentDictionary<string, string>();
@@ -342,7 +342,7 @@ public static String ToDebugReport()
342342
String report = "C# SDK (Xero.NetStandard.OAuth2) Debug Report:\n";
343343
report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n";
344344
report += " Version of the API: 9.1.0\n";
345-
report += " SDK Package Version: 12.1.0\n";
345+
report += " SDK Package Version: 12.2.0\n";
346346

347347
return report;
348348
}

Xero.NetStandard.OAuth2/Xero.NetStandard.OAuth2.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1717
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
1818
<RootNamespace>Xero.NetStandard.OAuth2</RootNamespace>
19-
<Version>12.1.0</Version>
19+
<Version>12.2.0</Version>
2020
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Xero.NetStandard.OAuth2.xml</DocumentationFile>
2121
<PackageLicenseUrl>https://github.com/XeroAPI/Xero-NetStandard/</PackageLicenseUrl>
2222
<PackageIconUrl>https://en.gravatar.com/userimage/180557955/74b3a957d886bc921b0d1455beed9dab.png</PackageIconUrl>

docs/accounting/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6340,7 +6340,7 @@
63406340
<nav id="scrollingNav">
63416341
<ul class="sidenav nav nav-list">
63426342
<li class="nav-header" data-group="Accounting"><strong>SDK: </strong><span id='sdk-name'></span></li>
6343-
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>12.1.0</li>
6343+
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>12.2.0</li>
63446344
<li class="nav-header" data-group="Accounting"><a href="#api-Accounting">Methods</a></li>
63456345
<li data-group="Accounting" data-name="createAccount" class="">
63466346
<a href="#api-Accounting-createAccount">createAccount</a>

docs/appstore/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@
12421242
<nav id="scrollingNav">
12431243
<ul class="sidenav nav nav-list">
12441244
<li class="nav-header" data-group="AppStore"><strong>SDK: </strong><span id='sdk-name'></span></li>
1245-
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>12.1.0</li>
1245+
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>12.2.0</li>
12461246
<li class="nav-header" data-group="AppStore"><a href="#api-AppStore">Methods</a></li>
12471247
<li data-group="AppStore" data-name="getSubscription" class="">
12481248
<a href="#api-AppStore-getSubscription">getSubscription</a>

docs/bankfeeds/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@
12691269
<nav id="scrollingNav">
12701270
<ul class="sidenav nav nav-list">
12711271
<li class="nav-header" data-group="BankFeeds"><strong>SDK: </strong><span id='sdk-name'></span></li>
1272-
<li class="nav-header" data-group="BankFeeds"><strong>VSN: </strong>12.1.0</li>
1272+
<li class="nav-header" data-group="BankFeeds"><strong>VSN: </strong>12.2.0</li>
12731273
<li class="nav-header" data-group="BankFeeds"><a href="#api-BankFeeds">Methods</a></li>
12741274
<li data-group="BankFeeds" data-name="createFeedConnections" class="">
12751275
<a href="#api-BankFeeds-createFeedConnections">createFeedConnections</a>

docs/files/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@
11711171
<nav id="scrollingNav">
11721172
<ul class="sidenav nav nav-list">
11731173
<li class="nav-header" data-group="Files"><strong>SDK: </strong><span id='sdk-name'></span></li>
1174-
<li class="nav-header" data-group="Files"><strong>VSN: </strong>12.1.0</li>
1174+
<li class="nav-header" data-group="Files"><strong>VSN: </strong>12.2.0</li>
11751175
<li class="nav-header" data-group="Files"><a href="#api-Files">Methods</a></li>
11761176
<li data-group="Files" data-name="createFileAssociation" class="">
11771177
<a href="#api-Files-createFileAssociation">createFileAssociation</a>

docs/finance/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2717,7 +2717,7 @@
27172717
<nav id="scrollingNav">
27182718
<ul class="sidenav nav nav-list">
27192719
<li class="nav-header" data-group="Finance"><strong>SDK: </strong><span id='sdk-name'></span></li>
2720-
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>12.1.0</li>
2720+
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>12.2.0</li>
27212721
<li class="nav-header" data-group="Finance"><a href="#api-Finance">Methods</a></li>
27222722
<li data-group="Finance" data-name="getAccountingActivityAccountUsage" class="">
27232723
<a href="#api-Finance-getAccountingActivityAccountUsage">getAccountingActivityAccountUsage</a>

docs/payroll-au/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3413,7 +3413,7 @@
34133413
<nav id="scrollingNav">
34143414
<ul class="sidenav nav nav-list">
34153415
<li class="nav-header" data-group="PayrollAu"><strong>SDK: </strong><span id='sdk-name'></span></li>
3416-
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>12.1.0</li>
3416+
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>12.2.0</li>
34173417
<li class="nav-header" data-group="PayrollAu"><a href="#api-PayrollAu">Methods</a></li>
34183418
<li data-group="PayrollAu" data-name="approveLeaveApplication" class="">
34193419
<a href="#api-PayrollAu-approveLeaveApplication">approveLeaveApplication</a>

docs/payroll-nz/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4088,7 +4088,7 @@
40884088
<nav id="scrollingNav">
40894089
<ul class="sidenav nav nav-list">
40904090
<li class="nav-header" data-group="PayrollNz"><strong>SDK: </strong><span id='sdk-name'></span></li>
4091-
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>12.1.0</li>
4091+
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>12.2.0</li>
40924092
<li class="nav-header" data-group="PayrollNz"><a href="#api-PayrollNz">Methods</a></li>
40934093
<li data-group="PayrollNz" data-name="approveTimesheet" class="">
40944094
<a href="#api-PayrollNz-approveTimesheet">approveTimesheet</a>

0 commit comments

Comments
 (0)