Skip to content

Commit dae3a13

Browse files
committed
further code refactoring
1 parent d26a15b commit dae3a13

File tree

104 files changed

+240
-231
lines changed

Some content is hidden

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

104 files changed

+240
-231
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ dotnet_diagnostic.SA1510.severity = error
478478
dotnet_diagnostic.SA1511.severity = error
479479

480480
# SA1512: Single-line comments should not be followed by blank line
481-
dotnet_diagnostic.SA1512.severity = error
481+
dotnet_diagnostic.SA1512.severity = silent
482482

483483
# SA1513: Closing brace should be followed by blank line
484484
dotnet_diagnostic.SA1513.severity = error
@@ -490,7 +490,7 @@ dotnet_diagnostic.SA1508.severity = error
490490
dotnet_diagnostic.SA1514.severity = error
491491

492492
# SA1515: Single-line comment should be preceded by blank line
493-
dotnet_diagnostic.SA1515.severity = error
493+
dotnet_diagnostic.SA1515.severity = silent
494494

495495
# SA1516: Elements should be separated by blank line
496496
dotnet_diagnostic.SA1516.severity = error

Quick_ACG/eSignature/Controllers/EgController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public virtual IActionResult Get()
8484
return Redirect("eg001");
8585
}
8686

87-
return View(EgName, this);
87+
return View(this.EgName, this);
8888
}
8989

9090
return Redirect("/ds/mustAuthenticate");

launcher-csharp/Admin/Controllers/CreateCLMESignUser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public CreateCLMESignUser(
2727
IRequestItemsService requestItemsService)
2828
: base(dsConfig, launcherTexts, requestItemsService)
2929
{
30-
this.CodeExampleText = this.GetExampleText(EgName, ExamplesAPIType.Admin);
30+
this.CodeExampleText = this.GetExampleText(this.EgName, ExamplesAPIType.Admin);
3131
this.ViewBag.title = this.CodeExampleText.ExampleName;
3232
}
3333

launcher-csharp/Admin/Controllers/CreateUser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public CreateUser(
2222
IRequestItemsService requestItemsService)
2323
: base(dsConfig, launcherTexts, requestItemsService)
2424
{
25-
this.CodeExampleText = this.GetExampleText(EgName, ExamplesAPIType.Admin);
25+
this.CodeExampleText = this.GetExampleText(this.EgName, ExamplesAPIType.Admin);
2626
this.ViewBag.title = this.CodeExampleText.ExampleName;
2727
}
2828

launcher-csharp/Admin/Controllers/DeleteUserDataFromAccount.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class DeleteUserDataFromAccount : EgController
2323
public DeleteUserDataFromAccount(DSConfiguration config, LauncherTexts launcherTexts, IRequestItemsService requestItemsService)
2424
: base(config, launcherTexts, requestItemsService)
2525
{
26-
this.CodeExampleText = this.GetExampleText(EgName, ExamplesAPIType.Admin);
26+
this.CodeExampleText = this.GetExampleText(this.EgName, ExamplesAPIType.Admin);
2727
this.ViewBag.title = this.CodeExampleText.ExampleName;
2828
}
2929

launcher-csharp/Admin/Controllers/DeleteUserDataFromOrganization.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class DeleteUserDataFromOrganization : EgController
2323
public DeleteUserDataFromOrganization(DSConfiguration config, LauncherTexts launcherTexts, IRequestItemsService requestItemsService)
2424
: base(config, launcherTexts, requestItemsService)
2525
{
26-
this.CodeExampleText = this.GetExampleText(EgName, ExamplesAPIType.Admin);
26+
this.CodeExampleText = this.GetExampleText(this.EgName, ExamplesAPIType.Admin);
2727
this.ViewBag.title = this.CodeExampleText.ExampleName;
2828
}
2929

launcher-csharp/Admin/Controllers/DeleteUserProductPermissionProfile.cs

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,50 @@ public class DeleteUserProductPermissionProfile : EgController
3333
public DeleteUserProductPermissionProfile(DSConfiguration config, LauncherTexts launcherTexts, IRequestItemsService requestItemsService)
3434
: base(config, launcherTexts, requestItemsService)
3535
{
36-
this.CodeExampleText = this.GetExampleText(EgName, ExamplesAPIType.Admin);
36+
this.CodeExampleText = this.GetExampleText(this.EgName, ExamplesAPIType.Admin);
3737
this.ViewBag.title = this.CodeExampleText.ExampleName;
3838
}
3939

4040
public override string EgName => "aeg009";
4141

