Skip to content

Commit 54a1c2a

Browse files
authored
Release 22.1 (#34)
* Release 22.1 * Fix compatibility with .NET framework
1 parent 2cef734 commit 54a1c2a

File tree

112 files changed

+219
-550
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+219
-550
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Aspose Pty Ltd
3+
Copyright (c) 2022 Aspose Pty Ltd
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![Nuget](https://img.shields.io/nuget/v/Aspose.BarCode-Cloud)](https://www.nuget.org/packages/Aspose.BarCode-Cloud/)
99

1010
- API version: 3.0
11-
- SDK version: 21.12.0
11+
- SDK version: 22.1.0
1212

1313
## Demo applications
1414

Tests/ApiExceptionTests.cs

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
1-
// --------------------------------------------------------------------------------------------------------------------
2-
// <copyright company="Aspose" file="ApiExceptionTests.cs">
3-
// Copyright (c) 2021 Aspose.BarCode for Cloud
4-
// </copyright>
5-
// <summary>
6-
// Permission is hereby granted, free of charge, to any person obtaining a copy
7-
// of this software and associated documentation files (the "Software"), to deal
8-
// in the Software without restriction, including without limitation the rights
9-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
// copies of the Software, and to permit persons to whom the Software is
11-
// furnished to do so, subject to the following conditions:
12-
//
13-
// The above copyright notice and this permission notice shall be included in all
14-
// copies or substantial portions of the Software.
15-
//
16-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22-
// SOFTWARE.
23-
// </summary>
24-
// --------------------------------------------------------------------------------------------------------------------
25-
26-
using Aspose.BarCode.Cloud.Sdk.Api;
1+
using Aspose.BarCode.Cloud.Sdk.Api;
272
using Aspose.BarCode.Cloud.Sdk.Model;
283
using Aspose.BarCode.Cloud.Sdk.Model.Requests;
294
using NUnit.Framework;

Tests/BarcodeApiTests.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
1-
// --------------------------------------------------------------------------------------------------------------------
2-
// <copyright company="Aspose" file="BarcodeApi.cs">
3-
// Copyright (c) 2021 Aspose.BarCode for Cloud
4-
// </copyright>
5-
// <summary>
6-
// Permission is hereby granted, free of charge, to any person obtaining a copy
7-
// of this software and associated documentation files (the "Software"), to deal
8-
// in the Software without restriction, including without limitation the rights
9-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
// copies of the Software, and to permit persons to whom the Software is
11-
// furnished to do so, subject to the following conditions:
12-
//
13-
// The above copyright notice and this permission notice shall be included in all
14-
// copies or substantial portions of the Software.
15-
//
16-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22-
// SOFTWARE.
23-
// </summary>
24-
// --------------------------------------------------------------------------------------------------------------------
25-
261
using System.Collections.Generic;
272
using System.IO;
283
using System.Linq;

src/Api/AuthType.cs

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
1-
// --------------------------------------------------------------------------------------------------------------------
2-
// <copyright company="Aspose" file="AuthType.cs">
3-
// Copyright (c) 2021 Aspose.BarCode for Cloud
4-
// </copyright>
5-
// <summary>
6-
// Permission is hereby granted, free of charge, to any person obtaining a copy
7-
// of this software and associated documentation files (the "Software"), to deal
8-
// in the Software without restriction, including without limitation the rights
9-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
// copies of the Software, and to permit persons to whom the Software is
11-
// furnished to do so, subject to the following conditions:
12-
//
13-
// The above copyright notice and this permission notice shall be included in all
14-
// copies or substantial portions of the Software.
15-
//
16-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22-
// SOFTWARE.
23-
// </summary>
24-
// --------------------------------------------------------------------------------------------------------------------
25-
26-
namespace Aspose.BarCode.Cloud.Sdk.Api
1+
namespace Aspose.BarCode.Cloud.Sdk.Api
272
{
283
/// <summary>
294
/// Supported types of authentication.

src/Api/BarcodeApi.cs

Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose" file="BarcodeApi.cs">
3-
// Copyright (c) 2021 Aspose.BarCode for Cloud
3+
// Copyright (c) 2022 Aspose.BarCode for Cloud
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -148,7 +148,6 @@ public System.IO.Stream GetBarcodeGenerate(GetBarcodeGenerateRequest request)
148148
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "barWidthReduction", request.BarWidthReduction);
149149
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "format", request.format);
150150

151-
var headerParams = new Dictionary<string, string>();
152151

153152
return _apiInvoker.InvokeBinaryApi(
154153
resourcePath,
@@ -217,14 +216,17 @@ public BarcodeResponseList GetBarcodeRecognize(GetBarcodeRecognizeRequest reques
217216
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storage", request.storage);
218217
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "folder", request.folder);
219218

219+
var contentType = "application/json";
220220
var headerParams = new Dictionary<string, string>();
221221

222+
222223
var response = _apiInvoker.InvokeApi(
223-
resourcePath,
224-
"GET",
225-
null,
226-
headerParams,
227-
null);
224+
resourcePath,
225+
"GET",
226+
contentType,
227+
null,
228+
headerParams,
229+
null);
228230

229231
if (response != null)
230232
{
@@ -288,20 +290,23 @@ public BarcodeResponseList PostBarcodeRecognizeFromUrlOrContent(PostBarcodeRecog
288290
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "rectangleRegion", request.RectangleRegion);
289291
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "url", request.url);
290292

293+
var contentType = "application/json";
291294
var headerParams = new Dictionary<string, string>();
292295

296+
293297
if (request.image != null)
294298
{
295299
formParams.Add("image", _apiInvoker.ToFileInfo(request.image, "image"));
296-
headerParams["Content-Type"] = "multipart/form-data";
300+
contentType = "multipart/form-data";
297301

298302
}
299303
var response = _apiInvoker.InvokeApi(
300-
resourcePath,
301-
"POST",
302-
null,
303-
headerParams,
304-
formParams);
304+
resourcePath,
305+
"POST",
306+
contentType,
307+
null,
308+
headerParams,
309+
formParams);
305310

