chore: sync LIAM solution snapshot incl. diagnostics tooling

- update multiple LIAM projects and solution/config files

- add LiamWorkflowDiagnostics app sources and generated outputs

- include current workspace state (dependencies and build outputs)
This commit is contained in:
Meik
2026-02-27 09:12:34 +01:00
parent f563d78417
commit 3d4f60d83e
721 changed files with 936335 additions and 653393 deletions

31
AGENTS.md Normal file
View File

@@ -0,0 +1,31 @@
# Repository Guidelines
## Project Structure & Module Organization
The solution `LIAM.sln` covers all Matrix42 integration projects. Runtime code centers on `LiamM42WebApi` (service endpoints), `LiamWorkflowActivities*` (workflow logic and designers), and adapters such as `LiamActiveDirectory`, `LiamExchange`, and `LiamMsTeams`. Shared helpers live in `LiamBaseClasses` and `LiamHelper`. The `_shared` directory pins required third-party binaries; do not modify or rename them. NuGet restore artifacts belong in `packages/`, and the WinForms tooling `LiamTestTeams` supports manual verification.
## Build, Test, and Development Commands
Run `nuget restore LIAM.sln` once per clone to hydrate packages. Build locally with `msbuild LIAM.sln /p:Configuration=Debug`; use `Release` for deployable artifacts. For a clean rebuild, execute `msbuild LIAM.sln /t:Clean,Build /p:Configuration=Debug`. Visual Studio can open `LIAM.sln`, with `LiamM42WebApi` as the suggested startup project. When self-hosting the API, deploy it to IIS or IIS Express pointing at the project folder.
## Coding Style & Naming Conventions
Follow C# Allman braces with four-space indentation. Maintain `PascalCase` for classes, members, and constants (e.g., `constFragmentNameConfigProviderBase`), and `camelCase` for locals and parameters. Keep `using` directives sorted and trimmed. New projects should link `SharedAssemblyInfo.cs` to align assembly metadata. Format via Visual Studio or `dotnet format` if the SDK is available.
## Testing Guidelines
Automated tests are currently absent; regression work relies on targeted manual runs. Use `LiamTestTeams` to drive Microsoft Teams scenarios and validate API calls. Document manual steps in pull requests until automated coverage is added. When introducing tests, co-locate them with the feature project and add the project to `LIAM.sln` so CI can call the standard `msbuild` targets.
## Commit & Pull Request Guidelines
History is minimal (`initial`), so prefer concise, imperative commit subjects and reference tracking IDs when applicable (e.g., `Add Graph delta sync for users (LIAM-123)`). Squash tooling-only commits before merge. Pull requests should note the impacted integration area, configuration changes, and manual verification evidence (logs, screenshots, or request IDs). Confirm no secrets are included and request review from the owner of each touched module.
### Mandatory Workflow Rules
- Before making any code change, the working tree must be clean (`git diff` and `git diff --cached` must be empty).
- If the working tree is not clean before starting, stop and clarify with the requester before proceeding.
- After completing a requested code change, always create a commit with a concise, imperative message.
## Security & Configuration Tips
Exclude environment-specific `web.config`, `app.config`, and credential artifacts from version control. Treat binaries under `_shared` as read-only dependencies. When updating external references, confirm compatibility with the target Matrix42 environment and record the expected deployment steps in the PR.***

298
LIAM.sln
View File

