Skip to content

Commit 7036162

Browse files
committed
Updating Nuget packages + cleanup
1 parent bef8151 commit 7036162

File tree

62 files changed

+215
-217
lines changed

Some content is hidden

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

62 files changed

+215
-217
lines changed

launcher-csharp/Common/DSHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.IO;
22

3-
namespace eg_03_csharp_auth_code_grant_core.Common
3+
namespace DocuSign.CodeExamples.Common
44
{
55
internal class DSHelper
66
{

launcher-csharp/Common/IRequestItemsService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using DocuSign.eSign.Client;
22
using DocuSign.eSign.Client.Auth;
3-
using eg_03_csharp_auth_code_grant_core.Models;
3+
using DocuSign.CodeExamples.Models;
44
using System;
55

6-
namespace eg_03_csharp_auth_code_grant_core
6+
namespace DocuSign.CodeExamples
77
{
88
public interface IRequestItemsService
99
{

launcher-csharp/Common/Languages.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Linq;
44
using System.Threading.Tasks;
55

6-
namespace eg_03_csharp_auth_code_grant_core.Common
6+
namespace DocuSign.CodeExamples.Common
77
{
88
public static class Languages
99
{

launcher-csharp/Common/LocalsFilter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using eg_03_csharp_auth_code_grant_core.Models;
1+
using DocuSign.CodeExamples.Models;
22
using Microsoft.AspNetCore.Mvc;
33
using Microsoft.AspNetCore.Mvc.Filters;
44
using Microsoft.Extensions.Caching.Memory;
55
using System;
66
using System.Linq;
77
using System.Security.Claims;
88

9-
namespace eg_03_csharp_auth_code_grant_core.Common
9+
namespace DocuSign.CodeExamples.Common
1010
{
1111
public class LocalsFilter : IActionFilter
1212
{

launcher-csharp/Common/RequestItemService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using DocuSign.eSign.Client;
22
using DocuSign.eSign.Client.Auth;
3-
using eg_03_csharp_auth_code_grant_core.Models;
3+
using DocuSign.CodeExamples.Models;
44
using Microsoft.AspNetCore.Http;
55
using Microsoft.Extensions.Caching.Memory;
66
using Microsoft.Extensions.Configuration;
@@ -11,7 +11,7 @@
1111
using static DocuSign.eSign.Client.Auth.OAuth;
1212
using static DocuSign.eSign.Client.Auth.OAuth.UserInfo;
1313

14-
namespace eg_03_csharp_auth_code_grant_core.Common
14+
namespace DocuSign.CodeExamples.Common
1515
{
1616
public class RequestItemsService : IRequestItemsService
1717
{

launcher-csharp/Common/SameSiteCookieServiceCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Microsoft.AspNetCore.Http;
33
using Microsoft.Extensions.DependencyInjection;
44

5-
namespace eg_03_csharp_auth_code_grant_core.Common
5+
namespace DocuSign.CodeExamples.Common
66
{
77
public static class SameSiteCookieServiceCollectionExtensions
88
{

launcher-csharp/Common/SessionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Linq;
66
using System.Threading.Tasks;
77

8-
namespace eg_03_csharp_auth_code_grant_core.Common
8+
namespace DocuSign.CodeExamples.Common
99
{
1010
public static class SessionExtensions
1111
{

launcher-csharp/Eg001EmbeddedSigningController.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
using DocuSign.eSign.Api;
44
using DocuSign.eSign.Client;
55
using DocuSign.eSign.Model;
6-
using eg_03_csharp_auth_code_grant_core.Controllers;
7-
using eg_03_csharp_auth_code_grant_core.Models;
6+
using DocuSign.CodeExamples.Controllers;
7+
using DocuSign.CodeExamples.Models;
88
using Microsoft.AspNetCore.Mvc;
99

10-
namespace eg_03_csharp_auth_code_grant_core.Views
10+
namespace DocuSign.CodeExamples.Views
1111
{
1212
[Route("eg001")]
1313
public class Eg001EmbeddedSigningController : EgController
@@ -43,9 +43,9 @@ private string DoWork(string signerEmail, string signerName,
4343
EnvelopeDefinition envelope = MakeEnvelope(signerEmail, signerName);
4444

4545
// Step 2. Call DocuSign to create the envelope
46-
var config = new Configuration(new ApiClient(basePath));
47-
config.AddDefaultHeader("Authorization", "Bearer " + accessToken);
48-
EnvelopesApi envelopesApi = new EnvelopesApi(config);
46+
var apiClient = new ApiClient(basePath);
47+
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
48+
var envelopesApi = new EnvelopesApi(apiClient);
4949
EnvelopeSummary results = envelopesApi.CreateEnvelope(accountId, envelope);
5050
string envelopeId = results.EnvelopeId;
5151

launcher-csharp/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Microsoft.AspNetCore;
22
using Microsoft.AspNetCore.Hosting;
33

4-
namespace eg_03_csharp_auth_code_grant_core
4+
namespace DocuSign.CodeExamples
55
{
66
public class Program
77
{

launcher-csharp/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"applicationUrl": "https://localhost:8080;http://localhost:5000"
1818
},
19-
"eg_03_csharp_auth_code_grant_core": {
19+
"CodeExamples": {
2020
"commandName": "Project",
2121
"launchBrowser": true,
2222
"environmentVariables": {

launcher-csharp/Startup.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
using System.Net.Http.Headers;
44
using System.Security.Claims;
55
using System.Threading.Tasks;
6-
using eg_03_csharp_auth_code_grant_core.Common;
7-
using eg_03_csharp_auth_code_grant_core.Models;
6+
using DocuSign.CodeExamples.Common;
7+
using DocuSign.CodeExamples.Models;
88
using Microsoft.AspNetCore.Authentication;
99
using Microsoft.AspNetCore.Authentication.Cookies;
1010
using Microsoft.AspNetCore.Authentication.OAuth;
@@ -20,7 +20,7 @@
2020
using DocuSign.eSign.Client.Auth;
2121
using System.Text;
2222

23-
namespace eg_03_csharp_auth_code_grant_core
23+
namespace DocuSign.CodeExamples
2424
{
2525
public class Startup
2626
{

launcher-csharp/Views/Eg024PermissionCreate/Eg024.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@model eg_03_csharp_auth_code_grant_core.Controllers.Eg024PermissionCreateController
1+
@model DocuSign.CodeExamples.Controllers.Eg024PermissionCreateController
22
<h4>24. Creates a new permission profile.</h4>
33
<p>
44
This is a general example of creating an permission profile.

launcher-csharp/Views/Eg026PermissionChangeSingleSetting/Eg026.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@model eg_03_csharp_auth_code_grant_core.Controllers.Eg026PermissionChangeSingleSettingController
1+
@model DocuSign.CodeExamples.Controllers.Eg026PermissionChangeSingleSettingController
22
<h4>26. Updates the permission profile.</h4>
33
<p>
44
This is a general example of updating an permission profile.

launcher-csharp/Views/Eg028CreateBrand/eg028.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@using eg_03_csharp_auth_code_grant_core.Common
1+
@using DocuSign.CodeExamples.Common
22
<h4>28. Creating a brand</h4>
33
<p>
44
The brand includes a Brand Name <a href="https://support.docusign.com/en/guides/ndse-admin-guide-configure-branding">Configure Brands</a>.

launcher-csharp/Views/Shared/PermissionProfileView.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@model eg_03_csharp_auth_code_grant_core.Models.PermissionProfileModel
1+
@model DocuSign.CodeExamples.Models.PermissionProfileModel
22

33
<h4>Permission profile</h4>
44
<form class="eg" asp-action="Create" method="post" data-busy="form">
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
@using eg_03_csharp_auth_code_grant_core
2-
@using eg_03_csharp_auth_code_grant_core.Models
1+
@using DocuSign.CodeExamples
2+
@using DocuSign.CodeExamples.Models
33
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

launcher-csharp/eSignature/Controllers/DSController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Microsoft.AspNetCore.Mvc;
33
using Microsoft.Extensions.Configuration;
44

5-
namespace eg_03_csharp_auth_code_grant_core.Controllers
5+
namespace DocuSign.CodeExamples.Controllers
66
{
77
[Route("ds/[action]")]
88
public class AccountController : Controller

launcher-csharp/eSignature/Controllers/Eg002SigningViaEmailController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
using System.Collections.Generic;
33
using DocuSign.eSign.Api;
44
using DocuSign.eSign.Model;
5-
using eg_03_csharp_auth_code_grant_core.Models;
5+
using DocuSign.CodeExamples.Models;
66
using Microsoft.AspNetCore.Mvc;
77
using System.Text;
88
using DocuSign.eSign.Client;
99

10-
namespace eg_03_csharp_auth_code_grant_core.Controllers
10+
namespace DocuSign.CodeExamples.Controllers
1111
{
1212
[Route("eg002")]
1313
public class Eg002SigningViaEmailController : EgController
@@ -33,9 +33,9 @@ public EnvelopeSummary DoWork(string signerEmail, string signerName, string ccEm
3333
var accountId = RequestItemsService.Session.AccountId;
3434

3535
EnvelopeDefinition env = MakeEnvelope(signerEmail, signerName, ccEmail, ccName);
36-
var config = new Configuration(new ApiClient(basePath));
37-
config.AddDefaultHeader("Authorization", "Bearer " + accessToken);
38-
EnvelopesApi envelopesApi = new EnvelopesApi(config);
36+
var apiClient = new ApiClient(basePath);
37+
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
38+
var envelopesApi = new EnvelopesApi(apiClient);
3939
EnvelopeSummary results = envelopesApi.CreateEnvelope(accountId, env);
4040
RequestItemsService.EnvelopeId = results.EnvelopeId;
4141
return results;

launcher-csharp/eSignature/Controllers/Eg003ListEnvelopesController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
using DocuSign.eSign.Api;
66
using DocuSign.eSign.Client;
77
using DocuSign.eSign.Model;
8-
using eg_03_csharp_auth_code_grant_core.Models;
8+
using DocuSign.CodeExamples.Models;
99
using Microsoft.AspNetCore.Mvc;
1010
using Newtonsoft.Json;
1111
using static DocuSign.eSign.Api.EnvelopesApi;
1212

13-
namespace eg_03_csharp_auth_code_grant_core.Controllers
13+
namespace DocuSign.CodeExamples.Controllers
1414
{
1515
[Route("eg003")]
1616
public class Eg003ListEnvelopesController : EgController
@@ -31,9 +31,9 @@ private EnvelopesInformation DoWork(string accessToken, string basePath, string
3131
// basePath
3232
// accountId
3333

34-
var config = new Configuration(new ApiClient(basePath));
35-
config.AddDefaultHeader("Authorization", "Bearer " + accessToken);
36-
EnvelopesApi envelopesApi = new EnvelopesApi(config);
34+
var apiClient = new ApiClient(basePath);
35+
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
36+
var envelopesApi = new EnvelopesApi(apiClient);
3737
ListStatusChangesOptions options = new ListStatusChangesOptions();
3838
options.fromDate = DateTime.Now.AddDays(-30).ToString("yyyy/MM/dd");
3939
// Call the API method:

launcher-csharp/eSignature/Controllers/Eg004EnvelopeInfoController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using DocuSign.eSign.Api;
22
using DocuSign.eSign.Client;
33
using DocuSign.eSign.Model;
4-
using eg_03_csharp_auth_code_grant_core.Models;
4+
using DocuSign.CodeExamples.Models;
55
using Microsoft.AspNetCore.Mvc;
66
using Newtonsoft.Json;
77

8-
namespace eg_03_csharp_auth_code_grant_core.Controllers
8+
namespace DocuSign.CodeExamples.Controllers
99
{
1010
[Route("eg004")]
1111
public class Eg004EnvelopeInfoController : EgController
@@ -28,9 +28,9 @@ private Envelope DoWork(string accessToken, string basePath, string accountId,
2828
// accountId
2929
// envelopeId
3030

31-
var config = new Configuration(new ApiClient(basePath));
32-
config.AddDefaultHeader("Authorization", "Bearer " + accessToken);
33-
EnvelopesApi envelopesApi = new EnvelopesApi(config);
31+
var apiClient = new ApiClient(basePath);
32+
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
33+
var envelopesApi = new EnvelopesApi(apiClient);
3434
ViewBag.h1 = "Get envelope status results";
3535
ViewBag.message = "Results from the Envelopes::get method:";
3636
Envelope results = envelopesApi.GetEnvelope(accountId, envelopeId);

launcher-csharp/eSignature/Controllers/Eg005EnvelopeRecipientsController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using DocuSign.eSign.Api;
22
using DocuSign.eSign.Client;
33
using DocuSign.eSign.Model;
4-
using eg_03_csharp_auth_code_grant_core.Models;
4+
using DocuSign.CodeExamples.Models;
55
using Microsoft.AspNetCore.Mvc;
66
using Newtonsoft.Json;
77

8-
namespace eg_03_csharp_auth_code_grant_core.Controllers
8+
namespace DocuSign.CodeExamples.Controllers
99
{
1010
[Route("eg005")]
1111
public class Eg005EnvelopeRecipientsController : EgController
@@ -27,9 +27,9 @@ private Recipients DoWork(string accessToken, string basePath, string accountId,
2727
// basePath
2828
// accountId
2929
// envelopeId
30-
var config = new Configuration(new ApiClient(basePath));
31-
config.AddDefaultHeader("Authorization", "Bearer " + accessToken);
32-
EnvelopesApi envelopesApi = new EnvelopesApi(config);
30+
var apiClient = new ApiClient(basePath);
31+
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
32+
var envelopesApi = new EnvelopesApi(apiClient);
3333
ViewBag.h1 = "List envelope recipients result";
3434
ViewBag.message = "Results from the EnvelopeRecipients::list method:";
3535
Recipients results = envelopesApi.ListRecipients(accountId, envelopeId);

launcher-csharp/eSignature/Controllers/Eg006EnvelopeDocsController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
using DocuSign.eSign.Api;
33
using DocuSign.eSign.Client;
44
using DocuSign.eSign.Model;
5-
using eg_03_csharp_auth_code_grant_core.Models;
5+
using DocuSign.CodeExamples.Models;
66
using Microsoft.AspNetCore.Mvc;
77
using Newtonsoft.Json;
88

9-
namespace eg_03_csharp_auth_code_grant_core.Controllers
9+
namespace DocuSign.CodeExamples.Controllers
1010
{
1111
[Route("eg006")]
1212
public class Eg006EnvelopeDocsController : EgController
@@ -29,9 +29,9 @@ public Eg006EnvelopeDocsController(DSConfiguration config, IRequestItemsService
2929
// accountId
3030
// envelopeId
3131

32-
var config = new Configuration(new ApiClient(basePath));
33-
config.AddDefaultHeader("Authorization", "Bearer " + accessToken);
34-
EnvelopesApi envelopesApi = new EnvelopesApi(config);
32+
var apiClient = new ApiClient(basePath);
33+
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
34+
var envelopesApi = new EnvelopesApi(apiClient);
3535
EnvelopeDocumentsResult results = envelopesApi.ListDocuments(accountId, envelopeId);
3636

3737
// Prepare and save the envelopeId and its list of documents in the session so

launcher-csharp/eSignature/Controllers/Eg007EnvelopeGetDocController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
using System.Linq;
33
using DocuSign.eSign.Api;
44
using DocuSign.eSign.Client;
5-
using eg_03_csharp_auth_code_grant_core.Models;
5+
using DocuSign.CodeExamples.Models;
66
using Microsoft.AspNetCore.Mvc;
77

8-
namespace eg_03_csharp_auth_code_grant_core.Controllers
8+
namespace DocuSign.CodeExamples.Controllers
99
{
1010
[Route("eg007")]
1111
public class Eg007EnvelopeGetDocController : EgController
@@ -29,9 +29,9 @@ private FileStreamResult DoWork(string accessToken, string basePath, string acco
2929
// envelopeId
3030
// docSelect -- the requested documentId
3131
// documents -- from eg 6
32-
var config = new Configuration(new ApiClient(basePath));
33-
config.AddDefaultHeader("Authorization", "Bearer " + accessToken);
34-
EnvelopesApi envelopesApi = new EnvelopesApi(config);
32+
var apiClient = new ApiClient(basePath);
33+
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
34+
var envelopesApi = new EnvelopesApi(apiClient);
3535

3636
// Step 1. EnvelopeDocuments::get.
3737
// Exceptions will be caught by the calling function

launcher-csharp/eSignature/Controllers/Eg008CreateTemplateController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
using DocuSign.eSign.Api;
44
using DocuSign.eSign.Client;
55
using DocuSign.eSign.Model;
6-
using eg_03_csharp_auth_code_grant_core.Models;
6+
using DocuSign.CodeExamples.Models;
77
using Microsoft.AspNetCore.Mvc;
88

9-
namespace eg_03_csharp_auth_code_grant_core.Controllers
9+
namespace DocuSign.CodeExamples.Controllers
1010
{
1111
[Route("eg008")]
1212
public class Eg008CreateTemplateController : EgController
@@ -33,9 +33,9 @@ public Eg008CreateTemplateController(DSConfiguration config, IRequestItemsServic
3333

3434

3535
// Step 1. List templates to see if ours exists already
36-
var config = new Configuration(new ApiClient(basePath));
37-
config.AddDefaultHeader("Authorization", "Bearer " + accessToken);
38-
TemplatesApi templatesApi = new TemplatesApi(config);
36+
var apiClient = new ApiClient(basePath);
37+
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
38+
var templatesApi = new TemplatesApi(apiClient);
3939
TemplatesApi.ListTemplatesOptions options = new TemplatesApi.ListTemplatesOptions();
4040
options.searchText = "Example Signer and CC template";
4141
EnvelopeTemplateResults results = templatesApi.ListTemplates(accountId, options);

launcher-csharp/eSignature/Controllers/Eg009UseTemplateController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
using DocuSign.eSign.Api;
66
using DocuSign.eSign.Client;
77
using DocuSign.eSign.Model;
8-
using eg_03_csharp_auth_code_grant_core.Models;
8+
using DocuSign.CodeExamples.Models;
99
using Microsoft.AspNetCore.Mvc;
1010

11-
namespace eg_03_csharp_auth_code_grant_core.Controllers
11+
namespace DocuSign.CodeExamples.Controllers
1212
{
1313
[Route("eg009")]
1414
public class Eg009UseTemplateController : EgController
@@ -35,9 +35,9 @@ string DoWork (string signerEmail, string signerName, string ccEmail,
3535
// accountId
3636
// templateId
3737

38-
var config = new Configuration(new ApiClient(basePath));
39-
config.AddDefaultHeader("Authorization", "Bearer " + accessToken);
40-
EnvelopesApi envelopesApi = new EnvelopesApi(config);
38+
var apiClient = new ApiClient(basePath);
39+
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
40+
var envelopesApi = new EnvelopesApi(apiClient);
4141
EnvelopeDefinition envelope = MakeEnvelope(signerEmail, signerName, ccEmail, ccName, templateId);
4242
EnvelopeSummary result = envelopesApi.CreateEnvelope(accountId, envelope);
4343
return result.EnvelopeId;

0 commit comments

Comments
 (0)