Browse Source

création du DSLink RSTP/FFMPEG

FARINA Louis 4 months ago
parent
commit
01448676f7
92 changed files with 6347 additions and 323 deletions
  1. BIN
      DSLink_Test/.vs/DSLink_Test/DesignTimeBuild/.dtbcache.v2
  2. BIN
      DSLink_Test/.vs/DSLink_Test/v16/.suo
  3. 0
    7
      DSLink_Test/.vs/VSWorkspaceState.json
  4. BIN
      DSLink_Test/.vs/slnx.sqlite
  5. BIN
      DSLink_Test/DSLink_Test/.vs/DSLink_Test/v16/.suo
  6. 0
    7
      DSLink_Test/DSLink_Test/.vs/VSWorkspaceState.json
  7. BIN
      DSLink_Test/DSLink_Test/.vs/slnx.sqlite
  8. 0
    15
      DSLink_Test/DSLink_Test/DSLink_Test.csproj
  9. 0
    16
      DSLink_Test/DSLink_Test/Program.cs
  10. 0
    39
      DSLink_Test/DSLink_Test/bin/Debug/netcoreapp3.1/DSLink_Test.deps.json
  11. BIN
      DSLink_Test/DSLink_Test/bin/Debug/netcoreapp3.1/DSLink_Test.dll
  12. BIN
      DSLink_Test/DSLink_Test/bin/Debug/netcoreapp3.1/DSLink_Test.pdb
  13. 0
    62
      DSLink_Test/DSLink_Test/obj/DSLink_Test.csproj.nuget.dgspec.json
  14. 0
    6
      DSLink_Test/DSLink_Test/obj/DSLink_Test.csproj.nuget.g.targets
  15. 0
    4
      DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
  16. 0
    1
      DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.AssemblyInfoInputs.cache
  17. BIN
      DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.assets.cache
  18. BIN
      DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.csproj.AssemblyReference.cache
  19. 0
    0
      DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.csproj.CopyComplete
  20. 0
    1
      DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.csproj.CoreCompileInputs.cache
  21. 0
    28
      DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.csproj.FileListAbsolute.txt
  22. BIN
      DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.dll
  23. 0
    1
      DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.genruntimeconfig.cache
  24. BIN
      DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.pdb
  25. 0
    4
      DSLink_Test/DSLink_Test/obj/Release/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
  26. 0
    23
      DSLink_Test/DSLink_Test/obj/Release/netcoreapp3.1/DSLink_Test.AssemblyInfo.cs
  27. 0
    1
      DSLink_Test/DSLink_Test/obj/Release/netcoreapp3.1/DSLink_Test.AssemblyInfoInputs.cache
  28. BIN
      DSLink_Test/DSLink_Test/obj/Release/netcoreapp3.1/DSLink_Test.assets.cache
  29. 0
    23
      DSLink_Test/DSLink_Test/obj/Test/netcoreapp3.1/DSLink_Test.AssemblyInfo.cs
  30. 0
    1
      DSLink_Test/DSLink_Test/obj/Test/netcoreapp3.1/DSLink_Test.AssemblyInfoInputs.cache
  31. BIN
      DSLink_Test/DSLink_Test/obj/Test/netcoreapp3.1/DSLink_Test.assets.cache
  32. 0
    67
      DSLink_Test/DSLink_Test/obj/project.assets.json
  33. 0
    8
      DSLink_Test/DSLink_Test/obj/project.nuget.cache
  34. BIN
      RSTP_DSLink/.vs/RSTP_DSLink/v16/.suo
  35. 8
    6
      RSTP_DSLink/RSTP_DSLink.sln
  36. 65
    0
      RSTP_DSLink/RSTP_DSLink/CommandLineArguments.cs
  37. 0
    0
      RSTP_DSLink/RSTP_DSLink/DSLink.dll
  38. 348
    0
      RSTP_DSLink/RSTP_DSLink/RSTP_DSLink.cs
  39. 33
    0
      RSTP_DSLink/RSTP_DSLink/RSTP_DSLink.csproj
  40. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/BouncyCastle.Crypto.dll
  41. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/CommandLine.dll
  42. 0
    0
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/DSLink.dll
  43. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/MsgPack.dll
  44. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Newtonsoft.Json.dll
  45. 578
    0
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.deps.json
  46. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.dll
  47. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.exe
  48. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.pdb
  49. 0
    0
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.runtimeconfig.dev.json
  50. 0
    0
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.runtimeconfig.json
  51. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Serilog.Sinks.Console.dll
  52. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Serilog.Sinks.Debug.dll
  53. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Serilog.Sinks.File.dll
  54. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Serilog.Sinks.RollingFile.dll
  55. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Serilog.dll
  56. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/StandardStorage.dll
  57. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.CodeDom.dll
  58. BIN
      RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.Security.Permissions.dll
  59. 0
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
  60. 33
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/ILog.cs
  61. 40
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/ILogProvider.cs
  62. 562
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogExtensions.cs
  63. 45
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogLevel.cs
  64. 318
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProvider.cs
  65. 26
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/DisposableAction.cs
  66. 42
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/LibLogException.cs
  67. 381
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/Log4NetLogProvider.cs
  68. 96
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/LogMessageFormatter.cs
  69. 135
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/LogProviderBase.cs
  70. 142
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/LoupeLogProvidercs.cs
  71. 539
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/NLogLogProvider.cs
  72. 246
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/SerilogLogProvider.cs
  73. 33
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/TraceEventTypeValues.cs
  74. 25
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/TypeExtensions.cs
  75. 21
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LoggerDelegate.cs
  76. 85
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LoggerExecutionWrapper.cs
  77. 3
    3
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.AssemblyInfo.cs
  78. 1
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.AssemblyInfoInputs.cache
  79. BIN
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.assets.cache
  80. 0
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.csproj.AssemblyReference.cache
  81. 0
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.csproj.CopyComplete
  82. 1
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.csproj.CoreCompileInputs.cache
  83. 27
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.csproj.FileListAbsolute.txt
  84. BIN
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.dll
  85. 1
    0
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.genruntimeconfig.cache
  86. BIN
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.pdb
  87. BIN
      RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/apphost.exe
  88. 118
    0
      RSTP_DSLink/RSTP_DSLink/obj/RSTP_DSLink.csproj.nuget.dgspec.json
  89. 0
    0
      RSTP_DSLink/RSTP_DSLink/obj/RSTP_DSLink.csproj.nuget.g.props
  90. 9
    0
      RSTP_DSLink/RSTP_DSLink/obj/RSTP_DSLink.csproj.nuget.g.targets
  91. 2341
    0
      RSTP_DSLink/RSTP_DSLink/obj/project.assets.json
  92. 45
    0
      RSTP_DSLink/RSTP_DSLink/obj/project.nuget.cache

BIN
DSLink_Test/.vs/DSLink_Test/DesignTimeBuild/.dtbcache.v2 View File


BIN
DSLink_Test/.vs/DSLink_Test/v16/.suo View File


+ 0
- 7
DSLink_Test/.vs/VSWorkspaceState.json View File

@@ -1,7 +0,0 @@
1
-{
2
-  "ExpandedNodes": [
3
-    "",
4
-    "\\DSLink_Test"
5
-  ],
6
-  "PreviewInSolutionExplorer": false
7
-}

BIN
DSLink_Test/.vs/slnx.sqlite View File


BIN
DSLink_Test/DSLink_Test/.vs/DSLink_Test/v16/.suo View File


+ 0
- 7
DSLink_Test/DSLink_Test/.vs/VSWorkspaceState.json View File

@@ -1,7 +0,0 @@
1
-{
2
-  "ExpandedNodes": [
3
-    ""
4
-  ],
5
-  "SelectedNode": "\\CMakeLists.txt",
6
-  "PreviewInSolutionExplorer": false
7
-}

BIN
DSLink_Test/DSLink_Test/.vs/slnx.sqlite View File


+ 0
- 15
DSLink_Test/DSLink_Test/DSLink_Test.csproj View File

@@ -1,15 +0,0 @@
1
-<Project Sdk="Microsoft.NET.Sdk">
2
-
3
-  <PropertyGroup>
4
-    <OutputType>Exe</OutputType>
5
-    <TargetFramework>netcoreapp3.1</TargetFramework>
6
-    <Configurations>Debug;Release</Configurations>
7
-  </PropertyGroup>
8
-
9
-  <ItemGroup>
10
-    <Reference Include="DSLink">
11
-      <HintPath>DSLink.dll</HintPath>
12
-    </Reference>
13
-  </ItemGroup>
14
-
15
-</Project>

+ 0
- 16
DSLink_Test/DSLink_Test/Program.cs View File

@@ -1,16 +0,0 @@
1
-using System;
2
-using DSLink;
3
-class ExampleDSLink : DSLinkContainer
4
-{
5
-    public ExampleDSLink() : base(new Configuration("example", responder: true))
6
-    {
7
-        Console.WriteLine("Starting DSLink...");
8
-    }
9
-
10
-    private static void Main()
11
-    {
12
-        new ExampleDSLink();
13
-        Console.ReadLine(); // Keep the link running.
14
-    }
15
-}
16
-

+ 0
- 39
DSLink_Test/DSLink_Test/bin/Debug/netcoreapp3.1/DSLink_Test.deps.json View File

@@ -1,39 +0,0 @@
1
-{
2
-  "runtimeTarget": {
3
-    "name": ".NETCoreApp,Version=v3.1",
4
-    "signature": ""
5
-  },
6
-  "compilationOptions": {},
7
-  "targets": {
8
-    ".NETCoreApp,Version=v3.1": {
9
-      "DSLink_Test/1.0.0": {
10
-        "dependencies": {
11
-          "DSLink": "1.0.0.0"
12
-        },
13
-        "runtime": {
14
-          "DSLink_Test.dll": {}
15
-        }
16
-      },
17
-      "DSLink/1.0.0.0": {
18
-        "runtime": {
19
-          "DSLink.dll": {
20
-            "assemblyVersion": "1.0.0.0",
21
-            "fileVersion": "1.0.0.0"
22
-          }
23
-        }
24
-      }
25
-    }
26
-  },
27
-  "libraries": {
28
-    "DSLink_Test/1.0.0": {
29
-      "type": "project",
30
-      "serviceable": false,
31
-      "sha512": ""
32
-    },
33
-    "DSLink/1.0.0.0": {
34
-      "type": "reference",
35
-      "serviceable": false,
36
-      "sha512": ""
37
-    }
38
-  }
39
-}

BIN
DSLink_Test/DSLink_Test/bin/Debug/netcoreapp3.1/DSLink_Test.dll View File


BIN
DSLink_Test/DSLink_Test/bin/Debug/netcoreapp3.1/DSLink_Test.pdb View File


+ 0
- 62
DSLink_Test/DSLink_Test/obj/DSLink_Test.csproj.nuget.dgspec.json View File

@@ -1,62 +0,0 @@
1
-{
2
-  "format": 1,
3
-  "restore": {
4
-    "C:\\Users\\l.farina\\Desktop\\UCRM_stage\\DSLink_Test\\DSLink_Test\\DSLink_Test.csproj": {}
5
-  },
6
-  "projects": {
7
-    "C:\\Users\\l.farina\\Desktop\\UCRM_stage\\DSLink_Test\\DSLink_Test\\DSLink_Test.csproj": {
8
-      "version": "1.0.0",
9
-      "restore": {
10
-        "projectUniqueName": "C:\\Users\\l.farina\\Desktop\\UCRM_stage\\DSLink_Test\\DSLink_Test\\DSLink_Test.csproj",
11
-        "projectName": "DSLink_Test",
12
-        "projectPath": "C:\\Users\\l.farina\\Desktop\\UCRM_stage\\DSLink_Test\\DSLink_Test\\DSLink_Test.csproj",
13
-        "packagesPath": "C:\\Users\\l.farina\\.nuget\\packages\\",
14
-        "outputPath": "C:\\Users\\l.farina\\Desktop\\UCRM_stage\\DSLink_Test\\DSLink_Test\\obj\\",
15
-        "projectStyle": "PackageReference",
16
-        "configFilePaths": [
17
-          "C:\\Users\\l.farina\\AppData\\Roaming\\NuGet\\NuGet.Config",
18
-          "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
19
-        ],
20
-        "originalTargetFrameworks": [
21
-          "netcoreapp3.1"
22
-        ],
23
-        "sources": {
24
-          "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
25
-          "https://api.nuget.org/v3/index.json": {}
26
-        },
27
-        "frameworks": {
28
-          "netcoreapp3.1": {
29
-            "targetAlias": "netcoreapp3.1",
30
-            "projectReferences": {}
31
-          }
32
-        },
33
-        "warningProperties": {
34
-          "warnAsError": [
35
-            "NU1605"
36
-          ]
37
-        }
38
-      },
39
-      "frameworks": {
40
-        "netcoreapp3.1": {
41
-          "targetAlias": "netcoreapp3.1",
42
-          "imports": [
43
-            "net461",
44
-            "net462",
45
-            "net47",
46
-            "net471",
47
-            "net472",
48
-            "net48"
49
-          ],
50
-          "assetTargetFallback": true,
51
-          "warn": true,
52
-          "frameworkReferences": {
53
-            "Microsoft.NETCore.App": {
54
-              "privateAssets": "all"
55
-            }
56
-          },
57
-          "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.301\\RuntimeIdentifierGraph.json"
58
-        }
59
-      }
60
-    }
61
-  }
62
-}

+ 0
- 6
DSLink_Test/DSLink_Test/obj/DSLink_Test.csproj.nuget.g.targets View File

@@ -1,6 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8" standalone="no"?>
2
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
-  <PropertyGroup>
4
-    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
5
-  </PropertyGroup>
6
-</Project>

+ 0
- 4
DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs View File

@@ -1,4 +0,0 @@
1
-// <autogenerated />
2
-using System;
3
-using System.Reflection;
4
-[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]

+ 0
- 1
DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.AssemblyInfoInputs.cache View File