@@ -1,161 +1,169 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.6.33723.286 VisualStudioVersion = 17.6.33723.286
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamTestTeams", "LiamTestTeams\LiamTestTeams.csproj", "{6197C490-07C6-4313-8E0F-AADC27776473}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamTestTeams", "LiamTestTeams\LiamTestTeams.csproj", "{6197C490-07C6-4313-8E0F-AADC27776473}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{451CEE78-7CF7-4691-AAB6-4D636BF22E04}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{451CEE78-7CF7-4691-AAB6-4D636BF22E04}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
_shared\Matrix42.Common.dll = _shared\Matrix42.Common.dll _shared\Matrix42.Common.dll = _shared\Matrix42.Common.dll
SharedAssemblyInfo.cs = SharedAssemblyInfo.cs SharedAssemblyInfo.cs = SharedAssemblyInfo.cs
_shared\System.Web.Http.dll = _shared\System.Web.Http.dll _shared\System.Web.Http.dll = _shared\System.Web.Http.dll
_shared\update4u.SPS.DataLayer.dll = _shared\update4u.SPS.DataLayer.dll _shared\update4u.SPS.DataLayer.dll = _shared\update4u.SPS.DataLayer.dll
_shared\update4u.SPS.DataLayer_alt.dll = _shared\update4u.SPS.DataLayer_alt.dll _shared\update4u.SPS.DataLayer_alt.dll = _shared\update4u.SPS.DataLayer_alt.dll
_shared\update4u.SPS.Security.dll = _shared\update4u.SPS.Security.dll _shared\update4u.SPS.Security.dll = _shared\update4u.SPS.Security.dll
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamBaseClasses", "LiamBaseClasses\LiamBaseClasses.csproj", "{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamBaseClasses", "LiamBaseClasses\LiamBaseClasses.csproj", "{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamMsTeams", "LiamMsTeams\LiamMsTeams.csproj", "{DACBD3DC-1866-4B39-964A-D2A8DEA2774C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamMsTeams", "LiamMsTeams\LiamMsTeams.csproj", "{DACBD3DC-1866-4B39-964A-D2A8DEA2774C}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamHelper", "LiamHelper\LiamHelper.csproj", "{6B0E73A6-F918-42D5-9525-D59D4D16283D}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamHelper", "LiamHelper\LiamHelper.csproj", "{6B0E73A6-F918-42D5-9525-D59D4D16283D}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamMsGraph", "LiamMsGraph\LiamMsGraph.csproj", "{452827DB-14FF-469E-AF41-1A24E1875BDA}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamMsGraph", "LiamMsGraph\LiamMsGraph.csproj", "{452827DB-14FF-469E-AF41-1A24E1875BDA}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamM42WebApi", "LiamM42WebApi\LiamM42WebApi.csproj", "{007A69B8-3BEA-44F3-BD61-C5354C707F3A}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamM42WebApi", "LiamM42WebApi\LiamM42WebApi.csproj", "{007A69B8-3BEA-44F3-BD61-C5354C707F3A}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{452827DB-14FF-469E-AF41-1A24E1875BDA} = {452827DB-14FF-469E-AF41-1A24E1875BDA} {452827DB-14FF-469E-AF41-1A24E1875BDA} = {452827DB-14FF-469E-AF41-1A24E1875BDA}
{DACBD3DC-1866-4B39-964A-D2A8DEA2774C} = {DACBD3DC-1866-4B39-964A-D2A8DEA2774C} {DACBD3DC-1866-4B39-964A-D2A8DEA2774C} = {DACBD3DC-1866-4B39-964A-D2A8DEA2774C}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamNtfs", "LiamNtfs\LiamNtfs.csproj", "{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamNtfs", "LiamNtfs\LiamNtfs.csproj", "{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamWorkflowActivities", "LiamWorkflowActivities\LiamWorkflowActivities.csproj", "{5840BB2D-88BF-4E1C-8FF6-510305894B42}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamWorkflowActivities", "LiamWorkflowActivities\LiamWorkflowActivities.csproj", "{5840BB2D-88BF-4E1C-8FF6-510305894B42}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamWorkflowActivitiesDesign", "LiamWorkflowActivitiesDesign\LiamWorkflowActivitiesDesign.csproj", "{03D5EBBD-3147-4B30-AE90-6D5C57335E0A}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamWorkflowActivitiesDesign", "LiamWorkflowActivitiesDesign\LiamWorkflowActivitiesDesign.csproj", "{03D5EBBD-3147-4B30-AE90-6D5C57335E0A}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamActiveDirectory", "LIAMActiveDirectory\LiamActiveDirectory.csproj", "{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamActiveDirectory", "LIAMActiveDirectory\LiamActiveDirectory.csproj", "{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamExchange", "LiamExchange\LiamExchange.csproj", "{12586A29-BB1E-49B4-B971-88E520D6A77C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamExchange", "LiamExchange\LiamExchange.csproj", "{12586A29-BB1E-49B4-B971-88E520D6A77C}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamWorkflowDiagnostics", "LiamWorkflowDiagnostics\LiamWorkflowDiagnostics.csproj", "{2D7FADB7-3F21-4D4F-9A60-639746F1B1B1}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_and_copy|Any CPU = Debug_and_copy|Any CPU Debug_and_copy|Any CPU = Debug_and_copy|Any CPU
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6197C490-07C6-4313-8E0F-AADC27776473}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU {6197C490-07C6-4313-8E0F-AADC27776473}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU
{6197C490-07C6-4313-8E0F-AADC27776473}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU {6197C490-07C6-4313-8E0F-AADC27776473}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU
{6197C490-07C6-4313-8E0F-AADC27776473}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6197C490-07C6-4313-8E0F-AADC27776473}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6197C490-07C6-4313-8E0F-AADC27776473}.Debug|Any CPU.Build.0 = Debug|Any CPU {6197C490-07C6-4313-8E0F-AADC27776473}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6197C490-07C6-4313-8E0F-AADC27776473}.Release|Any CPU.ActiveCfg = Release|Any CPU {6197C490-07C6-4313-8E0F-AADC27776473}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6197C490-07C6-4313-8E0F-AADC27776473}.Release|Any CPU.Build.0 = Release|Any CPU {6197C490-07C6-4313-8E0F-AADC27776473}.Release|Any CPU.Build.0 = Release|Any CPU
{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU {3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU
{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU {3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU
{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}.Debug|Any CPU.Build.0 = Debug|Any CPU {3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}.Release|Any CPU.ActiveCfg = Release|Any CPU {3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}.Release|Any CPU.Build.0 = Release|Any CPU {3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}.Release|Any CPU.Build.0 = Release|Any CPU
{DACBD3DC-1866-4B39-964A-D2A8DEA2774C}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU {DACBD3DC-1866-4B39-964A-D2A8DEA2774C}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU
{DACBD3DC-1866-4B39-964A-D2A8DEA2774C}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU {DACBD3DC-1866-4B39-964A-D2A8DEA2774C}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU
{DACBD3DC-1866-4B39-964A-D2A8DEA2774C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DACBD3DC-1866-4B39-964A-D2A8DEA2774C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DACBD3DC-1866-4B39-964A-D2A8DEA2774C}.Debug|Any CPU.Build.0 = Debug|Any CPU {DACBD3DC-1866-4B39-964A-D2A8DEA2774C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DACBD3DC-1866-4B39-964A-D2A8DEA2774C}.Release|Any CPU.ActiveCfg = Release|Any CPU {DACBD3DC-1866-4B39-964A-D2A8DEA2774C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DACBD3DC-1866-4B39-964A-D2A8DEA2774C}.Release|Any CPU.Build.0 = Release|Any CPU {DACBD3DC-1866-4B39-964A-D2A8DEA2774C}.Release|Any CPU.Build.0 = Release|Any CPU
{6B0E73A6-F918-42D5-9525-D59D4D16283D}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU {6B0E73A6-F918-42D5-9525-D59D4D16283D}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU
{6B0E73A6-F918-42D5-9525-D59D4D16283D}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU {6B0E73A6-F918-42D5-9525-D59D4D16283D}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU
{6B0E73A6-F918-42D5-9525-D59D4D16283D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6B0E73A6-F918-42D5-9525-D59D4D16283D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B0E73A6-F918-42D5-9525-D59D4D16283D}.Debug|Any CPU.Build.0 = Debug|Any CPU {6B0E73A6-F918-42D5-9525-D59D4D16283D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B0E73A6-F918-42D5-9525-D59D4D16283D}.Release|Any CPU.ActiveCfg = Release|Any CPU {6B0E73A6-F918-42D5-9525-D59D4D16283D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B0E73A6-F918-42D5-9525-D59D4D16283D}.Release|Any CPU.Build.0 = Release|Any CPU {6B0E73A6-F918-42D5-9525-D59D4D16283D}.Release|Any CPU.Build.0 = Release|Any CPU
{452827DB-14FF-469E-AF41-1A24E1875BDA}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU {452827DB-14FF-469E-AF41-1A24E1875BDA}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU
{452827DB-14FF-469E-AF41-1A24E1875BDA}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU {452827DB-14FF-469E-AF41-1A24E1875BDA}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU
{452827DB-14FF-469E-AF41-1A24E1875BDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {452827DB-14FF-469E-AF41-1A24E1875BDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{452827DB-14FF-469E-AF41-1A24E1875BDA}.Debug|Any CPU.Build.0 = Debug|Any CPU {452827DB-14FF-469E-AF41-1A24E1875BDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{452827DB-14FF-469E-AF41-1A24E1875BDA}.Release|Any CPU.ActiveCfg = Release|Any CPU {452827DB-14FF-469E-AF41-1A24E1875BDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{452827DB-14FF-469E-AF41-1A24E1875BDA}.Release|Any CPU.Build.0 = Release|Any CPU {452827DB-14FF-469E-AF41-1A24E1875BDA}.Release|Any CPU.Build.0 = Release|Any CPU
{007A69B8-3BEA-44F3-BD61-C5354C707F3A}.Debug_and_copy|Any CPU.ActiveCfg = Debug_and_copy|Any CPU {007A69B8-3BEA-44F3-BD61-C5354C707F3A}.Debug_and_copy|Any CPU.ActiveCfg = Debug_and_copy|Any CPU
{007A69B8-3BEA-44F3-BD61-C5354C707F3A}.Debug_and_copy|Any CPU.Build.0 = Debug_and_copy|Any CPU {007A69B8-3BEA-44F3-BD61-C5354C707F3A}.Debug_and_copy|Any CPU.Build.0 = Debug_and_copy|Any CPU
{007A69B8-3BEA-44F3-BD61-C5354C707F3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {007A69B8-3BEA-44F3-BD61-C5354C707F3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{007A69B8-3BEA-44F3-BD61-C5354C707F3A}.Debug|Any CPU.Build.0 = Debug|Any CPU {007A69B8-3BEA-44F3-BD61-C5354C707F3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{007A69B8-3BEA-44F3-BD61-C5354C707F3A}.Release|Any CPU.ActiveCfg = Release|Any CPU {007A69B8-3BEA-44F3-BD61-C5354C707F3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{007A69B8-3BEA-44F3-BD61-C5354C707F3A}.Release|Any CPU.Build.0 = Release|Any CPU {007A69B8-3BEA-44F3-BD61-C5354C707F3A}.Release|Any CPU.Build.0 = Release|Any CPU
{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU {7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU
{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU {7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU
{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}.Debug|Any CPU.Build.0 = Debug|Any CPU {7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}.Release|Any CPU.ActiveCfg = Release|Any CPU {7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}.Release|Any CPU.Build.0 = Release|Any CPU {7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}.Release|Any CPU.Build.0 = Release|Any CPU
{5840BB2D-88BF-4E1C-8FF6-510305894B42}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU {5840BB2D-88BF-4E1C-8FF6-510305894B42}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU
{5840BB2D-88BF-4E1C-8FF6-510305894B42}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU {5840BB2D-88BF-4E1C-8FF6-510305894B42}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU
{5840BB2D-88BF-4E1C-8FF6-510305894B42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5840BB2D-88BF-4E1C-8FF6-510305894B42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5840BB2D-88BF-4E1C-8FF6-510305894B42}.Debug|Any CPU.Build.0 = Debug|Any CPU {5840BB2D-88BF-4E1C-8FF6-510305894B42}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5840BB2D-88BF-4E1C-8FF6-510305894B42}.Release|Any CPU.ActiveCfg = Release|Any CPU {5840BB2D-88BF-4E1C-8FF6-510305894B42}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5840BB2D-88BF-4E1C-8FF6-510305894B42}.Release|Any CPU.Build.0 = Release|Any CPU {5840BB2D-88BF-4E1C-8FF6-510305894B42}.Release|Any CPU.Build.0 = Release|Any CPU
{03D5EBBD-3147-4B30-AE90-6D5C57335E0A}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU {03D5EBBD-3147-4B30-AE90-6D5C57335E0A}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU
{03D5EBBD-3147-4B30-AE90-6D5C57335E0A}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU {03D5EBBD-3147-4B30-AE90-6D5C57335E0A}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU
{03D5EBBD-3147-4B30-AE90-6D5C57335E0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {03D5EBBD-3147-4B30-AE90-6D5C57335E0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03D5EBBD-3147-4B30-AE90-6D5C57335E0A}.Debug|Any CPU.Build.0 = Debug|Any CPU {03D5EBBD-3147-4B30-AE90-6D5C57335E0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03D5EBBD-3147-4B30-AE90-6D5C57335E0A}.Release|Any CPU.ActiveCfg = Release|Any CPU {03D5EBBD-3147-4B30-AE90-6D5C57335E0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03D5EBBD-3147-4B30-AE90-6D5C57335E0A}.Release|Any CPU.Build.0 = Release|Any CPU {03D5EBBD-3147-4B30-AE90-6D5C57335E0A}.Release|Any CPU.Build.0 = Release|Any CPU
{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU {AECA0AD2-8B91-4767-9AFA-E160F6662DBE}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU
{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU {AECA0AD2-8B91-4767-9AFA-E160F6662DBE}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU
{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AECA0AD2-8B91-4767-9AFA-E160F6662DBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}.Debug|Any CPU.Build.0 = Debug|Any CPU {AECA0AD2-8B91-4767-9AFA-E160F6662DBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}.Release|Any CPU.ActiveCfg = Release|Any CPU {AECA0AD2-8B91-4767-9AFA-E160F6662DBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}.Release|Any CPU.Build.0 = Release|Any CPU {AECA0AD2-8B91-4767-9AFA-E160F6662DBE}.Release|Any CPU.Build.0 = Release|Any CPU
{12586A29-BB1E-49B4-B971-88E520D6A77C}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU {12586A29-BB1E-49B4-B971-88E520D6A77C}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU
{12586A29-BB1E-49B4-B971-88E520D6A77C}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU {12586A29-BB1E-49B4-B971-88E520D6A77C}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU
{12586A29-BB1E-49B4-B971-88E520D6A77C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {12586A29-BB1E-49B4-B971-88E520D6A77C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{12586A29-BB1E-49B4-B971-88E520D6A77C}.Debug|Any CPU.Build.0 = Debug|Any CPU {12586A29-BB1E-49B4-B971-88E520D6A77C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{12586A29-BB1E-49B4-B971-88E520D6A77C}.Release|Any CPU.ActiveCfg = Release|Any CPU {12586A29-BB1E-49B4-B971-88E520D6A77C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{12586A29-BB1E-49B4-B971-88E520D6A77C}.Release|Any CPU.Build.0 = Release|Any CPU {12586A29-BB1E-49B4-B971-88E520D6A77C}.Release|Any CPU.Build.0 = Release|Any CPU
{2D7FADB7-3F21-4D4F-9A60-639746F1B1B1}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU
{2D7FADB7-3F21-4D4F-9A60-639746F1B1B1}.Debug_and_copy|Any CPU.Build.0 = Debug|Any CPU
{2D7FADB7-3F21-4D4F-9A60-639746F1B1B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2D7FADB7-3F21-4D4F-9A60-639746F1B1B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2D7FADB7-3F21-4D4F-9A60-639746F1B1B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2D7FADB7-3F21-4D4F-9A60-639746F1B1B1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0EC9AD55-4DBA-49C3-BEEF-5EC07E361909} SolutionGuid = {0EC9AD55-4DBA-49C3-BEEF-5EC07E361909}
EndGlobalSection EndGlobalSection
GlobalSection(TeamFoundationVersionControl) = preSolution GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 12 SccNumberOfProjects = 12
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://consulting4it.visualstudio.com/ SccTeamFoundationServer = https://consulting4it.visualstudio.com/
SccLocalPath0 = . SccLocalPath0 = .
SccProjectUniqueName1 = LiamBaseClasses\\LiamBaseClasses.csproj SccProjectUniqueName1 = LiamBaseClasses\\LiamBaseClasses.csproj
SccProjectName1 = LiamBaseClasses SccProjectName1 = LiamBaseClasses
SccLocalPath1 = LiamBaseClasses SccLocalPath1 = LiamBaseClasses
SccProjectUniqueName2 = LiamHelper\\LiamHelper.csproj SccProjectUniqueName2 = LiamHelper\\LiamHelper.csproj
SccProjectName2 = LiamHelper SccProjectName2 = LiamHelper
SccLocalPath2 = LiamHelper SccLocalPath2 = LiamHelper
SccProjectUniqueName3 = LiamM42WebApi\\LiamM42WebApi.csproj SccProjectUniqueName3 = LiamM42WebApi\\LiamM42WebApi.csproj
SccProjectName3 = LiamM42WebApi SccProjectName3 = LiamM42WebApi
SccLocalPath3 = LiamM42WebApi SccLocalPath3 = LiamM42WebApi
SccProjectUniqueName4 = LiamMsGraph\\LiamMsGraph.csproj SccProjectUniqueName4 = LiamMsGraph\\LiamMsGraph.csproj
SccProjectName4 = LiamMsGraph SccProjectName4 = LiamMsGraph
SccLocalPath4 = LiamMsGraph SccLocalPath4 = LiamMsGraph
SccProjectUniqueName5 = LiamMsTeams\\LiamMsTeams.csproj SccProjectUniqueName5 = LiamMsTeams\\LiamMsTeams.csproj
SccProjectName5 = LiamMsTeams SccProjectName5 = LiamMsTeams
SccLocalPath5 = LiamMsTeams SccLocalPath5 = LiamMsTeams
SccProjectUniqueName6 = LiamTestTeams\\LiamTestTeams.csproj SccProjectUniqueName6 = LiamTestTeams\\LiamTestTeams.csproj
SccProjectName6 = LiamTestTeams SccProjectName6 = LiamTestTeams
SccLocalPath6 = LiamTestTeams SccLocalPath6 = LiamTestTeams
SccProjectUniqueName7 = LiamNtfs\\LiamNtfs.csproj SccProjectUniqueName7 = LiamNtfs\\LiamNtfs.csproj
SccProjectName7 = LiamNtfs SccProjectName7 = LiamNtfs
SccLocalPath7 = LiamNtfs SccLocalPath7 = LiamNtfs
SccProjectUniqueName8 = LiamWorkflowActivities\\LiamWorkflowActivities.csproj SccProjectUniqueName8 = LiamWorkflowActivities\\LiamWorkflowActivities.csproj
SccProjectName8 = LiamWorkflowActivities SccProjectName8 = LiamWorkflowActivities
SccLocalPath8 = LiamWorkflowActivities SccLocalPath8 = LiamWorkflowActivities
SccProjectUniqueName9 = LiamWorkflowActivitiesDesign\\LiamWorkflowActivitiesDesign.csproj SccProjectUniqueName9 = LiamWorkflowActivitiesDesign\\LiamWorkflowActivitiesDesign.csproj
SccProjectName9 = LiamWorkflowActivitiesDesign SccProjectName9 = LiamWorkflowActivitiesDesign
SccLocalPath9 = LiamWorkflowActivitiesDesign SccLocalPath9 = LiamWorkflowActivitiesDesign
SccProjectUniqueName10 = LIAMActiveDirectory\\LiamActiveDirectory.csproj SccProjectUniqueName10 = LIAMActiveDirectory\\LiamActiveDirectory.csproj
SccProjectName10 = LIAMActiveDirectory SccProjectName10 = LIAMActiveDirectory
SccLocalPath10 = LIAMActiveDirectory SccLocalPath10 = LIAMActiveDirectory
SccProjectUniqueName11 = LiamExchange\\LiamExchange.csproj SccProjectUniqueName11 = LiamExchange\\LiamExchange.csproj
SccProjectName11 = LiamExchange SccProjectName11 = LiamExchange
SccLocalPath11 = LiamExchange SccLocalPath11 = LiamExchange
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@@ -1,371 +1,371 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.DirectoryServices.AccountManagement; using System.DirectoryServices.AccountManagement;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Security.AccessControl; using System.Security.AccessControl;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using C4IT.Logging; using C4IT.Logging;
using C4IT.Matrix42.ServerInfo; using C4IT.Matrix42.ServerInfo;
using LiamAD; using LiamAD;
using static C4IT.Logging.cLogManager; using static C4IT.Logging.cLogManager;
using static LiamAD.ADServiceGroupCreator; using static LiamAD.ADServiceGroupCreator;
using static LiamAD.cActiveDirectoryBase; using static LiamAD.cActiveDirectoryBase;
namespace C4IT.LIAM namespace C4IT.LIAM
{ {
public static class LiamInitializer public static class LiamInitializer
{ {
static public cLiamProviderBase CreateInstance(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData) static public cLiamProviderBase CreateInstance(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData)
{ {
return new cLiamProviderAD(LiamConfiguration, ProviderData); return new cLiamProviderAD(LiamConfiguration, ProviderData);
} }
} }
public class cLiamProviderAD : cLiamProviderBase public class cLiamProviderAD : cLiamProviderBase
{ {
public static Guid adModuleId = new Guid("e820a625-0653-ee11-b886-00155d300101"); public static Guid adModuleId = new Guid("e820a625-0653-ee11-b886-00155d300101");
public readonly cActiveDirectoryBase activeDirectoryBase = new cActiveDirectoryBase(); public readonly cActiveDirectoryBase activeDirectoryBase = new cActiveDirectoryBase();
private readonly ADServiceGroupCreator _serviceGroupCreator; private readonly ADServiceGroupCreator _serviceGroupCreator;
public cLiamProviderAD(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData) : public cLiamProviderAD(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData) :
base(LiamConfiguration, ProviderData) base(LiamConfiguration, ProviderData)
{ {
_serviceGroupCreator = new ADServiceGroupCreator(this); _serviceGroupCreator = new ADServiceGroupCreator(this);
} }
public List<Tuple<string, string, string, string>> CreateServiceGroups( public List<Tuple<string, string, string, string>> CreateServiceGroups(
string serviceName, string serviceName,
string description = null, string description = null,
eLiamAccessRoleScopes gruppenbereich = eLiamAccessRoleScopes.Universal, eLiamAccessRoleScopes gruppenbereich = eLiamAccessRoleScopes.Universal,
ADGroupType gruppentyp = ADGroupType.Distribution, ADGroupType gruppentyp = ADGroupType.Distribution,
IEnumerable<string> ownerSidList = null, IEnumerable<string> ownerSidList = null,
IEnumerable<string> memberSidList = null) IEnumerable<string> memberSidList = null)
{ {
return _serviceGroupCreator.EnsureServiceGroups( return _serviceGroupCreator.EnsureServiceGroups(
serviceName, serviceName,
description, description,
gruppenbereich, gruppenbereich,
gruppentyp, gruppentyp,
ownerSidList, ownerSidList,
memberSidList); memberSidList);
} }
public override async Task<bool> LogonAsync() public override async Task<bool> LogonAsync()
{ {
if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId)) if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId))
{ {
LogEntry($"Error: License not valid", LogLevels.Error); LogEntry($"Error: License not valid", LogLevels.Error);
return false; return false;
} }
return await LogonAsync(true); return await LogonAsync(true);
} }
public async Task<bool> LogonAsync(bool force = false) public async Task<bool> LogonAsync(bool force = false)
{ {
var CM = MethodBase.GetCurrentMethod(); var CM = MethodBase.GetCurrentMethod();
LogMethodBegin(CM); LogMethodBegin(CM);
try try
{ {
var LI = new cADLogonInfo() var LI = new cADLogonInfo()
{ {
Domain = Domain, Domain = Domain,
User = Credential?.Identification, User = Credential?.Identification,
UserSecret = Credential?.Secret, UserSecret = Credential?.Secret,
TargetGroupPath = this.GroupPath TargetGroupPath = this.GroupPath
}; };
var RetVal = await activeDirectoryBase.LogonAsync(LI); var RetVal = await activeDirectoryBase.LogonAsync(LI);
return RetVal; return RetVal;
} }
catch (Exception E) catch (Exception E)
{ {
LogException(E); LogException(E);
} }
finally finally
{ {
LogMethodEnd(CM); LogMethodEnd(CM);
} }
return false; return false;
} }
public override async Task<List<cLiamDataAreaBase>> getDataAreasAsync(int Depth = -1) public override async Task<List<cLiamDataAreaBase>> getDataAreasAsync(int Depth = -1)
{ {
var CM = MethodBase.GetCurrentMethod(); var CM = MethodBase.GetCurrentMethod();
LogMethodBegin(CM); LogMethodBegin(CM);
try try
{ {
if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId)) if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId))
{ {
LogEntry($"Error: License not valid", LogLevels.Error); LogEntry($"Error: License not valid", LogLevels.Error);
return new List<cLiamDataAreaBase>(); return new List<cLiamDataAreaBase>();
} }
if (!await LogonAsync()) if (!await LogonAsync())
return null; return null;
if (string.IsNullOrEmpty(this.GroupPath)) if (string.IsNullOrEmpty(this.GroupPath))
return null; return null;
// 1. Alle Roh-Resultate einlesen // 1. Alle Roh-Resultate einlesen
var rawList = await activeDirectoryBase.RequestSecurityGroupsListAsync(this.GroupFilter); var rawList = await activeDirectoryBase.RequestSecurityGroupsListAsync(this.GroupFilter);
if (rawList == null) if (rawList == null)
return null; return null;
// 2. Nur die, die dem RegEx entsprechen und deren Wert extrahieren // 2. Nur die, die dem RegEx entsprechen und deren Wert extrahieren
var allResults = rawList var allResults = rawList
.Where(entry => .Where(entry =>
string.IsNullOrEmpty(this.GroupRegEx) string.IsNullOrEmpty(this.GroupRegEx)
|| Regex.Match(entry.Value.DisplayName, this.GroupRegEx).Success) || Regex.Match(entry.Value.DisplayName, this.GroupRegEx).Success)
.Select(entry => (cSecurityGroupResult)entry.Value) .Select(entry => (cSecurityGroupResult)entry.Value)
.ToList(); .ToList();
// 3. ManagedBySID-Werte sammeln (ohne Null-/Leereinträge) // 3. ManagedBySID-Werte sammeln (ohne Null-/Leereinträge)
var managedBySids = new HashSet<string>( var managedBySids = new HashSet<string>(
allResults allResults
.Select(r => r.ManagedBySID) .Select(r => r.ManagedBySID)
.Where(m => !string.IsNullOrEmpty(m)) .Where(m => !string.IsNullOrEmpty(m))
); );
// 4. Nur die Gruppen, deren ID nicht in managedBySids enthalten ist // 4. Nur die Gruppen, deren ID nicht in managedBySids enthalten ist
var filteredResults = allResults var filteredResults = allResults
.Where(r => !managedBySids.Contains(r.ID)) .Where(r => !managedBySids.Contains(r.ID))
.ToList(); .ToList();
// 5. In DataArea-Objekte umwandeln // 5. In DataArea-Objekte umwandeln
var SecurityGroups = new List<cLiamDataAreaBase>(); var SecurityGroups = new List<cLiamDataAreaBase>();
foreach (var secGroup in filteredResults) foreach (var secGroup in filteredResults)
{ {
SecurityGroups.Add(new cLiamAdGroupAsDataArea(this, secGroup)); SecurityGroups.Add(new cLiamAdGroupAsDataArea(this, secGroup));
} }
return SecurityGroups; return SecurityGroups;
} }
catch (Exception E) catch (Exception E)
{ {
LogException(E); LogException(E);
return null; return null;
} }
finally finally
{ {
LogMethodEnd(CM); LogMethodEnd(CM);
} }
} }
public override async Task<List<cLiamDataAreaBase>> getSecurityGroupsAsync(string groupFilter) public override async Task<List<cLiamDataAreaBase>> getSecurityGroupsAsync(string groupFilter)
{ {
var CM = MethodBase.GetCurrentMethod(); var CM = MethodBase.GetCurrentMethod();
LogMethodBegin(CM); LogMethodBegin(CM);
try try
{ {
if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId)) if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId))
{ {
LogEntry($"Error: License not valid", LogLevels.Error); LogEntry($"Error: License not valid", LogLevels.Error);
return new List<cLiamDataAreaBase>(); return new List<cLiamDataAreaBase>();
} }
if (!await LogonAsync()) if (!await LogonAsync())
return null; return null;
if (string.IsNullOrEmpty(this.GroupPath)) if (string.IsNullOrEmpty(this.GroupPath))
return null; return null;
var SecurityGroups = new List<cLiamDataAreaBase>(); var SecurityGroups = new List<cLiamDataAreaBase>();
var SGL = await activeDirectoryBase.RequestSecurityGroupsListAsync(groupFilter); var SGL = await activeDirectoryBase.RequestSecurityGroupsListAsync(groupFilter);
if (SGL == null) if (SGL == null)
return null; return null;
foreach (var Entry in SGL) foreach (var Entry in SGL)
{ {
if (!string.IsNullOrEmpty(this.GroupRegEx) && !Regex.Match(Entry.Value.DisplayName, this.GroupRegEx).Success) if (!string.IsNullOrEmpty(this.GroupRegEx) && !Regex.Match(Entry.Value.DisplayName, this.GroupRegEx).Success)
continue; continue;
var SecurityGroup = new cLiamAdGroup2(this, (cSecurityGroupResult)Entry.Value); var SecurityGroup = new cLiamAdGroup2(this, (cSecurityGroupResult)Entry.Value);
SecurityGroups.Add(SecurityGroup); SecurityGroups.Add(SecurityGroup);
} }
return SecurityGroups; return SecurityGroups;
} }
catch (Exception E) catch (Exception E)
{ {
LogException(E); LogException(E);
} }
finally finally
{ {
LogMethodEnd(CM); LogMethodEnd(CM);
} }
return null; return null;
} }
public int getDepth(string path) public int getDepth(string path)
{ {
return getDepth(this.RootPath, path); return getDepth(this.RootPath, path);
} }
public static int getDepth(DirectoryInfo root, DirectoryInfo folder) public static int getDepth(DirectoryInfo root, DirectoryInfo folder)
{ {
var rootDepth = root.FullName.TrimEnd(Path.DirectorySeparatorChar).Split(Path.DirectorySeparatorChar).Length; var rootDepth = root.FullName.TrimEnd(Path.DirectorySeparatorChar).Split(Path.DirectorySeparatorChar).Length;
var folderDepth = folder.FullName.TrimEnd(Path.DirectorySeparatorChar).Split(Path.DirectorySeparatorChar).Length; var folderDepth = folder.FullName.TrimEnd(Path.DirectorySeparatorChar).Split(Path.DirectorySeparatorChar).Length;
return folderDepth - rootDepth; return folderDepth - rootDepth;
} }
public static int getDepth(string root, string folder) public static int getDepth(string root, string folder)
{ {
return getDepth(new DirectoryInfo(root), new DirectoryInfo(folder)); return getDepth(new DirectoryInfo(root), new DirectoryInfo(folder));
} }
public override string GetLastErrorMessage() public override string GetLastErrorMessage()
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public override async Task<cLiamDataAreaBase> LoadDataArea(string UID) public override async Task<cLiamDataAreaBase> LoadDataArea(string UID)
{ {
//TODO implement LoadDataArea //TODO implement LoadDataArea
var CM = MethodBase.GetCurrentMethod(); var CM = MethodBase.GetCurrentMethod();
LogMethodBegin(CM); LogMethodBegin(CM);
try try
{ {
await Task.Delay(0); await Task.Delay(0);
if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId)) if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId))
{ {
LogEntry($"Error: License not valid", LogLevels.Error); LogEntry($"Error: License not valid", LogLevels.Error);
return null; return null;
} }
var res = new cLiamAdGroupAsDataArea(this, new cSecurityGroupResult() var res = new cLiamAdGroupAsDataArea(this, new cSecurityGroupResult()
{ {
Path = UID Path = UID
}); });
return res; return res;
} }
catch (Exception E) catch (Exception E)
{ {
LogException(E); LogException(E);
return null; return null;
} }
finally finally
{ {
LogMethodEnd(CM); LogMethodEnd(CM);
} }
} }
} }
public class cLiamAdGroupAsDataArea : cLiamDataAreaBase public class cLiamAdGroupAsDataArea : cLiamDataAreaBase
{ {
public new readonly cLiamProviderAD Provider = null; public new readonly cLiamProviderAD Provider = null;
public readonly string dn = null; public readonly string dn = null;
public readonly string scope = null; public readonly string scope = null;
public readonly string ManagedBySID; public readonly string ManagedBySID;
public override Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1) public override Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public cLiamAdGroupAsDataArea(cLiamProviderAD Provider, cSecurityGroupResult secGroup) : base(Provider) public cLiamAdGroupAsDataArea(cLiamProviderAD Provider, cSecurityGroupResult secGroup) : base(Provider)
{ {
this.UID = secGroup.ID; this.UID = secGroup.ID;
this.TechnicalName = secGroup.Path; this.TechnicalName = secGroup.Path;
this.DisplayName = secGroup.DisplayName; this.DisplayName = secGroup.DisplayName;
this.Description = secGroup.Description; this.Description = secGroup.Description;
this.Provider = Provider; this.Provider = Provider;
this.dn = secGroup.Path; this.dn = secGroup.Path;
this.scope = secGroup.Scope.ToString(); this.scope = secGroup.Scope.ToString();
this.ManagedBySID = secGroup.ManagedBySID; this.ManagedBySID = secGroup.ManagedBySID;
} }
public override async Task<List<cLiamUserInfo>> GetOwnersAsync() public override async Task<List<cLiamUserInfo>> GetOwnersAsync()
{ {
var CM = MethodBase.GetCurrentMethod(); var CM = MethodBase.GetCurrentMethod();
LogMethodBegin(CM); LogMethodBegin(CM);
try try
{ {
return await GetMembersAsync(true); return await GetMembersAsync(true);
} }
catch (Exception E) catch (Exception E)
{ {
LogException(E); LogException(E);
return null; return null;
} }
finally finally
{ {
LogMethodEnd(CM); LogMethodEnd(CM);
} }
} }
private async Task<List<cLiamUserInfo>> GetMembersAsync(bool owners) private async Task<List<cLiamUserInfo>> GetMembersAsync(bool owners)
{ {
var CM = MethodBase.GetCurrentMethod(); var CM = MethodBase.GetCurrentMethod();
LogMethodBegin(CM); LogMethodBegin(CM);
try try
{ {
var AD = this.Provider?.activeDirectoryBase; var AD = this.Provider?.activeDirectoryBase;
if (AD == null) if (AD == null)
{ {
LogEntry($"Could not get ad class from Provider for folder '{this.TechnicalName}'", LogLevels.Warning); LogEntry($"Could not get ad class from Provider for folder '{this.TechnicalName}'", LogLevels.Warning);
return null; return null;
} }
cADCollectionBase lstMembers; cADCollectionBase lstMembers;
if (owners && !string.IsNullOrEmpty(OwnerRef)) if (owners && !string.IsNullOrEmpty(OwnerRef))
lstMembers = await AD.GetMembersAsync(OwnerRef); lstMembers = await AD.GetMembersAsync(OwnerRef);
else if (owners && !string.IsNullOrEmpty(dn)) else if (owners && !string.IsNullOrEmpty(dn))
lstMembers = await AD.GetManagedByMembersAsync(this.dn); lstMembers = await AD.GetManagedByMembersAsync(this.dn);
else else
lstMembers = null; lstMembers = null;
if (lstMembers == null) if (lstMembers == null)
{ {
LogEntry($"Could not get owner list for folder '{this.TechnicalName}'", LogLevels.Warning); LogEntry($"Could not get owner list for folder '{this.TechnicalName}'", LogLevels.Warning);
return null; return null;
} }
var RetVal = new List<cLiamUserInfo>(lstMembers.Count); var RetVal = new List<cLiamUserInfo>(lstMembers.Count);
LogEntry($"Owners for folder found: {lstMembers.Count}", LogLevels.Debug); LogEntry($"Owners for folder found: {lstMembers.Count}", LogLevels.Debug);
foreach (var MemberEntry in lstMembers.Values) foreach (var MemberEntry in lstMembers.Values)
{ {
var User = new cLiamUserInfo() var User = new cLiamUserInfo()
{ {
DisplayName = MemberEntry.DisplayName, DisplayName = MemberEntry.DisplayName,
UserPrincipalName = (MemberEntry as cADUserResult).UserPrincipalName, UserPrincipalName = (MemberEntry as cADUserResult).UserPrincipalName,
SID = MemberEntry.ID SID = MemberEntry.ID
}; };
RetVal.Add(User); RetVal.Add(User);
} }
return RetVal; return RetVal;
} }
catch (Exception E) catch (Exception E)
{ {
LogException(E); LogException(E);
return null; return null;
} }
finally finally
{ {
LogMethodEnd(CM); LogMethodEnd(CM);
} }
} }
} }
public class cLiamAdGroup2 : cLiamDataAreaBase public class cLiamAdGroup2 : cLiamDataAreaBase
{ {
public new readonly cLiamProviderAD Provider = null; public new readonly cLiamProviderAD Provider = null;
public readonly string dn = null; public readonly string dn = null;
public readonly string scope = null; public readonly string scope = null;
public override Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1) public override Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public cLiamAdGroup2(cLiamProviderAD Provider, cSecurityGroupResult secGroup) : base(Provider) public cLiamAdGroup2(cLiamProviderAD Provider, cSecurityGroupResult secGroup) : base(Provider)
{ {
this.DisplayName = secGroup.DisplayName; this.DisplayName = secGroup.DisplayName;
this.UID = secGroup.ID; this.UID = secGroup.ID;
this.TechnicalName = secGroup.DisplayName; this.TechnicalName = secGroup.DisplayName;
this.Provider = Provider; this.Provider = Provider;
this.dn = secGroup.Path; this.dn = secGroup.Path;
this.scope = secGroup.Scope.ToString(); this.scope = secGroup.Scope.ToString();
} }
} }
} }

View File

@@ -1,10 +1,10 @@
"" ""
{ {
"FILE_VERSION" = "9237" "FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER" "ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = "" "PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0" "NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = "" "ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0" "NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
} }

View File

@@ -1,74 +1,77 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}</ProjectGuid> <ProjectGuid>{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LIAMActiveDirectory</RootNamespace> <RootNamespace>LIAMActiveDirectory</RootNamespace>
<AssemblyName>LiamActiveDirectory</AssemblyName> <AssemblyName>LiamActiveDirectory</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<SccProjectName>SAK</SccProjectName> <SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath> <SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath> <SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider> <SccProvider>SAK</SccProvider>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.DirectoryServices" /> <Reference Include="System.DirectoryServices" />
<Reference Include="System.DirectoryServices.AccountManagement" /> <Reference Include="System.DirectoryServices.AccountManagement" />
<Reference Include="System.ValueTuple, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.ValueTuple, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.6.1\lib\net462\System.ValueTuple.dll</HintPath> <HintPath>..\packages\System.ValueTuple.4.6.1\lib\net462\System.ValueTuple.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="cActiveDirectoryBase.cs" /> <Compile Include="..\SharedAssemblyInfo.cs">
<Compile Include="C4IT.LIAM.AD.cs" /> <Link>Properties\SharedAssemblyInfo.cs</Link>
<Compile Include="cADBase.cs" /> </Compile>
<Compile Include="cADServiceGroupCreator.cs" /> <Compile Include="cActiveDirectoryBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="C4IT.LIAM.AD.cs" />
</ItemGroup> <Compile Include="cADBase.cs" />
<ItemGroup> <Compile Include="cADServiceGroupCreator.cs" />
<ProjectReference Include="..\LiamBaseClasses\LiamBaseClasses.csproj"> <Compile Include="Properties\AssemblyInfo.cs" />
<Project>{3531c9e6-cf6e-458e-b604-4a5a8d1c7ab0}</Project> </ItemGroup>
<Name>LiamBaseClasses</Name> <ItemGroup>
</ProjectReference> <ProjectReference Include="..\LiamBaseClasses\LiamBaseClasses.csproj">
<ProjectReference Include="..\LiamHelper\LiamHelper.csproj"> <Project>{3531c9e6-cf6e-458e-b604-4a5a8d1c7ab0}</Project>
<Project>{6b0e73a6-f918-42d5-9525-d59d4d16283d}</Project> <Name>LiamBaseClasses</Name>
<Name>LiamHelper</Name> </ProjectReference>
</ProjectReference> <ProjectReference Include="..\LiamHelper\LiamHelper.csproj">
</ItemGroup> <Project>{6b0e73a6-f918-42d5-9525-d59d4d16283d}</Project>
<ItemGroup> <Name>LiamHelper</Name>
<None Include="packages.config" /> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View File

@@ -1,36 +1,19 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("LIAMActiveDirectory")] [assembly: AssemblyTitle("LIAM AD Module")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCulture("")]
[assembly: AssemblyProduct("LIAMActiveDirectory")]
[assembly: AssemblyCopyright("Copyright © 2024")] // Setting ComVisible to false makes the types in this assembly not visible
[assembly: AssemblyTrademark("")] // to COM components. If you need to access a type in this assembly from
[assembly: AssemblyCulture("")] // COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from // The following GUID is for the ID of the typelib if this project is exposed to COM
// COM, set the ComVisible attribute to true on that type. [assembly: Guid("aeca0ad2-8b91-4767-9afa-e160f6662dbe")]
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("aeca0ad2-8b91-4767-9afa-e160f6662dbe")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,142 +1,142 @@
using C4IT.Logging; using C4IT.Logging;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.DirectoryServices.AccountManagement; using System.DirectoryServices.AccountManagement;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security.AccessControl; using System.Security.AccessControl;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace LiamAD namespace LiamAD
{ {
public class cADBase public class cADBase
{ {
private cADLogonInfo privLogonInfo = null; private cADLogonInfo privLogonInfo = null;
private int scanningDepth; private int scanningDepth;
public PrincipalContext adContext = null; public PrincipalContext adContext = null;
public Exception LastException { get; private set; } = null; public Exception LastException { get; private set; } = null;
public string LastErrorMessage { get; private set; } = null; public string LastErrorMessage { get; private set; } = null;
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public void ResetError() public void ResetError()
{ {
LastException = null; LastException = null;
LastErrorMessage = null; LastErrorMessage = null;
} }
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public void SetErrorException(string Action, Exception E, LogLevels lev = LogLevels.Error) public void SetErrorException(string Action, Exception E, LogLevels lev = LogLevels.Error)
{ {
LastException = E; LastException = E;
LastErrorMessage = Action + ": " + E.Message; LastErrorMessage = Action + ": " + E.Message;
cLogManager.LogEntry(Action, lev); cLogManager.LogEntry(Action, lev);
} }
[DllImport("mpr.dll")] [DllImport("mpr.dll")]
private static extern int WNetAddConnection2(NetResource netResource, string password, string username, int flags); private static extern int WNetAddConnection2(NetResource netResource, string password, string username, int flags);
[DllImport("mpr.dll")] [DllImport("mpr.dll")]
private static extern int WNetCancelConnection2(string name, int flags, private static extern int WNetCancelConnection2(string name, int flags,
bool force); bool force);
} }
public class cADLogonInfo public class cADLogonInfo
{ {
public string Domain; public string Domain;
public string User; public string User;
public string UserSecret; public string UserSecret;
public string TargetGroupPath; public string TargetGroupPath;
} }
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public class NetResource public class NetResource
{ {
public ResourceScope Scope; public ResourceScope Scope;
public ResourceType ResourceType; public ResourceType ResourceType;
public ResourceDisplaytype DisplayType; public ResourceDisplaytype DisplayType;
public int Usage; public int Usage;
public string LocalName; public string LocalName;
public string RemoteName; public string RemoteName;
public string Comment; public string Comment;
public string Provider; public string Provider;
} }
public enum ResourceScope : int public enum ResourceScope : int
{ {
Connected = 1, Connected = 1,
GlobalNetwork, GlobalNetwork,
Remembered, Remembered,
Recent, Recent,
Context Context
}; };
public enum ResourceType : int public enum ResourceType : int
{ {
Any = 0, Any = 0,
Disk = 1, Disk = 1,
Print = 2, Print = 2,
Reserved = 8, Reserved = 8,
} }
public enum ResourceDisplaytype : int public enum ResourceDisplaytype : int
{ {
Generic = 0x0, Generic = 0x0,
Domain = 0x01, Domain = 0x01,
Server = 0x02, Server = 0x02,
Share = 0x03, Share = 0x03,
File = 0x04, File = 0x04,
Group = 0x05, Group = 0x05,
Network = 0x06, Network = 0x06,
Root = 0x07, Root = 0x07,
Shareadmin = 0x08, Shareadmin = 0x08,
Directory = 0x09, Directory = 0x09,
Tree = 0x0a, Tree = 0x0a,
Ndscontainer = 0x0b Ndscontainer = 0x0b
} }
public enum NetError : uint public enum NetError : uint
{ {
NERR_Success = 0, NERR_Success = 0,
NERR_BASE = 2100, NERR_BASE = 2100,
NERR_UnknownDevDir = (NERR_BASE + 16), NERR_UnknownDevDir = (NERR_BASE + 16),
NERR_DuplicateShare = (NERR_BASE + 18), NERR_DuplicateShare = (NERR_BASE + 18),
NERR_BufTooSmall = (NERR_BASE + 23), NERR_BufTooSmall = (NERR_BASE + 23),
} }
public enum SHARE_TYPE : uint public enum SHARE_TYPE : uint
{ {
STYPE_DISKTREE = 0, STYPE_DISKTREE = 0,
STYPE_PRINTQ = 1, STYPE_PRINTQ = 1,
STYPE_DEVICE = 2, STYPE_DEVICE = 2,
STYPE_IPC = 3, STYPE_IPC = 3,
STYPE_SPECIAL = 0x80000000, STYPE_SPECIAL = 0x80000000,
} }
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SHARE_INFO_1 public struct SHARE_INFO_1
{ {
public string shi1_netname; public string shi1_netname;
public uint shi1_type; public uint shi1_type;
public string shi1_remark; public string shi1_remark;
public SHARE_INFO_1(string sharename, uint sharetype, string remark) public SHARE_INFO_1(string sharename, uint sharetype, string remark)
{ {
this.shi1_netname = sharename; this.shi1_netname = sharename;
this.shi1_type = sharetype; this.shi1_type = sharetype;
this.shi1_remark = remark; this.shi1_remark = remark;
} }
public override string ToString() public override string ToString()
{ {
return shi1_netname; return shi1_netname;
} }
} }
} }

View File

@@ -1,288 +1,288 @@
using System; using System;
using System.DirectoryServices; using System.DirectoryServices;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using C4IT.Logging; using C4IT.Logging;
using C4IT.LIAM; using C4IT.LIAM;
using LiamAD; using LiamAD;
using System.Collections.Generic; using System.Collections.Generic;
using System.Security.Principal; using System.Security.Principal;
using System.Text; using System.Text;
namespace LiamAD namespace LiamAD
{ {
/// <summary> /// <summary>
/// Helfer für cLiamProviderAD: Erstellt AD Member- und Owner-Gruppen für Services /// Helfer für cLiamProviderAD: Erstellt AD Member- und Owner-Gruppen für Services
/// nach konfigurierter Namenskonvention und setzt ManagedBy. /// nach konfigurierter Namenskonvention und setzt ManagedBy.
/// </summary> /// </summary>
public class ADServiceGroupCreator public class ADServiceGroupCreator
{ {
private readonly cLiamProviderAD _provider; private readonly cLiamProviderAD _provider;
private readonly cActiveDirectoryBase _adBase; private readonly cActiveDirectoryBase _adBase;
private readonly string _ldapRoot; private readonly string _ldapRoot;
private readonly string _user; private readonly string _user;
private readonly string _password; private readonly string _password;
public enum ADGroupType public enum ADGroupType
{ {
Security, // Sicherheit Security, // Sicherheit
Distribution // Verteiler Distribution // Verteiler
} }
public ADServiceGroupCreator(cLiamProviderAD provider) public ADServiceGroupCreator(cLiamProviderAD provider)
{ {
_provider = provider ?? throw new ArgumentNullException(nameof(provider)); _provider = provider ?? throw new ArgumentNullException(nameof(provider));
_adBase = provider.activeDirectoryBase; _adBase = provider.activeDirectoryBase;
_ldapRoot = $"LDAP://{provider.Domain}/{provider.GroupPath}"; _ldapRoot = $"LDAP://{provider.Domain}/{provider.GroupPath}";
_user = provider.Credential.Identification; _user = provider.Credential.Identification;
_password = new System.Net.NetworkCredential(_user, provider.Credential.Secret).Password; _password = new System.Net.NetworkCredential(_user, provider.Credential.Secret).Password;
} }
/// <summary> /// <summary>
/// Erstellt oder findet beide AD-Gruppen (Member & Owner) für einen Service. /// Erstellt oder findet beide AD-Gruppen (Member & Owner) für einen Service.
/// Neu mit: gruppenbereich (Scope) und gruppentyp (für Member-Gruppe). /// Neu mit: gruppenbereich (Scope) und gruppentyp (für Member-Gruppe).
/// Owner-Gruppe ist immer Security. /// Owner-Gruppe ist immer Security.
/// </summary> /// </summary>
public List<Tuple<string, string, string, string>> EnsureServiceGroups( public List<Tuple<string, string, string, string>> EnsureServiceGroups(
string serviceName, string serviceName,
string description = null, string description = null,
eLiamAccessRoleScopes gruppenbereich = eLiamAccessRoleScopes.Universal, eLiamAccessRoleScopes gruppenbereich = eLiamAccessRoleScopes.Universal,
ADGroupType gruppentyp = ADGroupType.Distribution, ADGroupType gruppentyp = ADGroupType.Distribution,
IEnumerable<string> ownerSidList = null, IEnumerable<string> ownerSidList = null,
IEnumerable<string> memberSidList = null) IEnumerable<string> memberSidList = null)
{ {
const int MaxLoop = 50; const int MaxLoop = 50;
var result = new List<Tuple<string, string, string, string>>(); var result = new List<Tuple<string, string, string, string>>();
// Konventionen für Member und Owner // Konventionen für Member und Owner
var ownerConv = _provider.NamingConventions var ownerConv = _provider.NamingConventions
.FirstOrDefault(nc => nc.AccessRole == eLiamAccessRoles.ADOwner); .FirstOrDefault(nc => nc.AccessRole == eLiamAccessRoles.ADOwner);
var memberConv = _provider.NamingConventions var memberConv = _provider.NamingConventions
.FirstOrDefault(nc => nc.AccessRole == eLiamAccessRoles.ADMember); .FirstOrDefault(nc => nc.AccessRole == eLiamAccessRoles.ADMember);
if (ownerConv == null || memberConv == null) if (ownerConv == null || memberConv == null)
throw new InvalidOperationException("Namenskonvention für ADMember oder ADOwner fehlt."); throw new InvalidOperationException("Namenskonvention für ADMember oder ADOwner fehlt.");
// Tags // Tags
_provider.CustomTags.TryGetValue("ADGroupPrefix", out var prefix); _provider.CustomTags.TryGetValue("ADGroupPrefix", out var prefix);
_provider.CustomTags.TryGetValue("ADOwner", out var ownerPostfix); _provider.CustomTags.TryGetValue("ADOwner", out var ownerPostfix);
_provider.CustomTags.TryGetValue("ADMember", out var memberPostfix); _provider.CustomTags.TryGetValue("ADMember", out var memberPostfix);
// 1) Owner-Gruppe (immer Security) // 1) Owner-Gruppe (immer Security)
string ownerName = null; string ownerName = null;
for (int loop = 0; loop <= MaxLoop; loop++) for (int loop = 0; loop <= MaxLoop; loop++)
{ {
string loopPart = loop > 0 ? "_" + loop : string.Empty; string loopPart = loop > 0 ? "_" + loop : string.Empty;
ownerName = ownerConv.NamingTemplate ownerName = ownerConv.NamingTemplate
.Replace("{{ADGroupPrefix}}", prefix ?? string.Empty) .Replace("{{ADGroupPrefix}}", prefix ?? string.Empty)
.Replace("{{NAME}}", serviceName) .Replace("{{NAME}}", serviceName)
.Replace("{{_LOOP}}", loopPart) .Replace("{{_LOOP}}", loopPart)
.Replace("{{GROUPTYPEPOSTFIX}}", ownerPostfix); .Replace("{{GROUPTYPEPOSTFIX}}", ownerPostfix);
if (!GroupExists(ownerName)) break; if (!GroupExists(ownerName)) break;
if (loop == MaxLoop) throw new InvalidOperationException($"Kein eindeutiger Owner-Name für '{serviceName}' nach {MaxLoop} Versuchen."); if (loop == MaxLoop) throw new InvalidOperationException($"Kein eindeutiger Owner-Name für '{serviceName}' nach {MaxLoop} Versuchen.");
} }
EnsureGroup(ownerName, ownerConv, description, managedByDn: null, gruppenbereich, ADGroupType.Security); EnsureGroup(ownerName, ownerConv, description, managedByDn: null, gruppenbereich, ADGroupType.Security);
AddMembersBySid(ownerName, ownerSidList); // NEU: SIDs als Owner hinzufügen AddMembersBySid(ownerName, ownerSidList); // NEU: SIDs als Owner hinzufügen
var ownerDn = GetDistinguishedName(ownerName); var ownerDn = GetDistinguishedName(ownerName);
var ownerSid = GetSid(ownerName); var ownerSid = GetSid(ownerName);
result.Add(Tuple.Create(eLiamAccessRoles.ADOwner.ToString(), ownerSid, ownerName, ownerDn)); result.Add(Tuple.Create(eLiamAccessRoles.ADOwner.ToString(), ownerSid, ownerName, ownerDn));
// 2) Member-Gruppe (Gruppentyp nach Parameter) // 2) Member-Gruppe (Gruppentyp nach Parameter)
string memberName = null; string memberName = null;
for (int loop = 0; loop <= MaxLoop; loop++) for (int loop = 0; loop <= MaxLoop; loop++)
{ {
string loopPart = loop > 0 ? "_" + loop : string.Empty; string loopPart = loop > 0 ? "_" + loop : string.Empty;
memberName = memberConv.NamingTemplate memberName = memberConv.NamingTemplate
.Replace("{{ADGroupPrefix}}", prefix ?? string.Empty) .Replace("{{ADGroupPrefix}}", prefix ?? string.Empty)
.Replace("{{NAME}}", serviceName) .Replace("{{NAME}}", serviceName)
.Replace("{{_LOOP}}", loopPart) .Replace("{{_LOOP}}", loopPart)
.Replace("{{GROUPTYPEPOSTFIX}}", memberPostfix); .Replace("{{GROUPTYPEPOSTFIX}}", memberPostfix);
if (!GroupExists(memberName)) break; if (!GroupExists(memberName)) break;
if (loop == MaxLoop) throw new InvalidOperationException($"Kein eindeutiger Member-Name für '{serviceName}' nach {MaxLoop} Versuchen."); if (loop == MaxLoop) throw new InvalidOperationException($"Kein eindeutiger Member-Name für '{serviceName}' nach {MaxLoop} Versuchen.");
} }
EnsureGroup(memberName, memberConv, description, managedByDn: ownerDn, gruppenbereich, gruppentyp); EnsureGroup(memberName, memberConv, description, managedByDn: ownerDn, gruppenbereich, gruppentyp);
AddMembersBySid(memberName, memberSidList); // NEU: SIDs als Member hinzufügen AddMembersBySid(memberName, memberSidList); // NEU: SIDs als Member hinzufügen
var memberDn = GetDistinguishedName(memberName); var memberDn = GetDistinguishedName(memberName);
var memberSid = GetSid(memberName); var memberSid = GetSid(memberName);
result.Add(Tuple.Create(eLiamAccessRoles.ADMember.ToString(), memberSid, memberName, memberDn)); result.Add(Tuple.Create(eLiamAccessRoles.ADMember.ToString(), memberSid, memberName, memberDn));
return result; return result;
} }
/// <summary> /// <summary>
/// Fügt einer bestehenden Gruppe per SID die entsprechenden AD-Objekte hinzu. /// Fügt einer bestehenden Gruppe per SID die entsprechenden AD-Objekte hinzu.
/// </summary> /// </summary>
private void AddMembersBySid(string groupName, IEnumerable<string> sidList) private void AddMembersBySid(string groupName, IEnumerable<string> sidList)
{ {
if (sidList == null) return; if (sidList == null) return;
// Basis für die Suche: komplette Domäne, nicht nur der OU-Pfad // Basis für die Suche: komplette Domäne, nicht nur der OU-Pfad
string domainRoot = $"LDAP://{_provider.Domain}"; string domainRoot = $"LDAP://{_provider.Domain}";
using (var root = new DirectoryEntry(domainRoot, _user, _password, AuthenticationTypes.Secure)) using (var root = new DirectoryEntry(domainRoot, _user, _password, AuthenticationTypes.Secure))
using (var grpSearch = new DirectorySearcher(root)) using (var grpSearch = new DirectorySearcher(root))
{ {
grpSearch.Filter = $"(&(objectCategory=group)(sAMAccountName={groupName}))"; grpSearch.Filter = $"(&(objectCategory=group)(sAMAccountName={groupName}))";
var grpRes = grpSearch.FindOne(); var grpRes = grpSearch.FindOne();
if (grpRes == null) return; if (grpRes == null) return;
var grpEntry = grpRes.GetDirectoryEntry(); var grpEntry = grpRes.GetDirectoryEntry();
foreach (var sidStr in sidList) foreach (var sidStr in sidList)
{ {
// Leere oder null überspringen // Leere oder null überspringen
if (string.IsNullOrWhiteSpace(sidStr)) if (string.IsNullOrWhiteSpace(sidStr))
continue; continue;
SecurityIdentifier sid; SecurityIdentifier sid;
try try
{ {
sid = new SecurityIdentifier(sidStr); sid = new SecurityIdentifier(sidStr);
} }
catch (Exception) catch (Exception)
{ {
// Ungültige SID-String-Darstellung überspringen // Ungültige SID-String-Darstellung überspringen
continue; continue;
} }
// In LDAP-Filter-Notation umwandeln // In LDAP-Filter-Notation umwandeln
var bytes = new byte[sid.BinaryLength]; var bytes = new byte[sid.BinaryLength];
sid.GetBinaryForm(bytes, 0); sid.GetBinaryForm(bytes, 0);
var sb = new StringBuilder(); var sb = new StringBuilder();
foreach (var b in bytes) foreach (var b in bytes)
sb.AppendFormat("\\{0:X2}", b); sb.AppendFormat("\\{0:X2}", b);
string octetSid = sb.ToString(); string octetSid = sb.ToString();
// Suche nach dem Objekt in der Domäne // Suche nach dem Objekt in der Domäne
using (var usrSearch = new DirectorySearcher(root)) using (var usrSearch = new DirectorySearcher(root))
{ {
usrSearch.Filter = $"(objectSid={octetSid})"; usrSearch.Filter = $"(objectSid={octetSid})";
var usrRes = usrSearch.FindOne(); var usrRes = usrSearch.FindOne();
if (usrRes == null) if (usrRes == null)
continue; continue;
var userDn = usrRes.Properties["distinguishedName"][0].ToString(); var userDn = usrRes.Properties["distinguishedName"][0].ToString();
// Doppelteinträge vermeiden // Doppelteinträge vermeiden
if (!grpEntry.Properties["member"].Contains(userDn)) if (!grpEntry.Properties["member"].Contains(userDn))
grpEntry.Properties["member"].Add(userDn); grpEntry.Properties["member"].Add(userDn);
} }
} }
grpEntry.CommitChanges(); grpEntry.CommitChanges();
} }
} }
/// <summary> /// <summary>
/// Wandelt eine SID (String-Form) in das für LDAP nötige Oktet-String-Format um. /// Wandelt eine SID (String-Form) in das für LDAP nötige Oktet-String-Format um.
/// </summary> /// </summary>
private string SidStringToLdapFilter(string sidString) private string SidStringToLdapFilter(string sidString)
{ {
var sid = new SecurityIdentifier(sidString); var sid = new SecurityIdentifier(sidString);
var bytes = new byte[sid.BinaryLength]; var bytes = new byte[sid.BinaryLength];
sid.GetBinaryForm(bytes, 0); sid.GetBinaryForm(bytes, 0);
var sb = new StringBuilder(); var sb = new StringBuilder();
foreach (var b in bytes) foreach (var b in bytes)
sb.AppendFormat("\\{0:X2}", b); sb.AppendFormat("\\{0:X2}", b);
return sb.ToString(); return sb.ToString();
} }
private string GetSid(string name) private string GetSid(string name)
{ {
using (var root = new DirectoryEntry(_ldapRoot, _user, _password, AuthenticationTypes.Secure)) using (var root = new DirectoryEntry(_ldapRoot, _user, _password, AuthenticationTypes.Secure))
using (var ds = new DirectorySearcher(root)) using (var ds = new DirectorySearcher(root))
{ {
ds.Filter = $"(&(objectCategory=group)(sAMAccountName={name}))"; ds.Filter = $"(&(objectCategory=group)(sAMAccountName={name}))";
var r = ds.FindOne(); var r = ds.FindOne();
if (r == null) return null; if (r == null) return null;
var de = r.GetDirectoryEntry(); var de = r.GetDirectoryEntry();
var sidBytes = (byte[])de.Properties["objectSid"][0]; var sidBytes = (byte[])de.Properties["objectSid"][0];
return new SecurityIdentifier(sidBytes, 0).Value; return new SecurityIdentifier(sidBytes, 0).Value;
} }
} }
private string FormatName(cLiamNamingConvention conv, string serviceName, System.Collections.Generic.IDictionary<string, string> tags) private string FormatName(cLiamNamingConvention conv, string serviceName, System.Collections.Generic.IDictionary<string, string> tags)
{ {
string tmpl = conv.NamingTemplate.Replace("{{NAME}}", serviceName); string tmpl = conv.NamingTemplate.Replace("{{NAME}}", serviceName);
foreach (var kv in tags) foreach (var kv in tags)
tmpl = tmpl.Replace("{{" + kv.Key + "}}", kv.Value); tmpl = tmpl.Replace("{{" + kv.Key + "}}", kv.Value);
return tmpl; return tmpl;
} }
/// <summary> /// <summary>
/// Stellt sicher, dass die Gruppe existiert neu mit Scope & Type. /// Stellt sicher, dass die Gruppe existiert neu mit Scope & Type.
/// </summary> /// </summary>
private void EnsureGroup( private void EnsureGroup(
string groupName, string groupName,
cLiamNamingConvention conv, cLiamNamingConvention conv,
string description, string description,
string managedByDn, string managedByDn,
eLiamAccessRoleScopes groupScope, eLiamAccessRoleScopes groupScope,
ADGroupType groupType) ADGroupType groupType)
{ {
if (!GroupExists(groupName)) if (!GroupExists(groupName))
{ {
using (var root = new DirectoryEntry(_ldapRoot, _user, _password, AuthenticationTypes.Secure)) using (var root = new DirectoryEntry(_ldapRoot, _user, _password, AuthenticationTypes.Secure))
{ {
var grp = root.Children.Add("CN=" + groupName, "group"); var grp = root.Children.Add("CN=" + groupName, "group");
grp.Properties["sAMAccountName"].Value = groupName; grp.Properties["sAMAccountName"].Value = groupName;
grp.Properties["displayName"].Value = groupName; grp.Properties["displayName"].Value = groupName;
// Hier: Security-Bit (0x80000000) nur, wenn Security, sonst 0 // Hier: Security-Bit (0x80000000) nur, wenn Security, sonst 0
int typeBit = (groupType == ADGroupType.Security) int typeBit = (groupType == ADGroupType.Security)
? unchecked((int)0x80000000) ? unchecked((int)0x80000000)
: 0; : 0;
// Scope-Bit aus Param // Scope-Bit aus Param
grp.Properties["groupType"].Value = unchecked(typeBit | GetScopeBit(groupScope)); grp.Properties["groupType"].Value = unchecked(typeBit | GetScopeBit(groupScope));
if (!string.IsNullOrEmpty(description)) if (!string.IsNullOrEmpty(description))
grp.Properties["description"].Value = description; grp.Properties["description"].Value = description;
if (managedByDn != null) if (managedByDn != null)
grp.Properties["managedBy"].Value = managedByDn; grp.Properties["managedBy"].Value = managedByDn;
grp.CommitChanges(); grp.CommitChanges();
} }
WaitReplication(groupName, TimeSpan.FromMinutes(2)); WaitReplication(groupName, TimeSpan.FromMinutes(2));
} }
} }
private bool GroupExists(string name) private bool GroupExists(string name)
{ {
return _adBase.directoryEntry.Children.Cast<DirectoryEntry>() return _adBase.directoryEntry.Children.Cast<DirectoryEntry>()
.Any(c => string.Equals( .Any(c => string.Equals(
c.Properties["sAMAccountName"]?.Value?.ToString(), name, StringComparison.OrdinalIgnoreCase)); c.Properties["sAMAccountName"]?.Value?.ToString(), name, StringComparison.OrdinalIgnoreCase));
} }
private void WaitReplication(string groupName, TimeSpan timeout) private void WaitReplication(string groupName, TimeSpan timeout)
{ {
var sw = System.Diagnostics.Stopwatch.StartNew(); var sw = System.Diagnostics.Stopwatch.StartNew();
while (sw.Elapsed < timeout) while (sw.Elapsed < timeout)
{ {
if (GroupExists(groupName)) if (GroupExists(groupName))
return; return;
Thread.Sleep(2000); Thread.Sleep(2000);
} }
} }
private string GetDistinguishedName(string name) private string GetDistinguishedName(string name)
{ {
using (var root = new DirectoryEntry(_ldapRoot, _user, _password, AuthenticationTypes.Secure)) using (var root = new DirectoryEntry(_ldapRoot, _user, _password, AuthenticationTypes.Secure))
using (var ds = new DirectorySearcher(root)) using (var ds = new DirectorySearcher(root))
{ {
ds.Filter = "(&(objectClass=group)(sAMAccountName=" + name + "))"; ds.Filter = "(&(objectClass=group)(sAMAccountName=" + name + "))";
var res = ds.FindOne(); var res = ds.FindOne();
return res?.Properties["distinguishedName"]?[0]?.ToString(); return res?.Properties["distinguishedName"]?[0]?.ToString();
} }
} }
private int GetScopeBit(eLiamAccessRoleScopes scope) private int GetScopeBit(eLiamAccessRoleScopes scope)
{ {
switch (scope) switch (scope)
{ {
case eLiamAccessRoleScopes.Universal: case eLiamAccessRoleScopes.Universal:
return 0x8; return 0x8;
case eLiamAccessRoleScopes.Global: case eLiamAccessRoleScopes.Global:
return 0x2; return 0x2;
case eLiamAccessRoleScopes.DomainLocal: case eLiamAccessRoleScopes.DomainLocal:
return 0x4; return 0x4;
default: default:
return 0x8; return 0x8;
} }
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
// <autogenerated /> // <autogenerated />
using System; using System;
using System.Reflection; using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")] [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]

View File

@@ -1,4 +1,4 @@
// <autogenerated /> // <autogenerated />
using System; using System;
using System.Reflection; using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

View File

@@ -1,14 +1,28 @@
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\LiamActiveDirectory.dll C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\LiamActiveDirectory.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\LiamActiveDirectory.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\LiamActiveDirectory.pdb
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\LiamBaseClasses.dll C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\LiamBaseClasses.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\LiamHelper.dll C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\LiamHelper.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\Newtonsoft.Json.dll C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\Newtonsoft.Json.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\LiamBaseClasses.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\LiamBaseClasses.pdb
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\LiamHelper.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\LiamHelper.pdb
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Debug\LiamActiveDirectory.csproj.AssemblyReference.cache C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Debug\LiamActiveDirectory.csproj.AssemblyReference.cache
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Debug\LiamActiveDirectory.csproj.CoreCompileInputs.cache C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Debug\LiamActiveDirectory.csproj.CoreCompileInputs.cache
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Debug\LiamActi.8091FDFC.Up2Date C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Debug\LiamActi.8091FDFC.Up2Date
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Debug\LiamActiveDirectory.dll C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Debug\LiamActiveDirectory.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Debug\LiamActiveDirectory.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Debug\LiamActiveDirectory.pdb
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\System.ValueTuple.dll C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\System.ValueTuple.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\System.ValueTuple.xml C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Debug\System.ValueTuple.xml
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Debug\LiamActiveDirectory.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Debug\LiamActiveDirectory.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Debug\LiamBaseClasses.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Debug\LiamHelper.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Debug\System.ValueTuple.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Debug\Newtonsoft.Json.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Debug\LiamBaseClasses.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Debug\LiamHelper.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Debug\System.ValueTuple.xml
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\obj\Debug\LiamActiveDirectory.csproj.AssemblyReference.cache
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\obj\Debug\LiamActiveDirectory.csproj.CoreCompileInputs.cache
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\obj\Debug\LiamActi.8091FDFC.Up2Date
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\obj\Debug\LiamActiveDirectory.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\obj\Debug\LiamActiveDirectory.pdb

View File

@@ -1 +1 @@
88ca960765b758a5c4edcddedf6dc811f2a49d840cd7ade015d7644911a99c77 0f439131d442d0ee4d6473d1fe79783624433c39a44374a60e15e079e468a4be

View File

@@ -1,4 +1,4 @@
// <autogenerated /> // <autogenerated />
using System; using System;
using System.Reflection; using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")] [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]

View File

@@ -1,14 +1,28 @@
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\LIAMActiveDirectory.dll C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\LIAMActiveDirectory.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\LIAMActiveDirectory.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\LIAMActiveDirectory.pdb
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\LiamBaseClasses.dll C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\LiamBaseClasses.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\LiamHelper.dll C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\LiamHelper.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\Newtonsoft.Json.dll C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\Newtonsoft.Json.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\LiamBaseClasses.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\LiamBaseClasses.pdb
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\LiamHelper.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\LiamHelper.pdb
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Release\LIAMActiveDirectory.csproj.AssemblyReference.cache C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Release\LIAMActiveDirectory.csproj.AssemblyReference.cache
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Release\LIAMActiveDirectory.csproj.CoreCompileInputs.cache C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Release\LIAMActiveDirectory.csproj.CoreCompileInputs.cache
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Release\LIAMActiveDirectory.dll C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Release\LIAMActiveDirectory.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Release\LIAMActiveDirectory.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Release\LIAMActiveDirectory.pdb
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Release\LiamActi.8091FDFC.Up2Date C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\obj\Release\LiamActi.8091FDFC.Up2Date
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\System.ValueTuple.dll C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\System.ValueTuple.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\System.ValueTuple.xml C:\Workspace\C4IT DEV LIAM WEB Service\LIAMActiveDirectory\bin\Release\System.ValueTuple.xml
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\obj\Release\LiamActiveDirectory.csproj.AssemblyReference.cache
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\obj\Release\LiamActiveDirectory.csproj.CoreCompileInputs.cache
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\obj\Release\LiamActiveDirectory.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\obj\Release\LiamActiveDirectory.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Release\LiamActiveDirectory.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Release\LiamActiveDirectory.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Release\LiamBaseClasses.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Release\LiamHelper.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Release\System.ValueTuple.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Release\Newtonsoft.Json.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Release\LiamBaseClasses.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Release\LiamHelper.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\bin\Release\System.ValueTuple.xml
C:\Workspace\C4IT DEV LIAM WEB Service_git\LIAMActiveDirectory\obj\Release\LiamActi.8091FDFC.Up2Date

View File

@@ -1 +1 @@
ab9bb136583040c5ab0b8fc2b80edba3f154caa1532f30973b39973f0def47e6 e6f9f5153aa55a3a910f7c5ef0287e4500a3f354c3a1c3198c24d7eea04e0de2

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="System.ValueTuple" version="4.6.1" targetFramework="net462" /> <package id="System.ValueTuple" version="4.6.1" targetFramework="net462" />
</packages> </packages>

View File

@@ -1,399 +1,399 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.IO; using System.IO;
using C4IT.Logging; using C4IT.Logging;
using static C4IT.Logging.cLogManager; using static C4IT.Logging.cLogManager;
namespace C4IT.LIAM namespace C4IT.LIAM
{ {
public enum eLiamAccessRoles public enum eLiamAccessRoles
{ {
Owner = 1, Write = 2, Read = 3, Traverse = 4, Owner = 1, Write = 2, Read = 3, Traverse = 4,
ADOwner = 110, // "AD Owner Group" ADOwner = 110, // "AD Owner Group"
ADMember = 100, // "AD Member Group" ADMember = 100, // "AD Member Group"
ExchangeMLMember = 200, // "Mailing List Member" ExchangeMLMember = 200, // "Mailing List Member"
ExchangeMLOwner = 210, // "Mailing List Owner" ExchangeMLOwner = 210, // "Mailing List Owner"
ExchangeSMBFullAccess = 250, // "Shared Mailbox Full Access" ExchangeSMBFullAccess = 250, // "Shared Mailbox Full Access"
ExchangeSMBSendAs = 260, // "Shared Mailbox Send as" ExchangeSMBSendAs = 260, // "Shared Mailbox Send as"
ExchangeSMBOwner = 270 // "Shared Mailbox Owner" ExchangeSMBOwner = 270 // "Shared Mailbox Owner"
}; };
public enum eLiamAccessRoleScopes { Unknown = 0, Universal = 1, Global = 2, DomainLocal = 3 }; public enum eLiamAccessRoleScopes { Unknown = 0, Universal = 1, Global = 2, DomainLocal = 3 };
public enum eLiamProviderTypes { Unknown = 0, Ntfs = 1, Sharepoint = 2, Matrix42 = 3, MsTeams = 4, ActiveDirectory = 5, Exchange = 6 }; public enum eLiamProviderTypes { Unknown = 0, Ntfs = 1, Sharepoint = 2, Matrix42 = 3, MsTeams = 4, ActiveDirectory = 5, Exchange = 6 };
public enum eLiamDataAreaTypes public enum eLiamDataAreaTypes
{ {
Unknown = 0, Unknown = 0,
NtfsShare = 101, NtfsShare = 101,
NtfsFolder = 102, NtfsFolder = 102,
MsTeamsTeam = 401, MsTeamsTeam = 401,
MsTeamsChannel = 402, MsTeamsChannel = 402,
MsTeamsFolder = 403, MsTeamsFolder = 403,
ActiveDirectoryGroup = 501, ActiveDirectoryGroup = 501,
ExchangeSharedMailbox = 601, ExchangeSharedMailbox = 601,
ExchangeDistributionGroup = 602 ExchangeDistributionGroup = 602
}; };
public enum eLiamGroupStrategies { None = 0, Ntfs_AGP = 0, Ntfs_AGDLP = 1 }; public enum eLiamGroupStrategies { None = 0, Ntfs_AGP = 0, Ntfs_AGDLP = 1 };
public class cLiamConfiguration public class cLiamConfiguration
{ {
} }
public class cLiamProviderData : ICloneable public class cLiamProviderData : ICloneable
{ {
public eLiamProviderTypes ProviderType { get; set; } = eLiamProviderTypes.Unknown; public eLiamProviderTypes ProviderType { get; set; } = eLiamProviderTypes.Unknown;
public string Domain { get; set; } = ""; public string Domain { get; set; } = "";
public string RootPath { get; set; } = ""; public string RootPath { get; set; } = "";
public cLiamCredential Credential { get; set; } = null; public cLiamCredential Credential { get; set; } = null;
public int MaxDepth { get; set; } = 1; public int MaxDepth { get; set; } = 1;
public eLiamGroupStrategies GroupStrategy { get; set; } = eLiamGroupStrategies.None; public eLiamGroupStrategies GroupStrategy { get; set; } = eLiamGroupStrategies.None;
public string DataAreaFilter { get; set; } = ""; public string DataAreaFilter { get; set; } = "";
public string DataAreaRegEx { get; set; } = ""; public string DataAreaRegEx { get; set; } = "";
public string GroupFilter { get; set; } = ""; public string GroupFilter { get; set; } = "";
public string GroupRegEx { get; set; } = ""; public string GroupRegEx { get; set; } = "";
public string GroupPath { get; set; } = ""; public string GroupPath { get; set; } = "";
public string OwnerGroupGlobal { get; set; } = ""; public string OwnerGroupGlobal { get; set; } = "";
public string OwnerGroupLocal { get; set; } = ""; public string OwnerGroupLocal { get; set; } = "";
public string WriteGroupGlobal { get; set; } = ""; public string WriteGroupGlobal { get; set; } = "";
public string WriteGroupLocal { get; set; } = ""; public string WriteGroupLocal { get; set; } = "";
public string ReadGroupGlobal { get; set; } = ""; public string ReadGroupGlobal { get; set; } = "";
public string ReadGroupLocal { get; set; } = ""; public string ReadGroupLocal { get; set; } = "";
public string TraverseGroup { get; set; } = ""; public string TraverseGroup { get; set; } = "";
public List<cLiamNamingConvention> NamingConventions { get; set; } = new List<cLiamNamingConvention>(); public List<cLiamNamingConvention> NamingConventions { get; set; } = new List<cLiamNamingConvention>();
public Dictionary<string, string> CustomTags { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); public Dictionary<string, string> CustomTags { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
public Dictionary<string, string> AdditionalConfiguration { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); public Dictionary<string, string> AdditionalConfiguration { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
public static void Copy(cLiamProviderData From, cLiamProviderData To) public static void Copy(cLiamProviderData From, cLiamProviderData To)
{ {
To.ProviderType = From.ProviderType; To.ProviderType = From.ProviderType;
To.Domain = From.Domain; To.Domain = From.Domain;
To.RootPath = From.RootPath; To.RootPath = From.RootPath;
To.Credential = From.Credential; To.Credential = From.Credential;
To.MaxDepth = From.MaxDepth; To.MaxDepth = From.MaxDepth;
To.GroupStrategy = From.GroupStrategy; To.GroupStrategy = From.GroupStrategy;
To.DataAreaFilter = From.DataAreaFilter; To.DataAreaFilter = From.DataAreaFilter;
To.DataAreaRegEx = From.DataAreaRegEx; To.DataAreaRegEx = From.DataAreaRegEx;
To.GroupFilter = From.GroupFilter; To.GroupFilter = From.GroupFilter;
To.GroupRegEx = From.GroupRegEx; To.GroupRegEx = From.GroupRegEx;
To.GroupPath = From.GroupPath; To.GroupPath = From.GroupPath;
To.CustomTags = From.CustomTags; To.CustomTags = From.CustomTags;
To.AdditionalConfiguration = From.AdditionalConfiguration; To.AdditionalConfiguration = From.AdditionalConfiguration;
To.CustomTags = From.CustomTags; To.CustomTags = From.CustomTags;
To.NamingConventions = From.NamingConventions; To.NamingConventions = From.NamingConventions;
} }
public cLiamProviderData() public cLiamProviderData()
{ {
} }
public cLiamProviderData(cLiamProviderData PD) public cLiamProviderData(cLiamProviderData PD)
{ {
Copy(PD, this); Copy(PD, this);
} }
public object Clone() public object Clone()
{ {
return new cLiamProviderData(this); return new cLiamProviderData(this);
} }
public void ReplaceCustomTags() public void ReplaceCustomTags()
{ {
foreach (var customTag in this.CustomTags) foreach (var customTag in this.CustomTags)
{ {
var Key = customTag.Key; var Key = customTag.Key;
foreach (var namingConvention in NamingConventions) foreach (var namingConvention in NamingConventions)
{ {
if (customTag.Key == "Filesystem_GroupDomainLocalTag" && namingConvention.Scope == eLiamAccessRoleScopes.DomainLocal || customTag.Key == "Filesystem_GroupGlobalTag" && namingConvention.Scope == eLiamAccessRoleScopes.Global) if (customTag.Key == "Filesystem_GroupDomainLocalTag" && namingConvention.Scope == eLiamAccessRoleScopes.DomainLocal || customTag.Key == "Filesystem_GroupGlobalTag" && namingConvention.Scope == eLiamAccessRoleScopes.Global)
Key = "SCOPETAG"; Key = "SCOPETAG";
else else
Key = customTag.Key; Key = customTag.Key;
namingConvention.DescriptionTemplate = namingConvention.DescriptionTemplate.Replace($"{{{{{Key}}}}}", customTag.Value); namingConvention.DescriptionTemplate = namingConvention.DescriptionTemplate.Replace($"{{{{{Key}}}}}", customTag.Value);
namingConvention.NamingTemplate = namingConvention.NamingTemplate.Replace($"{{{{{Key}}}}}", customTag.Value); namingConvention.NamingTemplate = namingConvention.NamingTemplate.Replace($"{{{{{Key}}}}}", customTag.Value);
namingConvention.Wildcard = namingConvention.Wildcard.Replace($"{{{{{Key}}}}}", customTag.Value); namingConvention.Wildcard = namingConvention.Wildcard.Replace($"{{{{{Key}}}}}", customTag.Value);
} }
GroupFilter = GroupFilter.Replace($"{{{{{Key}}}}}", customTag.Value); GroupFilter = GroupFilter.Replace($"{{{{{Key}}}}}", customTag.Value);
} }
} }
} }
public abstract class cLiamProviderBase : cLiamProviderData public abstract class cLiamProviderBase : cLiamProviderData
{ {
public cLiamConfiguration LiamConfiguration { get; private set; } public cLiamConfiguration LiamConfiguration { get; private set; }
public cLiamProviderBase(cLiamConfiguration Configuration, cLiamProviderData ProviderData) : public cLiamProviderBase(cLiamConfiguration Configuration, cLiamProviderData ProviderData) :
base(ProviderData) base(ProviderData)
{ {
LiamConfiguration = Configuration; LiamConfiguration = Configuration;
} }
public abstract Task<List<cLiamDataAreaBase>> getDataAreasAsync(int MaxDepth = -1); public abstract Task<List<cLiamDataAreaBase>> getDataAreasAsync(int MaxDepth = -1);
public abstract Task<bool> LogonAsync(); public abstract Task<bool> LogonAsync();
public abstract string GetLastErrorMessage(); public abstract string GetLastErrorMessage();
public abstract Task<cLiamDataAreaBase> LoadDataArea(string UID); public abstract Task<cLiamDataAreaBase> LoadDataArea(string UID);
public static cLiamProviderBase CreateInstance(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData) public static cLiamProviderBase CreateInstance(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData)
{ {
var CM = MethodBase.GetCurrentMethod(); var CM = MethodBase.GetCurrentMethod();
LogMethodBegin(CM); LogMethodBegin(CM);
try try
{ {
var MyPath = Assembly.GetExecutingAssembly()?.Location; var MyPath = Assembly.GetExecutingAssembly()?.Location;
if (MyPath == null) if (MyPath == null)
return null; return null;
MyPath = Path.GetDirectoryName(MyPath); MyPath = Path.GetDirectoryName(MyPath);
var DllPath = Path.Combine(MyPath, $"Liam{ProviderData.ProviderType}.dll"); var DllPath = Path.Combine(MyPath, $"Liam{ProviderData.ProviderType}.dll");
if (!File.Exists(DllPath)) if (!File.Exists(DllPath))
{ {
LogEntry($"Couldn not found Data Provider library '{DllPath}'", LogLevels.Error); LogEntry($"Couldn not found Data Provider library '{DllPath}'", LogLevels.Error);
return null; return null;
} }
var assLocal = Assembly.LoadFrom(DllPath); var assLocal = Assembly.LoadFrom(DllPath);
if (assLocal == null) if (assLocal == null)
{ {
LogEntry($"Could not load Data Provider library '{DllPath}'", LogLevels.Error); LogEntry($"Could not load Data Provider library '{DllPath}'", LogLevels.Error);
return null; return null;
} }
var TP = assLocal.GetTypes(); var TP = assLocal.GetTypes();
var type = assLocal.GetType("C4IT.LIAM.LiamInitializer"); var type = assLocal.GetType("C4IT.LIAM.LiamInitializer");
if (type == null) if (type == null)
{ {
LogEntry($"Could not found class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error); LogEntry($"Could not found class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error);
return null; return null;
} }
var MI = type.GetMethod("CreateInstance"); var MI = type.GetMethod("CreateInstance");
if (MI == null) if (MI == null)
{ {
LogEntry($"Could not found method 'CreateInstance' in class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error); LogEntry($"Could not found method 'CreateInstance' in class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error);
return null; return null;
} }
var objDll = MI.Invoke(null, new object[] { LiamConfiguration, ProviderData }); var objDll = MI.Invoke(null, new object[] { LiamConfiguration, ProviderData });
var RetVal = objDll as cLiamProviderBase; var RetVal = objDll as cLiamProviderBase;
ProviderData.ReplaceCustomTags(); ProviderData.ReplaceCustomTags();
return RetVal; return RetVal;
} }
catch (Exception E) catch (Exception E)
{ {
LogException(E); LogException(E);
return null; return null;
} }
finally finally
{ {
LogMethodEnd(CM); LogMethodEnd(CM);
} }
} }
public abstract Task<List<cLiamDataAreaBase>> getSecurityGroupsAsync(string groupFilter); public abstract Task<List<cLiamDataAreaBase>> getSecurityGroupsAsync(string groupFilter);
} }
public class cLiamCredential public class cLiamCredential
{ {
public string Domain { get; set; } = ""; public string Domain { get; set; } = "";
public string Identification { get; set; } = ""; public string Identification { get; set; } = "";
public string Secret { get; set; } = ""; public string Secret { get; set; } = "";
} }
public class cLiamNamingConvention public class cLiamNamingConvention
{ {
public string Name { get; set; } = ""; public string Name { get; set; } = "";
public string Description { get; set; } = ""; public string Description { get; set; } = "";
public string NamingTemplate { get; set; } = ""; public string NamingTemplate { get; set; } = "";
public string DescriptionTemplate { get; set; } = ""; public string DescriptionTemplate { get; set; } = "";
public string Wildcard { get; set; } = ""; public string Wildcard { get; set; } = "";
public eLiamAccessRoles AccessRole { get; set; } = eLiamAccessRoles.Read; public eLiamAccessRoles AccessRole { get; set; } = eLiamAccessRoles.Read;
public eLiamAccessRoleScopes Scope { get; set; } = eLiamAccessRoleScopes.Unknown; public eLiamAccessRoleScopes Scope { get; set; } = eLiamAccessRoleScopes.Unknown;
public eLiamProviderTypes? ProviderType { get; set; } = null; public eLiamProviderTypes? ProviderType { get; set; } = null;
} }
public class cLiamDataAreaInfo public class cLiamDataAreaInfo
{ {
public string DisplayName { get; protected set; } = null; public string DisplayName { get; protected set; } = null;
public string Description { get; protected set; } = null; public string Description { get; protected set; } = null;
public string OwnerRef { get; set; } = null; public string OwnerRef { get; set; } = null;
public string UID { get; protected set; } = null; public string UID { get; protected set; } = null;
public string CreatedDate { get; protected set; } = null; public string CreatedDate { get; protected set; } = null;
public string TechnicalName { get; protected set; } = ""; public string TechnicalName { get; protected set; } = "";
public int Level { get; set; } = -1; public int Level { get; set; } = -1;
public string ParentUID { get; protected set; } = null; public string ParentUID { get; protected set; } = null;
public eLiamDataAreaTypes DataType { get; protected set; } = eLiamDataAreaTypes.Unknown; public eLiamDataAreaTypes DataType { get; protected set; } = eLiamDataAreaTypes.Unknown;
public bool SupportsPermissions { get; protected set; } = false; public bool SupportsPermissions { get; protected set; } = false;
public bool SupportsOwners { get; protected set; } = false; public bool SupportsOwners { get; protected set; } = false;
} }
public abstract class cLiamDataAreaBase : cLiamDataAreaInfo public abstract class cLiamDataAreaBase : cLiamDataAreaInfo
{ {
public readonly cLiamProviderBase Provider = null; public readonly cLiamProviderBase Provider = null;
public cLiamDataAreaBase(cLiamProviderBase Provider) public cLiamDataAreaBase(cLiamProviderBase Provider)
{ {
this.Provider = Provider; this.Provider = Provider;
} }
public abstract Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1); public abstract Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1);
public static async Task<List<cLiamDataAreaBase>> getChildrenFromListAsync(List<cLiamDataAreaBase> Items, int Depth = -1) public static async Task<List<cLiamDataAreaBase>> getChildrenFromListAsync(List<cLiamDataAreaBase> Items, int Depth = -1)
{ {
var CM = MethodBase.GetCurrentMethod(); var CM = MethodBase.GetCurrentMethod();
LogMethodBegin(CM); LogMethodBegin(CM);
var RetVal = new List<cLiamDataAreaBase>(); var RetVal = new List<cLiamDataAreaBase>();
try try
{ {
if (Items == null) if (Items == null)
return RetVal; return RetVal;
if (Depth <= 0) if (Depth <= 0)
return RetVal; return RetVal;
foreach (var Entry in Items) foreach (var Entry in Items)
{ {
var Childs = await Entry.getChildrenAsync(Depth + 1); var Childs = await Entry.getChildrenAsync(Depth + 1);
if (Childs != null) if (Childs != null)
RetVal.AddRange(Childs); RetVal.AddRange(Childs);
} }
} }
catch (Exception E) catch (Exception E)
{ {
LogException(E); LogException(E);
} }
finally finally
{ {
LogMethodEnd(CM); LogMethodEnd(CM);
} }
return RetVal; return RetVal;
} }
public virtual async Task<List<cLiamUserInfo>> GetOwnersAsync() public virtual async Task<List<cLiamUserInfo>> GetOwnersAsync()
{ {
await Task.Delay(0); await Task.Delay(0);
return null; return null;
} }
public virtual async Task<List<cLiamPermissionInfo>> GetPermissionsAsync(bool force) public virtual async Task<List<cLiamPermissionInfo>> GetPermissionsAsync(bool force)
{ {
await Task.Delay(0); await Task.Delay(0);
return null; return null;
} }
public virtual async Task<cLiamPermissionResult> GrantPermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role) public virtual async Task<cLiamPermissionResult> GrantPermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role)
{ {
await Task.Delay(0); await Task.Delay(0);
return null; return null;
} }
public virtual async Task<bool> RevokePermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role) public virtual async Task<bool> RevokePermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role)
{ {
await Task.Delay(0); await Task.Delay(0);
return false; return false;
} }
} }
public class cLiamUserInfo public class cLiamUserInfo
{ {
public string DisplayName { get; set; } = null; public string DisplayName { get; set; } = null;
public string GivenName { get; set; } = null; public string GivenName { get; set; } = null;
public string SurName { get; set; } = null; public string SurName { get; set; } = null;
public string UserPrincipalName { get; set; } = null; public string UserPrincipalName { get; set; } = null;
public string EMail { get; set; } = null; public string EMail { get; set; } = null;
public string SID { get; set; } = null; public string SID { get; set; } = null;
} }
public class cLiamPermissionResult public class cLiamPermissionResult
{ {
public bool Valid { get; set; } = false; public bool Valid { get; set; } = false;
public string UserReference { get; set; } = null; public string UserReference { get; set; } = null;
} }
public class cLiamPermissionInfo public class cLiamPermissionInfo
{ {
public cLiamUserInfo User; public cLiamUserInfo User;
public eLiamAccessRoles AccessRole = eLiamAccessRoles.Read; public eLiamAccessRoles AccessRole = eLiamAccessRoles.Read;
public bool OnlyEffective = false; public bool OnlyEffective = false;
} }
public class DataAreaEntryBase public class DataAreaEntryBase
{ {
public string DisplayName { get; set; } public string DisplayName { get; set; }
public string TechnicalName { get; set; } public string TechnicalName { get; set; }
public string UID { get; set; } public string UID { get; set; }
public string TargetType { get; set; } public string TargetType { get; set; }
} }
public class SecurityGroupEntry : DataAreaEntryBase public class SecurityGroupEntry : DataAreaEntryBase
{ {
public string Scope { get; set; } public string Scope { get; set; }
} }
public class DataAreaEntry : DataAreaEntryBase public class DataAreaEntry : DataAreaEntryBase
{ {
public string Parent { get; set; } public string Parent { get; set; }
public string ParentUID { get; set; } public string ParentUID { get; set; }
public string Owner { get; set; } public string Owner { get; set; }
public string Write { get; set; } public string Write { get; set; }
public string Read { get; set; } public string Read { get; set; }
public string Traverse { get; set; } public string Traverse { get; set; }
public string CreatedDate { get; set; } public string CreatedDate { get; set; }
public string Level { get; set; } public string Level { get; set; }
public string ConfigurationId { get; set; } public string ConfigurationId { get; set; }
public string BaseFolder { get; set; } public string BaseFolder { get; set; }
public string Description { get; set; } public string Description { get; set; }
public string UniqueId { get; set; } public string UniqueId { get; set; }
public string DataAreaType { get; set; } public string DataAreaType { get; set; }
} }
public class LiamApiVersionInfo public class LiamApiVersionInfo
{ {
public string ProductName { get; set; } = "- unknown -"; public string ProductName { get; set; } = "- unknown -";
public string ProductVersion { get; set; } = ""; public string ProductVersion { get; set; } = "";
public string AssemblyName { get; set; } = "- unknown -"; public string AssemblyName { get; set; } = "- unknown -";
public string AssemblyVersion { get; set; } = ""; public string AssemblyVersion { get; set; } = "";
} }
public class ProviderCacheEntry public class ProviderCacheEntry
{ {
public Guid ID; public Guid ID;
public Guid ObjectID; public Guid ObjectID;
public DateTime ValidUntil; public DateTime ValidUntil;
public cLiamProviderBase Provider; public cLiamProviderBase Provider;
} }
public class LiamDataAreaEntry public class LiamDataAreaEntry
{ {
public string DisplayName { get; set; } = ""; public string DisplayName { get; set; } = "";
public string UID { get; set; } = ""; public string UID { get; set; } = "";
public bool SupportsPermissions { get; set; } = false; public bool SupportsPermissions { get; set; } = false;
} }
} }

View File

@@ -1,399 +1,399 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.IO; using System.IO;
using C4IT.Logging; using C4IT.Logging;
using static C4IT.Logging.cLogManager; using static C4IT.Logging.cLogManager;
namespace C4IT.LIAM namespace C4IT.LIAM
{ {
public enum eLiamAccessRoles public enum eLiamAccessRoles
{ {
Owner = 1, Write = 2, Read = 3, Traverse = 4, Owner = 1, Write = 2, Read = 3, Traverse = 4,
ADOwner = 100, // "AD Owner Group" ADOwner = 100, // "AD Owner Group"
ADMember = 110, // "AD Member Group" ADMember = 110, // "AD Member Group"
ExchangeMLMember = 200, // "Mailing List Member" ExchangeMLMember = 200, // "Mailing List Member"
ExchangeMLOwner = 210, // "Mailing List Owner" ExchangeMLOwner = 210, // "Mailing List Owner"
ExchangeSMBFullAccess = 250, // "Shared Mailbox Full Access" ExchangeSMBFullAccess = 250, // "Shared Mailbox Full Access"
ExchangeSMBSendAs = 260, // "Shared Mailbox Send as" ExchangeSMBSendAs = 260, // "Shared Mailbox Send as"
ExchangeSMBOwner = 270 // "Shared Mailbox Owner" ExchangeSMBOwner = 270 // "Shared Mailbox Owner"
}; };
public enum eLiamAccessRoleScopes { Unknown = 0, Universal = 1, Global = 2, DomainLocal = 3 }; public enum eLiamAccessRoleScopes { Unknown = 0, Universal = 1, Global = 2, DomainLocal = 3 };
public enum eLiamProviderTypes { Unknown = 0, Ntfs = 1, Sharepoint = 2, Matrix42 = 3, MsTeams = 4, ActiveDirectory = 5, Exchange = 6 }; public enum eLiamProviderTypes { Unknown = 0, Ntfs = 1, Sharepoint = 2, Matrix42 = 3, MsTeams = 4, ActiveDirectory = 5, Exchange = 6 };
public enum eLiamDataAreaTypes public enum eLiamDataAreaTypes
{ {
Unknown = 0, Unknown = 0,
NtfsShare = 101, NtfsShare = 101,
NtfsFolder = 102, NtfsFolder = 102,
MsTeamsTeam = 401, MsTeamsTeam = 401,
MsTeamsChannel = 402, MsTeamsChannel = 402,
MsTeamsFolder = 403, MsTeamsFolder = 403,
ActiveDirectoryGroup = 501, ActiveDirectoryGroup = 501,
ExchangeSharedMailbox = 601, ExchangeSharedMailbox = 601,
ExchangeDistributionGroup = 602 ExchangeDistributionGroup = 602
}; };
public enum eLiamGroupStrategies { None = 0, Ntfs_AGP = 0, Ntfs_AGDLP = 1 }; public enum eLiamGroupStrategies { None = 0, Ntfs_AGP = 0, Ntfs_AGDLP = 1 };
public class cLiamConfiguration public class cLiamConfiguration
{ {
} }
public class cLiamProviderData : ICloneable public class cLiamProviderData : ICloneable
{ {
public eLiamProviderTypes ProviderType { get; set; } = eLiamProviderTypes.Unknown; public eLiamProviderTypes ProviderType { get; set; } = eLiamProviderTypes.Unknown;
public string Domain { get; set; } = ""; public string Domain { get; set; } = "";
public string RootPath { get; set; } = ""; public string RootPath { get; set; } = "";
public cLiamCredential Credential { get; set; } = null; public cLiamCredential Credential { get; set; } = null;
public int MaxDepth { get; set; } = 1; public int MaxDepth { get; set; } = 1;
public eLiamGroupStrategies GroupStrategy { get; set; } = eLiamGroupStrategies.None; public eLiamGroupStrategies GroupStrategy { get; set; } = eLiamGroupStrategies.None;
public string DataAreaFilter { get; set; } = ""; public string DataAreaFilter { get; set; } = "";
public string DataAreaRegEx { get; set; } = ""; public string DataAreaRegEx { get; set; } = "";
public string GroupFilter { get; set; } = ""; public string GroupFilter { get; set; } = "";
public string GroupRegEx { get; set; } = ""; public string GroupRegEx { get; set; } = "";
public string GroupPath { get; set; } = ""; public string GroupPath { get; set; } = "";
public string OwnerGroupGlobal { get; set; } = ""; public string OwnerGroupGlobal { get; set; } = "";
public string OwnerGroupLocal { get; set; } = ""; public string OwnerGroupLocal { get; set; } = "";
public string WriteGroupGlobal { get; set; } = ""; public string WriteGroupGlobal { get; set; } = "";
public string WriteGroupLocal { get; set; } = ""; public string WriteGroupLocal { get; set; } = "";
public string ReadGroupGlobal { get; set; } = ""; public string ReadGroupGlobal { get; set; } = "";
public string ReadGroupLocal { get; set; } = ""; public string ReadGroupLocal { get; set; } = "";
public string TraverseGroup { get; set; } = ""; public string TraverseGroup { get; set; } = "";
public List<cLiamNamingConvention> NamingConventions { get; set; } = new List<cLiamNamingConvention>(); public List<cLiamNamingConvention> NamingConventions { get; set; } = new List<cLiamNamingConvention>();
public Dictionary<string, string> CustomTags { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); public Dictionary<string, string> CustomTags { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
public Dictionary<string, string> AdditionalConfiguration { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); public Dictionary<string, string> AdditionalConfiguration { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
public static void Copy(cLiamProviderData From, cLiamProviderData To) public static void Copy(cLiamProviderData From, cLiamProviderData To)
{ {
To.ProviderType = From.ProviderType; To.ProviderType = From.ProviderType;
To.Domain = From.Domain; To.Domain = From.Domain;
To.RootPath = From.RootPath; To.RootPath = From.RootPath;
To.Credential = From.Credential; To.Credential = From.Credential;
To.MaxDepth = From.MaxDepth; To.MaxDepth = From.MaxDepth;
To.GroupStrategy = From.GroupStrategy; To.GroupStrategy = From.GroupStrategy;
To.DataAreaFilter = From.DataAreaFilter; To.DataAreaFilter = From.DataAreaFilter;
To.DataAreaRegEx = From.DataAreaRegEx; To.DataAreaRegEx = From.DataAreaRegEx;
To.GroupFilter = From.GroupFilter; To.GroupFilter = From.GroupFilter;
To.GroupRegEx = From.GroupRegEx; To.GroupRegEx = From.GroupRegEx;
To.GroupPath = From.GroupPath; To.GroupPath = From.GroupPath;
To.CustomTags = From.CustomTags; To.CustomTags = From.CustomTags;
To.AdditionalConfiguration = From.AdditionalConfiguration; To.AdditionalConfiguration = From.AdditionalConfiguration;
To.CustomTags = From.CustomTags; To.CustomTags = From.CustomTags;
To.NamingConventions = From.NamingConventions; To.NamingConventions = From.NamingConventions;
} }
public cLiamProviderData() public cLiamProviderData()
{ {
} }
public cLiamProviderData(cLiamProviderData PD) public cLiamProviderData(cLiamProviderData PD)
{ {
Copy(PD, this); Copy(PD, this);
} }
public object Clone() public object Clone()
{ {
return new cLiamProviderData(this); return new cLiamProviderData(this);
} }
public void ReplaceCustomTags() public void ReplaceCustomTags()
{ {
foreach (var customTag in this.CustomTags) foreach (var customTag in this.CustomTags)
{ {
var Key = customTag.Key; var Key = customTag.Key;
foreach (var namingConvention in NamingConventions) foreach (var namingConvention in NamingConventions)
{ {
if (customTag.Key == "Filesystem_GroupDomainLocalTag" && namingConvention.Scope == eLiamAccessRoleScopes.DomainLocal || customTag.Key == "Filesystem_GroupGlobalTag" && namingConvention.Scope == eLiamAccessRoleScopes.Global) if (customTag.Key == "Filesystem_GroupDomainLocalTag" && namingConvention.Scope == eLiamAccessRoleScopes.DomainLocal || customTag.Key == "Filesystem_GroupGlobalTag" && namingConvention.Scope == eLiamAccessRoleScopes.Global)
Key = "SCOPETAG"; Key = "SCOPETAG";
else else
Key = customTag.Key; Key = customTag.Key;
namingConvention.DescriptionTemplate = namingConvention.DescriptionTemplate.Replace($"{{{{{Key}}}}}", customTag.Value); namingConvention.DescriptionTemplate = namingConvention.DescriptionTemplate.Replace($"{{{{{Key}}}}}", customTag.Value);
namingConvention.NamingTemplate = namingConvention.NamingTemplate.Replace($"{{{{{Key}}}}}", customTag.Value); namingConvention.NamingTemplate = namingConvention.NamingTemplate.Replace($"{{{{{Key}}}}}", customTag.Value);
namingConvention.Wildcard = namingConvention.Wildcard.Replace($"{{{{{Key}}}}}", customTag.Value); namingConvention.Wildcard = namingConvention.Wildcard.Replace($"{{{{{Key}}}}}", customTag.Value);
} }
GroupFilter = GroupFilter.Replace($"{{{{{Key}}}}}", customTag.Value); GroupFilter = GroupFilter.Replace($"{{{{{Key}}}}}", customTag.Value);
} }
} }
} }
public abstract class cLiamProviderBase : cLiamProviderData public abstract class cLiamProviderBase : cLiamProviderData
{ {
public cLiamConfiguration LiamConfiguration { get; private set; } public cLiamConfiguration LiamConfiguration { get; private set; }
public cLiamProviderBase(cLiamConfiguration Configuration, cLiamProviderData ProviderData) : public cLiamProviderBase(cLiamConfiguration Configuration, cLiamProviderData ProviderData) :
base(ProviderData) base(ProviderData)
{ {
LiamConfiguration = Configuration; LiamConfiguration = Configuration;
} }
public abstract Task<List<cLiamDataAreaBase>> getDataAreasAsync(int MaxDepth = -1); public abstract Task<List<cLiamDataAreaBase>> getDataAreasAsync(int MaxDepth = -1);
public abstract Task<bool> LogonAsync(); public abstract Task<bool> LogonAsync();
public abstract string GetLastErrorMessage(); public abstract string GetLastErrorMessage();
public abstract Task<cLiamDataAreaBase> LoadDataArea(string UID); public abstract Task<cLiamDataAreaBase> LoadDataArea(string UID);
public static cLiamProviderBase CreateInstance(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData) public static cLiamProviderBase CreateInstance(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData)
{ {
var CM = MethodBase.GetCurrentMethod(); var CM = MethodBase.GetCurrentMethod();
LogMethodBegin(CM); LogMethodBegin(CM);
try try
{ {
var MyPath = Assembly.GetExecutingAssembly()?.Location; var MyPath = Assembly.GetExecutingAssembly()?.Location;
if (MyPath == null) if (MyPath == null)
return null; return null;
MyPath = Path.GetDirectoryName(MyPath); MyPath = Path.GetDirectoryName(MyPath);
var DllPath = Path.Combine(MyPath, $"Liam{ProviderData.ProviderType}.dll"); var DllPath = Path.Combine(MyPath, $"Liam{ProviderData.ProviderType}.dll");
if (!File.Exists(DllPath)) if (!File.Exists(DllPath))
{ {
LogEntry($"Couldn not found Data Provider library '{DllPath}'", LogLevels.Error); LogEntry($"Couldn not found Data Provider library '{DllPath}'", LogLevels.Error);
return null; return null;
} }
var assLocal = Assembly.LoadFrom(DllPath); var assLocal = Assembly.LoadFrom(DllPath);
if (assLocal == null) if (assLocal == null)
{ {
LogEntry($"Could not load Data Provider library '{DllPath}'", LogLevels.Error); LogEntry($"Could not load Data Provider library '{DllPath}'", LogLevels.Error);
return null; return null;
} }
var TP = assLocal.GetTypes(); var TP = assLocal.GetTypes();
var type = assLocal.GetType("C4IT.LIAM.LiamInitializer"); var type = assLocal.GetType("C4IT.LIAM.LiamInitializer");
if (type == null) if (type == null)
{ {
LogEntry($"Could not found class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error); LogEntry($"Could not found class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error);
return null; return null;
} }
var MI = type.GetMethod("CreateInstance"); var MI = type.GetMethod("CreateInstance");
if (MI == null) if (MI == null)
{ {
LogEntry($"Could not found method 'CreateInstance' in class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error); LogEntry($"Could not found method 'CreateInstance' in class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error);
return null; return null;
} }
var objDll = MI.Invoke(null, new object[] { LiamConfiguration, ProviderData }); var objDll = MI.Invoke(null, new object[] { LiamConfiguration, ProviderData });
var RetVal = objDll as cLiamProviderBase; var RetVal = objDll as cLiamProviderBase;
ProviderData.ReplaceCustomTags(); ProviderData.ReplaceCustomTags();
return RetVal; return RetVal;
} }
catch (Exception E) catch (Exception E)
{ {
LogException(E); LogException(E);
return null; return null;
} }
finally finally
{ {
LogMethodEnd(CM); LogMethodEnd(CM);
} }
} }
public abstract Task<List<cLiamDataAreaBase>> getSecurityGroupsAsync(string groupFilter); public abstract Task<List<cLiamDataAreaBase>> getSecurityGroupsAsync(string groupFilter);
} }
public class cLiamCredential public class cLiamCredential
{ {
public string Domain { get; set; } = ""; public string Domain { get; set; } = "";
public string Identification { get; set; } = ""; public string Identification { get; set; } = "";
public string Secret { get; set; } = ""; public string Secret { get; set; } = "";
} }
public class cLiamNamingConvention public class cLiamNamingConvention
{ {
public string Name { get; set; } = ""; public string Name { get; set; } = "";
public string Description { get; set; } = ""; public string Description { get; set; } = "";
public string NamingTemplate { get; set; } = ""; public string NamingTemplate { get; set; } = "";
public string DescriptionTemplate { get; set; } = ""; public string DescriptionTemplate { get; set; } = "";
public string Wildcard { get; set; } = ""; public string Wildcard { get; set; } = "";
public eLiamAccessRoles AccessRole { get; set; } = eLiamAccessRoles.Read; public eLiamAccessRoles AccessRole { get; set; } = eLiamAccessRoles.Read;
public eLiamAccessRoleScopes Scope { get; set; } = eLiamAccessRoleScopes.Unknown; public eLiamAccessRoleScopes Scope { get; set; } = eLiamAccessRoleScopes.Unknown;
public eLiamProviderTypes? ProviderType { get; set; } = null; public eLiamProviderTypes? ProviderType { get; set; } = null;
} }
public class cLiamDataAreaInfo public class cLiamDataAreaInfo
{ {
public string DisplayName { get; protected set; } = null; public string DisplayName { get; protected set; } = null;
public string Description { get; protected set; } = null; public string Description { get; protected set; } = null;
public string OwnerRef { get; set; } = null; public string OwnerRef { get; set; } = null;
public string UID { get; protected set; } = null; public string UID { get; protected set; } = null;
public string CreatedDate { get; protected set; } = null; public string CreatedDate { get; protected set; } = null;
public string TechnicalName { get; protected set; } = ""; public string TechnicalName { get; protected set; } = "";
public int Level { get; set; } = -1; public int Level { get; set; } = -1;
public string ParentUID { get; protected set; } = null; public string ParentUID { get; protected set; } = null;
public eLiamDataAreaTypes DataType { get; protected set; } = eLiamDataAreaTypes.Unknown; public eLiamDataAreaTypes DataType { get; protected set; } = eLiamDataAreaTypes.Unknown;
public bool SupportsPermissions { get; protected set; } = false; public bool SupportsPermissions { get; protected set; } = false;
public bool SupportsOwners { get; protected set; } = false; public bool SupportsOwners { get; protected set; } = false;
} }
public abstract class cLiamDataAreaBase : cLiamDataAreaInfo public abstract class cLiamDataAreaBase : cLiamDataAreaInfo
{ {
public readonly cLiamProviderBase Provider = null; public readonly cLiamProviderBase Provider = null;
public cLiamDataAreaBase(cLiamProviderBase Provider) public cLiamDataAreaBase(cLiamProviderBase Provider)
{ {
this.Provider = Provider; this.Provider = Provider;
} }
public abstract Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1); public abstract Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1);
public static async Task<List<cLiamDataAreaBase>> getChildrenFromListAsync(List<cLiamDataAreaBase> Items, int Depth = -1) public static async Task<List<cLiamDataAreaBase>> getChildrenFromListAsync(List<cLiamDataAreaBase> Items, int Depth = -1)
{ {
var CM = MethodBase.GetCurrentMethod(); var CM = MethodBase.GetCurrentMethod();
LogMethodBegin(CM); LogMethodBegin(CM);
var RetVal = new List<cLiamDataAreaBase>(); var RetVal = new List<cLiamDataAreaBase>();
try try
{ {
if (Items == null) if (Items == null)
return RetVal; return RetVal;
if (Depth <= 0) if (Depth <= 0)
return RetVal; return RetVal;
foreach (var Entry in Items) foreach (var Entry in Items)
{ {
var Childs = await Entry.getChildrenAsync(Depth + 1); var Childs = await Entry.getChildrenAsync(Depth + 1);
if (Childs != null) if (Childs != null)
RetVal.AddRange(Childs); RetVal.AddRange(Childs);
} }
} }
catch (Exception E) catch (Exception E)
{ {
LogException(E); LogException(E);
} }
finally finally
{ {
LogMethodEnd(CM); LogMethodEnd(CM);
} }
return RetVal; return RetVal;
} }
public virtual async Task<List<cLiamUserInfo>> GetOwnersAsync() public virtual async Task<List<cLiamUserInfo>> GetOwnersAsync()
{ {
await Task.Delay(0); await Task.Delay(0);
return null; return null;
} }
public virtual async Task<List<cLiamPermissionInfo>> GetPermissionsAsync(bool force) public virtual async Task<List<cLiamPermissionInfo>> GetPermissionsAsync(bool force)
{ {
await Task.Delay(0); await Task.Delay(0);
return null; return null;
} }
public virtual async Task<cLiamPermissionResult> GrantPermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role) public virtual async Task<cLiamPermissionResult> GrantPermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role)
{ {
await Task.Delay(0); await Task.Delay(0);
return null; return null;
} }
public virtual async Task<bool> RevokePermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role) public virtual async Task<bool> RevokePermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role)
{ {
await Task.Delay(0); await Task.Delay(0);
return false; return false;
} }
} }
public class cLiamUserInfo public class cLiamUserInfo
{ {
public string DisplayName { get; set; } = null; public string DisplayName { get; set; } = null;
public string GivenName { get; set; } = null; public string GivenName { get; set; } = null;
public string SurName { get; set; } = null; public string SurName { get; set; } = null;
public string UserPrincipalName { get; set; } = null; public string UserPrincipalName { get; set; } = null;
public string EMail { get; set; } = null; public string EMail { get; set; } = null;
public string SID { get; set; } = null; public string SID { get; set; } = null;
} }
public class cLiamPermissionResult public class cLiamPermissionResult
{ {
public bool Valid { get; set; } = false; public bool Valid { get; set; } = false;
public string UserReference { get; set; } = null; public string UserReference { get; set; } = null;
} }
public class cLiamPermissionInfo public class cLiamPermissionInfo
{ {
public cLiamUserInfo User; public cLiamUserInfo User;
public eLiamAccessRoles AccessRole = eLiamAccessRoles.Read; public eLiamAccessRoles AccessRole = eLiamAccessRoles.Read;
public bool OnlyEffective = false; public bool OnlyEffective = false;
} }
public class DataAreaEntryBase public class DataAreaEntryBase
{ {
public string DisplayName { get; set; } public string DisplayName { get; set; }
public string TechnicalName { get; set; } public string TechnicalName { get; set; }
public string UID { get; set; } public string UID { get; set; }
public string TargetType { get; set; } public string TargetType { get; set; }
} }
public class SecurityGroupEntry : DataAreaEntryBase public class SecurityGroupEntry : DataAreaEntryBase
{ {
public string Scope { get; set; } public string Scope { get; set; }
} }
public class DataAreaEntry : DataAreaEntryBase public class DataAreaEntry : DataAreaEntryBase
{ {
public string Parent { get; set; } public string Parent { get; set; }
public string ParentUID { get; set; } public string ParentUID { get; set; }
public string Owner { get; set; } public string Owner { get; set; }
public string Write { get; set; } public string Write { get; set; }
public string Read { get; set; } public string Read { get; set; }
public string Traverse { get; set; } public string Traverse { get; set; }
public string CreatedDate { get; set; } public string CreatedDate { get; set; }
public string Level { get; set; } public string Level { get; set; }
public string ConfigurationId { get; set; } public string ConfigurationId { get; set; }
public string BaseFolder { get; set; } public string BaseFolder { get; set; }
public string Description { get; set; } public string Description { get; set; }
public string UniqueId { get; set; } public string UniqueId { get; set; }
public string DataAreaType { get; set; } public string DataAreaType { get; set; }
} }
public class LiamApiVersionInfo public class LiamApiVersionInfo
{ {
public string ProductName { get; set; } = "- unknown -"; public string ProductName { get; set; } = "- unknown -";
public string ProductVersion { get; set; } = ""; public string ProductVersion { get; set; } = "";
public string AssemblyName { get; set; } = "- unknown -"; public string AssemblyName { get; set; } = "- unknown -";
public string AssemblyVersion { get; set; } = ""; public string AssemblyVersion { get; set; } = "";
} }
public class ProviderCacheEntry public class ProviderCacheEntry
{ {
public Guid ID; public Guid ID;
public Guid ObjectID; public Guid ObjectID;
public DateTime ValidUntil; public DateTime ValidUntil;
public cLiamProviderBase Provider; public cLiamProviderBase Provider;
} }
public class LiamDataAreaEntry public class LiamDataAreaEntry
{ {
public string DisplayName { get; set; } = ""; public string DisplayName { get; set; } = "";
public string UID { get; set; } = ""; public string UID { get; set; } = "";
public bool SupportsPermissions { get; set; } = false; public bool SupportsPermissions { get; set; } = false;
} }
} }

View File

@@ -1,61 +1,61 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}</ProjectGuid> <ProjectGuid>{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LiamBaseClasses</RootNamespace> <RootNamespace>LiamBaseClasses</RootNamespace>
<AssemblyName>LiamBaseClasses</AssemblyName> <AssemblyName>LiamBaseClasses</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>false</Deterministic> <Deterministic>false</Deterministic>
<SccProjectName>SAK</SccProjectName> <SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath> <SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath> <SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider> <SccProvider>SAK</SccProvider>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs"> <Compile Include="..\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link> <Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile> </Compile>
<Compile Include="C4IT.LIAM.Base.cs" /> <Compile Include="C4IT.LIAM.Base.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\LiamHelper\LiamHelper.csproj"> <ProjectReference Include="..\LiamHelper\LiamHelper.csproj">
<Project>{6b0e73a6-f918-42d5-9525-d59d4d16283d}</Project> <Project>{6b0e73a6-f918-42d5-9525-d59d4d16283d}</Project>
<Name>LiamHelper</Name> <Name>LiamHelper</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View File

@@ -1,10 +1,10 @@
"" ""
{ {
"FILE_VERSION" = "9237" "FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER" "ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = "" "PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0" "NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = "" "ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0" "NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
} }

View File

@@ -1,11 +1,11 @@
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
[assembly: AssemblyTitle("LIAM support library for basic classes & interfaces")] [assembly: AssemblyTitle("LIAM support library for basic classes & interfaces")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
[assembly: Guid("3531c9e6-cf6e-458e-b604-4a5a8d1c7ab0")] [assembly: Guid("3531c9e6-cf6e-458e-b604-4a5a8d1c7ab0")]

View File

@@ -1,4 +1,4 @@
// <autogenerated /> // <autogenerated />
using System; using System;
using System.Reflection; using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")] [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]

View File

@@ -1 +1 @@
3908855f9633bf09d020c2efbd1fa153a9ad8a91b6e76b39255ee0403b9907f8 d0283af9d4075f4a557253c483f33e9a0d4fae295f6ce748fa39a1e639aafbb6

View File

@@ -1,10 +1,20 @@
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Debug\LiamBaseClasses.dll C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Debug\LiamBaseClasses.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Debug\LiamBaseClasses.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Debug\LiamBaseClasses.pdb
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Debug\LiamHelper.dll C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Debug\LiamHelper.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Debug\Newtonsoft.Json.dll C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Debug\Newtonsoft.Json.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Debug\LiamHelper.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Debug\LiamHelper.pdb
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Debug\LiamBaseClasses.csproj.AssemblyReference.cache C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Debug\LiamBaseClasses.csproj.AssemblyReference.cache
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Debug\LiamBaseClasses.csproj.CoreCompileInputs.cache C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Debug\LiamBaseClasses.csproj.CoreCompileInputs.cache
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Debug\LiamBase.24B0A51E.Up2Date C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Debug\LiamBase.24B0A51E.Up2Date
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Debug\LiamBaseClasses.dll C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Debug\LiamBaseClasses.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Debug\LiamBaseClasses.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Debug\LiamBaseClasses.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\bin\Debug\LiamBaseClasses.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\bin\Debug\LiamBaseClasses.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\bin\Debug\LiamHelper.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\bin\Debug\Newtonsoft.Json.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\bin\Debug\LiamHelper.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\obj\Debug\LiamBaseClasses.csproj.AssemblyReference.cache
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\obj\Debug\LiamBaseClasses.csproj.CoreCompileInputs.cache
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\obj\Debug\LiamBase.24B0A51E.Up2Date
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\obj\Debug\LiamBaseClasses.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\obj\Debug\LiamBaseClasses.pdb

View File

@@ -1,4 +1,4 @@
// <autogenerated /> // <autogenerated />
using System; using System;
using System.Reflection; using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")] [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]

View File

@@ -1 +1 @@
77f86ea35cc63f1fe117fbff3ddf1a527617a8ddb75413eb5ef7f6b4cf6c8399 135510e8387d9e004d20f72096af679b01eba0ea20db7534ef81cc95461b16c6

View File

@@ -1,10 +1,20 @@
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Release\LiamBaseClasses.dll C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Release\LiamBaseClasses.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Release\LiamBaseClasses.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Release\LiamBaseClasses.pdb
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Release\LiamHelper.dll C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Release\LiamHelper.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Release\Newtonsoft.Json.dll C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Release\Newtonsoft.Json.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Release\LiamHelper.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\bin\Release\LiamHelper.pdb
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Release\LiamBaseClasses.csproj.AssemblyReference.cache C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Release\LiamBaseClasses.csproj.AssemblyReference.cache
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Release\LiamBaseClasses.csproj.CoreCompileInputs.cache C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Release\LiamBaseClasses.csproj.CoreCompileInputs.cache
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Release\LiamBase.24B0A51E.Up2Date C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Release\LiamBase.24B0A51E.Up2Date
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Release\LiamBaseClasses.dll C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Release\LiamBaseClasses.dll
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Release\LiamBaseClasses.pdb C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Release\LiamBaseClasses.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\bin\Release\LiamBaseClasses.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\bin\Release\LiamBaseClasses.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\bin\Release\LiamHelper.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\bin\Release\Newtonsoft.Json.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\bin\Release\LiamHelper.pdb
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\obj\Release\LiamBaseClasses.csproj.AssemblyReference.cache
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\obj\Release\LiamBaseClasses.csproj.CoreCompileInputs.cache
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\obj\Release\LiamBase.24B0A51E.Up2Date
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\obj\Release\LiamBaseClasses.dll
C:\Workspace\C4IT DEV LIAM WEB Service_git\LiamBaseClasses\obj\Release\LiamBaseClasses.pdb

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,8 @@
using System; using System;
using System.Linq; using System.Linq;
using System.Management.Automation; using System.Management.Automation;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security; using System.Security;
using System.DirectoryServices; using System.DirectoryServices;
@@ -9,187 +10,254 @@ using System.Diagnostics;
using System.Threading; using System.Threading;
using System.Management.Automation.Runspaces; using System.Management.Automation.Runspaces;
using System.Security.Principal; using System.Security.Principal;
using C4IT.Logging;
namespace C4IT.LIAM using static C4IT.Logging.cLogManager;
{
namespace C4IT.LIAM
{
public partial class ExchangeManager public partial class ExchangeManager
{ {
/// <summary> private static readonly TimeSpan PowerShellInvokeTimeout = TimeSpan.FromSeconds(120);
/// Stellt sicher, dass eine AD-Sicherheitsgruppe für den angegebenen AccessRole existiert (erstellt sie falls nicht)
/// und wartet optional, bis die Replikation abgeschlossen ist. private static Collection<PSObject> InvokePowerShellWithTimeout(PowerShell ps, TimeSpan timeout, string operationName)
/// Liefert den tatsächlichen Gruppennamen zurück.
/// </summary>
private string EnsureSecurityGroup(eLiamAccessRoles accessRole, string baseName)
{ {
const int MaxLoop = 50; // Abbruchbedingung: nach 50 Versuchen abbrechen IAsyncResult asyncResult = null;
try
// 1. Namenskonvention für diese Rolle finden
var namingConvention = _provider.NamingConventions
.FirstOrDefault(nc => nc.AccessRole == accessRole);
if (namingConvention == null)
throw new InvalidOperationException($"Keine Namenskonvention für Rolle '{accessRole}' gefunden.");
// 2. Benötigte CustomTags aus dem Provider ziehen
// - Prefix (z.B. "ACL")
// - GROUPTYPEPOSTFIX (z.B. "ExchangeMLMember")
_provider.CustomTags.TryGetValue("ADGroupPrefix", out var prefix);
_provider.CustomTags.TryGetValue(accessRole.ToString(), out var typePostfix);
// 3. Schleife für _LOOP hochzählen, bis ein einzigartiger Name gefunden ist
string groupName = null;
string description = null;
for (int loop = 0; loop <= MaxLoop; loop++)
{ {
// nur einfügen, wenn loop > 0 asyncResult = ps.BeginInvoke();
var loopPart = loop > 0 ? $"_{loop}" : string.Empty; if (!asyncResult.AsyncWaitHandle.WaitOne(timeout))
{
try
{
ps.Stop();
}
catch (Exception stopEx)
{
LogException(stopEx);
}
// Platzhalter im Template ersetzen throw new TimeoutException(
groupName = namingConvention.NamingTemplate $"PowerShell operation '{operationName}' timed out after {timeout.TotalSeconds:0} seconds.");
.Replace("{{ADGroupPrefix}}", prefix ?? string.Empty) }
.Replace("{{NAME}}", baseName)
.Replace("{{_LOOP}}", loopPart)
.Replace("{{GROUPTYPEPOSTFIX}}", typePostfix ?? string.Empty);
description = namingConvention.DescriptionTemplate var results = ps.EndInvoke(asyncResult);
.Replace("{{ADGroupPrefix}}", prefix ?? string.Empty) if (ps.HadErrors)
.Replace("{{NAME}}", baseName) {
.Replace("{{_LOOP}}", loopPart) var errorMessage = CollectPowerShellErrors(ps);
.Replace("{{GROUPTYPEPOSTFIX}}", typePostfix ?? string.Empty);
// Existenz prüfen
bool exists = GetSecurityGroups(groupName)
.Any(g => string.Equals(
g.Properties["sAMAccountName"]?.Value?.ToString(),
groupName,
StringComparison.OrdinalIgnoreCase));
if (!exists)
break; // Name ist frei raus aus der Schleife
if (loop == MaxLoop)
throw new InvalidOperationException( throw new InvalidOperationException(
$"Konnte nach {MaxLoop} Versuchen keinen eindeutigen Gruppennamen für '{baseName}' erzeugen."); string.IsNullOrWhiteSpace(errorMessage)
} ? $"PowerShell operation '{operationName}' failed without detailed error output."
// 4. Gruppen-Scope-Bit setzen : $"PowerShell operation '{operationName}' failed: {errorMessage}");
int scopeBit;
switch (namingConvention.Scope)
{
case eLiamAccessRoleScopes.Global:
scopeBit = 0x2;
break;
case eLiamAccessRoleScopes.DomainLocal:
scopeBit = 0x4;
break;
case eLiamAccessRoleScopes.Universal:
scopeBit = 0x8;
break;
default:
scopeBit = 0x8;
break;
}
int groupType = unchecked((int)(0x80000000 | scopeBit));
// 5. Gruppe im AD anlegen
string ldapPath = $"LDAP://{_organizationalUnit}";
string password = new System.Net.NetworkCredential(string.Empty, _credential.Password).Password;
using (var root = new DirectoryEntry(
ldapPath,
_credential.UserName,
password,
AuthenticationTypes.Secure))
{
var newGroup = root.Children.Add($"CN={groupName}", "group");
newGroup.Properties["sAMAccountName"].Value = groupName;
newGroup.Properties["displayName"].Value = groupName;
newGroup.Properties["groupType"].Value = groupType;
if(!string.IsNullOrEmpty(description))
{
newGroup.Properties["description"].Value = description;
} }
newGroup.CommitChanges();
}
// 6. Auf Replikation warten (optional) return results;
const int replicationTimeoutMinutes = 2; }
if (!WaitForGroupReplication(groupName, TimeSpan.FromMinutes(replicationTimeoutMinutes))) finally
{ {
throw new TimeoutException( if (asyncResult != null)
$"Die AD-Gruppe '{groupName}' konnte innerhalb von {replicationTimeoutMinutes} Minuten nicht repliziert werden."); asyncResult.AsyncWaitHandle.Close();
} }
return groupName;
} }
/// <summary> private static string CollectPowerShellErrors(PowerShell ps)
/// Wartet darauf, dass die Gruppe nach der Erstellung im AD repliziert ist.
/// </summary>
private bool WaitForGroupReplication(string groupName, TimeSpan timeout)
{ {
var sw = Stopwatch.StartNew(); if (ps?.Streams?.Error == null || ps.Streams.Error.Count <= 0)
var pollInterval = TimeSpan.FromSeconds(5); return string.Empty;
while (sw.Elapsed < timeout) var errors = ps.Streams.Error
{ .Select(e => e.Exception?.Message ?? e.ToString())
var found = GetSecurityGroups(groupName) .Where(m => !string.IsNullOrWhiteSpace(m))
.Any(g => string.Equals( .Take(3);
g.Properties["sAMAccountName"]?.Value?.ToString(),
groupName,
StringComparison.OrdinalIgnoreCase));
if (found) return true; return string.Join(" | ", errors);
Thread.Sleep(pollInterval);
}
return false;
} }
/// <summary> private static string GetSharedMailboxCreateErrorCode(Exception ex)
/// Setzt das ManagedBy-Attribut einer AD-Gruppe auf eine andere Gruppe
/// mit den im Konstruktor übergebenen Credentials und Domain.
/// </summary>
private void SetManagedBy(string groupName, string managerGroup)
{ {
string ldapPath = $"LDAP://{_organizationalUnit}"; return ex is TimeoutException ? "EXCH_SHAREDMAILBOX_TIMEOUT" : "EXCH_SHAREDMAILBOX_CREATE_FAILED";
// SecureString -> Klartext
string password = SecureStringToString(_credential.Password);
using (var root = new DirectoryEntry(ldapPath,
_credential.UserName,
password,
AuthenticationTypes.Secure))
using (var ds = new DirectorySearcher(root))
{
// Gruppe holen
ds.Filter = $"(&(objectClass=group)(sAMAccountName={groupName}))";
var result = ds.FindOne();
if (result == null)
throw new InvalidOperationException($"Gruppe '{groupName}' nicht gefunden in {ldapPath}");
var groupEntry = result.GetDirectoryEntry();
// DistinguishedName der Manager-Gruppe ermitteln
using (var mgrSearch = new DirectorySearcher(root))
{
mgrSearch.Filter = $"(&(objectClass=group)(sAMAccountName={managerGroup}))";
var mgrResult = mgrSearch.FindOne();
if (mgrResult == null)
throw new InvalidOperationException($"Manager-Gruppe '{managerGroup}' nicht gefunden in {ldapPath}");
string managerDn = mgrResult.GetDirectoryEntry()
.Properties["distinguishedName"]
.Value
.ToString();
// Attribut setzen und speichern
groupEntry.Properties["managedBy"].Value = managerDn;
groupEntry.CommitChanges();
}
}
} }
private static string GetDistributionGroupCreateErrorCode(Exception ex)
{
return ex is TimeoutException ? "EXCH_DISTRIBUTIONGROUP_TIMEOUT" : "EXCH_DISTRIBUTIONGROUP_CREATE_FAILED";
}
/// <summary>
/// Stellt sicher, dass eine AD-Sicherheitsgruppe für den angegebenen AccessRole existiert (erstellt sie falls nicht)
/// und wartet optional, bis die Replikation abgeschlossen ist.
/// Liefert den tatsächlichen Gruppennamen zurück.
/// </summary>
private string EnsureSecurityGroup(eLiamAccessRoles accessRole, string baseName)
{
const int MaxLoop = 50; // Abbruchbedingung: nach 50 Versuchen abbrechen
// 1. Namenskonvention für diese Rolle finden
var namingConvention = _provider.NamingConventions
.FirstOrDefault(nc => nc.AccessRole == accessRole);
if (namingConvention == null)
throw new InvalidOperationException($"Keine Namenskonvention für Rolle '{accessRole}' gefunden.");
// 2. Benötigte CustomTags aus dem Provider ziehen
// - Prefix (z.B. "ACL")
// - GROUPTYPEPOSTFIX (z.B. "ExchangeMLMember")
_provider.CustomTags.TryGetValue("ADGroupPrefix", out var prefix);
_provider.CustomTags.TryGetValue(accessRole.ToString(), out var typePostfix);
// 3. Schleife für _LOOP hochzählen, bis ein einzigartiger Name gefunden ist
string groupName = null;
string description = null;
for (int loop = 0; loop <= MaxLoop; loop++)
{
// nur einfügen, wenn loop > 0
var loopPart = loop > 0 ? $"_{loop}" : string.Empty;
// Platzhalter im Template ersetzen
groupName = namingConvention.NamingTemplate
.Replace("{{ADGroupPrefix}}", prefix ?? string.Empty)
.Replace("{{NAME}}", baseName)
.Replace("{{_LOOP}}", loopPart)
.Replace("{{GROUPTYPEPOSTFIX}}", typePostfix ?? string.Empty);
description = namingConvention.DescriptionTemplate
.Replace("{{ADGroupPrefix}}", prefix ?? string.Empty)
.Replace("{{NAME}}", baseName)
.Replace("{{_LOOP}}", loopPart)
.Replace("{{GROUPTYPEPOSTFIX}}", typePostfix ?? string.Empty);
// Existenz prüfen
bool exists = GetSecurityGroups(groupName)
.Any(g => string.Equals(
g.Properties["sAMAccountName"]?.Value?.ToString(),
groupName,
StringComparison.OrdinalIgnoreCase));
if (!exists)
break; // Name ist frei raus aus der Schleife
if (loop == MaxLoop)
throw new InvalidOperationException(
$"Konnte nach {MaxLoop} Versuchen keinen eindeutigen Gruppennamen für '{baseName}' erzeugen.");
}
// 4. Gruppen-Scope-Bit setzen
int scopeBit;
switch (namingConvention.Scope)
{
case eLiamAccessRoleScopes.Global:
scopeBit = 0x2;
break;
case eLiamAccessRoleScopes.DomainLocal:
scopeBit = 0x4;
break;
case eLiamAccessRoleScopes.Universal:
scopeBit = 0x8;
break;
default:
scopeBit = 0x8;
break;
}
int groupType = unchecked((int)(0x80000000 | scopeBit));
// 5. Gruppe im AD anlegen
string ldapPath = $"LDAP://{_organizationalUnit}";
string password = new System.Net.NetworkCredential(string.Empty, _credential.Password).Password;
using (var root = new DirectoryEntry(
ldapPath,
_credential.UserName,
password,
AuthenticationTypes.Secure))
{
var newGroup = root.Children.Add($"CN={groupName}", "group");
newGroup.Properties["sAMAccountName"].Value = groupName;
newGroup.Properties["displayName"].Value = groupName;
newGroup.Properties["groupType"].Value = groupType;
if(!string.IsNullOrEmpty(description))
{
newGroup.Properties["description"].Value = description;
}
newGroup.CommitChanges();
}
// 6. Auf Replikation warten (optional)
const int replicationTimeoutMinutes = 2;
if (!WaitForGroupReplication(groupName, TimeSpan.FromMinutes(replicationTimeoutMinutes)))
{
throw new TimeoutException(
$"Die AD-Gruppe '{groupName}' konnte innerhalb von {replicationTimeoutMinutes} Minuten nicht repliziert werden.");
}
return groupName;
}
/// <summary>
/// Wartet darauf, dass die Gruppe nach der Erstellung im AD repliziert ist.
/// </summary>
private bool WaitForGroupReplication(string groupName, TimeSpan timeout)
{
var sw = Stopwatch.StartNew();
var pollInterval = TimeSpan.FromSeconds(5);
while (sw.Elapsed < timeout)
{
var found = GetSecurityGroups(groupName)
.Any(g => string.Equals(
g.Properties["sAMAccountName"]?.Value?.ToString(),
groupName,
StringComparison.OrdinalIgnoreCase));
if (found) return true;
Thread.Sleep(pollInterval);
}
return false;
}
/// <summary>
/// Setzt das ManagedBy-Attribut einer AD-Gruppe auf eine andere Gruppe
/// mit den im Konstruktor übergebenen Credentials und Domain.
/// </summary>
private void SetManagedBy(string groupName, string managerGroup)
{
string ldapPath = $"LDAP://{_organizationalUnit}";
// SecureString -> Klartext
string password = SecureStringToString(_credential.Password);
using (var root = new DirectoryEntry(ldapPath,
_credential.UserName,
password,
AuthenticationTypes.Secure))
using (var ds = new DirectorySearcher(root))
{
// Gruppe holen
ds.Filter = $"(&(objectClass=group)(sAMAccountName={groupName}))";
var result = ds.FindOne();
if (result == null)
throw new InvalidOperationException($"Gruppe '{groupName}' nicht gefunden in {ldapPath}");
var groupEntry = result.GetDirectoryEntry();
// DistinguishedName der Manager-Gruppe ermitteln
using (var mgrSearch = new DirectorySearcher(root))
{
mgrSearch.Filter = $"(&(objectClass=group)(sAMAccountName={managerGroup}))";
var mgrResult = mgrSearch.FindOne();
if (mgrResult == null)
throw new InvalidOperationException($"Manager-Gruppe '{managerGroup}' nicht gefunden in {ldapPath}");
string managerDn = mgrResult.GetDirectoryEntry()
.Properties["distinguishedName"]
.Value
.ToString();
// Attribut setzen und speichern
groupEntry.Properties["managedBy"].Value = managerDn;
groupEntry.CommitChanges();
}
}
}
/// <summary> /// <summary>
/// Erstellt eine Shared Mailbox samt zugehöriger AD-Gruppen (FullAccess, SendAs, Owner) und setzt die nötigen Berechtigungen. /// Erstellt eine Shared Mailbox samt zugehöriger AD-Gruppen (FullAccess, SendAs, Owner) und setzt die nötigen Berechtigungen.
/// </summary> /// </summary>
@@ -199,22 +267,63 @@ namespace C4IT.LIAM
string displayName = null, string displayName = null,
string primarySmtpAddress = null) string primarySmtpAddress = null)
{ {
string errorCode;
string errorMessage;
var result = CreateSharedMailboxWithOwnershipGroups(
name,
alias,
displayName,
primarySmtpAddress,
out errorCode,
out errorMessage);
if (result == null)
throw new InvalidOperationException($"[{errorCode}] {errorMessage}");
return result;
}
/// <summary>
/// Erstellt eine Shared Mailbox samt zugehöriger AD-Gruppen (FullAccess, SendAs, Owner) und setzt die nötigen Berechtigungen.
/// Liefert bei Fehlern einen Error-Code und eine Message zurück.
/// </summary>
public Tuple<Guid, List<Tuple<string, string, string, string>>> CreateSharedMailboxWithOwnershipGroups(
string name,
string alias,
string displayName,
string primarySmtpAddress,
out string errorCode,
out string errorMessage)
{
errorCode = string.Empty;
errorMessage = string.Empty;
CreationResult result = new CreationResult(); CreationResult result = new CreationResult();
// Ensure AD groups try
string fullAccessGroup = EnsureSecurityGroup(eLiamAccessRoles.ExchangeSMBFullAccess, name);
string sendAsGroup = EnsureSecurityGroup(eLiamAccessRoles.ExchangeSMBSendAs, name);
string ownerGroup = EnsureSecurityGroup(eLiamAccessRoles.ExchangeSMBOwner, name);
SetManagedBy(fullAccessGroup, ownerGroup);
SetManagedBy(sendAsGroup, ownerGroup);
// Create mailbox
using (Runspace rs = CreateRunspace())
{ {
LogEntry(
$"Start shared mailbox creation: Name='{name}', Alias='{alias}', DisplayName='{displayName}', PrimarySmtpAddress='{primarySmtpAddress}'",
LogLevels.Info);
// Ensure AD groups
string fullAccessGroup = EnsureSecurityGroup(eLiamAccessRoles.ExchangeSMBFullAccess, name);
string sendAsGroup = EnsureSecurityGroup(eLiamAccessRoles.ExchangeSMBSendAs, name);
string ownerGroup = EnsureSecurityGroup(eLiamAccessRoles.ExchangeSMBOwner, name);
SetManagedBy(fullAccessGroup, ownerGroup);
SetManagedBy(sendAsGroup, ownerGroup);
LogEntry(
$"Shared mailbox groups prepared: FullAccess='{fullAccessGroup}', SendAs='{sendAsGroup}', Owner='{ownerGroup}'",
LogLevels.Debug);
// Create mailbox and permissions
using (Runspace rs = CreateRunspace())
using (PowerShell ps = PowerShell.Create()) using (PowerShell ps = PowerShell.Create())
{ {
ps.Runspace = rs; ps.Runspace = rs;
ps.AddCommand("New-Mailbox"); ps.AddCommand("New-Mailbox");
ps.AddParameter("Name", name); ps.AddParameter("Name", name);
ps.AddParameter("Alias", alias); ps.AddParameter("Alias", alias);
@@ -224,47 +333,77 @@ namespace C4IT.LIAM
ps.AddParameter("DisplayName", displayName); ps.AddParameter("DisplayName", displayName);
if (!string.IsNullOrEmpty(primarySmtpAddress)) if (!string.IsNullOrEmpty(primarySmtpAddress))
ps.AddParameter("PrimarySmtpAddress", primarySmtpAddress); ps.AddParameter("PrimarySmtpAddress", primarySmtpAddress);
ps.Invoke();
AddMailboxPermission(name, fullAccessGroup, "FullAccess"); InvokePowerShellWithTimeout(ps, PowerShellInvokeTimeout, $"New-Mailbox '{alias}'");
AddSendAsPermission(name, sendAsGroup).GetAwaiter().GetResult();
ps.Commands.Clear();
ps.AddCommand("Add-MailboxPermission");
ps.AddParameter("Identity", name);
ps.AddParameter("User", fullAccessGroup);
ps.AddParameter("AccessRights", "FullAccess");
ps.AddParameter("InheritanceType", "All");
ps.AddParameter("ErrorAction", "Stop");
InvokePowerShellWithTimeout(ps, PowerShellInvokeTimeout, $"Add-MailboxPermission '{name}' -> '{fullAccessGroup}'");
ps.Commands.Clear();
ps.AddCommand("Add-ADPermission");
ps.AddParameter("Identity", name);
ps.AddParameter("User", sendAsGroup);
ps.AddParameter("ExtendedRights", "Send-As");
ps.AddParameter("AccessRights", "ExtendedRight");
ps.AddParameter("ErrorAction", "Stop");
InvokePowerShellWithTimeout(ps, PowerShellInvokeTimeout, $"Add-ADPermission Send-As '{name}' -> '{sendAsGroup}'");
} }
}
// Retrieve mailbox GUID // Retrieve mailbox GUID
DirectoryEntry mbEntry = FindAdObject("(&(objectClass=user)(mailNickname=" + alias + "))"); DirectoryEntry mbEntry = FindAdObject("(&(objectClass=user)(mailNickname=" + alias + "))");
if (mbEntry != null && mbEntry.Properties.Contains("objectGUID") && mbEntry.Properties["objectGUID"].Count > 0) if (mbEntry != null && mbEntry.Properties.Contains("objectGUID") && mbEntry.Properties["objectGUID"].Count > 0)
{
byte[] bytes = (byte[])mbEntry.Properties["objectGUID"][0];
result.ObjectGuid = new Guid(bytes);
}
// Collect group details
string[] roles = new string[] {
eLiamAccessRoles.ExchangeSMBFullAccess.ToString(),
eLiamAccessRoles.ExchangeSMBSendAs.ToString(),
eLiamAccessRoles.ExchangeSMBOwner.ToString()
};
string[] names = new string[] {
fullAccessGroup,
sendAsGroup,
ownerGroup
};
for (int i = 0; i < roles.Length; i++)
{
DirectoryEntry grpEntry = FindAdObject("(&(objectCategory=group)(sAMAccountName=" + names[i] + "))");
if (grpEntry != null && grpEntry.Properties.Contains("objectSid") && grpEntry.Properties["objectSid"].Count > 0)
{ {
byte[] sidBytes = (byte[])grpEntry.Properties["objectSid"][0]; byte[] bytes = (byte[])mbEntry.Properties["objectGUID"][0];
string sid = new SecurityIdentifier(sidBytes, 0).Value; result.ObjectGuid = new Guid(bytes);
string distinguishedName = grpEntry.Properties["distinguishedName"][0].ToString();
result.Groups.Add(Tuple.Create(roles[i], sid, names[i], distinguishedName));
} }
// Collect group details
string[] roles = new string[] {
eLiamAccessRoles.ExchangeSMBFullAccess.ToString(),
eLiamAccessRoles.ExchangeSMBSendAs.ToString(),
eLiamAccessRoles.ExchangeSMBOwner.ToString()
};
string[] names = new string[] {
fullAccessGroup,
sendAsGroup,
ownerGroup
};
for (int i = 0; i < roles.Length; i++)
{
DirectoryEntry grpEntry = FindAdObject("(&(objectCategory=group)(sAMAccountName=" + names[i] + "))");
if (grpEntry != null && grpEntry.Properties.Contains("objectSid") && grpEntry.Properties["objectSid"].Count > 0)
{
byte[] sidBytes = (byte[])grpEntry.Properties["objectSid"][0];
string sid = new SecurityIdentifier(sidBytes, 0).Value;
string distinguishedName = grpEntry.Properties["distinguishedName"][0].ToString();
result.Groups.Add(Tuple.Create(roles[i], sid, names[i], distinguishedName));
}
}
errorCode = "OK";
LogEntry(
$"Shared mailbox created successfully: Name='{name}', Alias='{alias}', ObjectGuid='{result.ObjectGuid}', GroupCount='{result.Groups.Count}'",
LogLevels.Info);
return Tuple.Create(result.ObjectGuid, result.Groups);
}
catch (Exception ex)
{
errorCode = GetSharedMailboxCreateErrorCode(ex);
errorMessage = ex.Message;
LogEntry($"Shared mailbox creation failed [{errorCode}] {errorMessage}", LogLevels.Error);
LogException(ex);
return null;
} }
return Tuple.Create(result.ObjectGuid, result.Groups);
} }
/// <summary> /// <summary>
/// Erstellt eine Distribution Group samt zugehöriger AD-Gruppen (Member, Owner) und setzt die nötigen Berechtigungen. /// Erstellt eine Distribution Group samt zugehöriger AD-Gruppen (Member, Owner) und setzt die nötigen Berechtigungen.
/// </summary> /// </summary>
@@ -274,17 +413,56 @@ namespace C4IT.LIAM
string displayName = null, string displayName = null,
string primarySmtpAddress = null) string primarySmtpAddress = null)
{ {
string errorCode;
string errorMessage;
var result = CreateDistributionGroupWithOwnershipGroups(
name,
alias,
displayName,
primarySmtpAddress,
out errorCode,
out errorMessage);
if (result == null)
throw new InvalidOperationException($"[{errorCode}] {errorMessage}");
return result;
}
/// <summary>
/// Erstellt eine Distribution Group samt zugehöriger AD-Gruppen (Member, Owner) und setzt die nötigen Berechtigungen.
/// Liefert bei Fehlern einen Error-Code und eine Message zurück.
/// </summary>
public Tuple<Guid, List<Tuple<string, string, string, string>>> CreateDistributionGroupWithOwnershipGroups(
string name,
string alias,
string displayName,
string primarySmtpAddress,
out string errorCode,
out string errorMessage)
{
errorCode = string.Empty;
errorMessage = string.Empty;
CreationResult result = new CreationResult(); CreationResult result = new CreationResult();
// Ensure AD groups try
string memberGroup = EnsureSecurityGroup(eLiamAccessRoles.ExchangeMLMember, name);
string ownerGroup = EnsureSecurityGroup(eLiamAccessRoles.ExchangeMLOwner, name);
SetManagedBy(memberGroup, ownerGroup);
// Create distribution group
using (Runspace rs = CreateRunspace())
{ {
LogEntry(
$"Start distribution group creation: Name='{name}', Alias='{alias}', DisplayName='{displayName}', PrimarySmtpAddress='{primarySmtpAddress}'",
LogLevels.Info);
// Ensure AD groups
string memberGroup = EnsureSecurityGroup(eLiamAccessRoles.ExchangeMLMember, name);
string ownerGroup = EnsureSecurityGroup(eLiamAccessRoles.ExchangeMLOwner, name);
SetManagedBy(memberGroup, ownerGroup);
LogEntry(
$"Distribution group permission groups prepared: Member='{memberGroup}', Owner='{ownerGroup}'",
LogLevels.Debug);
// Create distribution group and permissions
using (Runspace rs = CreateRunspace())
using (PowerShell ps = PowerShell.Create()) using (PowerShell ps = PowerShell.Create())
{ {
ps.Runspace = rs; ps.Runspace = rs;
@@ -296,13 +474,14 @@ namespace C4IT.LIAM
ps.AddParameter("DisplayName", displayName); ps.AddParameter("DisplayName", displayName);
if (!string.IsNullOrEmpty(primarySmtpAddress)) if (!string.IsNullOrEmpty(primarySmtpAddress))
ps.AddParameter("PrimarySmtpAddress", primarySmtpAddress); ps.AddParameter("PrimarySmtpAddress", primarySmtpAddress);
ps.Invoke(); InvokePowerShellWithTimeout(ps, PowerShellInvokeTimeout, $"New-DistributionGroup '{alias}'");
// b) GUID holen // GUID holen
ps.Commands.Clear(); ps.Commands.Clear();
ps.AddCommand("Get-DistributionGroup") ps.AddCommand("Get-DistributionGroup")
.AddParameter("Identity", name); .AddParameter("Identity", name);
var dg = ps.Invoke().FirstOrDefault(); var dg = InvokePowerShellWithTimeout(ps, PowerShellInvokeTimeout, $"Get-DistributionGroup '{name}'")
.FirstOrDefault();
if (dg != null && dg.Properties["Guid"] != null) if (dg != null && dg.Properties["Guid"] != null)
{ {
var guidVal = dg.Properties["Guid"].Value; var guidVal = dg.Properties["Guid"].Value;
@@ -310,71 +489,93 @@ namespace C4IT.LIAM
else if (guidVal is string s && Guid.TryParse(s, out Guid parsed)) result.ObjectGuid = parsed; else if (guidVal is string s && Guid.TryParse(s, out Guid parsed)) result.ObjectGuid = parsed;
} }
AddMemberToDistributionGroup(name, memberGroup); ps.Commands.Clear();
SetDistributionGroupManagedBy(name, ownerGroup); ps.AddCommand("Add-DistributionGroupMember")
.AddParameter("Identity", name)
.AddParameter("Member", memberGroup)
.AddParameter("ErrorAction", "Stop");
InvokePowerShellWithTimeout(ps, PowerShellInvokeTimeout, $"Add-DistributionGroupMember '{name}' -> '{memberGroup}'");
ps.Commands.Clear();
ps.AddCommand("Set-DistributionGroup")
.AddParameter("Identity", name)
.AddParameter("ManagedBy", ownerGroup)
.AddParameter("ErrorAction", "Stop");
InvokePowerShellWithTimeout(ps, PowerShellInvokeTimeout, $"Set-DistributionGroup ManagedBy '{name}' -> '{ownerGroup}'");
} }
}
// Collect group details
string[] dRoles = new string[] {
eLiamAccessRoles.ExchangeMLMember.ToString(),
eLiamAccessRoles.ExchangeMLOwner.ToString()
};
string[] dNames = new string[] {
memberGroup,
ownerGroup
};
for (int i = 0; i < dRoles.Length; i++)
// Collect group details
string[] dRoles = new string[] {
eLiamAccessRoles.ExchangeMLMember.ToString(),
eLiamAccessRoles.ExchangeMLOwner.ToString()
};
string[] dNames = new string[] {
memberGroup,
ownerGroup
};
for (int i = 0; i < dRoles.Length; i++)
{
DirectoryEntry grpEntry = FindAdObject("(&(objectCategory=group)(sAMAccountName=" + dNames[i] + "))");
if (grpEntry != null && grpEntry.Properties.Contains("objectSid") && grpEntry.Properties["objectSid"].Count > 0)
{ {
byte[] sidBytes = (byte[])grpEntry.Properties["objectSid"][0]; DirectoryEntry grpEntry = FindAdObject("(&(objectCategory=group)(sAMAccountName=" + dNames[i] + "))");
string sid = new SecurityIdentifier(sidBytes, 0).Value; if (grpEntry != null && grpEntry.Properties.Contains("objectSid") && grpEntry.Properties["objectSid"].Count > 0)
string distinguishedName = grpEntry.Properties["distinguishedName"][0].ToString(); {
result.Groups.Add(Tuple.Create(dRoles[i], sid, dNames[i], distinguishedName)); byte[] sidBytes = (byte[])grpEntry.Properties["objectSid"][0];
string sid = new SecurityIdentifier(sidBytes, 0).Value;
string distinguishedName = grpEntry.Properties["distinguishedName"][0].ToString();
result.Groups.Add(Tuple.Create(dRoles[i], sid, dNames[i], distinguishedName));
}
} }
errorCode = "OK";
LogEntry(
$"Distribution group created successfully: Name='{name}', Alias='{alias}', ObjectGuid='{result.ObjectGuid}', GroupCount='{result.Groups.Count}'",
LogLevels.Info);
return Tuple.Create(result.ObjectGuid, result.Groups);
} }
catch (Exception ex)
return Tuple.Create(result.ObjectGuid, result.Groups);
}
/// <summary>
/// Setzt das ManagedBy-Attribut einer Distribution Group.
/// </summary>
private void SetDistributionGroupManagedBy(string groupName, string managerGroup)
{
using (var runspace = CreateRunspace())
using (var ps = PowerShell.Create())
{ {
ps.Runspace = runspace; errorCode = GetDistributionGroupCreateErrorCode(ex);
ps.AddCommand("Set-DistributionGroup") errorMessage = ex.Message;
.AddParameter("Identity", groupName) LogEntry($"Distribution group creation failed [{errorCode}] {errorMessage}", LogLevels.Error);
.AddParameter("ManagedBy", managerGroup) LogException(ex);
.AddParameter("ErrorAction", "SilentlyContinue"); return null;
ps.Invoke();
} }
} }
/// <summary>
/// Hilfsmethode: SecureString in Klartext wandeln. /// <summary>
/// </summary> /// Setzt das ManagedBy-Attribut einer Distribution Group.
private static string SecureStringToString(SecureString ss) /// </summary>
{ private void SetDistributionGroupManagedBy(string groupName, string managerGroup)
if (ss == null) return string.Empty; {
IntPtr ptr = Marshal.SecureStringToBSTR(ss); using (var runspace = CreateRunspace())
try using (var ps = PowerShell.Create())
{ {
return Marshal.PtrToStringBSTR(ptr) ?? string.Empty; ps.Runspace = runspace;
} ps.AddCommand("Set-DistributionGroup")
finally .AddParameter("Identity", groupName)
{ .AddParameter("ManagedBy", managerGroup)
Marshal.ZeroFreeBSTR(ptr); .AddParameter("ErrorAction", "SilentlyContinue");
} ps.Invoke();
} }
} }
}
/// <summary>
/// Hilfsmethode: SecureString in Klartext wandeln.
/// </summary>
private static string SecureStringToString(SecureString ss)
{
if (ss == null) return string.Empty;
IntPtr ptr = Marshal.SecureStringToBSTR(ss);
try
{
return Marshal.PtrToStringBSTR(ptr) ?? string.Empty;
}
finally
{
Marshal.ZeroFreeBSTR(ptr);
}
}
}
}