42+
[MustAuthenticate]
43+
[SetViewBag]
44+
[HttpPost]
45+
[ValidateAntiForgeryToken]
46+
public ActionResult DeleteUserProductProfile(string productId)
47+
{
48+
try
49+
{
50+
Guid? organizationId = this.RequestItemsService.OrganizationId;
51+
string accessToken = this.RequestItemsService.User.AccessToken;
52+
string basePath = this.RequestItemsService.Session.AdminApiBasePath;
53+
Guid accountId = Guid.Parse(this.RequestItemsService.Session.AccountId);
54+
string email = this.RequestItemsService.EmailAddress;
55+
56+
RemoveUserProductsResponse response = DeleteUserProductPermissionProfileById.DeleteUserProductPermissionProfile(
57+
basePath,
58+
accessToken,
59+
organizationId,
60+
accountId,
61+
email,
62+
Guid.Parse(productId));
63+
64+
this.ViewBag.h1 = this.CodeExampleText.ExampleName;
65+
this.ViewBag.message = this.CodeExampleText.ResultsPageText;
66+
this.ViewBag.Locals.Json = JsonConvert.SerializeObject(response, Formatting.Indented);
67+
68+
return this.View("example_done");
69+
}
70+
catch (ApiException apiException)
71+
{
72+
this.ViewBag.errorCode = apiException.ErrorCode;
73+
this.ViewBag.errorMessage = apiException.Message;
74+
this.ViewBag.SupportingTexts = this.LauncherTexts.ManifestStructure.SupportingTexts;
75+
76+
return this.View("Error");
77+
}
78+
}
79+
4280
protected override void InitializeInternal()
4381
{
4482
base.InitializeInternal();
@@ -83,43 +121,5 @@ protected override void InitializeInternal()
83121

84122
this.ViewBag.EmailAddress = this.RequestItemsService.EmailAddress;
85123
}
86-
87-
[MustAuthenticate]
88-
[SetViewBag]
89-
[HttpPost]
90-
[ValidateAntiForgeryToken]
91-
public ActionResult DeleteUserProductProfile(string productId)
92-
{
93-
try
94-
{
95-
Guid? organizationId = this.RequestItemsService.OrganizationId;
96-
string accessToken = this.RequestItemsService.User.AccessToken;
97-
string basePath = this.RequestItemsService.Session.AdminApiBasePath;
98-
Guid accountId = Guid.Parse(this.RequestItemsService.Session.AccountId);
99-
string email = this.RequestItemsService.EmailAddress;
100-
101-
RemoveUserProductsResponse response = DeleteUserProductPermissionProfileById.DeleteUserProductPermissionProfile(
102-
basePath,
103-
accessToken,
104-
organizationId,
105-
accountId,
106-
email,
107-
Guid.Parse(productId));
108-
109-
this.ViewBag.h1 = this.CodeExampleText.ExampleName;
110-
this.ViewBag.message = this.CodeExampleText.ResultsPageText;
111-
this.ViewBag.Locals.Json = JsonConvert.SerializeObject(response, Formatting.Indented);
112-
113-
return this.View("example_done");
114-
}
115-
catch (ApiException apiException)
116-
{
117-
this.ViewBag.errorCode = apiException.ErrorCode;
118-
this.ViewBag.errorMessage = apiException.Message;
119-
this.ViewBag.SupportingTexts = this.LauncherTexts.ManifestStructure.SupportingTexts;
120-
121-
return this.View("Error");
122-
}
123-
}
124124
}
125125
}

launcher-csharp/Admin/Controllers/ImportUser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class ImportUser : EgController
2121
public ImportUser(DSConfiguration config, LauncherTexts launcherTexts, IRequestItemsService requestItemsService)
2222
: base(config, launcherTexts, requestItemsService)
2323
{
24-
this.CodeExampleText = this.GetExampleText(EgName, ExamplesAPIType.Admin);
24+
this.CodeExampleText = this.GetExampleText(this.EgName, ExamplesAPIType.Admin);
2525
this.ViewBag.title = this.CodeExampleText.ExampleName;
2626
}
2727

launcher-csharp/Admin/Controllers/RetrieveDocuSignProfileByEmailAddress.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class RetrieveDocuSignProfileByEmailAddress : EgController
2020
public RetrieveDocuSignProfileByEmailAddress(DSConfiguration config, LauncherTexts launcherTexts, IRequestItemsService requestItemsService)
2121
: base(config, launcherTexts, requestItemsService)
2222
{
23-
this.CodeExampleText = this.GetExampleText(EgName, ExamplesAPIType.Admin);
23+
this.CodeExampleText = this.GetExampleText(this.EgName, ExamplesAPIType.Admin);
2424
this.ViewBag.title = this.CodeExampleText.ExampleName;
2525
}
2626

launcher-csharp/Admin/Controllers/RetrieveDocuSignProfileByUserId.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class RetrieveDocuSignProfileByUserId : EgController
2020
public RetrieveDocuSignProfileByUserId(DSConfiguration config, LauncherTexts launcherTexts, IRequestItemsService requestItemsService)
2121
: base(config, launcherTexts, requestItemsService)
2222
{
23-
this.CodeExampleText = this.GetExampleText(EgName, ExamplesAPIType.Admin);
23+
this.CodeExampleText = this.GetExampleText(this.EgName, ExamplesAPIType.Admin);
2424
this.ViewBag.title = this.CodeExampleText.ExampleName;
2525
}
2626

0 commit comments

Comments
 (0)