@@ -1 +0,0 @@
1
-04e11fc9f114ddb9939a4a129dda1f1f0f8cc542

BIN
DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.assets.cache View File


BIN
DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.csproj.AssemblyReference.cache View File


+ 0
- 0
DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.csproj.CopyComplete View File


+ 0
- 1
DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.csproj.CoreCompileInputs.cache View File

@@ -1 +0,0 @@
1
-7ce18094f6e3334762ad9383b8e4e114e700dd30

+ 0
- 28
DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.csproj.FileListAbsolute.txt View File

@@ -1,28 +0,0 @@
1
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink_Test.exe
2
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink_Test.deps.json
3
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink_Test.runtimeconfig.json
4
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink_Test.runtimeconfig.dev.json
5
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink_Test.dll
6
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink_Test.pdb
7
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.csproj.AssemblyReference.cache
8
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.AssemblyInfoInputs.cache
9
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.AssemblyInfo.cs
10
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.csproj.CoreCompileInputs.cache
11
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.dll
12
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.pdb
13
-C:\Users\l.farina\source\repos\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.genruntimeconfig.cache
14
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink_Test.exe
15
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink_Test.deps.json
16
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink_Test.runtimeconfig.json
17
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink_Test.runtimeconfig.dev.json
18
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink_Test.dll
19
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink_Test.pdb
20
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.csproj.AssemblyReference.cache
21
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.AssemblyInfoInputs.cache
22
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.AssemblyInfo.cs
23
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.csproj.CoreCompileInputs.cache
24
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.dll
25
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.pdb
26
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.genruntimeconfig.cache
27
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\bin\Debug\netcoreapp3.1\DSLink.dll
28
-C:\Users\l.farina\Desktop\UCRM_stage\DSLink_Test\DSLink_Test\obj\Debug\netcoreapp3.1\DSLink_Test.csproj.CopyComplete

BIN
DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.dll View File


+ 0
- 1
DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.genruntimeconfig.cache View File

@@ -1 +0,0 @@
1
-9951d35de2a7aa16d30daf51510165cfcd03091c

BIN
DSLink_Test/DSLink_Test/obj/Debug/netcoreapp3.1/DSLink_Test.pdb View File


+ 0
- 4
DSLink_Test/DSLink_Test/obj/Release/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs View File

@@ -1,4 +0,0 @@
1
-// <autogenerated />
2
-using System;
3
-using System.Reflection;
4
-[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]

+ 0
- 23
DSLink_Test/DSLink_Test/obj/Release/netcoreapp3.1/DSLink_Test.AssemblyInfo.cs View File