View File

@@ -1,102 +1,105 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{12586A29-BB1E-49B4-B971-88E520D6A77C}</ProjectGuid> <ProjectGuid>{12586A29-BB1E-49B4-B971-88E520D6A77C}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LiamExchange</RootNamespace> <RootNamespace>LiamExchange</RootNamespace>
<AssemblyName>LiamExchange</AssemblyName> <AssemblyName>LiamExchange</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<SccProjectName>SAK</SccProjectName> <SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath> <SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath> <SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider> <SccProvider>SAK</SccProvider>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.Bcl.Cryptography, Version=9.0.0.4, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="Microsoft.Bcl.Cryptography, Version=9.0.0.4, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Cryptography.9.0.4\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath> <HintPath>..\packages\Microsoft.Bcl.Cryptography.9.0.4\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath> <HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.DirectoryServices" /> <Reference Include="System.DirectoryServices" />
<Reference Include="System.DirectoryServices.AccountManagement" /> <Reference Include="System.DirectoryServices.AccountManagement" />
<Reference Include="System.Formats.Asn1, Version=9.0.0.4, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Formats.Asn1, Version=9.0.0.4, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Formats.Asn1.9.0.4\lib\net462\System.Formats.Asn1.dll</HintPath> <HintPath>..\packages\System.Formats.Asn1.9.0.4\lib\net462\System.Formats.Asn1.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.PowerShell.5.ReferenceAssemblies.1.1.0\lib\net4\System.Management.Automation.dll</HintPath> <HintPath>..\packages\Microsoft.PowerShell.5.ReferenceAssemblies.1.1.0\lib\net4\System.Management.Automation.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath> <HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Numerics" /> <Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath> <HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath> <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll</HintPath> <HintPath>..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath> <HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="C4IT.LIAM.Exchange.cs" /> <Compile Include="..\SharedAssemblyInfo.cs">
<Compile Include="ExchangeManager.Extensions.cs" /> <Link>Properties\SharedAssemblyInfo.cs</Link>
<Compile Include="Properties\AssemblyInfo.cs" /> </Compile>
</ItemGroup> <Compile Include="C4IT.LIAM.Exchange.cs" />
<ItemGroup> <Compile Include="ExchangeManager.Extensions.cs" />
<ProjectReference Include="..\LiamBaseClasses\LiamBaseClasses.csproj"> <Compile Include="Properties\AssemblyInfo.cs" />
<Project>{3531c9e6-cf6e-458e-b604-4a5a8d1c7ab0}</Project> </ItemGroup>
<Name>LiamBaseClasses</Name> <ItemGroup>
</ProjectReference> <ProjectReference Include="..\LiamBaseClasses\LiamBaseClasses.csproj">
<ProjectReference Include="..\LiamHelper\LiamHelper.csproj"> <Project>{3531c9e6-cf6e-458e-b604-4a5a8d1c7ab0}</Project>
<Project>{6b0e73a6-f918-42d5-9525-d59d4d16283d}</Project> <Name>LiamBaseClasses</Name>
<Name>LiamHelper</Name> </ProjectReference>
</ProjectReference> <ProjectReference Include="..\LiamHelper\LiamHelper.csproj">
<ProjectReference Include="..\LiamNtfs\LiamNtfs.csproj"> <Project>{6b0e73a6-f918-42d5-9525-d59d4d16283d}</Project>
<Project>{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}</Project> <Name>LiamHelper</Name>
<Name>LiamNtfs</Name> </ProjectReference>
</ProjectReference> <ProjectReference Include="..\LiamNtfs\LiamNtfs.csproj">
</ItemGroup> <Project>{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}</Project>
<ItemGroup> <Name>LiamNtfs</Name>
<Compile Include="C4IT.LIAM.ExchangeManager.cs" /> </ProjectReference>
<None Include="app.config" /> </ItemGroup>
<None Include="packages.config" /> <ItemGroup>
</ItemGroup> <Compile Include="C4IT.LIAM.ExchangeManager.cs" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View File

