diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2023-05-17 08:03:55 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2023-05-17 08:03:55 +0300 |
commit | 9f0ef900051521df2eef2c1c3607fcf8898717da (patch) | |
tree | eedd4710d0035b42dde56d202f4f479692f85684 | |
parent | e2031554747d59c800bcd14834493926ea70391c (diff) |
Refactoring
-rw-r--r-- | RhSolutions.AddIn/AddIn/RhSolutionsAddIn.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/RhSolutions.AddIn/AddIn/RhSolutionsAddIn.cs b/RhSolutions.AddIn/AddIn/RhSolutionsAddIn.cs index 7d70ef0..004cace 100644 --- a/RhSolutions.AddIn/AddIn/RhSolutionsAddIn.cs +++ b/RhSolutions.AddIn/AddIn/RhSolutionsAddIn.cs @@ -41,8 +41,8 @@ public sealed class RhSolutionsAddIn : IExcelAddIn Excel = ServiceProvider.GetService<Application>(); EventsUtil.Initialize(); - string variable = Environment.GetEnvironmentVariable("ISTESTING"); - bool isTesting = variable switch + + bool isTesting = Environment.GetEnvironmentVariable("ISTESTING") switch { "true" => true, "false" => false, @@ -59,7 +59,9 @@ public sealed class RhSolutionsAddIn : IExcelAddIn public void AutoClose() { - EventsUtil.Uninitialize(); bool isTesting = Environment.GetEnvironmentVariable("ISTESTING") switch + EventsUtil.Uninitialize(); + + bool isTesting = Environment.GetEnvironmentVariable("ISTESTING") switch { "true" => true, "false" => false, |