@@ -1,23 +0,0 @@
1
-//------------------------------------------------------------------------------
2
-// <auto-generated>
3
-//     Ce code a été généré par un outil.
4
-//     Version du runtime :4.0.30319.42000
5
-//
6
-//     Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
7
-//     le code est régénéré.
8
-// </auto-generated>
9
-//------------------------------------------------------------------------------
10
-
11
-using System;
12
-using System.Reflection;
13
-
14
-[assembly: System.Reflection.AssemblyCompanyAttribute("DSLink_Test")]
15
-[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
16
-[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
17
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
18
-[assembly: System.Reflection.AssemblyProductAttribute("DSLink_Test")]
19
-[assembly: System.Reflection.AssemblyTitleAttribute("DSLink_Test")]
20
-[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
21
-
22
-// Généré par la classe MSBuild WriteCodeFragment.
23
-

+ 0
- 1
DSLink_Test/DSLink_Test/obj/Release/netcoreapp3.1/DSLink_Test.AssemblyInfoInputs.cache View File

@@ -1 +0,0 @@
1
-5cc398a481358a1a40cae62ae902be38a2818d55

BIN
DSLink_Test/DSLink_Test/obj/Release/netcoreapp3.1/DSLink_Test.assets.cache View File


+ 0
- 23
DSLink_Test/DSLink_Test/obj/Test/netcoreapp3.1/DSLink_Test.AssemblyInfo.cs View File

@@ -1,23 +0,0 @@
1
-//------------------------------------------------------------------------------
2
-// <auto-generated>
3
-//     Ce code a été généré par un outil.
4
-//     Version du runtime :4.0.30319.42000
5
-//
6
-//     Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
7
-//     le code est régénéré.
8
-// </auto-generated>
9
-//------------------------------------------------------------------------------
10
-
11
-using System;
12
-using System.Reflection;
13
-
14
-[assembly: System.Reflection.AssemblyCompanyAttribute("DSLink_Test")]
15
-[assembly: System.Reflection.AssemblyConfigurationAttribute("Test")]
16
-[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
17
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
18
-[assembly: System.Reflection.AssemblyProductAttribute("DSLink_Test")]
19
-[assembly: System.Reflection.AssemblyTitleAttribute("DSLink_Test")]
20
-[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
21
-
22
-// Généré par la classe MSBuild WriteCodeFragment.
23
-

+ 0
- 1
DSLink_Test/DSLink_Test/obj/Test/netcoreapp3.1/DSLink_Test.AssemblyInfoInputs.cache View File

@@ -1 +0,0 @@
1
-29ce44dbba55365cfde6500e07c1af1e99992622

BIN
DSLink_Test/DSLink_Test/obj/Test/netcoreapp3.1/DSLink_Test.assets.cache View File


+ 0
- 67
DSLink_Test/DSLink_Test/obj/project.assets.json View File

@@ -1,67 +0,0 @@
1
-{
2
-  "version": 3,
3
-  "targets": {
4
-    ".NETCoreApp,Version=v3.1": {}
5
-  },
6
-  "libraries": {},
7
-  "projectFileDependencyGroups": {
8
-    ".NETCoreApp,Version=v3.1": []
9
-  },
10
-  "packageFolders": {
11
-    "C:\\Users\\l.farina\\.nuget\\packages\\": {}
12
-  },
13
-  "project": {
14
-    "version": "1.0.0",
15
-    "restore": {
16
-      "projectUniqueName": "C:\\Users\\l.farina\\Desktop\\UCRM_stage\\DSLink_Test\\DSLink_Test\\DSLink_Test.csproj",
17
-      "projectName": "DSLink_Test",
18
-      "projectPath": "C:\\Users\\l.farina\\Desktop\\UCRM_stage\\DSLink_Test\\DSLink_Test\\DSLink_Test.csproj",
19
-      "packagesPath": "C:\\Users\\l.farina\\.nuget\\packages\\",
20
-      "outputPath": "C:\\Users\\l.farina\\Desktop\\UCRM_stage\\DSLink_Test\\DSLink_Test\\obj\\",
21
-      "projectStyle": "PackageReference",
22
-      "configFilePaths": [
23
-        "C:\\Users\\l.farina\\AppData\\Roaming\\NuGet\\NuGet.Config",
24
-        "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
25
-      ],
26
-      "originalTargetFrameworks": [
27
-        "netcoreapp3.1"
28
-      ],
29
-      "sources": {
30
-        "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
31
-        "https://api.nuget.org/v3/index.json": {}
32
-      },
33
-      "frameworks": {
34
-        "netcoreapp3.1": {
35
-          "targetAlias": "netcoreapp3.1",
36
-          "projectReferences": {}
37
-        }
38
-      },
39
-      "warningProperties": {
40
-        "warnAsError": [
41
-          "NU1605"
42
-        ]
43
-      }
44
-    },
45
-    "frameworks": {
46
-      "netcoreapp3.1": {
47
-        "targetAlias": "netcoreapp3.1",
48
-        "imports": [
49
-          "net461",
50
-          "net462",
51
-          "net47",
52
-          "net471",
53
-          "net472",
54
-          "net48"
55
-        ],
56
-        "assetTargetFallback": true,
57
-        "warn": true,
58
-        "frameworkReferences": {
59
-          "Microsoft.NETCore.App": {
60
-            "privateAssets": "all"
61
-          }
62
-        },
63
-        "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.301\\RuntimeIdentifierGraph.json"
64
-      }
65
-    }
66
-  }
67
-}

+ 0
- 8
DSLink_Test/DSLink_Test/obj/project.nuget.cache View File

@@ -1,8 +0,0 @@
1
-{
2
-  "version": 2,
3
-  "dgSpecHash": "1CII1sNVoGsMIQceS0aY95FTrlNLrDyIPckFdr+/8fyJTQfXUpQ/mVUsQed4bcDNBOxbdzuTUwf5lQTJvNB7rA==",
4
-  "success": true,
5
-  "projectFilePath": "C:\\Users\\l.farina\\Desktop\\UCRM_stage\\DSLink_Test\\DSLink_Test\\DSLink_Test.csproj",
6
-  "expectedPackageFiles": [],
7
-  "logs": []
8
-}

BIN
RSTP_DSLink/.vs/RSTP_DSLink/v16/.suo View File


DSLink_Test/DSLink_Test.sln → RSTP_DSLink/RSTP_DSLink.sln View File

@@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
3 3
 # Visual Studio Version 16
4 4
 VisualStudioVersion = 16.0.31424.327
5 5
 MinimumVisualStudioVersion = 10.0.40219.1
6
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DSLink_Test", "DSLink_Test\DSLink_Test.csproj", "{21A60B53-3AD5-4DBE-8247-C6C4CAA5436B}"
6
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RSTP_DSLink", "RSTP_DSLink\RSTP_DSLink.csproj", "{2159D007-8C77-42E2-807A-CFB57271BC47}"
7
+EndProject
8
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3A28B0FE-3B23-4A29-9D4F-D3AD9417FF14}"
7 9
 EndProject
8 10
 Global
9 11
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,15 +13,15 @@ Global
11 13
 		Release|Any CPU = Release|Any CPU
12 14
 	EndGlobalSection
13 15
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
14
-		{21A60B53-3AD5-4DBE-8247-C6C4CAA5436B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15
-		{21A60B53-3AD5-4DBE-8247-C6C4CAA5436B}.Debug|Any CPU.Build.0 = Debug|Any CPU
16
-		{21A60B53-3AD5-4DBE-8247-C6C4CAA5436B}.Release|Any CPU.ActiveCfg = Release|Any CPU
17
-		{21A60B53-3AD5-4DBE-8247-C6C4CAA5436B}.Release|Any CPU.Build.0 = Release|Any CPU
16
+		{2159D007-8C77-42E2-807A-CFB57271BC47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17
+		{2159D007-8C77-42E2-807A-CFB57271BC47}.Debug|Any CPU.Build.0 = Debug|Any CPU
18
+		{2159D007-8C77-42E2-807A-CFB57271BC47}.Release|Any CPU.ActiveCfg = Release|Any CPU
19
+		{2159D007-8C77-42E2-807A-CFB57271BC47}.Release|Any CPU.Build.0 = Release|Any CPU
18 20
 	EndGlobalSection
19 21
 	GlobalSection(SolutionProperties) = preSolution
20 22
 		HideSolutionNode = FALSE
21 23
 	EndGlobalSection
22 24
 	GlobalSection(ExtensibilityGlobals) = postSolution
23
-		SolutionGuid = {85B9784F-6A1C-4696-820D-E32D7F4FF0EA}
25
+		SolutionGuid = {C77C46E8-EE7F-49DF-8262-001263A7262B}
24 26
 	EndGlobalSection
25 27
 EndGlobal

+ 65
- 0
RSTP_DSLink/RSTP_DSLink/CommandLineArguments.cs View File

@@ -0,0 +1,65 @@
1
+using CommandLine;
2
+
3
+namespace RTSP_DSLink
4
+{
5
+    public enum LogLevel
6
+    {
7
+        Unspecified = -1,
8
+        Info,
9
+        Debug,
10
+        Warning,
11
+        Error
12
+    }
13
+
14
+    /// <summary>
15
+    /// This class represents the complete of set of all possible command line options
16
+    /// used not only by DSLink SDK but the calling program itself
17
+    /// 
18
+    /// It makes use of the CommandLineParser nuget package to supply attributes to the various
19
+    /// class members.  Those attributes are then used by the parser.
20
+    /// </summary>
21
+    public class CommandLineArguments
22
+    {
23
+        [Option('b', "broker",
24
+            Required = false,
25
+            HelpText = "The connection to the DSA Broker")]
26
+        public string BrokerUrl { get; set; }
27
+
28
+        [Option('n', "name",
29
+            Required = true,
30
+            HelpText = "The display name of the DSLink within the Broker")]
31
+        public string LinkName { get; set; }
32
+
33
+        [Option('l', "log",
34
+            Required = false,
35
+            Default = LogLevel.Unspecified,
36
+            HelpText = "The log level for log messages")]
37
+        public LogLevel LogLevel { get; set; }
38
+
39
+        [Option('f', "log-file",
40
+            Required = false,
41
+            HelpText =
42
+                "The folder ending with the Path.DirectorySeparatorChar specifying the location for log files to be written")]
43
+        public string LogFileFolder { get; set; }
44
+
45
+        [Option('o', "nodes",
46
+            Required = false,
47
+            HelpText = "The filename containing the DSLink nodes")]
48
+        public string NodesFileName { get; set; }
49
+
50
+        [Option('t', "token",
51
+            Required = false,
52
+            HelpText = "The security token for the connection to the Broker")]
53
+        public string Token { get; set; }
54
+
55
+        [Option('k', "key",
56
+            Required = false,
57
+            HelpText = "The path for the stored key")]
58
+        public string KeysFolder { get; set; }
59
+
60
+        [Option('d', "dslink-json",
61
+            Required = false,
62
+            HelpText = "The alternate filename containing the contents of dslink.json")]
63
+        public string DSLinkJsonFilename { get; set; }
64
+    }
65
+}

DSLink_Test/DSLink_Test/bin/Debug/netcoreapp3.1/DSLink.dll → RSTP_DSLink/RSTP_DSLink/DSLink.dll View File


+ 348
- 0
RSTP_DSLink/RSTP_DSLink/RSTP_DSLink.cs View File

@@ -0,0 +1,348 @@
1
+using DSLink;
2
+using DSLink.Nodes;
3
+using DSLink.Nodes.Actions;
4
+using DSLink.Request;
5
+using Newtonsoft.Json.Linq;
6
+using System;
7
+using System.Collections.Generic;
8
+using System.Threading;
9
+using System.Threading.Tasks;
10
+using Serilog;
11
+using CommandLine;
12
+using System.IO;
13
+using RTSP_DSLink;
14
+
15
+namespace RTSP_DSLink
16
+{
17
+    public class RSTP_DSLink : DSLinkContainer
18
+    {
19
+        private readonly Dictionary<string, Node> _rngValues;
20
+        private readonly Random _random;
21
+        private readonly Thread _randomNumberThread;
22
+
23
+        private static void Main(string[] args)
24
+        {
25
+            Parser.Default.ParseArguments<CommandLineArguments>(args)
26
+                .WithParsed(cmdLineOptions =>
27
+                {
28
+                    cmdLineOptions = ProcessDSLinkJson(cmdLineOptions);
29
+
30
+                    //Init the logging engine
31
+                    InitializeLogging(cmdLineOptions);
32
+
33
+                    //Construct a link Configuration
34
+                    var config = new Configuration(cmdLineOptions.LinkName, true, true);
35
+
36
+                    //Construct our custom link
37
+                    var dslink = new RSTP_DSLink(config, cmdLineOptions);
38
+
39
+                    InitializeLink(dslink).Wait();
40
+                })
41
+                .WithNotParsed(errors => { Environment.Exit(-1); });
42
+
43
+            while (true)
44
+            {
45
+                Thread.Sleep(1000);
46
+            }
47
+        }
48
+
49
+        public static async Task InitializeLink(RSTP_DSLink dsLink)
50
+        {
51
+            await dsLink.Connect();
52
+            await dsLink.SaveNodes();
53
+        }
54
+
55
+        public RSTP_DSLink(Configuration config, CommandLineArguments cmdLineOptions) : base(config)
56
+        {
57
+            //Perform any configuration overrides from command line options
58
+            if (cmdLineOptions.BrokerUrl != null)
59
+            {
60
+                config.BrokerUrl = cmdLineOptions.BrokerUrl;
61
+            }
62
+
63
+            if (cmdLineOptions.Token != null)
64
+            {
65
+                config.Token = cmdLineOptions.Token;
66
+            }
67
+
68
+            if (cmdLineOptions.NodesFileName != null)
69
+            {
70
+                config.NodesFilename = cmdLineOptions.NodesFileName;
71
+            }
72
+
73
+            if (cmdLineOptions.KeysFolder != null)
74
+            {
75
+                config.KeysFolder = cmdLineOptions.KeysFolder;
76
+            }
77
+
78
+            _rngValues = new Dictionary<string, Node>();
79
+            _random = new Random();
80
+
81
+            Responder.AddNodeClass("rngAdd", delegate(Node node)
82
+            {
83
+                node.Configs.Set(ConfigType.DisplayName, new Value("Create RNG"));
84
+                node.AddParameter(new Parameter
85
+                {
86
+                    Name = "rngName",
87
+                    ValueType = DSLink.Nodes.ValueType.String
88
+                });
89
+                node.SetAction(new ActionHandler(Permission.Config, _createRngAction));
90
+            });
91
+
92
+            Responder.AddNodeClass("rng", delegate(Node node)
93
+            {
94
+                node.Configs.Set(ConfigType.Writable, new Value(Permission.Read.Permit));
95
+                node.Configs.Set(ConfigType.ValueType, DSLink.Nodes.ValueType.Number.TypeValue);
96
+                node.Value.Set(0);
97
+
98
+                lock (_rngValues)
99
+                {
100
+                    _rngValues.Add(node.Name, node);
101
+                }
102
+            });
103
+
104
+            Responder.AddNodeClass("number", delegate (Node node)
105
+            {
106
+                node.Configs.Set(ConfigType.Writable, new Value(Permission.Read.Permit));
107
+                node.Configs.Set(ConfigType.ValueType, DSLink.Nodes.ValueType.Number.TypeValue);
108
+                node.Value.Set(0);
109
+            });
110
+
111
+            _randomNumberThread = new Thread(_updateRandomNumbers);
112
+            _randomNumberThread.Start();
113
+        }
114
+
115
+        public override void InitializeDefaultNodes()
116
+        {
117
+            Responder.SuperRoot.CreateChild("createRNG", "rngAdd").BuildNode();
118
+        }
119
+
120
+        private void _updateRandomNumbers()
121
+        {
122
+            while (Thread.CurrentThread.IsAlive)
123
+            {
124
+                lock (_rngValues)
125
+                {
126
+                    foreach (var n in _rngValues)
127
+                    {
128
+                        Node minChild, maxChild;
129
+                        n.Value.Children.TryGetValue("min", out minChild);
130
+                        n.Value.Children.TryGetValue("max", out maxChild);
131
+                        //Si les enfants ne sont pas initialisés, on met les valeurs de min et max à 0
132
+                        // Code équivalent à :
133
+                        //int min, max;
134
+                        //if (minChild != null) {
135
+                        //    min = minChild.Value.Int;
136
+                        //}
137
+                        //else {
138
+                        //    min = 0;
139
+                        //}
140
+                        //if (maxChild != null) {
141
+                        //    max = maxChild.Value.Int;
142
+                        //}
143
+                        //else {
144
+                        //    max = 0;
145
+                        //}
146
+                        int min = (minChild != null ? minChild.Value.Int : 0);
147
+                        int max = (maxChild != null ? maxChild.Value.Int : 0);
148
+
149
+                       n.Value.Value.Set(_random.Next(min, max+1));
150
+                    }
151
+                }
152
+                
153
+                Thread.Sleep(10000);
154
+            }
155
+        }
156
+
157
+        private async void _createRngAction(InvokeRequest request)
158
+        {
159
+            var rngName = request.Parameters["rngName"].Value<string>();
160
+            if (string.IsNullOrEmpty(rngName)) return;
161
+            if (Responder.SuperRoot.Children.ContainsKey(rngName)) return;
162
+
163
+            var newRng = Responder.SuperRoot.CreateChild(rngName, "rng").BuildNode();
164
+            newRng.CreateChild("min", "number").BuildNode();
165
+            newRng.CreateChild("max", "number").BuildNode();
166
+
167
+            await request.Close();
168
+            await SaveNodes();
169
+        }
170
+
171
+        #region Initialize Logging
172
+
173
+        /// <summary>
174
+        /// This method initializes the logging engine.  In this case Serilog is used, but you
175
+        /// may use a variety of logging engines so long as they are compatible with
176
+        /// Liblog (the interface used by the DSLink SDK)
177
+        /// </summary>
178
+        /// <param name="cmdLineOptions"></param>
179
+        private static void InitializeLogging(CommandLineArguments cmdLineOptions)
180
+        {
181
+            if (cmdLineOptions.LogFileFolder != null &&
182
+                !cmdLineOptions.LogFileFolder.EndsWith(Path.DirectorySeparatorChar))
183
+            {
184
+                throw new ArgumentException($"Specified LogFileFolder must end with '{Path.DirectorySeparatorChar}'");
185
+            }
186
+
187
+            var logConfig = new LoggerConfiguration();
188
+            switch (cmdLineOptions.LogLevel)
189
+            {
190
+                case LogLevel.Debug:
191
+                    logConfig.MinimumLevel.Debug();
192
+                    break;
193
+
194
+                case LogLevel.Unspecified:
195
+                case LogLevel.Info:
196
+                    logConfig.MinimumLevel.Information();
197
+                    break;
198
+
199
+                case LogLevel.Warning:
200
+                    logConfig.MinimumLevel.Warning();
201
+                    break;
202
+
203
+                case LogLevel.Error:
204
+                    logConfig.MinimumLevel.Error();
205
+                    break;
206
+            }
207
+
208
+            logConfig.WriteTo.Console(
209
+                outputTemplate:
210
+                "{Timestamp:MM/dd/yyyy HH:mm:ss} {SourceContext} [{Level}] {Message}{NewLine}{Exception}");
211
+            logConfig.WriteTo.Logger(lc =>
212
+            {
213
+                lc.WriteTo.RollingFile(cmdLineOptions.LogFileFolder + "log-{Date}.txt", retainedFileCountLimit: 3);
214
+            });
215
+            Log.Logger = logConfig.CreateLogger();
216
+        }
217
+
218
+        #endregion
219
+
220
+        #region dslink-json file processing
221
+
222
+        /// <summary>
223
+        /// This method will return an instance of CommandLineArguments build with the following logic rules.
224
+        /// The file dslink.json can be utilized to specifiy command line arguments.  These live within the config block
225
+        /// of the file.  Here is an example:
226
+        ///         ...
227
+        ///         "configs" : {
228
+        ///                 "broker" : {
229
+        ///                     "type": "url",
230
+        ///                     "value":  "mybroker",
231
+        ///                     "default": "http:localhost:8080\conn"
232
+        ///                 },
233
+        ///              }
234
+        /// 
235
+        /// The code in this method considers only the attribute's name ("broker") and value ("mybroker") in this example).
236
+        /// "type" and "default" are not used.
237
+        /// 
238
+        /// The receives an instance of CommandLineArguments previously built from the parser.  If the dslink-json paramater
239
+        /// is not null the code will use the value specified rather than the default value of "dslink.json" for the file
240
+        /// to read containing the information.
241
+        /// 
242
+        /// Options specified on the command line wins out over those specified in the file.
243
+        /// 
244
+        /// </summary>
245
+        /// <param name="cmdLineOptions"></param>
246
+        /// <returns></returns>
247
+        private static CommandLineArguments ProcessDSLinkJson(CommandLineArguments cmdLineOptions)
248
+        {
249
+            bool errorIfNotFound = false;
250
+            string fileName = "dslink.json";
251
+
252
+            //If filename is specified then error if it is not found
253
+            if (!String.IsNullOrEmpty(cmdLineOptions.DSLinkJsonFilename))
254
+            {
255
+                errorIfNotFound = true;
256
+                fileName = cmdLineOptions.DSLinkJsonFilename;
257
+            }
258
+
259
+            string fileData = "";
260
+            if (File.Exists(fileName))
261
+            {
262
+                fileData = File.ReadAllText(fileName);
263
+                Console.WriteLine(
264
+                    $"Will use a combination of options specified from the command line and those specified in {fileName}");
265
+            }
266
+            else
267
+            {
268
+                if (errorIfNotFound == true)
269
+                {
270
+                    throw new ArgumentException($"Specified dslink-json file <{fileName}> was not found");
271
+                }
272
+                else
273
+                {
274
+                    return cmdLineOptions;
275
+                }
276
+            }
277
+
278
+            JObject dslinkJson = JObject.Parse(fileData);
279
+            var dsLinkJsonConfig = dslinkJson["configs"];
280
+
281
+            var cmdLineOptionsDslinkJson = new CommandLineArguments();
282
+
283
+            cmdLineOptionsDslinkJson.BrokerUrl =
284
+                GetDsLinkStringValueForAttributeName(dsLinkJsonConfig, "broker", cmdLineOptions.BrokerUrl);
285
+            cmdLineOptionsDslinkJson.LinkName =
286
+                GetDsLinkStringValueForAttributeName(dsLinkJsonConfig, "name", cmdLineOptions.LinkName);
287
+            cmdLineOptionsDslinkJson.LogFileFolder =
288
+                GetDsLinkStringValueForAttributeName(dsLinkJsonConfig, "log-file", cmdLineOptions.LogFileFolder);
289
+            cmdLineOptionsDslinkJson.KeysFolder =
290
+                GetDsLinkStringValueForAttributeName(dsLinkJsonConfig, "key", cmdLineOptions.KeysFolder);
291
+            cmdLineOptionsDslinkJson.NodesFileName =
292
+                GetDsLinkStringValueForAttributeName(dsLinkJsonConfig, "nodes", cmdLineOptions.NodesFileName);
293
+            cmdLineOptionsDslinkJson.Token =
294
+                GetDsLinkStringValueForAttributeName(dsLinkJsonConfig, "token", cmdLineOptions.Token);
295
+            cmdLineOptionsDslinkJson.LogLevel = GetDsLinkLogLevel(dsLinkJsonConfig, cmdLineOptions.LogLevel);
296
+
297
+            return cmdLineOptionsDslinkJson;
298
+        }
299
+
300
+        private static LogLevel GetDsLinkLogLevel(JToken configObj, LogLevel logLevel)
301
+        {
302
+            if (logLevel != LogLevel.Unspecified)
303
+            {
304
+                return logLevel;
305
+            }
306
+
307
+            string testString = "";
308
+            try
309
+            {
310
+                testString = configObj["log"]["value"].ToString();
311
+            }
312
+            catch
313
+            {
314
+            }
315
+
316
+            ;
317
+
318
+            LogLevel useLogLevel = LogLevel.Info;
319
+            if (!Enum.TryParse(testString, out useLogLevel))
320
+            {
321
+                throw new ArgumentException("Invalid 'value' specified for 'log' value in dslink-json file");
322
+            }
323
+
324
+            return useLogLevel;
325
+        }
326
+
327
+        private static string GetDsLinkStringValueForAttributeName(JToken configObj, string attributeName,
328
+            string cmdLineValue)
329
+        {
330
+            //use cmdLineValue if specified else attempt to use the one from the dslink-json
331
+            if (cmdLineValue != null)
332
+            {
333
+                return cmdLineValue;
334
+            }
335
+
336
+            try
337
+            {
338
+                return configObj[attributeName]["value"].ToString();
339
+            }
340
+            catch
341
+            {
342
+                return null;
343
+            }
344
+        }
345
+
346
+        #endregion processingq
347
+    }
348
+}

+ 33
- 0
RSTP_DSLink/RSTP_DSLink/RSTP_DSLink.csproj View File

@@ -0,0 +1,33 @@
1
+<Project Sdk="Microsoft.NET.Sdk">
2
+
3
+  <PropertyGroup>
4
+    <OutputType>Exe</OutputType>
5
+    <TargetFramework>netcoreapp3.1</TargetFramework>
6
+  </PropertyGroup>
7
+
8
+  <ItemGroup>
9
+    <PackageReference Include="CommandLineParser" Version="2.8.0" />
10
+    <PackageReference Include="LibLog" Version="5.0.8">
11
+      <PrivateAssets>all</PrivateAssets>
12
+      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
13
+    </PackageReference>
14
+    <PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
15
+    <PackageReference Include="MsgPack.Cli" Version="1.0.1" />
16
+    <PackageReference Include="NETStandard.Library" Version="2.0.3" />
17
+    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
18
+    <PackageReference Include="Portable.BouncyCastle" Version="1.8.10" />
19
+    <PackageReference Include="Serilog" Version="2.10.0" />
20
+    <PackageReference Include="Serilog.Sinks.Console" Version="4.0.0" />
21
+    <PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
22
+    <PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
23
+    <PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.0" />
24
+    <PackageReference Include="StandardStorage" Version="0.1.1" />
25
+  </ItemGroup>
26
+
27
+  <ItemGroup>
28
+    <Reference Include="DSLink">
29
+      <HintPath>DSLink.dll</HintPath>
30
+    </Reference>
31
+  </ItemGroup>
32
+
33
+</Project>

BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/BouncyCastle.Crypto.dll View File


BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/CommandLine.dll View File


DSLink_Test/DSLink_Test/DSLink.dll → RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/DSLink.dll View File


BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/MsgPack.dll View File


BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Newtonsoft.Json.dll View File


+ 578
- 0
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.deps.json View File

@@ -0,0 +1,578 @@
1
+{
2
+  "runtimeTarget": {
3
+    "name": ".NETCoreApp,Version=v3.1",
4
+    "signature": ""
5
+  },
6
+  "compilationOptions": {},
7
+  "targets": {
8
+    ".NETCoreApp,Version=v3.1": {
9
+      "RSTP_DSLink/1.0.0": {
10
+        "dependencies": {
11
+          "CommandLineParser": "2.8.0",
12
+          "LibLog": "5.0.8",
13
+          "Microsoft.CSharp": "4.7.0",
14
+          "MsgPack.Cli": "1.0.1",
15
+          "NETStandard.Library": "2.0.3",
16
+          "Newtonsoft.Json": "13.0.1",
17
+          "Portable.BouncyCastle": "1.8.10",
18
+          "Serilog": "2.10.0",
19
+          "Serilog.Sinks.Console": "4.0.0",
20
+          "Serilog.Sinks.Debug": "2.0.0",
21
+          "Serilog.Sinks.File": "5.0.0",
22
+          "Serilog.Sinks.RollingFile": "3.3.0",
23
+          "StandardStorage": "0.1.1",
24
+          "DSLink": "1.0.0.0"
25
+        },
26
+        "runtime": {
27
+          "RSTP_DSLink.dll": {}
28
+        }
29
+      },
30
+      "CommandLineParser/2.8.0": {
31
+        "runtime": {
32
+          "lib/netstandard2.0/CommandLine.dll": {
33
+            "assemblyVersion": "2.8.0.0",
34
+            "fileVersion": "2.8.0.0"
35
+          }
36
+        }
37
+      },
38
+      "LibLog/5.0.8": {},
39
+      "Microsoft.CSharp/4.7.0": {},
40
+      "Microsoft.NETCore.Platforms/2.0.0": {},
41
+      "Microsoft.NETCore.Targets/1.1.0": {},
42
+      "MsgPack.Cli/1.0.1": {
43
+        "dependencies": {
44
+          "System.CodeDom": "4.4.0",
45
+          "System.Numerics.Vectors": "4.3.0",
46
+          "System.Reflection.Emit": "4.3.0",
47
+          "System.Reflection.Emit.Lightweight": "4.3.0"
48
+        },
49
+        "runtime": {
50
+          "lib/netstandard2.0/MsgPack.dll": {
51
+            "assemblyVersion": "1.0.0.0",
52
+            "fileVersion": "1.0.228.0"
53
+          }
54
+        }
55
+      },
56
+      "NETStandard.Library/2.0.3": {
57
+        "dependencies": {
58
+          "Microsoft.NETCore.Platforms": "2.0.0"
59
+        }
60
+      },
61
+      "Newtonsoft.Json/13.0.1": {
62
+        "runtime": {
63
+          "lib/netstandard2.0/Newtonsoft.Json.dll": {
64
+            "assemblyVersion": "13.0.0.0",
65
+            "fileVersion": "13.0.1.25517"
66
+          }
67
+        }
68
+      },
69
+      "Portable.BouncyCastle/1.8.10": {
70
+        "runtime": {
71
+          "lib/netstandard2.0/BouncyCastle.Crypto.dll": {
72
+            "assemblyVersion": "1.8.10.0",
73
+            "fileVersion": "1.8.10.1"
74
+          }
75
+        }
76
+      },
77
+      "Serilog/2.10.0": {
78
+        "runtime": {
79
+          "lib/netstandard2.1/Serilog.dll": {
80
+            "assemblyVersion": "2.0.0.0",
81
+            "fileVersion": "2.10.0.0"
82
+          }
83
+        }
84
+      },
85
+      "Serilog.Sinks.Console/4.0.0": {
86
+        "dependencies": {
87
+          "Serilog": "2.10.0"
88
+        },
89
+        "runtime": {
90
+          "lib/netstandard2.0/Serilog.Sinks.Console.dll": {
91
+            "assemblyVersion": "4.0.0.0",
92
+            "fileVersion": "4.0.0.0"
93
+          }
94
+        }
95
+      },
96
+      "Serilog.Sinks.Debug/2.0.0": {
97
+        "dependencies": {
98
+          "Serilog": "2.10.0"
99
+        },
100
+        "runtime": {
101
+          "lib/netstandard2.1/Serilog.Sinks.Debug.dll": {
102
+            "assemblyVersion": "2.0.0.0",
103
+            "fileVersion": "2.0.0.0"
104
+          }
105
+        }
106
+      },
107
+      "Serilog.Sinks.File/5.0.0": {
108
+        "dependencies": {
109
+          "Serilog": "2.10.0"
110
+        },
111
+        "runtime": {
112
+          "lib/netstandard2.1/Serilog.Sinks.File.dll": {
113
+            "assemblyVersion": "5.0.0.0",
114
+            "fileVersion": "5.0.0.0"
115
+          }
116
+        }
117
+      },
118
+      "Serilog.Sinks.RollingFile/3.3.0": {
119
+        "dependencies": {
120
+          "Serilog.Sinks.File": "5.0.0",
121
+          "System.IO": "4.3.0",
122
+          "System.IO.FileSystem.Primitives": "4.0.1",
123
+          "System.Runtime.InteropServices": "4.1.0",
124
+          "System.Text.Encoding.Extensions": "4.0.11"
125
+        },
126
+        "runtime": {
127
+          "lib/netstandard1.3/Serilog.Sinks.RollingFile.dll": {
128
+            "assemblyVersion": "2.0.0.0",
129
+            "fileVersion": "3.3.0.0"
130
+          }
131
+        }
132
+      },
133
+      "StandardStorage/0.1.1": {
134
+        "dependencies": {
135
+          "System.Security.Permissions": "4.4.1"
136
+        },
137
+        "runtime": {
138
+          "lib/netstandard2.0/StandardStorage.dll": {
139
+            "assemblyVersion": "1.0.0.0",
140
+            "fileVersion": "1.0.0.0"
141
+          }
142
+        }
143
+      },
144
+      "System.CodeDom/4.4.0": {
145
+        "runtime": {
146
+          "lib/netstandard2.0/System.CodeDom.dll": {
147
+            "assemblyVersion": "4.0.0.0",
148
+            "fileVersion": "4.6.25519.3"
149
+          }
150
+        }
151
+      },
152
+      "System.Globalization/4.3.0": {
153
+        "dependencies": {
154
+          "Microsoft.NETCore.Platforms": "2.0.0",
155
+          "Microsoft.NETCore.Targets": "1.1.0",
156
+          "System.Runtime": "4.3.0"
157
+        }
158
+      },
159
+      "System.IO/4.3.0": {
160
+        "dependencies": {
161
+          "Microsoft.NETCore.Platforms": "2.0.0",
162
+          "Microsoft.NETCore.Targets": "1.1.0",
163
+          "System.Runtime": "4.3.0",
164
+          "System.Text.Encoding": "4.3.0",
165
+          "System.Threading.Tasks": "4.3.0"
166
+        }
167
+      },
168
+      "System.IO.FileSystem.Primitives/4.0.1": {
169
+        "dependencies": {
170
+          "System.Runtime": "4.3.0"
171
+        }
172
+      },
173
+      "System.Numerics.Vectors/4.3.0": {
174
+        "dependencies": {
175
+          "System.Globalization": "4.3.0",
176
+          "System.Resources.ResourceManager": "4.3.0",
177
+          "System.Runtime": "4.3.0",
178
+          "System.Runtime.Extensions": "4.3.0"
179
+        }
180
+      },
181
+      "System.Reflection/4.3.0": {
182
+        "dependencies": {
183
+          "Microsoft.NETCore.Platforms": "2.0.0",
184
+          "Microsoft.NETCore.Targets": "1.1.0",
185
+          "System.IO": "4.3.0",
186
+          "System.Reflection.Primitives": "4.3.0",
187
+          "System.Runtime": "4.3.0"
188
+        }
189
+      },
190
+      "System.Reflection.Emit/4.3.0": {
191
+        "dependencies": {
192
+          "System.IO": "4.3.0",
193
+          "System.Reflection": "4.3.0",
194
+          "System.Reflection.Emit.ILGeneration": "4.3.0",
195
+          "System.Reflection.Primitives": "4.3.0",
196
+          "System.Runtime": "4.3.0"
197
+        }
198
+      },
199
+      "System.Reflection.Emit.ILGeneration/4.3.0": {
200
+        "dependencies": {
201
+          "System.Reflection": "4.3.0",
202
+          "System.Reflection.Primitives": "4.3.0",
203
+          "System.Runtime": "4.3.0"
204
+        }
205
+      },
206
+      "System.Reflection.Emit.Lightweight/4.3.0": {
207
+        "dependencies": {
208
+          "System.Reflection": "4.3.0",
209
+          "System.Reflection.Emit.ILGeneration": "4.3.0",
210
+          "System.Reflection.Primitives": "4.3.0",
211
+          "System.Runtime": "4.3.0"
212
+        }
213
+      },
214
+      "System.Reflection.Primitives/4.3.0": {
215
+        "dependencies": {
216
+          "Microsoft.NETCore.Platforms": "2.0.0",
217
+          "Microsoft.NETCore.Targets": "1.1.0",
218
+          "System.Runtime": "4.3.0"
219
+        }
220
+      },
221
+      "System.Resources.ResourceManager/4.3.0": {
222
+        "dependencies": {
223
+          "Microsoft.NETCore.Platforms": "2.0.0",
224
+          "Microsoft.NETCore.Targets": "1.1.0",
225
+          "System.Globalization": "4.3.0",
226
+          "System.Reflection": "4.3.0",
227
+          "System.Runtime": "4.3.0"
228
+        }
229
+      },
230
+      "System.Runtime/4.3.0": {
231
+        "dependencies": {
232
+          "Microsoft.NETCore.Platforms": "2.0.0",
233
+          "Microsoft.NETCore.Targets": "1.1.0"
234
+        }
235
+      },
236
+      "System.Runtime.Extensions/4.3.0": {
237
+        "dependencies": {
238
+          "Microsoft.NETCore.Platforms": "2.0.0",
239
+          "Microsoft.NETCore.Targets": "1.1.0",
240
+          "System.Runtime": "4.3.0"
241
+        }
242
+      },
243
+      "System.Runtime.Handles/4.0.1": {
244
+        "dependencies": {
245
+          "Microsoft.NETCore.Platforms": "2.0.0",
246
+          "Microsoft.NETCore.Targets": "1.1.0",
247
+          "System.Runtime": "4.3.0"
248
+        }
249
+      },
250
+      "System.Runtime.InteropServices/4.1.0": {
251
+        "dependencies": {
252
+          "Microsoft.NETCore.Platforms": "2.0.0",
253
+          "Microsoft.NETCore.Targets": "1.1.0",
254
+          "System.Reflection": "4.3.0",
255
+          "System.Reflection.Primitives": "4.3.0",
256
+          "System.Runtime": "4.3.0",
257
+          "System.Runtime.Handles": "4.0.1"
258
+        }
259
+      },
260
+      "System.Security.AccessControl/4.4.0": {
261
+        "dependencies": {
262
+          "Microsoft.NETCore.Platforms": "2.0.0",
263
+          "System.Security.Principal.Windows": "4.4.0"
264
+        }
265
+      },
266
+      "System.Security.Permissions/4.4.1": {
267
+        "dependencies": {
268
+          "System.Security.AccessControl": "4.4.0"
269
+        },
270
+        "runtime": {
271
+          "lib/netstandard2.0/System.Security.Permissions.dll": {
272
+            "assemblyVersion": "4.0.0.0",
273
+            "fileVersion": "4.6.25921.2"
274
+          }
275
+        }
276
+      },
277
+      "System.Security.Principal.Windows/4.4.0": {
278
+        "dependencies": {
279
+          "Microsoft.NETCore.Platforms": "2.0.0"
280
+        }
281
+      },
282
+      "System.Text.Encoding/4.3.0": {
283
+        "dependencies": {
284
+          "Microsoft.NETCore.Platforms": "2.0.0",
285
+          "Microsoft.NETCore.Targets": "1.1.0",
286
+          "System.Runtime": "4.3.0"
287
+        }
288
+      },
289
+      "System.Text.Encoding.Extensions/4.0.11": {
290
+        "dependencies": {
291
+          "Microsoft.NETCore.Platforms": "2.0.0",
292
+          "Microsoft.NETCore.Targets": "1.1.0",
293
+          "System.Runtime": "4.3.0",
294
+          "System.Text.Encoding": "4.3.0"
295
+        }
296
+      },
297
+      "System.Threading.Tasks/4.3.0": {
298
+        "dependencies": {
299
+          "Microsoft.NETCore.Platforms": "2.0.0",
300
+          "Microsoft.NETCore.Targets": "1.1.0",
301
+          "System.Runtime": "4.3.0"
302
+        }
303
+      },
304
+      "DSLink/1.0.0.0": {
305
+        "runtime": {
306
+          "DSLink.dll": {
307
+            "assemblyVersion": "1.0.0.0",
308
+            "fileVersion": "1.0.0.0"
309
+          }
310
+        }
311
+      }
312
+    }
313
+  },
314
+  "libraries": {
315
+    "RSTP_DSLink/1.0.0": {
316
+      "type": "project",
317
+      "serviceable": false,
318
+      "sha512": ""
319
+    },
320
+    "CommandLineParser/2.8.0": {
321
+      "type": "package",
322
+      "serviceable": true,
323
+      "sha512": "sha512-eco2HlKQBY4Joz9odHigzGpVzv6pjsXnY5lziioMveQxr+i2Z7xYcIOMeZTgYiqnMtMAbXMXsVhrNfWO5vJS8Q==",
324
+      "path": "commandlineparser/2.8.0",
325
+      "hashPath": "commandlineparser.2.8.0.nupkg.sha512"
326
+    },
327
+    "LibLog/5.0.8": {
328
+      "type": "package",
329
+      "serviceable": true,
330
+      "sha512": "sha512-kRbiSI/lNkGgRr4d4iy8fmjRcolOSnPUjxfuV1QK9S4IOdEOLJf8ofc1ob6XP5+GQONJfEKMEWitL/ezxdG4GQ==",
331
+      "path": "liblog/5.0.8",
332
+      "hashPath": "liblog.5.0.8.nupkg.sha512"
333
+    },
334
+    "Microsoft.CSharp/4.7.0": {
335
+      "type": "package",
336
+      "serviceable": true,
337
+      "sha512": "sha512-pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==",
338
+      "path": "microsoft.csharp/4.7.0",
339
+      "hashPath": "microsoft.csharp.4.7.0.nupkg.sha512"
340
+    },
341
+    "Microsoft.NETCore.Platforms/2.0.0": {
342
+      "type": "package",
343
+      "serviceable": true,
344
+      "sha512": "sha512-VdLJOCXhZaEMY7Hm2GKiULmn7IEPFE4XC5LPSfBVCUIA8YLZVh846gtfBJalsPQF2PlzdD7ecX7DZEulJ402ZQ==",
345
+      "path": "microsoft.netcore.platforms/2.0.0",
346
+      "hashPath": "microsoft.netcore.platforms.2.0.0.nupkg.sha512"
347
+    },
348
+    "Microsoft.NETCore.Targets/1.1.0": {
349
+      "type": "package",
350
+      "serviceable": true,
351
+      "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
352
+      "path": "microsoft.netcore.targets/1.1.0",
353
+      "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
354
+    },
355
+    "MsgPack.Cli/1.0.1": {
356
+      "type": "package",
357
+      "serviceable": true,
358
+      "sha512": "sha512-od0WujAAuPuRLoGfGNfE2iRPP7Kj+o174Oed2uirT03/Dp4rkccnEIqQl/QRHjly79sMwh6xKaIVsLqYwWtiHA==",
359
+      "path": "msgpack.cli/1.0.1",
360
+      "hashPath": "msgpack.cli.1.0.1.nupkg.sha512"
361
+    },
362
+    "NETStandard.Library/2.0.3": {
363
+      "type": "package",
364
+      "serviceable": true,
365
+      "sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
366
+      "path": "netstandard.library/2.0.3",
367
+      "hashPath": "netstandard.library.2.0.3.nupkg.sha512"
368
+    },
369
+    "Newtonsoft.Json/13.0.1": {
370
+      "type": "package",
371
+      "serviceable": true,
372
+      "sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
373
+      "path": "newtonsoft.json/13.0.1",
374
+      "hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
375
+    },
376
+    "Portable.BouncyCastle/1.8.10": {
377
+      "type": "package",
378
+      "serviceable": true,
379
+      "sha512": "sha512-XLhjNAwuVB9ynwn11l5K44eyozh8q6gFseTrlnLNttejimglX7+F9+vxh60LPjvA/DAt6fUdS43N3ah8K6eaWg==",
380
+      "path": "portable.bouncycastle/1.8.10",
381
+      "hashPath": "portable.bouncycastle.1.8.10.nupkg.sha512"
382
+    },
383
+    "Serilog/2.10.0": {
384
+      "type": "package",
385
+      "serviceable": true,
386
+      "sha512": "sha512-+QX0hmf37a0/OZLxM3wL7V6/ADvC1XihXN4Kq/p6d8lCPfgkRdiuhbWlMaFjR9Av0dy5F0+MBeDmDdRZN/YwQA==",
387
+      "path": "serilog/2.10.0",
388
+      "hashPath": "serilog.2.10.0.nupkg.sha512"
389
+    },
390
+    "Serilog.Sinks.Console/4.0.0": {
391
+      "type": "package",
392
+      "serviceable": true,
393
+      "sha512": "sha512-yJQit9sTJ4xGLKgCujqDJsaGqBNJwGB/H898z+xYlMG06twy4//6LLnSrsmpduZxcHIG4im7cv+JmXLzXz2EkQ==",
394
+      "path": "serilog.sinks.console/4.0.0",
395
+      "hashPath": "serilog.sinks.console.4.0.0.nupkg.sha512"
396
+    },
397
+    "Serilog.Sinks.Debug/2.0.0": {
398
+      "type": "package",
399
+      "serviceable": true,
400
+      "sha512": "sha512-Y6g3OBJ4JzTyyw16fDqtFcQ41qQAydnEvEqmXjhwhgjsnG/FaJ8GUqF5ldsC/bVkK8KYmqrPhDO+tm4dF6xx4A==",
401
+      "path": "serilog.sinks.debug/2.0.0",
402
+      "hashPath": "serilog.sinks.debug.2.0.0.nupkg.sha512"
403
+    },
404
+    "Serilog.Sinks.File/5.0.0": {
405
+      "type": "package",
406
+      "serviceable": true,
407
+      "sha512": "sha512-uwV5hdhWPwUH1szhO8PJpFiahqXmzPzJT/sOijH/kFgUx+cyoDTMM8MHD0adw9+Iem6itoibbUXHYslzXsLEAg==",
408
+      "path": "serilog.sinks.file/5.0.0",
409
+      "hashPath": "serilog.sinks.file.5.0.0.nupkg.sha512"
410
+    },
411
+    "Serilog.Sinks.RollingFile/3.3.0": {
412
+      "type": "package",
413
+      "serviceable": true,
414
+      "sha512": "sha512-2lT5X1r3GH4P0bRWJfhA7etGl8Q2Ipw9AACvtAHWRUSpYZ42NGVyHoVs2ALBZ/cAkkS+tA4jl80Zie144eLQPg==",
415
+      "path": "serilog.sinks.rollingfile/3.3.0",
416
+      "hashPath": "serilog.sinks.rollingfile.3.3.0.nupkg.sha512"
417
+    },
418
+    "StandardStorage/0.1.1": {
419
+      "type": "package",
420
+      "serviceable": true,
421
+      "sha512": "sha512-zi7/3LSxFqCu0e+x5pMGprnuWkwD5G3ZFaDaWzV/kViB12iuVQIVrW03NxjzgcBf3Q5ZAp0l1DdFHSmKR6xBpw==",
422
+      "path": "standardstorage/0.1.1",
423
+      "hashPath": "standardstorage.0.1.1.nupkg.sha512"
424
+    },
425
+    "System.CodeDom/4.4.0": {
426
+      "type": "package",
427
+      "serviceable": true,
428
+      "sha512": "sha512-2sCCb7doXEwtYAbqzbF/8UAeDRMNmPaQbU2q50Psg1J9KzumyVVCgKQY8s53WIPTufNT0DpSe9QRvVjOzfDWBA==",
429
+      "path": "system.codedom/4.4.0",
430
+      "hashPath": "system.codedom.4.4.0.nupkg.sha512"
431
+    },
432
+    "System.Globalization/4.3.0": {
433
+      "type": "package",
434
+      "serviceable": true,
435
+      "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
436
+      "path": "system.globalization/4.3.0",
437
+      "hashPath": "system.globalization.4.3.0.nupkg.sha512"
438
+    },
439
+    "System.IO/4.3.0": {
440
+      "type": "package",
441
+      "serviceable": true,
442
+      "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
443
+      "path": "system.io/4.3.0",
444
+      "hashPath": "system.io.4.3.0.nupkg.sha512"
445
+    },
446
+    "System.IO.FileSystem.Primitives/4.0.1": {
447
+      "type": "package",
448
+      "serviceable": true,
449
+      "sha512": "sha512-kWkKD203JJKxJeE74p8aF8y4Qc9r9WQx4C0cHzHPrY3fv/L/IhWnyCHaFJ3H1QPOH6A93whlQ2vG5nHlBDvzWQ==",
450
+      "path": "system.io.filesystem.primitives/4.0.1",
451
+      "hashPath": "system.io.filesystem.primitives.4.0.1.nupkg.sha512"
452
+    },
453
+    "System.Numerics.Vectors/4.3.0": {
454
+      "type": "package",
455
+      "serviceable": true,
456
+      "sha512": "sha512-uAIqmwiQPPXdCz59MQcyHwsH2MzIv24VGCS54kP/1GzTRTuU3hazmiPnGUTlKFia4B1DnbLWjTHoGyTI5BMCTQ==",
457
+      "path": "system.numerics.vectors/4.3.0",
458
+      "hashPath": "system.numerics.vectors.4.3.0.nupkg.sha512"
459
+    },
460
+    "System.Reflection/4.3.0": {
461
+      "type": "package",
462
+      "serviceable": true,
463
+      "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
464
+      "path": "system.reflection/4.3.0",
465
+      "hashPath": "system.reflection.4.3.0.nupkg.sha512"
466
+    },
467
+    "System.Reflection.Emit/4.3.0": {
468
+      "type": "package",
469
+      "serviceable": true,
470
+      "sha512": "sha512-228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==",
471
+      "path": "system.reflection.emit/4.3.0",
472
+      "hashPath": "system.reflection.emit.4.3.0.nupkg.sha512"
473
+    },
474
+    "System.Reflection.Emit.ILGeneration/4.3.0": {
475
+      "type": "package",
476
+      "serviceable": true,
477
+      "sha512": "sha512-59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==",
478
+      "path": "system.reflection.emit.ilgeneration/4.3.0",
479
+      "hashPath": "system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512"
480
+    },
481
+    "System.Reflection.Emit.Lightweight/4.3.0": {
482
+      "type": "package",
483
+      "serviceable": true,
484
+      "sha512": "sha512-oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==",
485
+      "path": "system.reflection.emit.lightweight/4.3.0",
486
+      "hashPath": "system.reflection.emit.lightweight.4.3.0.nupkg.sha512"
487
+    },
488
+    "System.Reflection.Primitives/4.3.0": {
489
+      "type": "package",
490
+      "serviceable": true,
491
+      "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
492
+      "path": "system.reflection.primitives/4.3.0",
493
+      "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512"
494
+    },
495
+    "System.Resources.ResourceManager/4.3.0": {
496
+      "type": "package",
497
+      "serviceable": true,
498
+      "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
499
+      "path": "system.resources.resourcemanager/4.3.0",
500
+      "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512"
501
+    },
502
+    "System.Runtime/4.3.0": {
503
+      "type": "package",
504
+      "serviceable": true,
505
+      "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
506
+      "path": "system.runtime/4.3.0",
507
+      "hashPath": "system.runtime.4.3.0.nupkg.sha512"
508
+    },
509
+    "System.Runtime.Extensions/4.3.0": {
510
+      "type": "package",
511
+      "serviceable": true,
512
+      "sha512": "sha512-guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==",
513
+      "path": "system.runtime.extensions/4.3.0",
514
+      "hashPath": "system.runtime.extensions.4.3.0.nupkg.sha512"
515
+    },
516
+    "System.Runtime.Handles/4.0.1": {
517
+      "type": "package",
518
+      "serviceable": true,
519
+      "sha512": "sha512-nCJvEKguXEvk2ymk1gqj625vVnlK3/xdGzx0vOKicQkoquaTBJTP13AIYkocSUwHCLNBwUbXTqTWGDxBTWpt7g==",
520
+      "path": "system.runtime.handles/4.0.1",
521
+      "hashPath": "system.runtime.handles.4.0.1.nupkg.sha512"
522
+    },
523
+    "System.Runtime.InteropServices/4.1.0": {
524
+      "type": "package",
525
+      "serviceable": true,
526
+      "sha512": "sha512-16eu3kjHS633yYdkjwShDHZLRNMKVi/s0bY8ODiqJ2RfMhDMAwxZaUaWVnZ2P71kr/or+X9o/xFWtNqz8ivieQ==",
527
+      "path": "system.runtime.interopservices/4.1.0",
528
+      "hashPath": "system.runtime.interopservices.4.1.0.nupkg.sha512"
529
+    },
530
+    "System.Security.AccessControl/4.4.0": {
531
+      "type": "package",
532
+      "serviceable": true,
533
+      "sha512": "sha512-2NRFPX/V81ucKQmqNgGBZrKGH/5ejsvivSGMRum0SMgPnJxwhuNkzVS1+7gC3R2X0f57CtwrPrXPPSe6nOp82g==",
534
+      "path": "system.security.accesscontrol/4.4.0",
535
+      "hashPath": "system.security.accesscontrol.4.4.0.nupkg.sha512"
536
+    },
537
+    "System.Security.Permissions/4.4.1": {
538
+      "type": "package",
539
+      "serviceable": true,
540
+      "sha512": "sha512-l8IxQ9mEAkKv85uoEcjcYhrh+yTLZtLgNqb2T7QChTdKXh45EUnmKd+Ckdt1D+VYW2dk2Pb5MT+0zwQ74Jd2Xg==",
541
+      "path": "system.security.permissions/4.4.1",
542
+      "hashPath": "system.security.permissions.4.4.1.nupkg.sha512"
543
+    },
544
+    "System.Security.Principal.Windows/4.4.0": {
545
+      "type": "package",
546
+      "serviceable": true,
547
+      "sha512": "sha512-pP+AOzt1o3jESOuLmf52YQTF7H3Ng9hTnrOESQiqsnl2IbBh1HInsAMHYtoh75iUYV0OIkHmjvveraYB6zM97w==",
548
+      "path": "system.security.principal.windows/4.4.0",
549
+      "hashPath": "system.security.principal.windows.4.4.0.nupkg.sha512"
550
+    },
551
+    "System.Text.Encoding/4.3.0": {
552
+      "type": "package",
553
+      "serviceable": true,
554
+      "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
555
+      "path": "system.text.encoding/4.3.0",
556
+      "hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
557
+    },
558
+    "System.Text.Encoding.Extensions/4.0.11": {
559
+      "type": "package",
560
+      "serviceable": true,
561
+      "sha512": "sha512-jtbiTDtvfLYgXn8PTfWI+SiBs51rrmO4AAckx4KR6vFK9Wzf6tI8kcRdsYQNwriUeQ1+CtQbM1W4cMbLXnj/OQ==",
562
+      "path": "system.text.encoding.extensions/4.0.11",
563
+      "hashPath": "system.text.encoding.extensions.4.0.11.nupkg.sha512"
564
+    },
565
+    "System.Threading.Tasks/4.3.0": {
566
+      "type": "package",
567
+      "serviceable": true,
568
+      "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
569
+      "path": "system.threading.tasks/4.3.0",
570
+      "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
571
+    },
572
+    "DSLink/1.0.0.0": {
573
+      "type": "reference",
574
+      "serviceable": false,
575
+      "sha512": ""
576
+    }
577
+  }
578
+}

BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.dll View File


BIN
DSLink_Test/DSLink_Test/bin/Debug/netcoreapp3.1/DSLink_Test.exe → RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.exe View File


BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.pdb View File


DSLink_Test/DSLink_Test/bin/Debug/netcoreapp3.1/DSLink_Test.runtimeconfig.dev.json → RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.runtimeconfig.dev.json View File


DSLink_Test/DSLink_Test/bin/Debug/netcoreapp3.1/DSLink_Test.runtimeconfig.json → RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.runtimeconfig.json View File


BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Serilog.Sinks.Console.dll View File


BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Serilog.Sinks.Debug.dll View File


BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Serilog.Sinks.File.dll View File


BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Serilog.Sinks.RollingFile.dll View File


BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Serilog.dll View File


BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/StandardStorage.dll View File


BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.CodeDom.dll View File


BIN
RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.Security.Permissions.dll View File


DSLink_Test/DSLink_Test/obj/Test/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs → RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs View File


+ 33
- 0
RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/ILog.cs View File

@@ -0,0 +1,33 @@
1
+// <auto-generated/>
2
+// ReSharper disable CheckNamespace
3
+namespace RSTP_DSLink.Logging
4
+{
5
+    using System;
6
+
7
+    /// <summary>
8
+    ///     Simple interface that represent a logger.
9
+    /// </summary>
10
+#if LIBLOG_PUBLIC
11
+    public
12
+#else
13
+    internal
14
+#endif
15
+        interface ILog
16
+    {
17
+        /// <summary>
18
+        ///     Log a message the specified log level.
19
+        /// </summary>
20
+        /// <param name="logLevel">The log level.</param>
21
+        /// <param name="messageFunc">The message function.</param>
22
+        /// <param name="exception">An optional exception.</param>
23
+        /// <param name="formatParameters">Optional format parameters for the message generated by the messagefunc. </param>
24
+        /// <returns>true if the message was logged. Otherwise false.</returns>
25
+        /// <remarks>
26
+        ///     Note to implementers: the message func should not be called if the loglevel is not enabled
27
+        ///     so as not to incur performance penalties.
28
+        ///     To check IsEnabled call Log with only LogLevel and check the return value, no event will be written.
29
+        /// </remarks>
30
+        bool Log(LogLevel logLevel, Func<string> messageFunc, Exception exception = null,
31
+            params object[] formatParameters);
32
+    }
33
+}

+ 40
- 0
RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/ILogProvider.cs View File

@@ -0,0 +1,40 @@
1
+// <auto-generated/>
2
+// ReSharper disable CheckNamespace
3
+using System;
4
+
5
+namespace RSTP_DSLink.Logging
6
+{
7
+    /// <summary>
8
+    /// Represents a way to get a <see cref="Logger"/>
9
+    /// </summary>
10
+#if LIBLOG_PROVIDERS_ONLY
11
+    internal
12
+#else
13
+    public
14
+#endif
15
+    interface ILogProvider
16
+    {
17
+        /// <summary>
18
+        /// Gets the specified named logger.
19
+        /// </summary>
20
+        /// <param name="name">Name of the logger.</param>
21
+        /// <returns>The logger reference.</returns>
22
+        Logger GetLogger(string name);
23
+
24
+        /// <summary>
25
+        /// Opens a nested diagnostics context. Not supported in EntLib logging.
26
+        /// </summary>
27
+        /// <param name="message">The message to add to the diagnostics context.</param>
28
+        /// <returns>A disposable that when disposed removes the message from the context.</returns>
29
+        IDisposable OpenNestedContext(string message);
30
+
31
+        /// <summary>
32
+        /// Opens a mapped diagnostics context. Not supported in EntLib logging.
33
+        /// </summary>
34
+        /// <param name="key">A key.</param>
35
+        /// <param name="value">A value.</param>
36
+        /// <param name="destructure">Determines whether to call the destructor or not.</param>
37
+        /// <returns>A disposable that when disposed removes the map from the context.</returns>
38
+        IDisposable OpenMappedContext(string key, object value, bool destructure = false);
39
+    }
40
+}

+ 562
- 0
RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogExtensions.cs View File

@@ -0,0 +1,562 @@
1
+// <auto-generated/>
2
+// ReSharper disable CheckNamespace
3
+namespace RSTP_DSLink.Logging
4
+{
5
+    using System;
6
+#if LIBLOG_EXCLUDE_CODE_COVERAGE
7
+    using System.Diagnostics.CodeAnalysis;
8
+#endif
9
+
10
+    /// <summary>
11
+    ///     Extension methods for the <see cref="ILog"/> interface.
12
+    /// </summary>
13
+#if LIBLOG_EXCLUDE_CODE_COVERAGE
14
+    [ExcludeFromCodeCoverage]
15
+#endif
16
+#if LIBLOG_PUBLIC
17
+    public
18
+#else
19
+    internal
20
+#endif
21
+    static class LogExtensions
22
+    {
23
+        internal static readonly object[] EmptyParams = new object[0];
24
+
25
+        /// <summary>
26
+        ///     Check if the <see cref="LogLevel.Debug"/> log level is enabled.
27
+        /// </summary>
28
+        /// <param name="logger">The <see cref="ILog"/> to check with.</param>
29
+        /// <returns>True if the log level is enabled; false otherwise.</returns>
30
+        public static bool IsDebugEnabled(this ILog logger)
31
+        {
32
+            GuardAgainstNullLogger(logger);
33
+            return logger.Log(LogLevel.Debug, null, null, EmptyParams);
34
+        }
35
+
36
+        /// <summary>
37
+        ///     Check if the <see cref="LogLevel.Error"/> log level is enabled.
38
+        /// </summary>
39
+        /// <param name="logger">The <see cref="ILog"/> to check with.</param>
40
+        /// <returns>True if the log level is enabled; false otherwise.</returns>
41
+        public static bool IsErrorEnabled(this ILog logger)
42
+        {
43
+            GuardAgainstNullLogger(logger);
44
+            return logger.Log(LogLevel.Error, null, null, EmptyParams);
45
+        }
46
+
47
+        /// <summary>
48
+        ///     Check if the <see cref="LogLevel.Fatal"/> log level is enabled.
49
+        /// </summary>
50
+        /// <param name="logger">The <see cref="ILog"/> to check with.</param>
51
+        /// <returns>True if the log level is enabled; false otherwise.</returns>
52
+        public static bool IsFatalEnabled(this ILog logger)
53
+        {
54
+            GuardAgainstNullLogger(logger);
55
+            return logger.Log(LogLevel.Fatal, null, null, EmptyParams);
56
+        }
57
+
58
+        /// <summary>
59
+        ///     Check if the <see cref="LogLevel.Info"/> log level is enabled.
60
+        /// </summary>
61
+        /// <param name="logger">The <see cref="ILog"/> to check with.</param>
62
+        /// <returns>True if the log level is enabled; false otherwise.</returns>
63
+        public static bool IsInfoEnabled(this ILog logger)
64
+        {
65
+            GuardAgainstNullLogger(logger);
66
+            return logger.Log(LogLevel.Info, null, null, EmptyParams);
67
+        }
68
+
69
+        /// <summary>
70
+        ///     Check if the <see cref="LogLevel.Trace"/> log level is enabled.
71
+        /// </summary>
72
+        /// <param name="logger">The <see cref="ILog"/> to check with.</param>
73
+        /// <returns>True if the log level is enabled; false otherwise.</returns>
74
+        public static bool IsTraceEnabled(this ILog logger)
75
+        {
76
+            GuardAgainstNullLogger(logger);
77
+            return logger.Log(LogLevel.Trace, null, null, EmptyParams);
78
+        }
79
+
80
+        /// <summary>
81
+        ///     Check if the <see cref="LogLevel.Warn"/> log level is enabled.
82
+        /// </summary>
83
+        /// <param name="logger">The <see cref="ILog"/> to check with.</param>
84
+        /// <returns>True if the log level is enabled; false otherwise.</returns>
85
+        public static bool IsWarnEnabled(this ILog logger)
86
+        {
87
+            GuardAgainstNullLogger(logger);
88
+            return logger.Log(LogLevel.Warn, null, null, EmptyParams);
89
+        }
90
+
91
+        /// <summary>
92
+        ///     Logs a message at the <see cref="LogLevel.Debug"/> log level, if enabled.
93
+        /// </summary>
94
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
95
+        /// <param name="messageFunc">The message function.</param>
96
+        public static void Debug(this ILog logger, Func<string> messageFunc)
97
+        {
98
+            GuardAgainstNullLogger(logger);
99
+            logger.Log(LogLevel.Debug, WrapLogInternal(messageFunc), null, EmptyParams);
100
+        }
101
+
102
+        /// <summary>
103
+        ///     Logs a message at the <see cref="LogLevel.Debug"/> log level, if enabled.
104
+        /// </summary>
105
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
106
+        /// <param name="message">The message.</param>
107
+        public static void Debug(this ILog logger, string message)
108
+        {
109
+            if (logger.IsDebugEnabled()) logger.Log(LogLevel.Debug, message.AsFunc(), null, EmptyParams);
110
+        }
111
+
112
+        /// <summary>
113
+        ///     Logs a message at the <see cref="LogLevel.Debug"/> log level, if enabled.
114
+        /// </summary>
115
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
116
+        /// <param name="message">The message.</param>
117
+        /// <param name="args">Optional format parameters for the message.</param>
118
+        public static void Debug(this ILog logger, string message, params object[] args)
119
+        {
120
+            logger.DebugFormat(message, args);
121
+        }
122
+
123
+        /// <summary>
124
+        ///     Logs an exception at the <see cref="LogLevel.Debug"/> log level, if enabled.
125
+        /// </summary>
126
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
127
+        /// <param name="exception">The exception.</param>
128
+        /// <param name="message">The message.</param>
129
+        /// <param name="args">Optional format parameters for the message.</param>
130
+        public static void Debug(this ILog logger, Exception exception, string message, params object[] args)
131
+        {
132
+            logger.DebugException(message, exception, args);
133
+        }
134
+
135
+        /// <summary>
136
+        ///     Logs a message at the <see cref="LogLevel.Debug"/> log level, if enabled.
137
+        /// </summary>
138
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
139
+        /// <param name="message">The message.</param>
140
+        /// <param name="args">Optional format parameters for the message.</param>
141
+        public static void DebugFormat(this ILog logger, string message, params object[] args)
142
+        {
143
+            if (logger.IsDebugEnabled()) logger.LogFormat(LogLevel.Debug, message, args);
144
+        }
145
+
146
+        /// <summary>
147
+        ///     Logs an exception at the <see cref="LogLevel.Debug"/> log level, if enabled.
148
+        /// </summary>
149
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
150
+        /// <param name="message">The message.</param>
151
+        /// <param name="exception">The exception.</param>
152
+        public static void DebugException(this ILog logger, string message, Exception exception)
153
+        {
154
+            if (logger.IsDebugEnabled()) logger.Log(LogLevel.Debug, message.AsFunc(), exception, EmptyParams);
155
+        }
156
+
157
+        /// <summary>
158
+        ///     Logs an exception at the <see cref="LogLevel.Debug"/> log level, if enabled.
159
+        /// </summary>
160
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
161
+        /// <param name="message">The message.</param>
162
+        /// <param name="exception">The exception.</param>
163
+        /// <param name="args">Optional format parameters for the message.</param>
164
+        public static void DebugException(this ILog logger, string message, Exception exception,
165
+            params object[] args)
166
+        {
167
+            if (logger.IsDebugEnabled()) logger.Log(LogLevel.Debug, message.AsFunc(), exception, args);
168
+        }
169
+
170
+        /// <summary>
171
+        ///     Logs a message at the <see cref="LogLevel.Error"/> log level, if enabled.
172
+        /// </summary>
173
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
174
+        /// <param name="messageFunc">The message function.</param>
175
+        public static void Error(this ILog logger, Func<string> messageFunc)
176
+        {
177
+            GuardAgainstNullLogger(logger);
178
+            logger.Log(LogLevel.Error, WrapLogInternal(messageFunc), null, EmptyParams);
179
+        }
180
+
181
+        /// <summary>
182
+        ///     Logs a message at the <see cref="LogLevel.Error"/> log level, if enabled.
183
+        /// </summary>
184
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
185
+        /// <param name="message">The message.</param>
186
+        public static void Error(this ILog logger, string message)
187
+        {
188
+            if (logger.IsErrorEnabled()) logger.Log(LogLevel.Error, message.AsFunc(), null, EmptyParams);
189
+        }
190
+
191
+        /// <summary>
192
+        ///     Logs a message at the <see cref="LogLevel.Error"/> log level, if enabled.
193
+        /// </summary>
194
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
195
+        /// <param name="message">The message.</param>
196
+        /// <param name="args">Optional format parameters for the message.</param>
197
+        public static void Error(this ILog logger, string message, params object[] args)
198
+        {
199
+            logger.ErrorFormat(message, args);
200
+        }
201
+
202
+        /// <summary>
203
+        ///     Logs an exception at the <see cref="LogLevel.Error"/> log level, if enabled.
204
+        /// </summary>
205
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
206
+        /// <param name="exception">The exception.</param>
207
+        /// <param name="message">The message.</param>
208
+        /// <param name="args">Optional format parameters for the message.</param>
209
+        public static void Error(this ILog logger, Exception exception, string message, params object[] args)
210
+        {
211
+            logger.ErrorException(message, exception, args);
212
+        }
213
+
214
+        /// <summary>
215
+        ///     Logs a message at the <see cref="LogLevel.Error"/> log level, if enabled.
216
+        /// </summary>
217
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
218
+        /// <param name="message">The message.</param>
219
+        /// <param name="args">Optional format parameters for the message.</param>
220
+        public static void ErrorFormat(this ILog logger, string message, params object[] args)
221
+        {
222
+            if (logger.IsErrorEnabled()) logger.LogFormat(LogLevel.Error, message, args);
223
+        }
224
+
225
+        /// <summary>
226
+        ///     Logs an exception at the <see cref="LogLevel.Error"/> log level, if enabled.
227
+        /// </summary>
228
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
229
+        /// <param name="message">The message.</param>
230
+        /// <param name="exception">The exception.</param>
231
+        /// <param name="args">Optional format parameters for the message.</param>
232
+        public static void ErrorException(this ILog logger, string message, Exception exception,
233
+            params object[] args)
234
+        {
235
+            if (logger.IsErrorEnabled()) logger.Log(LogLevel.Error, message.AsFunc(), exception, args);
236
+        }
237
+
238
+        /// <summary>
239
+        ///     Logs a message at the <see cref="LogLevel.Fatal"/> log level, if enabled.
240
+        /// </summary>
241
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
242
+        /// <param name="messageFunc">The message function.</param>
243
+        public static void Fatal(this ILog logger, Func<string> messageFunc)
244
+        {
245
+            logger.Log(LogLevel.Fatal, WrapLogInternal(messageFunc), null, EmptyParams);
246
+        }
247
+
248
+        /// <summary>
249
+        ///     Logs a message at the <see cref="LogLevel.Fatal"/> log level, if enabled.
250
+        /// </summary>
251
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
252
+        /// <param name="message">The message.</param>
253
+        public static void Fatal(this ILog logger, string message)
254
+        {
255
+            if (logger.IsFatalEnabled()) logger.Log(LogLevel.Fatal, message.AsFunc(), null, EmptyParams);
256
+        }
257
+
258
+        /// <summary>
259
+        ///     Logs a message at the <see cref="LogLevel.Fatal"/> log level, if enabled.
260
+        /// </summary>
261
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
262
+        /// <param name="message">The message.</param>
263
+        /// <param name="args">Optional format parameters for the message.</param>
264
+        public static void Fatal(this ILog logger, string message, params object[] args)
265
+        {
266
+            logger.FatalFormat(message, args);
267
+        }
268
+
269
+        /// <summary>
270
+        ///     Logs an exception at the <see cref="LogLevel.Fatal"/> log level, if enabled.
271
+        /// </summary>
272
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
273
+        /// <param name="exception">The exception.</param>
274
+        /// <param name="message">The message.</param>
275
+        /// <param name="args">Optional format parameters for the message.</param>
276
+        public static void Fatal(this ILog logger, Exception exception, string message, params object[] args)
277
+        {
278
+            logger.FatalException(message, exception, args);
279
+        }
280
+
281
+        /// <summary>
282
+        ///     Logs a message at the <see cref="LogLevel.Fatal"/> log level, if enabled.
283
+        /// </summary>
284
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
285
+        /// <param name="message">The message.</param>
286
+        /// <param name="args">Optional format parameters for the message.</param>
287
+        public static void FatalFormat(this ILog logger, string message, params object[] args)
288
+        {
289
+            if (logger.IsFatalEnabled()) logger.LogFormat(LogLevel.Fatal, message, args);
290
+        }
291
+
292
+        /// <summary>
293
+        ///     Logs an exception at the <see cref="LogLevel.Fatal"/> log level, if enabled.
294
+        /// </summary>
295
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
296
+        /// <param name="message">The message.</param>
297
+        /// <param name="exception">The exception.</param>
298
+        /// <param name="args">Optional format parameters for the message.</param>
299
+        public static void FatalException(this ILog logger, string message, Exception exception,
300
+            params object[] args)
301
+        {
302
+            if (logger.IsFatalEnabled()) logger.Log(LogLevel.Fatal, message.AsFunc(), exception, args);
303
+        }
304
+
305
+        /// <summary>
306
+        ///     Logs a message at the <see cref="LogLevel.Info"/> log level, if enabled.
307
+        /// </summary>
308
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
309
+        /// <param name="messageFunc">The message function.</param>
310
+        public static void Info(this ILog logger, Func<string> messageFunc)
311
+        {
312
+            GuardAgainstNullLogger(logger);
313
+            logger.Log(LogLevel.Info, WrapLogInternal(messageFunc), null, EmptyParams);
314
+        }
315
+
316
+        /// <summary>
317
+        ///     Logs a message at the <see cref="LogLevel.Info"/> log level, if enabled.
318
+        /// </summary>
319
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
320
+        /// <param name="message">The message.</param>
321
+        public static void Info(this ILog logger, string message)
322
+        {
323
+            if (logger.IsInfoEnabled()) logger.Log(LogLevel.Info, message.AsFunc(), null, EmptyParams);
324
+        }
325
+
326
+        /// <summary>
327
+        ///     Logs a message at the <see cref="LogLevel.Info"/> log level, if enabled.
328
+        /// </summary>
329
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
330
+        /// <param name="message">The message.</param>
331
+        /// <param name="args">Optional format parameters for the message.</param>
332
+        public static void Info(this ILog logger, string message, params object[] args)
333
+        {
334
+            logger.InfoFormat(message, args);
335
+        }
336
+
337
+        /// <summary>
338
+        ///     Logs an exception at the <see cref="LogLevel.Info"/> log level, if enabled.
339
+        /// </summary>
340
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
341
+        /// <param name="exception">The exception.</param>
342
+        /// <param name="message">The message.</param>
343
+        /// <param name="args">Optional format parameters for the message.</param>
344
+        public static void Info(this ILog logger, Exception exception, string message, params object[] args)
345
+        {
346
+            logger.InfoException(message, exception, args);
347
+        }
348
+
349
+        /// <summary>
350
+        ///     Logs a message at the <see cref="LogLevel.Info"/> log level, if enabled.
351
+        /// </summary>
352
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
353
+        /// <param name="message">The message.</param>
354
+        /// <param name="args">Optional format parameters for the message.</param>
355
+        public static void InfoFormat(this ILog logger, string message, params object[] args)
356
+        {
357
+            if (logger.IsInfoEnabled()) logger.LogFormat(LogLevel.Info, message, args);
358
+        }
359
+
360
+        /// <summary>
361
+        ///     Logs an exception at the <see cref="LogLevel.Info"/> log level, if enabled.
362
+        /// </summary>
363
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
364
+        /// <param name="message">The message.</param>
365
+        /// <param name="exception">The exception.</param>
366
+        /// <param name="args">Optional format parameters for the message.</param>
367
+        public static void InfoException(this ILog logger, string message, Exception exception,
368
+            params object[] args)
369
+        {
370
+            if (logger.IsInfoEnabled()) logger.Log(LogLevel.Info, message.AsFunc(), exception, args);
371
+        }
372
+
373
+        /// <summary>
374
+        ///     Logs a message at the <see cref="LogLevel.Trace"/> log level, if enabled.
375
+        /// </summary>
376
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
377
+        /// <param name="messageFunc">The message function.</param>
378
+        public static void Trace(this ILog logger, Func<string> messageFunc)
379
+        {
380
+            GuardAgainstNullLogger(logger);
381
+            logger.Log(LogLevel.Trace, WrapLogInternal(messageFunc), null, EmptyParams);
382
+        }
383
+
384
+        /// <summary>
385
+        ///     Logs a message at the <see cref="LogLevel.Trace"/> log level, if enabled.
386
+        /// </summary>
387
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
388
+        /// <param name="message">The message.</param>
389
+        public static void Trace(this ILog logger, string message)
390
+        {
391
+            if (logger.IsTraceEnabled()) logger.Log(LogLevel.Trace, message.AsFunc(), null, EmptyParams);
392
+        }
393
+
394
+        /// <summary>
395
+        ///     Logs a message at the <see cref="LogLevel.Trace"/> log level, if enabled.
396
+        /// </summary>
397
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
398
+        /// <param name="message">The message.</param>
399
+        /// <param name="args">Optional format parameters for the message.</param>
400
+        public static void Trace(this ILog logger, string message, params object[] args)
401
+        {
402
+            logger.TraceFormat(message, args);
403
+        }
404
+
405
+        /// <summary>
406
+        ///     Logs an exception at the <see cref="LogLevel.Trace"/> log level, if enabled.
407
+        /// </summary>
408
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
409
+        /// <param name="exception">The exception.</param>
410
+        /// <param name="message">The message.</param>
411
+        /// <param name="args">Optional format parameters for the message.</param>
412
+        public static void Trace(this ILog logger, Exception exception, string message, params object[] args)
413
+        {
414
+            logger.TraceException(message, exception, args);
415
+        }
416
+
417
+        /// <summary>
418
+        ///     Logs a message at the <see cref="LogLevel.Trace"/> log level, if enabled.
419
+        /// </summary>
420
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
421
+        /// <param name="message">The message.</param>
422
+        /// <param name="args">Optional format parameters for the message.</param>
423
+        public static void TraceFormat(this ILog logger, string message, params object[] args)
424
+        {
425
+            if (logger.IsTraceEnabled()) logger.LogFormat(LogLevel.Trace, message, args);
426
+        }
427
+
428
+        /// <summary>
429
+        ///     Logs an exception at the <see cref="LogLevel.Trace"/> log level, if enabled.
430
+        /// </summary>
431
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
432
+        /// <param name="message">The message.</param>
433
+        /// <param name="exception">The exception.</param>
434
+        /// <param name="args">Optional format parameters for the message.</param>
435
+        public static void TraceException(this ILog logger, string message, Exception exception,
436
+            params object[] args)
437
+        {
438
+            if (logger.IsTraceEnabled()) logger.Log(LogLevel.Trace, message.AsFunc(), exception, args);
439
+        }
440
+
441
+        /// <summary>
442
+        ///     Logs a message at the <see cref="LogLevel.Warn"/> log level, if enabled.
443
+        /// </summary>
444
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
445
+        /// <param name="messageFunc">The message function.</param>
446
+        public static void Warn(this ILog logger, Func<string> messageFunc)
447
+        {
448
+            GuardAgainstNullLogger(logger);
449
+            logger.Log(LogLevel.Warn, WrapLogInternal(messageFunc), null, EmptyParams);
450
+        }
451
+
452
+        /// <summary>
453
+        ///     Logs a message at the <see cref="LogLevel.Warn"/> log level, if enabled.
454
+        /// </summary>
455
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
456
+        /// <param name="message">The message.</param>
457
+        public static void Warn(this ILog logger, string message)
458
+        {
459
+            if (logger.IsWarnEnabled()) logger.Log(LogLevel.Warn, message.AsFunc(), null, EmptyParams);
460
+        }
461
+
462
+        /// <summary>
463
+        ///     Logs a message at the <see cref="LogLevel.Warn"/> log level, if enabled.
464
+        /// </summary>
465
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
466
+        /// <param name="message">The message.</param>
467
+        /// <param name="args">Optional format parameters for the message.</param>
468
+        public static void Warn(this ILog logger, string message, params object[] args)
469
+        {
470
+            logger.WarnFormat(message, args);
471
+        }
472
+
473
+        /// <summary>
474
+        ///     Logs an exception at the <see cref="LogLevel.Warn"/> log level, if enabled.
475
+        /// </summary>
476
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
477
+        /// <param name="exception">The exception.</param>
478
+        /// <param name="message">The message.</param>
479
+        /// <param name="args">Optional format parameters for the message.</param>
480
+        public static void Warn(this ILog logger, Exception exception, string message, params object[] args)
481
+        {
482
+            logger.WarnException(message, exception, args);
483
+        }
484
+
485
+        /// <summary>
486
+        ///     Logs a message at the <see cref="LogLevel.Warn"/> log level, if enabled.
487
+        /// </summary>
488
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
489
+        /// <param name="message">The message.</param>
490
+        /// <param name="args">Optional format parameters for the message.</param>
491
+        public static void WarnFormat(this ILog logger, string message, params object[] args)
492
+        {
493
+            if (logger.IsWarnEnabled()) logger.LogFormat(LogLevel.Warn, message, args);
494
+        }
495
+
496
+        /// <summary>
497
+        ///     Logs an exception at the <see cref="LogLevel.Warn"/> log level, if enabled.
498
+        /// </summary>
499
+        /// <param name="logger">The <see cref="ILog"/> to use.</param>
500
+        /// <param name="message">The message.</param>
501
+        /// <param name="exception">The exception.</param>
502
+        /// <param name="args">Optional format parameters for the message.</param>
503
+        public static void WarnException(this ILog logger, string message, Exception exception,
504
+            params object[] args)
505
+        {
506
+            if (logger.IsWarnEnabled()) logger.Log(LogLevel.Warn, message.AsFunc(), exception, args);
507
+        }
508
+
509
+        // ReSharper disable once UnusedParameter.Local
510
+        private static void GuardAgainstNullLogger(ILog logger)
511
+        {
512
+            if (logger == null) throw new ArgumentNullException("logger");
513
+        }
514
+
515
+        private static void LogFormat(this ILog logger, LogLevel logLevel, string message, params object[] args)
516
+        {
517
+            logger.Log(logLevel, message.AsFunc(), null, args);
518
+        }
519
+
520
+        // Avoid the closure allocation, see https://gist.github.com/AArnott/d285feef75c18f6ecd2b
521
+        private static Func<T> AsFunc<T>(this T value) where T : class
522
+        {
523
+            return value.Return;
524
+        }
525
+
526
+        private static T Return<T>(this T value)
527
+        {
528
+            return value;
529
+        }
530
+
531
+        // Allow passing callsite-logger-type to LogProviderBase using messageFunc
532
+        internal static Func<string> WrapLogSafeInternal(LoggerExecutionWrapper logger, Func<string> messageFunc)
533
+        {
534
+            var WrappedMessageFunc = new Func<string>(() => {
535
+                try
536
+                {
537
+                    return messageFunc();
538
+                }
539
+                catch (Exception ex)
540
+                {
541
+                    logger.WrappedLogger(LogLevel.Error, () => LoggerExecutionWrapper.FailedToGenerateLogMessage, ex,
542
+                        EmptyParams);
543
+                }
544
+
545
+                return null;
546
+            });
547
+
548
+            return WrappedMessageFunc;
549
+        }
550
+
551
+        // Allow passing callsite-logger-type to LogProviderBase using messageFunc
552
+        private static Func<string> WrapLogInternal(Func<string> messageFunc)
553
+        {
554
+            var WrappedMessageFunc = new Func<string>(() =>
555
+            {
556
+                return messageFunc();
557
+            });
558
+
559
+            return WrappedMessageFunc;
560
+        }
561
+    }
562
+}

+ 45
- 0
RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogLevel.cs View File

@@ -0,0 +1,45 @@
1
+// <auto-generated/>
2
+// ReSharper disable CheckNamespace
3
+namespace RSTP_DSLink.Logging
4
+{
5
+    /// <summary>
6
+    ///     The log level.
7
+    /// </summary>
8
+#if LIBLOG_PROVIDERS_ONLY
9
+    internal
10
+#else
11
+    public
12
+#endif
13
+        enum LogLevel
14
+    {
15
+        /// <summary>
16
+        /// Trace
17
+        /// </summary>
18
+        Trace,
19
+
20
+        /// <summary>
21
+        /// Debug
22
+        /// </summary>
23
+        Debug,
24
+
25
+        /// <summary>
26
+        /// Info
27
+        /// </summary>
28
+        Info,
29
+
30
+        /// <summary>
31
+        /// Warn
32
+        /// </summary>
33
+        Warn,
34
+
35
+        /// <summary>
36
+        /// Error
37
+        /// </summary>
38
+        Error,
39
+
40
+        /// <summary>
41
+        /// Fatal
42
+        /// </summary>
43
+        Fatal
44
+    }
45
+}

+ 318
- 0
RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProvider.cs View File

@@ -0,0 +1,318 @@
1
+// <auto-generated/>
2
+// ReSharper disable CheckNamespace
3
+//===============================================================================
4
+// LibLog
5
+//
6
+// https://github.com/damianh/LibLog
7
+//===============================================================================
8
+// Copyright © 2011-2017 Damian Hickey.  All rights reserved.
9
+//
10
+// Permission is hereby granted, free of charge, to any person obtaining a copy
11
+// of this software and associated documentation files (the "Software"), to deal
12
+// in the Software without restriction, including without limitation the rights
13
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+// copies of the Software, and to permit persons to whom the Software is
15
+// furnished to do so, subject to the following conditions:
16
+//
17
+// The above copyright notice and this permission notice shall be included in
18
+// all copies or substantial portions of the Software.
19
+//
20
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+// SOFTWARE.
27
+//===============================================================================
28
+
29
+// @formatter:off — disable resharper formatter after this line
30
+// ReSharper disable PossibleNullReferenceException
31
+
32
+// Define LIBLOG_PUBLIC to enable ability to GET a logger (LogProvider.For<>() etc) from outside this library. NOTE:
33
+// this can have unintended consequences of consumers of your library using your library to resolve a logger. If the
34
+// reason is because you want to open this functionality to other projects within your solution,
35
+// consider [InternalsVisibleTo] instead.
36
+// 
37
+// Define LIBLOG_PROVIDERS_ONLY if your library provides its own logging API and you just want to use the
38
+// LibLog providers internally to provide built in support for popular logging frameworks.
39
+
40
+#pragma warning disable 1591
41
+
42
+using global::System.Diagnostics.CodeAnalysis;
43
+
44
+[assembly: SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "RSTP_DSLink.Logging")]
45
+[assembly: SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed", Scope = "member", Target = "RSTP_DSLink.Logging.Logger.#Invoke(RSTP_DSLink.Logging.LogLevel,System.Func`1<System.String>,System.Exception,System.Object[])")]
46
+
47
+// If you copied this file manually, you need to change all "YourRootNameSpace" so not to clash with other libraries
48
+// that use LibLog
49
+namespace RSTP_DSLink.Logging
50
+{
51
+    using global::System.Collections.Generic;
52
+    using global::System.Diagnostics.CodeAnalysis;
53
+    using global::RSTP_DSLink.Logging.LogProviders;
54
+    using global::System;
55
+#if !LIBLOG_PROVIDERS_ONLY
56
+    using global::System.Diagnostics;
57
+    using global::System.Runtime.CompilerServices;
58
+#endif
59
+
60
+#if LIBLOG_EXCLUDE_CODE_COVERAGE
61
+    [ExcludeFromCodeCoverage]
62
+#endif
63
+#if LIBLOG_PROVIDERS_ONLY
64
+    /// <summary>
65
+    /// Provides a mechanism to set the <see cref="ILogProvider" />
66
+	/// and create instances of <see cref="ILog" /> objects. 
67
+    /// </summary>
68
+    internal
69
+#else
70
+    /// <summary>
71
+    /// Provides a mechanism to set the <see cref="ILogProvider" />.
72
+    /// </summary>
73
+    public
74
+#endif
75
+    static class LogProvider
76
+    {
77
+        private static readonly Lazy<ILogProvider> ResolvedLogProvider = new Lazy<ILogProvider>(ForceResolveLogProvider);
78
+#if !LIBLOG_PROVIDERS_ONLY
79
+        private static ILogProvider s_currentLogProvider;
80
+        private static Action<ILogProvider> s_onCurrentLogProviderSet;
81
+
82
+        [SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline")]
83
+        static LogProvider()
84
+        {
85
+            IsDisabled = false;
86
+        }
87
+
88
+        /// <summary>
89
+        /// Sets the current log provider.
90
+        /// </summary>
91
+        /// <param name="logProvider">The log provider.</param>
92
+        public static void SetCurrentLogProvider(ILogProvider logProvider)
93
+        {
94
+            s_currentLogProvider = logProvider;
95
+
96
+            RaiseOnCurrentLogProviderSet();
97
+        }
98
+
99
+        /// <summary>
100
+        /// Gets or sets a value indicating whether this is logging is disabled.
101
+        /// </summary>
102
+        /// <value>
103
+        /// <c>true</c> if logging is disabled; otherwise, <c>false</c>.
104
+        /// </value>
105
+        public static bool IsDisabled { get; set; }
106
+
107
+        /// <summary>
108
+        /// Sets an action that is invoked when a consumer of your library has called SetCurrentLogProvider. It is 
109
+        /// important that hook into this if you are using child libraries (especially ilmerged ones) that are using
110
+        /// LibLog (or other logging abstraction) so you adapt and delegate to them.
111
+        /// <see cref="SetCurrentLogProvider"/> 
112
+        /// </summary>
113
+        internal static Action<ILogProvider> OnCurrentLogProviderSet
114
+        {
115
+            set
116
+            {
117
+                s_onCurrentLogProviderSet = value;
118
+                RaiseOnCurrentLogProviderSet();
119
+            }
120
+        }
121
+
122
+        internal static ILogProvider CurrentLogProvider
123
+        { 
124
+            get { return s_currentLogProvider; } 
125
+        }
126
+
127
+        /// <summary>
128
+        /// Gets a logger for the specified type.
129
+        /// </summary>
130
+        /// <typeparam name="T">The type whose name will be used for the logger.</typeparam>
131
+        /// <returns>An instance of <see cref="ILog"/></returns>
132
+#if LIBLOG_PUBLIC
133
+        public
134
+#else
135
+        internal
136
+#endif
137
+        static ILog For<T>() 
138
+        {
139
+            return GetLogger(typeof(T));
140
+        }
141
+
142
+        /// <summary>
143
+        /// Gets a logger for the current class.
144
+        /// </summary>
145
+        /// <returns>An instance of <see cref="ILog"/></returns>
146
+        [MethodImpl(MethodImplOptions.NoInlining)]
147
+#if LIBLOG_PUBLIC
148
+        public
149
+#else
150
+        internal
151
+#endif
152
+        static ILog GetCurrentClassLogger()
153
+        {
154
+            var stackFrame = new StackFrame(1, false);
155
+            return GetLogger(stackFrame.GetMethod().DeclaringType);
156
+        }
157
+
158
+        /// <summary>
159
+        /// Gets a logger for the specified type.
160
+        /// </summary>
161
+        /// <param name="type">The type whose name will be used for the logger.</param>
162
+        /// <param name="fallbackTypeName">If the type is null then this name will be used as the log name instead</param>
163
+        /// <returns>An instance of <see cref="ILog"/></returns>
164
+#if LIBLOG_PUBLIC
165
+        public
166
+#else
167
+        internal
168
+#endif
169
+        static ILog GetLogger(Type type, string fallbackTypeName = "System.Object")
170
+        {
171
+            // If the type passed in is null then fallback to the type name specified
172
+            return GetLogger(type != null ? type.ToString() : fallbackTypeName);
173
+        }
174
+
175
+        /// <summary>
176
+        /// Gets a logger with the specified name.
177
+        /// </summary>
178
+        /// <param name="name">The name.</param>
179
+        /// <returns>An instance of <see cref="ILog"/></returns>
180
+#if LIBLOG_PUBLIC
181
+        public
182
+#else
183
+        internal
184
+#endif
185
+        static ILog GetLogger(string name)
186
+        {
187
+            var logProvider = CurrentLogProvider ?? ResolveLogProvider();
188
+            return logProvider == null
189
+                ? NoOpLogger.Instance
190
+                : (ILog)new LoggerExecutionWrapper(logProvider.GetLogger(name), () => IsDisabled);
191
+        }
192
+
193
+        /// <summary>
194
+        /// Opens a nested diagnostics context.
195
+        /// </summary>
196
+        /// <param name="message">A message.</param>
197
+        /// <returns>An <see cref="IDisposable"/> that closes context when disposed.</returns>
198
+        [SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "SetCurrentLogProvider")]
199
+#if LIBLOG_PUBLIC
200
+        public
201
+#else
202
+        internal
203
+#endif
204
+        static IDisposable OpenNestedContext(string message)
205
+        {
206
+            var logProvider = CurrentLogProvider ?? ResolveLogProvider();
207
+
208
+            return logProvider == null
209
+                ? new DisposableAction(() => { })
210
+                : logProvider.OpenNestedContext(message);
211
+        }
212
+
213
+        /// <summary>
214
+        /// Opens a mapped diagnostics context.
215
+        /// </summary>
216
+        /// <param name="key">A key.</param>
217
+        /// <param name="value">A value.</param>
218
+        /// <param name="destructure">A optional paramater to indicate message should be destructured.</param>
219
+        /// <returns>An <see cref="IDisposable"/> that closes context when disposed.</returns>
220
+        [SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "SetCurrentLogProvider")]
221
+#if LIBLOG_PUBLIC
222
+        public
223
+#else
224
+        internal
225
+#endif
226
+        static IDisposable OpenMappedContext(string key, object value, bool destructure = false)
227
+        {
228
+            var logProvider = CurrentLogProvider ?? ResolveLogProvider();
229
+
230
+            return logProvider == null
231
+                ? new DisposableAction(() => { })
232
+                : logProvider.OpenMappedContext(key, value, destructure);
233
+        }
234
+#endif
235
+
236
+#if LIBLOG_PROVIDERS_ONLY
237
+    private
238
+#else
239
+        internal
240
+#endif
241
+        delegate bool IsLoggerAvailable();
242
+
243
+#if LIBLOG_PROVIDERS_ONLY
244
+        private
245
+#else
246
+        internal
247
+#endif
248
+        delegate ILogProvider CreateLogProvider();
249
+
250
+#if LIBLOG_PROVIDERS_ONLY
251
+        private
252
+#else
253
+        internal
254
+#endif
255
+        static readonly List<Tuple<IsLoggerAvailable, CreateLogProvider>> LogProviderResolvers =
</