@@ -1,10 +1,10 @@
"" ""
{ {
"FILE_VERSION" = "9237" "FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER" "ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = "" "PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0" "NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = "" "ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0" "NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
} }

View File

@@ -1,33 +1,19 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("LiamExchange")] [assembly: AssemblyTitle("LIAM Exchange Module")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCulture("")]
[assembly: AssemblyProduct("LiamExchange")]
[assembly: AssemblyCopyright("Copyright © 2025")] // Setting ComVisible to false makes the types in this assembly not visible
[assembly: AssemblyTrademark("")] // to COM components. If you need to access a type in this assembly from
[assembly: AssemblyCulture("")] // COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from // The following GUID is for the ID of the typelib if this project is exposed to COM
// COM, set the ComVisible attribute to true on that type. [assembly: Guid("12586a29-bb1e-49b4-b971-88e520d6a77c")]
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("12586a29-bb1e-49b4-b971-88e520d6a77c")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1,38 +1,38 @@
<?xml version="1.0" encoding="utf-8"?><doc> <?xml version="1.0" encoding="utf-8"?><doc>
<assembly> <assembly>
<name>System.Buffers</name> <name>System.Buffers</name>
</assembly> </assembly>
<members> <members>
<member name="T:System.Buffers.ArrayPool`1"> <member name="T:System.Buffers.ArrayPool`1">
<summary>Provides a resource pool that enables reusing instances of type <see cref="T[]"></see>.</summary> <summary>Provides a resource pool that enables reusing instances of type <see cref="T[]"></see>.</summary>
<typeparam name="T">The type of the objects that are in the resource pool.</typeparam> <typeparam name="T">The type of the objects that are in the resource pool.</typeparam>
</member> </member>
<member name="M:System.Buffers.ArrayPool`1.#ctor"> <member name="M:System.Buffers.ArrayPool`1.#ctor">
<summary>Initializes a new instance of the <see cref="T:System.Buffers.ArrayPool`1"></see> class.</summary> <summary>Initializes a new instance of the <see cref="T:System.Buffers.ArrayPool`1"></see> class.</summary>
</member> </member>
<member name="M:System.Buffers.ArrayPool`1.Create"> <member name="M:System.Buffers.ArrayPool`1.Create">
<summary>Creates a new instance of the <see cref="T:System.Buffers.ArrayPool`1"></see> class.</summary> <summary>Creates a new instance of the <see cref="T:System.Buffers.ArrayPool`1"></see> class.</summary>
<returns>A new instance of the <see cref="System.Buffers.ArrayPool`1"></see> class.</returns> <returns>A new instance of the <see cref="System.Buffers.ArrayPool`1"></see> class.</returns>
</member> </member>
<member name="M:System.Buffers.ArrayPool`1.Create(System.Int32,System.Int32)"> <member name="M:System.Buffers.ArrayPool`1.Create(System.Int32,System.Int32)">
<summary>Creates a new instance of the <see cref="T:System.Buffers.ArrayPool`1"></see> class using the specifed configuration.</summary> <summary>Creates a new instance of the <see cref="T:System.Buffers.ArrayPool`1"></see> class using the specifed configuration.</summary>
<param name="maxArrayLength">The maximum length of an array instance that may be stored in the pool.</param> <param name="maxArrayLength">The maximum length of an array instance that may be stored in the pool.</param>
<param name="maxArraysPerBucket">The maximum number of array instances that may be stored in each bucket in the pool. The pool groups arrays of similar lengths into buckets for faster access.</param> <param name="maxArraysPerBucket">The maximum number of array instances that may be stored in each bucket in the pool. The pool groups arrays of similar lengths into buckets for faster access.</param>
<returns>A new instance of the <see cref="System.Buffers.ArrayPool`1"></see> class with the specified configuration.</returns> <returns>A new instance of the <see cref="System.Buffers.ArrayPool`1"></see> class with the specified configuration.</returns>
</member> </member>
<member name="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"> <member name="M:System.Buffers.ArrayPool`1.Rent(System.Int32)">
<summary>Retrieves a buffer that is at least the requested length.</summary> <summary>Retrieves a buffer that is at least the requested length.</summary>
<param name="minimumLength">The minimum length of the array.</param> <param name="minimumLength">The minimum length of the array.</param>
<returns>An array of type <see cref="T[]"></see> that is at least <paramref name="minimumLength">minimumLength</paramref> in length.</returns> <returns>An array of type <see cref="T[]"></see> that is at least <paramref name="minimumLength">minimumLength</paramref> in length.</returns>
</member> </member>
<member name="M:System.Buffers.ArrayPool`1.Return(`0[],System.Boolean)"> <member name="M:System.Buffers.ArrayPool`1.Return(`0[],System.Boolean)">
<summary>Returns an array to the pool that was previously obtained using the <see cref="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"></see> method on the same <see cref="T:System.Buffers.ArrayPool`1"></see> instance.</summary> <summary>Returns an array to the pool that was previously obtained using the <see cref="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"></see> method on the same <see cref="T:System.Buffers.ArrayPool`1"></see> instance.</summary>
<param name="array">A buffer to return to the pool that was previously obtained using the <see cref="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"></see> method.</param> <param name="array">A buffer to return to the pool that was previously obtained using the <see cref="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"></see> method.</param>
<param name="clearArray">Indicates whether the contents of the buffer should be cleared before reuse. If <paramref name="clearArray">clearArray</paramref> is set to true, and if the pool will store the buffer to enable subsequent reuse, the <see cref="M:System.Buffers.ArrayPool`1.Return(`0[],System.Boolean)"></see> method will clear the <paramref name="array">array</paramref> of its contents so that a subsequent caller using the <see cref="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"></see> method will not see the content of the previous caller. If <paramref name="clearArray">clearArray</paramref> is set to false or if the pool will release the buffer, the array&amp;#39;s contents are left unchanged.</param> <param name="clearArray">Indicates whether the contents of the buffer should be cleared before reuse. If <paramref name="clearArray">clearArray</paramref> is set to true, and if the pool will store the buffer to enable subsequent reuse, the <see cref="M:System.Buffers.ArrayPool`1.Return(`0[],System.Boolean)"></see> method will clear the <paramref name="array">array</paramref> of its contents so that a subsequent caller using the <see cref="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"></see> method will not see the content of the previous caller. If <paramref name="clearArray">clearArray</paramref> is set to false or if the pool will release the buffer, the array&amp;#39;s contents are left unchanged.</param>
</member> </member>
<member name="P:System.Buffers.ArrayPool`1.Shared"> <member name="P:System.Buffers.ArrayPool`1.Shared">
<summary>Gets a shared <see cref="T:System.Buffers.ArrayPool`1"></see> instance.</summary> <summary>Gets a shared <see cref="T:System.Buffers.ArrayPool`1"></see> instance.</summary>
<returns>A shared <see cref="System.Buffers.ArrayPool`1"></see> instance.</returns> <returns>A shared <see cref="System.Buffers.ArrayPool`1"></see> instance.</returns>
</member> </member>
</members> </members>
</doc> </doc>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,355 +1,355 @@
<?xml version="1.0" encoding="utf-8"?><doc> <?xml version="1.0" encoding="utf-8"?><doc>
<assembly> <assembly>
<name>System.Memory</name> <name>System.Memory</name>
</assembly> </assembly>
<members> <members>
<member name="T:System.Span`1"> <member name="T:System.Span`1">
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
</member> </member>
<member name="M:System.Span`1.#ctor(`0[])"> <member name="M:System.Span`1.#ctor(`0[])">
<param name="array"></param> <param name="array"></param>
</member> </member>
<member name="M:System.Span`1.#ctor(System.Void*,System.Int32)"> <member name="M:System.Span`1.#ctor(System.Void*,System.Int32)">
<param name="pointer"></param> <param name="pointer"></param>
<param name="length"></param> <param name="length"></param>
</member> </member>
<member name="M:System.Span`1.#ctor(`0[],System.Int32)"> <member name="M:System.Span`1.#ctor(`0[],System.Int32)">
<param name="array"></param> <param name="array"></param>
<param name="start"></param> <param name="start"></param>
</member> </member>
<member name="M:System.Span`1.#ctor(`0[],System.Int32,System.Int32)"> <member name="M:System.Span`1.#ctor(`0[],System.Int32,System.Int32)">
<param name="array"></param> <param name="array"></param>
<param name="start"></param> <param name="start"></param>
<param name="length"></param> <param name="length"></param>
</member> </member>
<member name="M:System.Span`1.Clear"> <member name="M:System.Span`1.Clear">
</member> </member>
<member name="M:System.Span`1.CopyTo(System.Span{`0})"> <member name="M:System.Span`1.CopyTo(System.Span{`0})">
<param name="destination"></param> <param name="destination"></param>
</member> </member>
<member name="M:System.Span`1.DangerousCreate(System.Object,`0@,System.Int32)"> <member name="M:System.Span`1.DangerousCreate(System.Object,`0@,System.Int32)">
<param name="obj"></param> <param name="obj"></param>
<param name="objectData"></param> <param name="objectData"></param>
<param name="length"></param> <param name="length"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.Span`1.DangerousGetPinnableReference"> <member name="M:System.Span`1.DangerousGetPinnableReference">
<returns></returns> <returns></returns>
</member> </member>
<member name="P:System.Span`1.Empty"> <member name="P:System.Span`1.Empty">
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.Span`1.Equals(System.Object)"> <member name="M:System.Span`1.Equals(System.Object)">
<param name="obj"></param> <param name="obj"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.Span`1.Fill(`0)"> <member name="M:System.Span`1.Fill(`0)">
<param name="value"></param> <param name="value"></param>
</member> </member>
<member name="M:System.Span`1.GetHashCode"> <member name="M:System.Span`1.GetHashCode">
<returns></returns> <returns></returns>
</member> </member>
<member name="P:System.Span`1.IsEmpty"> <member name="P:System.Span`1.IsEmpty">
<returns></returns> <returns></returns>
</member> </member>
<member name="P:System.Span`1.Item(System.Int32)"> <member name="P:System.Span`1.Item(System.Int32)">
<param name="index"></param> <param name="index"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="P:System.Span`1.Length"> <member name="P:System.Span`1.Length">
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.Span`1.op_Equality(System.Span{`0},System.Span{`0})"> <member name="M:System.Span`1.op_Equality(System.Span{`0},System.Span{`0})">
<param name="left"></param> <param name="left"></param>
<param name="right"></param> <param name="right"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.Span`1.op_Implicit(System.ArraySegment{T})~System.Span{T}"> <member name="M:System.Span`1.op_Implicit(System.ArraySegment{T})~System.Span{T}">
<param name="arraySegment"></param> <param name="arraySegment"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.Span`1.op_Implicit(System.Span{T})~System.ReadOnlySpan{T}"> <member name="M:System.Span`1.op_Implicit(System.Span{T})~System.ReadOnlySpan{T}">
<param name="span"></param> <param name="span"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.Span`1.op_Implicit(T[])~System.Span{T}"> <member name="M:System.Span`1.op_Implicit(T[])~System.Span{T}">
<param name="array"></param> <param name="array"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.Span`1.op_Inequality(System.Span{`0},System.Span{`0})"> <member name="M:System.Span`1.op_Inequality(System.Span{`0},System.Span{`0})">
<param name="left"></param> <param name="left"></param>
<param name="right"></param> <param name="right"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.Span`1.Slice(System.Int32)"> <member name="M:System.Span`1.Slice(System.Int32)">
<param name="start"></param> <param name="start"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.Span`1.Slice(System.Int32,System.Int32)"> <member name="M:System.Span`1.Slice(System.Int32,System.Int32)">
<param name="start"></param> <param name="start"></param>
<param name="length"></param> <param name="length"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.Span`1.ToArray"> <member name="M:System.Span`1.ToArray">
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.Span`1.TryCopyTo(System.Span{`0})"> <member name="M:System.Span`1.TryCopyTo(System.Span{`0})">
<param name="destination"></param> <param name="destination"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="T:System.SpanExtensions"> <member name="T:System.SpanExtensions">
</member> </member>
<member name="M:System.SpanExtensions.AsBytes``1(System.ReadOnlySpan{``0})"> <member name="M:System.SpanExtensions.AsBytes``1(System.ReadOnlySpan{``0})">
<param name="source"></param> <param name="source"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.AsBytes``1(System.Span{``0})"> <member name="M:System.SpanExtensions.AsBytes``1(System.Span{``0})">
<param name="source"></param> <param name="source"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.AsSpan(System.String)"> <member name="M:System.SpanExtensions.AsSpan(System.String)">
<param name="text"></param> <param name="text"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.AsSpan``1(System.ArraySegment{``0})"> <member name="M:System.SpanExtensions.AsSpan``1(System.ArraySegment{``0})">
<param name="arraySegment"></param> <param name="arraySegment"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.AsSpan``1(``0[])"> <member name="M:System.SpanExtensions.AsSpan``1(``0[])">
<param name="array"></param> <param name="array"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.CopyTo``1(``0[],System.Span{``0})"> <member name="M:System.SpanExtensions.CopyTo``1(``0[],System.Span{``0})">
<param name="array"></param> <param name="array"></param>
<param name="destination"></param> <param name="destination"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
</member> </member>
<member name="M:System.SpanExtensions.IndexOf(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})"> <member name="M:System.SpanExtensions.IndexOf(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
<param name="span"></param> <param name="span"></param>
<param name="value"></param> <param name="value"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOf(System.Span{System.Byte},System.Byte)"> <member name="M:System.SpanExtensions.IndexOf(System.Span{System.Byte},System.Byte)">
<param name="span"></param> <param name="span"></param>
<param name="value"></param> <param name="value"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOf(System.ReadOnlySpan{System.Byte},System.Byte)"> <member name="M:System.SpanExtensions.IndexOf(System.ReadOnlySpan{System.Byte},System.Byte)">
<param name="span"></param> <param name="span"></param>
<param name="value"></param> <param name="value"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOf(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})"> <member name="M:System.SpanExtensions.IndexOf(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
<param name="span"></param> <param name="span"></param>
<param name="value"></param> <param name="value"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOf``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})"> <member name="M:System.SpanExtensions.IndexOf``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})">
<param name="span"></param> <param name="span"></param>
<param name="value"></param> <param name="value"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOf``1(System.ReadOnlySpan{``0},``0)"> <member name="M:System.SpanExtensions.IndexOf``1(System.ReadOnlySpan{``0},``0)">
<param name="span"></param> <param name="span"></param>
<param name="value"></param> <param name="value"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOf``1(System.Span{``0},System.ReadOnlySpan{``0})"> <member name="M:System.SpanExtensions.IndexOf``1(System.Span{``0},System.ReadOnlySpan{``0})">
<param name="span"></param> <param name="span"></param>
<param name="value"></param> <param name="value"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOf``1(System.Span{``0},``0)"> <member name="M:System.SpanExtensions.IndexOf``1(System.Span{``0},``0)">
<param name="span"></param> <param name="span"></param>
<param name="value"></param> <param name="value"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.Byte,System.Byte,System.Byte)"> <member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.Byte,System.Byte,System.Byte)">
<param name="span"></param> <param name="span"></param>
<param name="value0"></param> <param name="value0"></param>
<param name="value1"></param> <param name="value1"></param>
<param name="value2"></param> <param name="value2"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.Byte,System.Byte,System.Byte)"> <member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.Byte,System.Byte,System.Byte)">
<param name="span"></param> <param name="span"></param>
<param name="value0"></param> <param name="value0"></param>
<param name="value1"></param> <param name="value1"></param>
<param name="value2"></param> <param name="value2"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.Byte,System.Byte)"> <member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.Byte,System.Byte)">
<param name="span"></param> <param name="span"></param>
<param name="value0"></param> <param name="value0"></param>
<param name="value1"></param> <param name="value1"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})"> <member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
<param name="span"></param> <param name="span"></param>
<param name="values"></param> <param name="values"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})"> <member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
<param name="span"></param> <param name="span"></param>
<param name="values"></param> <param name="values"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.Byte,System.Byte)"> <member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.Byte,System.Byte)">
<param name="span"></param> <param name="span"></param>
<param name="value0"></param> <param name="value0"></param>
<param name="value1"></param> <param name="value1"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.NonPortableCast``2(System.ReadOnlySpan{``0})"> <member name="M:System.SpanExtensions.NonPortableCast``2(System.ReadOnlySpan{``0})">
<param name="source"></param> <param name="source"></param>
<typeparam name="TFrom"></typeparam> <typeparam name="TFrom"></typeparam>
<typeparam name="TTo"></typeparam> <typeparam name="TTo"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.NonPortableCast``2(System.Span{``0})"> <member name="M:System.SpanExtensions.NonPortableCast``2(System.Span{``0})">
<param name="source"></param> <param name="source"></param>
<typeparam name="TFrom"></typeparam> <typeparam name="TFrom"></typeparam>
<typeparam name="TTo"></typeparam> <typeparam name="TTo"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.SequenceEqual(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})"> <member name="M:System.SpanExtensions.SequenceEqual(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
<param name="first"></param> <param name="first"></param>
<param name="second"></param> <param name="second"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.SequenceEqual(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})"> <member name="M:System.SpanExtensions.SequenceEqual(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
<param name="first"></param> <param name="first"></param>
<param name="second"></param> <param name="second"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.SequenceEqual``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})"> <member name="M:System.SpanExtensions.SequenceEqual``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})">
<param name="first"></param> <param name="first"></param>
<param name="second"></param> <param name="second"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.SequenceEqual``1(System.Span{``0},System.ReadOnlySpan{``0})"> <member name="M:System.SpanExtensions.SequenceEqual``1(System.Span{``0},System.ReadOnlySpan{``0})">
<param name="first"></param> <param name="first"></param>
<param name="second"></param> <param name="second"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.StartsWith(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})"> <member name="M:System.SpanExtensions.StartsWith(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
<param name="span"></param> <param name="span"></param>
<param name="value"></param> <param name="value"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.StartsWith(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})"> <member name="M:System.SpanExtensions.StartsWith(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
<param name="span"></param> <param name="span"></param>
<param name="value"></param> <param name="value"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.StartsWith``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})"> <member name="M:System.SpanExtensions.StartsWith``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})">
<param name="span"></param> <param name="span"></param>
<param name="value"></param> <param name="value"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.SpanExtensions.StartsWith``1(System.Span{``0},System.ReadOnlySpan{``0})"> <member name="M:System.SpanExtensions.StartsWith``1(System.Span{``0},System.ReadOnlySpan{``0})">
<param name="span"></param> <param name="span"></param>
<param name="value"></param> <param name="value"></param>
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
<returns></returns> <returns></returns>
</member> </member>
<member name="T:System.ReadOnlySpan`1"> <member name="T:System.ReadOnlySpan`1">
<typeparam name="T"></typeparam> <typeparam name="T"></typeparam>
</member> </member>
<member name="M:System.ReadOnlySpan`1.#ctor(`0[])"> <member name="M:System.ReadOnlySpan`1.#ctor(`0[])">
<param name="array"></param> <param name="array"></param>
</member> </member>
<member name="M:System.ReadOnlySpan`1.#ctor(System.Void*,System.Int32)"> <member name="M:System.ReadOnlySpan`1.#ctor(System.Void*,System.Int32)">
<param name="pointer"></param> <param name="pointer"></param>
<param name="length"></param> <param name="length"></param>
</member> </member>
<member name="M:System.ReadOnlySpan`1.#ctor(`0[],System.Int32)"> <member name="M:System.ReadOnlySpan`1.#ctor(`0[],System.Int32)">
<param name="array"></param> <param name="array"></param>
<param name="start"></param> <param name="start"></param>
</member> </member>
<member name="M:System.ReadOnlySpan`1.#ctor(`0[],System.Int32,System.Int32)"> <member name="M:System.ReadOnlySpan`1.#ctor(`0[],System.Int32,System.Int32)">
<param name="array"></param> <param name="array"></param>
<param name="start"></param> <param name="start"></param>
<param name="length"></param> <param name="length"></param>
</member> </member>
<member name="M:System.ReadOnlySpan`1.CopyTo(System.Span{`0})"> <member name="M:System.ReadOnlySpan`1.CopyTo(System.Span{`0})">
<param name="destination"></param> <param name="destination"></param>
</member> </member>
<member name="M:System.ReadOnlySpan`1.DangerousCreate(System.Object,`0@,System.Int32)"> <member name="M:System.ReadOnlySpan`1.DangerousCreate(System.Object,`0@,System.Int32)">
<param name="obj"></param> <param name="obj"></param>
<param name="objectData"></param> <param name="objectData"></param>
<param name="length"></param> <param name="length"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.ReadOnlySpan`1.DangerousGetPinnableReference"> <member name="M:System.ReadOnlySpan`1.DangerousGetPinnableReference">
<returns></returns> <returns></returns>
</member> </member>
<member name="P:System.ReadOnlySpan`1.Empty"> <member name="P:System.ReadOnlySpan`1.Empty">
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.ReadOnlySpan`1.Equals(System.Object)"> <member name="M:System.ReadOnlySpan`1.Equals(System.Object)">
<param name="obj"></param> <param name="obj"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.ReadOnlySpan`1.GetHashCode"> <member name="M:System.ReadOnlySpan`1.GetHashCode">
<returns></returns> <returns></returns>
</member> </member>
<member name="P:System.ReadOnlySpan`1.IsEmpty"> <member name="P:System.ReadOnlySpan`1.IsEmpty">
<returns></returns> <returns></returns>
</member> </member>
<member name="P:System.ReadOnlySpan`1.Item(System.Int32)"> <member name="P:System.ReadOnlySpan`1.Item(System.Int32)">
<param name="index"></param> <param name="index"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="P:System.ReadOnlySpan`1.Length"> <member name="P:System.ReadOnlySpan`1.Length">
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.ReadOnlySpan`1.op_Equality(System.ReadOnlySpan{`0},System.ReadOnlySpan{`0})"> <member name="M:System.ReadOnlySpan`1.op_Equality(System.ReadOnlySpan{`0},System.ReadOnlySpan{`0})">
<param name="left"></param> <param name="left"></param>
<param name="right"></param> <param name="right"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.ReadOnlySpan`1.op_Implicit(System.ArraySegment{T})~System.ReadOnlySpan{T}"> <member name="M:System.ReadOnlySpan`1.op_Implicit(System.ArraySegment{T})~System.ReadOnlySpan{T}">
<param name="arraySegment"></param> <param name="arraySegment"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.ReadOnlySpan`1.op_Implicit(T[])~System.ReadOnlySpan{T}"> <member name="M:System.ReadOnlySpan`1.op_Implicit(T[])~System.ReadOnlySpan{T}">
<param name="array"></param> <param name="array"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.ReadOnlySpan`1.op_Inequality(System.ReadOnlySpan{`0},System.ReadOnlySpan{`0})"> <member name="M:System.ReadOnlySpan`1.op_Inequality(System.ReadOnlySpan{`0},System.ReadOnlySpan{`0})">
<param name="left"></param> <param name="left"></param>
<param name="right"></param> <param name="right"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.ReadOnlySpan`1.Slice(System.Int32)"> <member name="M:System.ReadOnlySpan`1.Slice(System.Int32)">
<param name="start"></param> <param name="start"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.ReadOnlySpan`1.Slice(System.Int32,System.Int32)"> <member name="M:System.ReadOnlySpan`1.Slice(System.Int32,System.Int32)">
<param name="start"></param> <param name="start"></param>
<param name="length"></param> <param name="length"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.ReadOnlySpan`1.ToArray"> <member name="M:System.ReadOnlySpan`1.ToArray">
<returns></returns> <returns></returns>
</member> </member>
<member name="M:System.ReadOnlySpan`1.TryCopyTo(System.Span{`0})"> <member name="M:System.ReadOnlySpan`1.TryCopyTo(System.Span{`0})">
<param name="destination"></param> <param name="destination"></param>
<returns></returns> <returns></returns>
</member> </member>
</members> </members>
</doc> </doc>

File diff suppressed because it is too large Load Diff

View File

@@ -1,291 +1,291 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<doc> <doc>
<assembly> <assembly>
<name>System.Runtime.CompilerServices.Unsafe</name> <name>System.Runtime.CompilerServices.Unsafe</name>
</assembly> </assembly>
<members> <members>
<member name="T:System.Runtime.CompilerServices.Unsafe"> <member name="T:System.Runtime.CompilerServices.Unsafe">
<summary>Contains generic, low-level functionality for manipulating pointers.</summary> <summary>Contains generic, low-level functionality for manipulating pointers.</summary>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.Int32)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.Int32)">
<summary>Adds an element offset to the given reference.</summary> <summary>Adds an element offset to the given reference.</summary>
<param name="source">The reference to add the offset to.</param> <param name="source">The reference to add the offset to.</param>
<param name="elementOffset">The offset to add.</param> <param name="elementOffset">The offset to add.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns>A new reference that reflects the addition of offset to pointer.</returns> <returns>A new reference that reflects the addition of offset to pointer.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.IntPtr)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.IntPtr)">
<summary>Adds an element offset to the given reference.</summary> <summary>Adds an element offset to the given reference.</summary>
<param name="source">The reference to add the offset to.</param> <param name="source">The reference to add the offset to.</param>
<param name="elementOffset">The offset to add.</param> <param name="elementOffset">The offset to add.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns>A new reference that reflects the addition of offset to pointer.</returns> <returns>A new reference that reflects the addition of offset to pointer.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.UIntPtr)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.UIntPtr)">
<summary>Adds an element offset to the given reference.</summary> <summary>Adds an element offset to the given reference.</summary>
<param name="source">The reference to add the offset to.</param> <param name="source">The reference to add the offset to.</param>
<param name="elementOffset">The offset to add.</param> <param name="elementOffset">The offset to add.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns>A new reference that reflects the addition of offset to pointer.</returns> <returns>A new reference that reflects the addition of offset to pointer.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(System.Void*,System.Int32)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(System.Void*,System.Int32)">
<summary>Adds an element offset to the given void pointer.</summary> <summary>Adds an element offset to the given void pointer.</summary>
<param name="source">The void pointer to add the offset to.</param> <param name="source">The void pointer to add the offset to.</param>
<param name="elementOffset">The offset to add.</param> <param name="elementOffset">The offset to add.</param>
<typeparam name="T">The type of void pointer.</typeparam> <typeparam name="T">The type of void pointer.</typeparam>
<returns>A new void pointer that reflects the addition of offset to the specified pointer.</returns> <returns>A new void pointer that reflects the addition of offset to the specified pointer.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.AddByteOffset``1(``0@,System.IntPtr)"> <member name="M:System.Runtime.CompilerServices.Unsafe.AddByteOffset``1(``0@,System.IntPtr)">
<summary>Adds a byte offset to the given reference.</summary> <summary>Adds a byte offset to the given reference.</summary>
<param name="source">The reference to add the offset to.</param> <param name="source">The reference to add the offset to.</param>
<param name="byteOffset">The offset to add.</param> <param name="byteOffset">The offset to add.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns>A new reference that reflects the addition of byte offset to pointer.</returns> <returns>A new reference that reflects the addition of byte offset to pointer.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.AddByteOffset``1(``0@,System.UIntPtr)"> <member name="M:System.Runtime.CompilerServices.Unsafe.AddByteOffset``1(``0@,System.UIntPtr)">
<summary>Adds a byte offset to the given reference.</summary> <summary>Adds a byte offset to the given reference.</summary>
<param name="source">The reference to add the offset to.</param> <param name="source">The reference to add the offset to.</param>
<param name="byteOffset">The offset to add.</param> <param name="byteOffset">The offset to add.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns>A new reference that reflects the addition of byte offset to pointer.</returns> <returns>A new reference that reflects the addition of byte offset to pointer.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.AreSame``1(``0@,``0@)"> <member name="M:System.Runtime.CompilerServices.Unsafe.AreSame``1(``0@,``0@)">
<summary>Determines whether the specified references point to the same location.</summary> <summary>Determines whether the specified references point to the same location.</summary>
<param name="left">The first reference to compare.</param> <param name="left">The first reference to compare.</param>
<param name="right">The second reference to compare.</param> <param name="right">The second reference to compare.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns> <returns>
<see langword="true" /> if <paramref name="left" /> and <paramref name="right" /> point to the same location; otherwise, <see langword="false" />.</returns> <see langword="true" /> if <paramref name="left" /> and <paramref name="right" /> point to the same location; otherwise, <see langword="false" />.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.As``1(System.Object)"> <member name="M:System.Runtime.CompilerServices.Unsafe.As``1(System.Object)">
<summary>Casts the given object to the specified type.</summary> <summary>Casts the given object to the specified type.</summary>
<param name="o">The object to cast.</param> <param name="o">The object to cast.</param>
<typeparam name="T">The type which the object will be cast to.</typeparam> <typeparam name="T">The type which the object will be cast to.</typeparam>
<returns>The original object, casted to the given type.</returns> <returns>The original object, casted to the given type.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.As``2(``0@)"> <member name="M:System.Runtime.CompilerServices.Unsafe.As``2(``0@)">
<summary>Reinterprets the given reference as a reference to a value of type <typeparamref name="TTo" />.</summary> <summary>Reinterprets the given reference as a reference to a value of type <typeparamref name="TTo" />.</summary>
<param name="source">The reference to reinterpret.</param> <param name="source">The reference to reinterpret.</param>
<typeparam name="TFrom">The type of reference to reinterpret.</typeparam> <typeparam name="TFrom">The type of reference to reinterpret.</typeparam>
<typeparam name="TTo">The desired type of the reference.</typeparam> <typeparam name="TTo">The desired type of the reference.</typeparam>
<returns>A reference to a value of type <typeparamref name="TTo" />.</returns> <returns>A reference to a value of type <typeparamref name="TTo" />.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.AsPointer``1(``0@)"> <member name="M:System.Runtime.CompilerServices.Unsafe.AsPointer``1(``0@)">
<summary>Returns a pointer to the given by-ref parameter.</summary> <summary>Returns a pointer to the given by-ref parameter.</summary>
<param name="value">The object whose pointer is obtained.</param> <param name="value">The object whose pointer is obtained.</param>
<typeparam name="T">The type of object.</typeparam> <typeparam name="T">The type of object.</typeparam>
<returns>A pointer to the given value.</returns> <returns>A pointer to the given value.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.AsRef``1(``0@)"> <member name="M:System.Runtime.CompilerServices.Unsafe.AsRef``1(``0@)">
<summary>Reinterprets the given read-only reference as a reference.</summary> <summary>Reinterprets the given read-only reference as a reference.</summary>
<param name="source">The read-only reference to reinterpret.</param> <param name="source">The read-only reference to reinterpret.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns>A reference to a value of type <typeparamref name="T" />.</returns> <returns>A reference to a value of type <typeparamref name="T" />.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.AsRef``1(System.Void*)"> <member name="M:System.Runtime.CompilerServices.Unsafe.AsRef``1(System.Void*)">
<summary>Reinterprets the given location as a reference to a value of type <typeparamref name="T" />.</summary> <summary>Reinterprets the given location as a reference to a value of type <typeparamref name="T" />.</summary>
<param name="source">The location of the value to reference.</param> <param name="source">The location of the value to reference.</param>
<typeparam name="T">The type of the interpreted location.</typeparam> <typeparam name="T">The type of the interpreted location.</typeparam>
<returns>A reference to a value of type <typeparamref name="T" />.</returns> <returns>A reference to a value of type <typeparamref name="T" />.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.ByteOffset``1(``0@,``0@)"> <member name="M:System.Runtime.CompilerServices.Unsafe.ByteOffset``1(``0@,``0@)">
<summary>Determines the byte offset from origin to target from the given references.</summary> <summary>Determines the byte offset from origin to target from the given references.</summary>
<param name="origin">The reference to origin.</param> <param name="origin">The reference to origin.</param>
<param name="target">The reference to target.</param> <param name="target">The reference to target.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns>Byte offset from origin to target i.e. <paramref name="target" /> - <paramref name="origin" />.</returns> <returns>Byte offset from origin to target i.e. <paramref name="target" /> - <paramref name="origin" />.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Copy``1(``0@,System.Void*)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Copy``1(``0@,System.Void*)">
<summary>Copies a value of type <typeparamref name="T" /> to the given location.</summary> <summary>Copies a value of type <typeparamref name="T" /> to the given location.</summary>
<param name="destination">The location to copy to.</param> <param name="destination">The location to copy to.</param>
<param name="source">A pointer to the value to copy.</param> <param name="source">A pointer to the value to copy.</param>
<typeparam name="T">The type of value to copy.</typeparam> <typeparam name="T">The type of value to copy.</typeparam>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Copy``1(System.Void*,``0@)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Copy``1(System.Void*,``0@)">
<summary>Copies a value of type <typeparamref name="T" /> to the given location.</summary> <summary>Copies a value of type <typeparamref name="T" /> to the given location.</summary>
<param name="destination">The location to copy to.</param> <param name="destination">The location to copy to.</param>
<param name="source">A reference to the value to copy.</param> <param name="source">A reference to the value to copy.</param>
<typeparam name="T">The type of value to copy.</typeparam> <typeparam name="T">The type of value to copy.</typeparam>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlock(System.Byte@,System.Byte@,System.UInt32)"> <member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlock(System.Byte@,System.Byte@,System.UInt32)">
<summary>Copies bytes from the source address to the destination address.</summary> <summary>Copies bytes from the source address to the destination address.</summary>
<param name="destination">The destination address to copy to.</param> <param name="destination">The destination address to copy to.</param>
<param name="source">The source address to copy from.</param> <param name="source">The source address to copy from.</param>
<param name="byteCount">The number of bytes to copy.</param> <param name="byteCount">The number of bytes to copy.</param>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlock(System.Void*,System.Void*,System.UInt32)"> <member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlock(System.Void*,System.Void*,System.UInt32)">
<summary>Copies bytes from the source address to the destination address.</summary> <summary>Copies bytes from the source address to the destination address.</summary>
<param name="destination">The destination address to copy to.</param> <param name="destination">The destination address to copy to.</param>
<param name="source">The source address to copy from.</param> <param name="source">The source address to copy from.</param>
<param name="byteCount">The number of bytes to copy.</param> <param name="byteCount">The number of bytes to copy.</param>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlockUnaligned(System.Byte@,System.Byte@,System.UInt32)"> <member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlockUnaligned(System.Byte@,System.Byte@,System.UInt32)">
<summary>Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.</summary> <summary>Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.</summary>
<param name="destination">The destination address to copy to.</param> <param name="destination">The destination address to copy to.</param>
<param name="source">The source address to copy from.</param> <param name="source">The source address to copy from.</param>
<param name="byteCount">The number of bytes to copy.</param> <param name="byteCount">The number of bytes to copy.</param>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlockUnaligned(System.Void*,System.Void*,System.UInt32)"> <member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlockUnaligned(System.Void*,System.Void*,System.UInt32)">
<summary>Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.</summary> <summary>Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.</summary>
<param name="destination">The destination address to copy to.</param> <param name="destination">The destination address to copy to.</param>
<param name="source">The source address to copy from.</param> <param name="source">The source address to copy from.</param>
<param name="byteCount">The number of bytes to copy.</param> <param name="byteCount">The number of bytes to copy.</param>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.InitBlock(System.Byte@,System.Byte,System.UInt32)"> <member name="M:System.Runtime.CompilerServices.Unsafe.InitBlock(System.Byte@,System.Byte,System.UInt32)">
<summary>Initializes a block of memory at the given location with a given initial value.</summary> <summary>Initializes a block of memory at the given location with a given initial value.</summary>
<param name="startAddress">The address of the start of the memory block to initialize.</param> <param name="startAddress">The address of the start of the memory block to initialize.</param>
<param name="value">The value to initialize the block to.</param> <param name="value">The value to initialize the block to.</param>
<param name="byteCount">The number of bytes to initialize.</param> <param name="byteCount">The number of bytes to initialize.</param>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.InitBlock(System.Void*,System.Byte,System.UInt32)"> <member name="M:System.Runtime.CompilerServices.Unsafe.InitBlock(System.Void*,System.Byte,System.UInt32)">
<summary>Initializes a block of memory at the given location with a given initial value.</summary> <summary>Initializes a block of memory at the given location with a given initial value.</summary>
<param name="startAddress">The address of the start of the memory block to initialize.</param> <param name="startAddress">The address of the start of the memory block to initialize.</param>
<param name="value">The value to initialize the block to.</param> <param name="value">The value to initialize the block to.</param>
<param name="byteCount">The number of bytes to initialize.</param> <param name="byteCount">The number of bytes to initialize.</param>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(System.Byte@,System.Byte,System.UInt32)"> <member name="M:System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(System.Byte@,System.Byte,System.UInt32)">
<summary>Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address.</summary> <summary>Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address.</summary>
<param name="startAddress">The address of the start of the memory block to initialize.</param> <param name="startAddress">The address of the start of the memory block to initialize.</param>
<param name="value">The value to initialize the block to.</param> <param name="value">The value to initialize the block to.</param>
<param name="byteCount">The number of bytes to initialize.</param> <param name="byteCount">The number of bytes to initialize.</param>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(System.Void*,System.Byte,System.UInt32)"> <member name="M:System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(System.Void*,System.Byte,System.UInt32)">
<summary>Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address.</summary> <summary>Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address.</summary>
<param name="startAddress">The address of the start of the memory block to initialize.</param> <param name="startAddress">The address of the start of the memory block to initialize.</param>
<param name="value">The value to initialize the block to.</param> <param name="value">The value to initialize the block to.</param>
<param name="byteCount">The number of bytes to initialize.</param> <param name="byteCount">The number of bytes to initialize.</param>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.IsAddressGreaterThan``1(``0@,``0@)"> <member name="M:System.Runtime.CompilerServices.Unsafe.IsAddressGreaterThan``1(``0@,``0@)">
<summary>Returns a value that indicates whether a specified reference is greater than another specified reference.</summary> <summary>Returns a value that indicates whether a specified reference is greater than another specified reference.</summary>
<param name="left">The first value to compare.</param> <param name="left">The first value to compare.</param>
<param name="right">The second value to compare.</param> <param name="right">The second value to compare.</param>
<typeparam name="T">The type of the reference.</typeparam> <typeparam name="T">The type of the reference.</typeparam>
<returns> <returns>
<see langword="true" /> if <paramref name="left" /> is greater than <paramref name="right" />; otherwise, <see langword="false" />.</returns> <see langword="true" /> if <paramref name="left" /> is greater than <paramref name="right" />; otherwise, <see langword="false" />.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.IsAddressLessThan``1(``0@,``0@)"> <member name="M:System.Runtime.CompilerServices.Unsafe.IsAddressLessThan``1(``0@,``0@)">
<summary>Returns a value that indicates whether a specified reference is less than another specified reference.</summary> <summary>Returns a value that indicates whether a specified reference is less than another specified reference.</summary>
<param name="left">The first value to compare.</param> <param name="left">The first value to compare.</param>
<param name="right">The second value to compare.</param> <param name="right">The second value to compare.</param>
<typeparam name="T">The type of the reference.</typeparam> <typeparam name="T">The type of the reference.</typeparam>
<returns> <returns>
<see langword="true" /> if <paramref name="left" /> is less than <paramref name="right" />; otherwise, <see langword="false" />.</returns> <see langword="true" /> if <paramref name="left" /> is less than <paramref name="right" />; otherwise, <see langword="false" />.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.IsNullRef``1(``0@)"> <member name="M:System.Runtime.CompilerServices.Unsafe.IsNullRef``1(``0@)">
<summary>Determines if a given reference to a value of type <typeparamref name="T" /> is a null reference.</summary> <summary>Determines if a given reference to a value of type <typeparamref name="T" /> is a null reference.</summary>
<param name="source">The reference to check.</param> <param name="source">The reference to check.</param>
<typeparam name="T">The type of the reference.</typeparam> <typeparam name="T">The type of the reference.</typeparam>
<returns> <returns>
<see langword="true" /> if <paramref name="source" /> is a null reference; otherwise, <see langword="false" />.</returns> <see langword="true" /> if <paramref name="source" /> is a null reference; otherwise, <see langword="false" />.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.NullRef``1"> <member name="M:System.Runtime.CompilerServices.Unsafe.NullRef``1">
<summary>Returns a reference to a value of type <typeparamref name="T" /> that is a null reference.</summary> <summary>Returns a reference to a value of type <typeparamref name="T" /> that is a null reference.</summary>
<typeparam name="T">The type of the reference.</typeparam> <typeparam name="T">The type of the reference.</typeparam>
<returns>A reference to a value of type <typeparamref name="T" /> that is a null reference.</returns> <returns>A reference to a value of type <typeparamref name="T" /> that is a null reference.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Read``1(System.Void*)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Read``1(System.Void*)">
<summary>Reads a value of type <typeparamref name="T" /> from the given location.</summary> <summary>Reads a value of type <typeparamref name="T" /> from the given location.</summary>
<param name="source">The location to read from.</param> <param name="source">The location to read from.</param>
<typeparam name="T">The type to read.</typeparam> <typeparam name="T">The type to read.</typeparam>
<returns>An object of type <typeparamref name="T" /> read from the given location.</returns> <returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.ReadUnaligned``1(System.Byte@)"> <member name="M:System.Runtime.CompilerServices.Unsafe.ReadUnaligned``1(System.Byte@)">
<summary>Reads a value of type <typeparamref name="T" /> from the given location without assuming architecture dependent alignment of the addresses.</summary> <summary>Reads a value of type <typeparamref name="T" /> from the given location without assuming architecture dependent alignment of the addresses.</summary>
<param name="source">The location to read from.</param> <param name="source">The location to read from.</param>
<typeparam name="T">The type to read.</typeparam> <typeparam name="T">The type to read.</typeparam>
<returns>An object of type <typeparamref name="T" /> read from the given location.</returns> <returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.ReadUnaligned``1(System.Void*)"> <member name="M:System.Runtime.CompilerServices.Unsafe.ReadUnaligned``1(System.Void*)">
<summary>Reads a value of type <typeparamref name="T" /> from the given location without assuming architecture dependent alignment of the addresses.</summary> <summary>Reads a value of type <typeparamref name="T" /> from the given location without assuming architecture dependent alignment of the addresses.</summary>
<param name="source">The location to read from.</param> <param name="source">The location to read from.</param>
<typeparam name="T">The type to read.</typeparam> <typeparam name="T">The type to read.</typeparam>
<returns>An object of type <typeparamref name="T" /> read from the given location.</returns> <returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.SizeOf``1"> <member name="M:System.Runtime.CompilerServices.Unsafe.SizeOf``1">
<summary>Returns the size of an object of the given type parameter.</summary> <summary>Returns the size of an object of the given type parameter.</summary>
<typeparam name="T">The type of object whose size is retrieved.</typeparam> <typeparam name="T">The type of object whose size is retrieved.</typeparam>
<returns>The size of an object of type <typeparamref name="T" />.</returns> <returns>The size of an object of type <typeparamref name="T" />.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.SkipInit``1(``0@)"> <member name="M:System.Runtime.CompilerServices.Unsafe.SkipInit``1(``0@)">
<summary>Bypasses definite assignment rules for a given value.</summary> <summary>Bypasses definite assignment rules for a given value.</summary>
<param name="value">The uninitialized object.</param> <param name="value">The uninitialized object.</param>
<typeparam name="T">The type of the uninitialized object.</typeparam> <typeparam name="T">The type of the uninitialized object.</typeparam>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.Int32)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.Int32)">
<summary>Subtracts an element offset from the given reference.</summary> <summary>Subtracts an element offset from the given reference.</summary>
<param name="source">The reference to subtract the offset from.</param> <param name="source">The reference to subtract the offset from.</param>
<param name="elementOffset">The offset to subtract.</param> <param name="elementOffset">The offset to subtract.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns>A new reference that reflects the subtraction of offset from pointer.</returns> <returns>A new reference that reflects the subtraction of offset from pointer.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.IntPtr)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.IntPtr)">
<summary>Subtracts an element offset from the given reference.</summary> <summary>Subtracts an element offset from the given reference.</summary>
<param name="source">The reference to subtract the offset from.</param> <param name="source">The reference to subtract the offset from.</param>
<param name="elementOffset">The offset to subtract.</param> <param name="elementOffset">The offset to subtract.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns>A new reference that reflects the subtraction of offset from pointer.</returns> <returns>A new reference that reflects the subtraction of offset from pointer.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.UIntPtr)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.UIntPtr)">
<summary>Subtracts an element offset from the given reference.</summary> <summary>Subtracts an element offset from the given reference.</summary>
<param name="source">The reference to subtract the offset from.</param> <param name="source">The reference to subtract the offset from.</param>
<param name="elementOffset">The offset to subtract.</param> <param name="elementOffset">The offset to subtract.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns>A new reference that reflects the subraction of offset from pointer.</returns> <returns>A new reference that reflects the subraction of offset from pointer.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(System.Void*,System.Int32)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(System.Void*,System.Int32)">
<summary>Subtracts an element offset from the given void pointer.</summary> <summary>Subtracts an element offset from the given void pointer.</summary>
<param name="source">The void pointer to subtract the offset from.</param> <param name="source">The void pointer to subtract the offset from.</param>
<param name="elementOffset">The offset to subtract.</param> <param name="elementOffset">The offset to subtract.</param>
<typeparam name="T">The type of the void pointer.</typeparam> <typeparam name="T">The type of the void pointer.</typeparam>
<returns>A new void pointer that reflects the subtraction of offset from the specified pointer.</returns> <returns>A new void pointer that reflects the subtraction of offset from the specified pointer.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.SubtractByteOffset``1(``0@,System.IntPtr)"> <member name="M:System.Runtime.CompilerServices.Unsafe.SubtractByteOffset``1(``0@,System.IntPtr)">
<summary>Subtracts a byte offset from the given reference.</summary> <summary>Subtracts a byte offset from the given reference.</summary>
<param name="source">The reference to subtract the offset from.</param> <param name="source">The reference to subtract the offset from.</param>
<param name="byteOffset">The offset to subtract.</param> <param name="byteOffset">The offset to subtract.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns>A new reference that reflects the subtraction of byte offset from pointer.</returns> <returns>A new reference that reflects the subtraction of byte offset from pointer.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.SubtractByteOffset``1(``0@,System.UIntPtr)"> <member name="M:System.Runtime.CompilerServices.Unsafe.SubtractByteOffset``1(``0@,System.UIntPtr)">
<summary>Subtracts a byte offset from the given reference.</summary> <summary>Subtracts a byte offset from the given reference.</summary>
<param name="source">The reference to subtract the offset from.</param> <param name="source">The reference to subtract the offset from.</param>
<param name="byteOffset">The offset to subtract.</param> <param name="byteOffset">The offset to subtract.</param>
<typeparam name="T">The type of reference.</typeparam> <typeparam name="T">The type of reference.</typeparam>
<returns>A new reference that reflects the subraction of byte offset from pointer.</returns> <returns>A new reference that reflects the subraction of byte offset from pointer.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Unbox``1(System.Object)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Unbox``1(System.Object)">
<summary>Returns a <see langword="mutable ref" /> to a boxed value.</summary> <summary>Returns a <see langword="mutable ref" /> to a boxed value.</summary>
<param name="box">The value to unbox.</param> <param name="box">The value to unbox.</param>
<typeparam name="T">The type to be unboxed.</typeparam> <typeparam name="T">The type to be unboxed.</typeparam>
<exception cref="T:System.NullReferenceException"> <exception cref="T:System.NullReferenceException">
<paramref name="box" /> is <see langword="null" />, and <typeparamref name="T" /> is a non-nullable value type.</exception> <paramref name="box" /> is <see langword="null" />, and <typeparamref name="T" /> is a non-nullable value type.</exception>
<exception cref="T:System.InvalidCastException"> <exception cref="T:System.InvalidCastException">
<paramref name="box" /> is not a boxed value type. <paramref name="box" /> is not a boxed value type.
-or- -or-
<paramref name="box" /> is not a boxed <typeparamref name="T" />.</exception> <paramref name="box" /> is not a boxed <typeparamref name="T" />.</exception>
<exception cref="T:System.TypeLoadException"> <exception cref="T:System.TypeLoadException">
<typeparamref name="T" /> cannot be found.</exception> <typeparamref name="T" /> cannot be found.</exception>
<returns>A <see langword="mutable ref" /> to the boxed value <paramref name="box" />.</returns> <returns>A <see langword="mutable ref" /> to the boxed value <paramref name="box" />.</returns>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.Write``1(System.Void*,``0)"> <member name="M:System.Runtime.CompilerServices.Unsafe.Write``1(System.Void*,``0)">
<summary>Writes a value of type <typeparamref name="T" /> to the given location.</summary> <summary>Writes a value of type <typeparamref name="T" /> to the given location.</summary>
<param name="destination">The location to write to.</param> <param name="destination">The location to write to.</param>
<param name="value">The value to write.</param> <param name="value">The value to write.</param>
<typeparam name="T">The type of value to write.</typeparam> <typeparam name="T">The type of value to write.</typeparam>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.WriteUnaligned``1(System.Byte@,``0)"> <member name="M:System.Runtime.CompilerServices.Unsafe.WriteUnaligned``1(System.Byte@,``0)">
<summary>Writes a value of type <typeparamref name="T" /> to the given location without assuming architecture dependent alignment of the addresses.</summary> <summary>Writes a value of type <typeparamref name="T" /> to the given location without assuming architecture dependent alignment of the addresses.</summary>
<param name="destination">The location to write to.</param> <param name="destination">The location to write to.</param>
<param name="value">The value to write.</param> <param name="value">The value to write.</param>
<typeparam name="T">The type of value to write.</typeparam> <typeparam name="T">The type of value to write.</typeparam>
</member> </member>
<member name="M:System.Runtime.CompilerServices.Unsafe.WriteUnaligned``1(System.Void*,``0)"> <member name="M:System.Runtime.CompilerServices.Unsafe.WriteUnaligned``1(System.Void*,``0)">
<summary>Writes a value of type <typeparamref name="T" /> to the given location without assuming architecture dependent alignment of the addresses.</summary> <summary>Writes a value of type <typeparamref name="T" /> to the given location without assuming architecture dependent alignment of the addresses.</summary>
<param name="destination">The location to write to.</param> <param name="destination">The location to write to.</param>
<param name="value">The value to write.</param> <param name="value">The value to write.</param>
<typeparam name="T">The type of value to write.</typeparam> <typeparam name="T">The type of value to write.</typeparam>
</member> </member>
</members> </members>
</doc> </doc>

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<doc> <doc>
<assembly> <assembly>
<name>System.ValueTuple</name> <name>System.ValueTuple</name>
</assembly> </assembly>
<members> <members>
</members> </members>
</doc> </doc>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>

Some files were not shown because too many files have changed in this diff Show More