306311
if (response != null)
307312
{
@@ -334,7 +339,6 @@ public System.IO.Stream PostGenerateMultiple(PostGenerateMultipleRequest request
334339
.Replace("/?", "?");
335340
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "format", request.format);
336341

337-
var headerParams = new Dictionary<string, string>();
338342
var postBody = SerializationHelper.Serialize(request.generatorParamsList); // http body (model) parameter
339343
return _apiInvoker.InvokeBinaryApi(
340344
resourcePath,
@@ -413,14 +417,17 @@ public ResultImageInfo PutBarcodeGenerateFile(PutBarcodeGenerateFileRequest requ
413417
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "folder", request.folder);
414418
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "format", request.format);
415419

420+
var contentType = "application/json";
416421
var headerParams = new Dictionary<string, string>();
417422

423+
418424
var response = _apiInvoker.InvokeApi(
419-
resourcePath,
420-
"PUT",
421-
null,
422-
headerParams,
423-
null);
425+
resourcePath,
426+
"PUT",
427+
contentType,
428+
null,
429+
headerParams,
430+
null);
424431

425432
if (response != null)
426433
{
@@ -461,14 +468,17 @@ public BarcodeResponseList PutBarcodeRecognizeFromBody(PutBarcodeRecognizeFromBo
461468
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storage", request.storage);
462469
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "folder", request.folder);
463470

471+
var contentType = "application/json";
464472
var headerParams = new Dictionary<string, string>();
473+
465474
var postBody = SerializationHelper.Serialize(request.readerParams); // http body (model) parameter
466475
var response = _apiInvoker.InvokeApi(
467-
resourcePath,
468-
"PUT",
469-
postBody,
470-
headerParams,
471-
null);
476+
resourcePath,
477+
"PUT",
478+
contentType,
479+
postBody,
480+
headerParams,
481+
null);
472482

473483
if (response != null)
474484
{
@@ -509,14 +519,17 @@ public ResultImageInfo PutGenerateMultiple(PutGenerateMultipleRequest request)
509519
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "folder", request.folder);
510520
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storage", request.storage);
511521

522+
var contentType = "application/json";
512523
var headerParams = new Dictionary<string, string>();
524+
513525
var postBody = SerializationHelper.Serialize(request.generatorParamsList); // http body (model) parameter
514526
var response = _apiInvoker.InvokeApi(
515-
resourcePath,
516-
"PUT",
517-
postBody,
518-
headerParams,
519-
null);
527+
resourcePath,
528+
"PUT",
529+
contentType,
530+
postBody,
531+
headerParams,
532+
null);
520533

521534
if (response != null)
522535
{

src/Api/Configuration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose" file="Configuration.cs">
3-
// Copyright (c) 2021 Aspose.BarCode for Cloud
3+
// Copyright (c) 2022 Aspose.BarCode for Cloud
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy

src/Api/FileApi.cs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose" file="FileApi.cs">
3-
// Copyright (c) 2021 Aspose.BarCode for Cloud
3+
// Copyright (c) 2022 Aspose.BarCode for Cloud
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -116,8 +116,10 @@ public void CopyFile(CopyFileRequest request)
116116
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "destStorageName", request.destStorageName);
117117
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "versionId", request.versionId);
118118

119+
var contentType = "application/json";
119120
var headerParams = new Dictionary<string, string>();
120121

122+
121123
_apiInvoker.InvokeApi(
122124
resourcePath,
123125
"PUT",
@@ -148,8 +150,10 @@ public void DeleteFile(DeleteFileRequest request)
148150
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName);
149151
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "versionId", request.versionId);
150152

153+
var contentType = "application/json";
151154
var headerParams = new Dictionary<string, string>();
152155

156+
153157
_apiInvoker.InvokeApi(
154158
resourcePath,
155159
"DELETE",
@@ -182,7 +186,6 @@ public System.IO.Stream DownloadFile(DownloadFileRequest request)
182186
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName);
183187
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "versionId", request.versionId);
184188

185-
var headerParams = new Dictionary<string, string>();
186189

187190
return _apiInvoker.InvokeBinaryApi(
188191
resourcePath,
@@ -221,8 +224,10 @@ public void MoveFile(MoveFileRequest request)
221224
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "destStorageName", request.destStorageName);
222225
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "versionId", request.versionId);
223226

227+
var contentType = "application/json";
224228
var headerParams = new Dictionary<string, string>();
225229

230+
226231
_apiInvoker.InvokeApi(
227232
resourcePath,
228233
"PUT",
@@ -260,20 +265,23 @@ public FilesUploadResult UploadFile(UploadFileRequest request)
260265
resourcePath = UrlHelper.AddPathParameter(resourcePath, "path", request.path);
261266
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "storageName", request.storageName);
262267

268+
var contentType = "application/json";
263269
var headerParams = new Dictionary<string, string>();
264270

271+
265272
if (request.File != null)
266273
{
267274
formParams.Add("_file", _apiInvoker.ToFileInfo(request.File, "File"));
268-
headerParams["Content-Type"] = "multipart/form-data";
275+
contentType = "multipart/form-data";
269276

270277
}
271278
var response = _apiInvoker.InvokeApi(
272-
resourcePath,
273-
"PUT",
274-
null,
275-
headerParams,
276-
formParams);
279+
resourcePath,
280+
"PUT",
281+
contentType,
282+
null,
283+
headerParams,
284+
formParams);
277285

278286
if (response != null)
279287
{

0 commit comments

Comments
 (0)