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:
31
AGENTS.md
Normal file
31
AGENTS.md
Normal 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
298
LIAM.sln
@@ -1,161 +1,169 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.6.33723.286
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamTestTeams", "LiamTestTeams\LiamTestTeams.csproj", "{6197C490-07C6-4313-8E0F-AADC27776473}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{451CEE78-7CF7-4691-AAB6-4D636BF22E04}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
_shared\Matrix42.Common.dll = _shared\Matrix42.Common.dll
|
||||
SharedAssemblyInfo.cs = SharedAssemblyInfo.cs
|
||||
_shared\System.Web.Http.dll = _shared\System.Web.Http.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.Security.dll = _shared\update4u.SPS.Security.dll
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamBaseClasses", "LiamBaseClasses\LiamBaseClasses.csproj", "{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamMsTeams", "LiamMsTeams\LiamMsTeams.csproj", "{DACBD3DC-1866-4B39-964A-D2A8DEA2774C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamHelper", "LiamHelper\LiamHelper.csproj", "{6B0E73A6-F918-42D5-9525-D59D4D16283D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamMsGraph", "LiamMsGraph\LiamMsGraph.csproj", "{452827DB-14FF-469E-AF41-1A24E1875BDA}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamM42WebApi", "LiamM42WebApi\LiamM42WebApi.csproj", "{007A69B8-3BEA-44F3-BD61-C5354C707F3A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{452827DB-14FF-469E-AF41-1A24E1875BDA} = {452827DB-14FF-469E-AF41-1A24E1875BDA}
|
||||
{DACBD3DC-1866-4B39-964A-D2A8DEA2774C} = {DACBD3DC-1866-4B39-964A-D2A8DEA2774C}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamNtfs", "LiamNtfs\LiamNtfs.csproj", "{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamWorkflowActivities", "LiamWorkflowActivities\LiamWorkflowActivities.csproj", "{5840BB2D-88BF-4E1C-8FF6-510305894B42}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamWorkflowActivitiesDesign", "LiamWorkflowActivitiesDesign\LiamWorkflowActivitiesDesign.csproj", "{03D5EBBD-3147-4B30-AE90-6D5C57335E0A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamActiveDirectory", "LIAMActiveDirectory\LiamActiveDirectory.csproj", "{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}"
|
||||
EndProject
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.6.33723.286
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamTestTeams", "LiamTestTeams\LiamTestTeams.csproj", "{6197C490-07C6-4313-8E0F-AADC27776473}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{451CEE78-7CF7-4691-AAB6-4D636BF22E04}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
_shared\Matrix42.Common.dll = _shared\Matrix42.Common.dll
|
||||
SharedAssemblyInfo.cs = SharedAssemblyInfo.cs
|
||||
_shared\System.Web.Http.dll = _shared\System.Web.Http.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.Security.dll = _shared\update4u.SPS.Security.dll
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamBaseClasses", "LiamBaseClasses\LiamBaseClasses.csproj", "{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamMsTeams", "LiamMsTeams\LiamMsTeams.csproj", "{DACBD3DC-1866-4B39-964A-D2A8DEA2774C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamHelper", "LiamHelper\LiamHelper.csproj", "{6B0E73A6-F918-42D5-9525-D59D4D16283D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamMsGraph", "LiamMsGraph\LiamMsGraph.csproj", "{452827DB-14FF-469E-AF41-1A24E1875BDA}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamM42WebApi", "LiamM42WebApi\LiamM42WebApi.csproj", "{007A69B8-3BEA-44F3-BD61-C5354C707F3A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{452827DB-14FF-469E-AF41-1A24E1875BDA} = {452827DB-14FF-469E-AF41-1A24E1875BDA}
|
||||
{DACBD3DC-1866-4B39-964A-D2A8DEA2774C} = {DACBD3DC-1866-4B39-964A-D2A8DEA2774C}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamNtfs", "LiamNtfs\LiamNtfs.csproj", "{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamWorkflowActivities", "LiamWorkflowActivities\LiamWorkflowActivities.csproj", "{5840BB2D-88BF-4E1C-8FF6-510305894B42}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamWorkflowActivitiesDesign", "LiamWorkflowActivitiesDesign\LiamWorkflowActivitiesDesign.csproj", "{03D5EBBD-3147-4B30-AE90-6D5C57335E0A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamActiveDirectory", "LIAMActiveDirectory\LiamActiveDirectory.csproj", "{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamExchange", "LiamExchange\LiamExchange.csproj", "{12586A29-BB1E-49B4-B971-88E520D6A77C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiamWorkflowDiagnostics", "LiamWorkflowDiagnostics\LiamWorkflowDiagnostics.csproj", "{2D7FADB7-3F21-4D4F-9A60-639746F1B1B1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_and_copy|Any CPU = Debug_and_copy|Any CPU
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.Build.0 = Release|Any CPU
|
||||
{12586A29-BB1E-49B4-B971-88E520D6A77C}.Debug_and_copy|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {0EC9AD55-4DBA-49C3-BEEF-5EC07E361909}
|
||||
EndGlobalSection
|
||||
GlobalSection(TeamFoundationVersionControl) = preSolution
|
||||
SccNumberOfProjects = 12
|
||||
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
|
||||
SccTeamFoundationServer = https://consulting4it.visualstudio.com/
|
||||
SccLocalPath0 = .
|
||||
SccProjectUniqueName1 = LiamBaseClasses\\LiamBaseClasses.csproj
|
||||
SccProjectName1 = LiamBaseClasses
|
||||
SccLocalPath1 = LiamBaseClasses
|
||||
SccProjectUniqueName2 = LiamHelper\\LiamHelper.csproj
|
||||
SccProjectName2 = LiamHelper
|
||||
SccLocalPath2 = LiamHelper
|
||||
SccProjectUniqueName3 = LiamM42WebApi\\LiamM42WebApi.csproj
|
||||
SccProjectName3 = LiamM42WebApi
|
||||
SccLocalPath3 = LiamM42WebApi
|
||||
SccProjectUniqueName4 = LiamMsGraph\\LiamMsGraph.csproj
|
||||
SccProjectName4 = LiamMsGraph
|
||||
SccLocalPath4 = LiamMsGraph
|
||||
SccProjectUniqueName5 = LiamMsTeams\\LiamMsTeams.csproj
|
||||
SccProjectName5 = LiamMsTeams
|
||||
SccLocalPath5 = LiamMsTeams
|
||||
SccProjectUniqueName6 = LiamTestTeams\\LiamTestTeams.csproj
|
||||
SccProjectName6 = LiamTestTeams
|
||||
SccLocalPath6 = LiamTestTeams
|
||||
SccProjectUniqueName7 = LiamNtfs\\LiamNtfs.csproj
|
||||
SccProjectName7 = LiamNtfs
|
||||
SccLocalPath7 = LiamNtfs
|
||||
SccProjectUniqueName8 = LiamWorkflowActivities\\LiamWorkflowActivities.csproj
|
||||
SccProjectName8 = LiamWorkflowActivities
|
||||
SccLocalPath8 = LiamWorkflowActivities
|
||||
SccProjectUniqueName9 = LiamWorkflowActivitiesDesign\\LiamWorkflowActivitiesDesign.csproj
|
||||
SccProjectName9 = LiamWorkflowActivitiesDesign
|
||||
SccLocalPath9 = LiamWorkflowActivitiesDesign
|
||||
SccProjectUniqueName10 = LIAMActiveDirectory\\LiamActiveDirectory.csproj
|
||||
SccProjectName10 = LIAMActiveDirectory
|
||||
SccLocalPath10 = LIAMActiveDirectory
|
||||
SccProjectUniqueName11 = LiamExchange\\LiamExchange.csproj
|
||||
SccProjectName11 = LiamExchange
|
||||
SccLocalPath11 = LiamExchange
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
SolutionGuid = {0EC9AD55-4DBA-49C3-BEEF-5EC07E361909}
|
||||
EndGlobalSection
|
||||
GlobalSection(TeamFoundationVersionControl) = preSolution
|
||||
SccNumberOfProjects = 12
|
||||
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
|
||||
SccTeamFoundationServer = https://consulting4it.visualstudio.com/
|
||||
SccLocalPath0 = .
|
||||
SccProjectUniqueName1 = LiamBaseClasses\\LiamBaseClasses.csproj
|
||||
SccProjectName1 = LiamBaseClasses
|
||||
SccLocalPath1 = LiamBaseClasses
|
||||
SccProjectUniqueName2 = LiamHelper\\LiamHelper.csproj
|
||||
SccProjectName2 = LiamHelper
|
||||
SccLocalPath2 = LiamHelper
|
||||
SccProjectUniqueName3 = LiamM42WebApi\\LiamM42WebApi.csproj
|
||||
SccProjectName3 = LiamM42WebApi
|
||||
SccLocalPath3 = LiamM42WebApi
|
||||
SccProjectUniqueName4 = LiamMsGraph\\LiamMsGraph.csproj
|
||||
SccProjectName4 = LiamMsGraph
|
||||
SccLocalPath4 = LiamMsGraph
|
||||
SccProjectUniqueName5 = LiamMsTeams\\LiamMsTeams.csproj
|
||||
SccProjectName5 = LiamMsTeams
|
||||
SccLocalPath5 = LiamMsTeams
|
||||
SccProjectUniqueName6 = LiamTestTeams\\LiamTestTeams.csproj
|
||||
SccProjectName6 = LiamTestTeams
|
||||
SccLocalPath6 = LiamTestTeams
|
||||
SccProjectUniqueName7 = LiamNtfs\\LiamNtfs.csproj
|
||||
SccProjectName7 = LiamNtfs
|
||||
SccLocalPath7 = LiamNtfs
|
||||
SccProjectUniqueName8 = LiamWorkflowActivities\\LiamWorkflowActivities.csproj
|
||||
SccProjectName8 = LiamWorkflowActivities
|
||||
SccLocalPath8 = LiamWorkflowActivities
|
||||
SccProjectUniqueName9 = LiamWorkflowActivitiesDesign\\LiamWorkflowActivitiesDesign.csproj
|
||||
SccProjectName9 = LiamWorkflowActivitiesDesign
|
||||
SccLocalPath9 = LiamWorkflowActivitiesDesign
|
||||
SccProjectUniqueName10 = LIAMActiveDirectory\\LiamActiveDirectory.csproj
|
||||
SccProjectName10 = LIAMActiveDirectory
|
||||
SccLocalPath10 = LIAMActiveDirectory
|
||||
SccProjectUniqueName11 = LiamExchange\\LiamExchange.csproj
|
||||
SccProjectName11 = LiamExchange
|
||||
SccLocalPath11 = LiamExchange
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -1,371 +1,371 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.DirectoryServices.AccountManagement;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Security.AccessControl;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using C4IT.Logging;
|
||||
using C4IT.Matrix42.ServerInfo;
|
||||
using LiamAD;
|
||||
using static C4IT.Logging.cLogManager;
|
||||
using static LiamAD.ADServiceGroupCreator;
|
||||
using static LiamAD.cActiveDirectoryBase;
|
||||
|
||||
namespace C4IT.LIAM
|
||||
{
|
||||
public static class LiamInitializer
|
||||
{
|
||||
static public cLiamProviderBase CreateInstance(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData)
|
||||
{
|
||||
return new cLiamProviderAD(LiamConfiguration, ProviderData);
|
||||
}
|
||||
}
|
||||
|
||||
public class cLiamProviderAD : cLiamProviderBase
|
||||
{
|
||||
public static Guid adModuleId = new Guid("e820a625-0653-ee11-b886-00155d300101");
|
||||
public readonly cActiveDirectoryBase activeDirectoryBase = new cActiveDirectoryBase();
|
||||
private readonly ADServiceGroupCreator _serviceGroupCreator;
|
||||
|
||||
|
||||
public cLiamProviderAD(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData) :
|
||||
base(LiamConfiguration, ProviderData)
|
||||
{
|
||||
_serviceGroupCreator = new ADServiceGroupCreator(this);
|
||||
}
|
||||
|
||||
public List<Tuple<string, string, string, string>> CreateServiceGroups(
|
||||
string serviceName,
|
||||
string description = null,
|
||||
eLiamAccessRoleScopes gruppenbereich = eLiamAccessRoleScopes.Universal,
|
||||
ADGroupType gruppentyp = ADGroupType.Distribution,
|
||||
IEnumerable<string> ownerSidList = null,
|
||||
IEnumerable<string> memberSidList = null)
|
||||
{
|
||||
return _serviceGroupCreator.EnsureServiceGroups(
|
||||
serviceName,
|
||||
description,
|
||||
gruppenbereich,
|
||||
gruppentyp,
|
||||
ownerSidList,
|
||||
memberSidList);
|
||||
}
|
||||
|
||||
public override async Task<bool> LogonAsync()
|
||||
{
|
||||
if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId))
|
||||
{
|
||||
LogEntry($"Error: License not valid", LogLevels.Error);
|
||||
return false;
|
||||
}
|
||||
return await LogonAsync(true);
|
||||
}
|
||||
|
||||
public async Task<bool> LogonAsync(bool force = false)
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
var LI = new cADLogonInfo()
|
||||
{
|
||||
Domain = Domain,
|
||||
User = Credential?.Identification,
|
||||
UserSecret = Credential?.Secret,
|
||||
TargetGroupPath = this.GroupPath
|
||||
};
|
||||
var RetVal = await activeDirectoryBase.LogonAsync(LI);
|
||||
return RetVal;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override async Task<List<cLiamDataAreaBase>> getDataAreasAsync(int Depth = -1)
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId))
|
||||
{
|
||||
LogEntry($"Error: License not valid", LogLevels.Error);
|
||||
return new List<cLiamDataAreaBase>();
|
||||
}
|
||||
if (!await LogonAsync())
|
||||
return null;
|
||||
if (string.IsNullOrEmpty(this.GroupPath))
|
||||
return null;
|
||||
|
||||
// 1. Alle Roh-Resultate einlesen
|
||||
var rawList = await activeDirectoryBase.RequestSecurityGroupsListAsync(this.GroupFilter);
|
||||
if (rawList == null)
|
||||
return null;
|
||||
|
||||
// 2. Nur die, die dem RegEx entsprechen und deren Wert extrahieren
|
||||
var allResults = rawList
|
||||
.Where(entry =>
|
||||
string.IsNullOrEmpty(this.GroupRegEx)
|
||||
|| Regex.Match(entry.Value.DisplayName, this.GroupRegEx).Success)
|
||||
.Select(entry => (cSecurityGroupResult)entry.Value)
|
||||
.ToList();
|
||||
|
||||
// 3. ManagedBySID-Werte sammeln (ohne Null-/Leereinträge)
|
||||
var managedBySids = new HashSet<string>(
|
||||
allResults
|
||||
.Select(r => r.ManagedBySID)
|
||||
.Where(m => !string.IsNullOrEmpty(m))
|
||||
);
|
||||
|
||||
// 4. Nur die Gruppen, deren ID nicht in managedBySids enthalten ist
|
||||
var filteredResults = allResults
|
||||
.Where(r => !managedBySids.Contains(r.ID))
|
||||
.ToList();
|
||||
|
||||
// 5. In DataArea-Objekte umwandeln
|
||||
var SecurityGroups = new List<cLiamDataAreaBase>();
|
||||
foreach (var secGroup in filteredResults)
|
||||
{
|
||||
SecurityGroups.Add(new cLiamAdGroupAsDataArea(this, secGroup));
|
||||
}
|
||||
|
||||
return SecurityGroups;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override async Task<List<cLiamDataAreaBase>> getSecurityGroupsAsync(string groupFilter)
|
||||
{
|
||||
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId))
|
||||
{
|
||||
LogEntry($"Error: License not valid", LogLevels.Error);
|
||||
return new List<cLiamDataAreaBase>();
|
||||
}
|
||||
if (!await LogonAsync())
|
||||
return null;
|
||||
if (string.IsNullOrEmpty(this.GroupPath))
|
||||
return null;
|
||||
|
||||
var SecurityGroups = new List<cLiamDataAreaBase>();
|
||||
|
||||
var SGL = await activeDirectoryBase.RequestSecurityGroupsListAsync(groupFilter);
|
||||
if (SGL == null)
|
||||
return null;
|
||||
|
||||
foreach (var Entry in SGL)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.GroupRegEx) && !Regex.Match(Entry.Value.DisplayName, this.GroupRegEx).Success)
|
||||
continue;
|
||||
|
||||
|
||||
var SecurityGroup = new cLiamAdGroup2(this, (cSecurityGroupResult)Entry.Value);
|
||||
SecurityGroups.Add(SecurityGroup);
|
||||
}
|
||||
return SecurityGroups;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public int getDepth(string path)
|
||||
{
|
||||
return getDepth(this.RootPath, path);
|
||||
}
|
||||
public static int getDepth(DirectoryInfo root, DirectoryInfo folder)
|
||||
{
|
||||
var rootDepth = root.FullName.TrimEnd(Path.DirectorySeparatorChar).Split(Path.DirectorySeparatorChar).Length;
|
||||
var folderDepth = folder.FullName.TrimEnd(Path.DirectorySeparatorChar).Split(Path.DirectorySeparatorChar).Length;
|
||||
return folderDepth - rootDepth;
|
||||
|
||||
}
|
||||
public static int getDepth(string root, string folder)
|
||||
{
|
||||
return getDepth(new DirectoryInfo(root), new DirectoryInfo(folder));
|
||||
|
||||
}
|
||||
|
||||
public override string GetLastErrorMessage()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override async Task<cLiamDataAreaBase> LoadDataArea(string UID)
|
||||
{
|
||||
//TODO implement LoadDataArea
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
await Task.Delay(0);
|
||||
if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId))
|
||||
{
|
||||
LogEntry($"Error: License not valid", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
var res = new cLiamAdGroupAsDataArea(this, new cSecurityGroupResult()
|
||||
{
|
||||
Path = UID
|
||||
});
|
||||
return res;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class cLiamAdGroupAsDataArea : cLiamDataAreaBase
|
||||
{
|
||||
public new readonly cLiamProviderAD Provider = null;
|
||||
public readonly string dn = null;
|
||||
public readonly string scope = null;
|
||||
public readonly string ManagedBySID;
|
||||
|
||||
public override Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public cLiamAdGroupAsDataArea(cLiamProviderAD Provider, cSecurityGroupResult secGroup) : base(Provider)
|
||||
{
|
||||
this.UID = secGroup.ID;
|
||||
this.TechnicalName = secGroup.Path;
|
||||
this.DisplayName = secGroup.DisplayName;
|
||||
this.Description = secGroup.Description;
|
||||
this.Provider = Provider;
|
||||
this.dn = secGroup.Path;
|
||||
this.scope = secGroup.Scope.ToString();
|
||||
this.ManagedBySID = secGroup.ManagedBySID;
|
||||
}
|
||||
|
||||
public override async Task<List<cLiamUserInfo>> GetOwnersAsync()
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
return await GetMembersAsync(true);
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
}
|
||||
private async Task<List<cLiamUserInfo>> GetMembersAsync(bool owners)
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
var AD = this.Provider?.activeDirectoryBase;
|
||||
if (AD == null)
|
||||
{
|
||||
LogEntry($"Could not get ad class from Provider for folder '{this.TechnicalName}'", LogLevels.Warning);
|
||||
return null;
|
||||
}
|
||||
cADCollectionBase lstMembers;
|
||||
if (owners && !string.IsNullOrEmpty(OwnerRef))
|
||||
lstMembers = await AD.GetMembersAsync(OwnerRef);
|
||||
else if (owners && !string.IsNullOrEmpty(dn))
|
||||
lstMembers = await AD.GetManagedByMembersAsync(this.dn);
|
||||
else
|
||||
lstMembers = null;
|
||||
if (lstMembers == null)
|
||||
{
|
||||
LogEntry($"Could not get owner list for folder '{this.TechnicalName}'", LogLevels.Warning);
|
||||
return null;
|
||||
}
|
||||
|
||||
var RetVal = new List<cLiamUserInfo>(lstMembers.Count);
|
||||
LogEntry($"Owners for folder found: {lstMembers.Count}", LogLevels.Debug);
|
||||
foreach (var MemberEntry in lstMembers.Values)
|
||||
{
|
||||
var User = new cLiamUserInfo()
|
||||
{
|
||||
DisplayName = MemberEntry.DisplayName,
|
||||
UserPrincipalName = (MemberEntry as cADUserResult).UserPrincipalName,
|
||||
SID = MemberEntry.ID
|
||||
};
|
||||
RetVal.Add(User);
|
||||
}
|
||||
|
||||
return RetVal;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
}
|
||||
}
|
||||
public class cLiamAdGroup2 : cLiamDataAreaBase
|
||||
{
|
||||
public new readonly cLiamProviderAD Provider = null;
|
||||
public readonly string dn = null;
|
||||
public readonly string scope = null;
|
||||
public override Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public cLiamAdGroup2(cLiamProviderAD Provider, cSecurityGroupResult secGroup) : base(Provider)
|
||||
{
|
||||
this.DisplayName = secGroup.DisplayName;
|
||||
this.UID = secGroup.ID;
|
||||
this.TechnicalName = secGroup.DisplayName;
|
||||
this.Provider = Provider;
|
||||
this.dn = secGroup.Path;
|
||||
this.scope = secGroup.Scope.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.DirectoryServices.AccountManagement;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Security.AccessControl;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using C4IT.Logging;
|
||||
using C4IT.Matrix42.ServerInfo;
|
||||
using LiamAD;
|
||||
using static C4IT.Logging.cLogManager;
|
||||
using static LiamAD.ADServiceGroupCreator;
|
||||
using static LiamAD.cActiveDirectoryBase;
|
||||
|
||||
namespace C4IT.LIAM
|
||||
{
|
||||
public static class LiamInitializer
|
||||
{
|
||||
static public cLiamProviderBase CreateInstance(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData)
|
||||
{
|
||||
return new cLiamProviderAD(LiamConfiguration, ProviderData);
|
||||
}
|
||||
}
|
||||
|
||||
public class cLiamProviderAD : cLiamProviderBase
|
||||
{
|
||||
public static Guid adModuleId = new Guid("e820a625-0653-ee11-b886-00155d300101");
|
||||
public readonly cActiveDirectoryBase activeDirectoryBase = new cActiveDirectoryBase();
|
||||
private readonly ADServiceGroupCreator _serviceGroupCreator;
|
||||
|
||||
|
||||
public cLiamProviderAD(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData) :
|
||||
base(LiamConfiguration, ProviderData)
|
||||
{
|
||||
_serviceGroupCreator = new ADServiceGroupCreator(this);
|
||||
}
|
||||
|
||||
public List<Tuple<string, string, string, string>> CreateServiceGroups(
|
||||
string serviceName,
|
||||
string description = null,
|
||||
eLiamAccessRoleScopes gruppenbereich = eLiamAccessRoleScopes.Universal,
|
||||
ADGroupType gruppentyp = ADGroupType.Distribution,
|
||||
IEnumerable<string> ownerSidList = null,
|
||||
IEnumerable<string> memberSidList = null)
|
||||
{
|
||||
return _serviceGroupCreator.EnsureServiceGroups(
|
||||
serviceName,
|
||||
description,
|
||||
gruppenbereich,
|
||||
gruppentyp,
|
||||
ownerSidList,
|
||||
memberSidList);
|
||||
}
|
||||
|
||||
public override async Task<bool> LogonAsync()
|
||||
{
|
||||
if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId))
|
||||
{
|
||||
LogEntry($"Error: License not valid", LogLevels.Error);
|
||||
return false;
|
||||
}
|
||||
return await LogonAsync(true);
|
||||
}
|
||||
|
||||
public async Task<bool> LogonAsync(bool force = false)
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
var LI = new cADLogonInfo()
|
||||
{
|
||||
Domain = Domain,
|
||||
User = Credential?.Identification,
|
||||
UserSecret = Credential?.Secret,
|
||||
TargetGroupPath = this.GroupPath
|
||||
};
|
||||
var RetVal = await activeDirectoryBase.LogonAsync(LI);
|
||||
return RetVal;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override async Task<List<cLiamDataAreaBase>> getDataAreasAsync(int Depth = -1)
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId))
|
||||
{
|
||||
LogEntry($"Error: License not valid", LogLevels.Error);
|
||||
return new List<cLiamDataAreaBase>();
|
||||
}
|
||||
if (!await LogonAsync())
|
||||
return null;
|
||||
if (string.IsNullOrEmpty(this.GroupPath))
|
||||
return null;
|
||||
|
||||
// 1. Alle Roh-Resultate einlesen
|
||||
var rawList = await activeDirectoryBase.RequestSecurityGroupsListAsync(this.GroupFilter);
|
||||
if (rawList == null)
|
||||
return null;
|
||||
|
||||
// 2. Nur die, die dem RegEx entsprechen und deren Wert extrahieren
|
||||
var allResults = rawList
|
||||
.Where(entry =>
|
||||
string.IsNullOrEmpty(this.GroupRegEx)
|
||||
|| Regex.Match(entry.Value.DisplayName, this.GroupRegEx).Success)
|
||||
.Select(entry => (cSecurityGroupResult)entry.Value)
|
||||
.ToList();
|
||||
|
||||
// 3. ManagedBySID-Werte sammeln (ohne Null-/Leereinträge)
|
||||
var managedBySids = new HashSet<string>(
|
||||
allResults
|
||||
.Select(r => r.ManagedBySID)
|
||||
.Where(m => !string.IsNullOrEmpty(m))
|
||||
);
|
||||
|
||||
// 4. Nur die Gruppen, deren ID nicht in managedBySids enthalten ist
|
||||
var filteredResults = allResults
|
||||
.Where(r => !managedBySids.Contains(r.ID))
|
||||
.ToList();
|
||||
|
||||
// 5. In DataArea-Objekte umwandeln
|
||||
var SecurityGroups = new List<cLiamDataAreaBase>();
|
||||
foreach (var secGroup in filteredResults)
|
||||
{
|
||||
SecurityGroups.Add(new cLiamAdGroupAsDataArea(this, secGroup));
|
||||
}
|
||||
|
||||
return SecurityGroups;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override async Task<List<cLiamDataAreaBase>> getSecurityGroupsAsync(string groupFilter)
|
||||
{
|
||||
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId))
|
||||
{
|
||||
LogEntry($"Error: License not valid", LogLevels.Error);
|
||||
return new List<cLiamDataAreaBase>();
|
||||
}
|
||||
if (!await LogonAsync())
|
||||
return null;
|
||||
if (string.IsNullOrEmpty(this.GroupPath))
|
||||
return null;
|
||||
|
||||
var SecurityGroups = new List<cLiamDataAreaBase>();
|
||||
|
||||
var SGL = await activeDirectoryBase.RequestSecurityGroupsListAsync(groupFilter);
|
||||
if (SGL == null)
|
||||
return null;
|
||||
|
||||
foreach (var Entry in SGL)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.GroupRegEx) && !Regex.Match(Entry.Value.DisplayName, this.GroupRegEx).Success)
|
||||
continue;
|
||||
|
||||
|
||||
var SecurityGroup = new cLiamAdGroup2(this, (cSecurityGroupResult)Entry.Value);
|
||||
SecurityGroups.Add(SecurityGroup);
|
||||
}
|
||||
return SecurityGroups;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public int getDepth(string path)
|
||||
{
|
||||
return getDepth(this.RootPath, path);
|
||||
}
|
||||
public static int getDepth(DirectoryInfo root, DirectoryInfo folder)
|
||||
{
|
||||
var rootDepth = root.FullName.TrimEnd(Path.DirectorySeparatorChar).Split(Path.DirectorySeparatorChar).Length;
|
||||
var folderDepth = folder.FullName.TrimEnd(Path.DirectorySeparatorChar).Split(Path.DirectorySeparatorChar).Length;
|
||||
return folderDepth - rootDepth;
|
||||
|
||||
}
|
||||
public static int getDepth(string root, string folder)
|
||||
{
|
||||
return getDepth(new DirectoryInfo(root), new DirectoryInfo(folder));
|
||||
|
||||
}
|
||||
|
||||
public override string GetLastErrorMessage()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override async Task<cLiamDataAreaBase> LoadDataArea(string UID)
|
||||
{
|
||||
//TODO implement LoadDataArea
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
await Task.Delay(0);
|
||||
if (!cC4ITLicenseM42ESM.Instance.IsValid || !cC4ITLicenseM42ESM.Instance.Modules.ContainsKey(adModuleId))
|
||||
{
|
||||
LogEntry($"Error: License not valid", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
var res = new cLiamAdGroupAsDataArea(this, new cSecurityGroupResult()
|
||||
{
|
||||
Path = UID
|
||||
});
|
||||
return res;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class cLiamAdGroupAsDataArea : cLiamDataAreaBase
|
||||
{
|
||||
public new readonly cLiamProviderAD Provider = null;
|
||||
public readonly string dn = null;
|
||||
public readonly string scope = null;
|
||||
public readonly string ManagedBySID;
|
||||
|
||||
public override Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public cLiamAdGroupAsDataArea(cLiamProviderAD Provider, cSecurityGroupResult secGroup) : base(Provider)
|
||||
{
|
||||
this.UID = secGroup.ID;
|
||||
this.TechnicalName = secGroup.Path;
|
||||
this.DisplayName = secGroup.DisplayName;
|
||||
this.Description = secGroup.Description;
|
||||
this.Provider = Provider;
|
||||
this.dn = secGroup.Path;
|
||||
this.scope = secGroup.Scope.ToString();
|
||||
this.ManagedBySID = secGroup.ManagedBySID;
|
||||
}
|
||||
|
||||
public override async Task<List<cLiamUserInfo>> GetOwnersAsync()
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
return await GetMembersAsync(true);
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
}
|
||||
private async Task<List<cLiamUserInfo>> GetMembersAsync(bool owners)
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
var AD = this.Provider?.activeDirectoryBase;
|
||||
if (AD == null)
|
||||
{
|
||||
LogEntry($"Could not get ad class from Provider for folder '{this.TechnicalName}'", LogLevels.Warning);
|
||||
return null;
|
||||
}
|
||||
cADCollectionBase lstMembers;
|
||||
if (owners && !string.IsNullOrEmpty(OwnerRef))
|
||||
lstMembers = await AD.GetMembersAsync(OwnerRef);
|
||||
else if (owners && !string.IsNullOrEmpty(dn))
|
||||
lstMembers = await AD.GetManagedByMembersAsync(this.dn);
|
||||
else
|
||||
lstMembers = null;
|
||||
if (lstMembers == null)
|
||||
{
|
||||
LogEntry($"Could not get owner list for folder '{this.TechnicalName}'", LogLevels.Warning);
|
||||
return null;
|
||||
}
|
||||
|
||||
var RetVal = new List<cLiamUserInfo>(lstMembers.Count);
|
||||
LogEntry($"Owners for folder found: {lstMembers.Count}", LogLevels.Debug);
|
||||
foreach (var MemberEntry in lstMembers.Values)
|
||||
{
|
||||
var User = new cLiamUserInfo()
|
||||
{
|
||||
DisplayName = MemberEntry.DisplayName,
|
||||
UserPrincipalName = (MemberEntry as cADUserResult).UserPrincipalName,
|
||||
SID = MemberEntry.ID
|
||||
};
|
||||
RetVal.Add(User);
|
||||
}
|
||||
|
||||
return RetVal;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
}
|
||||
}
|
||||
public class cLiamAdGroup2 : cLiamDataAreaBase
|
||||
{
|
||||
public new readonly cLiamProviderAD Provider = null;
|
||||
public readonly string dn = null;
|
||||
public readonly string scope = null;
|
||||
public override Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public cLiamAdGroup2(cLiamProviderAD Provider, cSecurityGroupResult secGroup) : base(Provider)
|
||||
{
|
||||
this.DisplayName = secGroup.DisplayName;
|
||||
this.UID = secGroup.ID;
|
||||
this.TechnicalName = secGroup.DisplayName;
|
||||
this.Provider = Provider;
|
||||
this.dn = secGroup.Path;
|
||||
this.scope = secGroup.Scope.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
|
||||
@@ -1,74 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LIAMActiveDirectory</RootNamespace>
|
||||
<AssemblyName>LiamActiveDirectory</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.DirectoryServices.AccountManagement" />
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="cActiveDirectoryBase.cs" />
|
||||
<Compile Include="C4IT.LIAM.AD.cs" />
|
||||
<Compile Include="cADBase.cs" />
|
||||
<Compile Include="cADServiceGroupCreator.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LiamBaseClasses\LiamBaseClasses.csproj">
|
||||
<Project>{3531c9e6-cf6e-458e-b604-4a5a8d1c7ab0}</Project>
|
||||
<Name>LiamBaseClasses</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LiamHelper\LiamHelper.csproj">
|
||||
<Project>{6b0e73a6-f918-42d5-9525-d59d4d16283d}</Project>
|
||||
<Name>LiamHelper</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{AECA0AD2-8B91-4767-9AFA-E160F6662DBE}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LIAMActiveDirectory</RootNamespace>
|
||||
<AssemblyName>LiamActiveDirectory</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.DirectoryServices.AccountManagement" />
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="cActiveDirectoryBase.cs" />
|
||||
<Compile Include="C4IT.LIAM.AD.cs" />
|
||||
<Compile Include="cADBase.cs" />
|
||||
<Compile Include="cADServiceGroupCreator.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LiamBaseClasses\LiamBaseClasses.csproj">
|
||||
<Project>{3531c9e6-cf6e-458e-b604-4a5a8d1c7ab0}</Project>
|
||||
<Name>LiamBaseClasses</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LiamHelper\LiamHelper.csproj">
|
||||
<Project>{6b0e73a6-f918-42d5-9525-d59d4d16283d}</Project>
|
||||
<Name>LiamHelper</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -1,36 +1,19 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("LIAMActiveDirectory")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("LIAMActiveDirectory")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 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
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[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")]
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("LIAM AD Module")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 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
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[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")]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1,142 +1,142 @@
|
||||
using C4IT.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.DirectoryServices.AccountManagement;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.AccessControl;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiamAD
|
||||
{
|
||||
public class cADBase
|
||||
{
|
||||
private cADLogonInfo privLogonInfo = null;
|
||||
private int scanningDepth;
|
||||
public PrincipalContext adContext = null;
|
||||
public Exception LastException { get; private set; } = null;
|
||||
public string LastErrorMessage { get; private set; } = null;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ResetError()
|
||||
{
|
||||
LastException = null;
|
||||
LastErrorMessage = null;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetErrorException(string Action, Exception E, LogLevels lev = LogLevels.Error)
|
||||
{
|
||||
LastException = E;
|
||||
LastErrorMessage = Action + ": " + E.Message;
|
||||
cLogManager.LogEntry(Action, lev);
|
||||
}
|
||||
|
||||
|
||||
[DllImport("mpr.dll")]
|
||||
private static extern int WNetAddConnection2(NetResource netResource, string password, string username, int flags);
|
||||
|
||||
[DllImport("mpr.dll")]
|
||||
private static extern int WNetCancelConnection2(string name, int flags,
|
||||
bool force);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class cADLogonInfo
|
||||
{
|
||||
public string Domain;
|
||||
public string User;
|
||||
public string UserSecret;
|
||||
public string TargetGroupPath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class NetResource
|
||||
{
|
||||
public ResourceScope Scope;
|
||||
public ResourceType ResourceType;
|
||||
public ResourceDisplaytype DisplayType;
|
||||
public int Usage;
|
||||
public string LocalName;
|
||||
public string RemoteName;
|
||||
public string Comment;
|
||||
public string Provider;
|
||||
}
|
||||
|
||||
public enum ResourceScope : int
|
||||
{
|
||||
Connected = 1,
|
||||
GlobalNetwork,
|
||||
Remembered,
|
||||
Recent,
|
||||
Context
|
||||
};
|
||||
|
||||
public enum ResourceType : int
|
||||
{
|
||||
Any = 0,
|
||||
Disk = 1,
|
||||
Print = 2,
|
||||
Reserved = 8,
|
||||
}
|
||||
|
||||
public enum ResourceDisplaytype : int
|
||||
{
|
||||
Generic = 0x0,
|
||||
Domain = 0x01,
|
||||
Server = 0x02,
|
||||
Share = 0x03,
|
||||
File = 0x04,
|
||||
Group = 0x05,
|
||||
Network = 0x06,
|
||||
Root = 0x07,
|
||||
Shareadmin = 0x08,
|
||||
Directory = 0x09,
|
||||
Tree = 0x0a,
|
||||
Ndscontainer = 0x0b
|
||||
}
|
||||
|
||||
public enum NetError : uint
|
||||
{
|
||||
NERR_Success = 0,
|
||||
NERR_BASE = 2100,
|
||||
NERR_UnknownDevDir = (NERR_BASE + 16),
|
||||
NERR_DuplicateShare = (NERR_BASE + 18),
|
||||
NERR_BufTooSmall = (NERR_BASE + 23),
|
||||
}
|
||||
public enum SHARE_TYPE : uint
|
||||
{
|
||||
STYPE_DISKTREE = 0,
|
||||
STYPE_PRINTQ = 1,
|
||||
STYPE_DEVICE = 2,
|
||||
STYPE_IPC = 3,
|
||||
STYPE_SPECIAL = 0x80000000,
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
public struct SHARE_INFO_1
|
||||
{
|
||||
public string shi1_netname;
|
||||
public uint shi1_type;
|
||||
public string shi1_remark;
|
||||
public SHARE_INFO_1(string sharename, uint sharetype, string remark)
|
||||
{
|
||||
this.shi1_netname = sharename;
|
||||
this.shi1_type = sharetype;
|
||||
this.shi1_remark = remark;
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return shi1_netname;
|
||||
}
|
||||
}
|
||||
}
|
||||
using C4IT.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.DirectoryServices.AccountManagement;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.AccessControl;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiamAD
|
||||
{
|
||||
public class cADBase
|
||||
{
|
||||
private cADLogonInfo privLogonInfo = null;
|
||||
private int scanningDepth;
|
||||
public PrincipalContext adContext = null;
|
||||
public Exception LastException { get; private set; } = null;
|
||||
public string LastErrorMessage { get; private set; } = null;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ResetError()
|
||||
{
|
||||
LastException = null;
|
||||
LastErrorMessage = null;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetErrorException(string Action, Exception E, LogLevels lev = LogLevels.Error)
|
||||
{
|
||||
LastException = E;
|
||||
LastErrorMessage = Action + ": " + E.Message;
|
||||
cLogManager.LogEntry(Action, lev);
|
||||
}
|
||||
|
||||
|
||||
[DllImport("mpr.dll")]
|
||||
private static extern int WNetAddConnection2(NetResource netResource, string password, string username, int flags);
|
||||
|
||||
[DllImport("mpr.dll")]
|
||||
private static extern int WNetCancelConnection2(string name, int flags,
|
||||
bool force);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class cADLogonInfo
|
||||
{
|
||||
public string Domain;
|
||||
public string User;
|
||||
public string UserSecret;
|
||||
public string TargetGroupPath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class NetResource
|
||||
{
|
||||
public ResourceScope Scope;
|
||||
public ResourceType ResourceType;
|
||||
public ResourceDisplaytype DisplayType;
|
||||
public int Usage;
|
||||
public string LocalName;
|
||||
public string RemoteName;
|
||||
public string Comment;
|
||||
public string Provider;
|
||||
}
|
||||
|
||||
public enum ResourceScope : int
|
||||
{
|
||||
Connected = 1,
|
||||
GlobalNetwork,
|
||||
Remembered,
|
||||
Recent,
|
||||
Context
|
||||
};
|
||||
|
||||
public enum ResourceType : int
|
||||
{
|
||||
Any = 0,
|
||||
Disk = 1,
|
||||
Print = 2,
|
||||
Reserved = 8,
|
||||
}
|
||||
|
||||
public enum ResourceDisplaytype : int
|
||||
{
|
||||
Generic = 0x0,
|
||||
Domain = 0x01,
|
||||
Server = 0x02,
|
||||
Share = 0x03,
|
||||
File = 0x04,
|
||||
Group = 0x05,
|
||||
Network = 0x06,
|
||||
Root = 0x07,
|
||||
Shareadmin = 0x08,
|
||||
Directory = 0x09,
|
||||
Tree = 0x0a,
|
||||
Ndscontainer = 0x0b
|
||||
}
|
||||
|
||||
public enum NetError : uint
|
||||
{
|
||||
NERR_Success = 0,
|
||||
NERR_BASE = 2100,
|
||||
NERR_UnknownDevDir = (NERR_BASE + 16),
|
||||
NERR_DuplicateShare = (NERR_BASE + 18),
|
||||
NERR_BufTooSmall = (NERR_BASE + 23),
|
||||
}
|
||||
public enum SHARE_TYPE : uint
|
||||
{
|
||||
STYPE_DISKTREE = 0,
|
||||
STYPE_PRINTQ = 1,
|
||||
STYPE_DEVICE = 2,
|
||||
STYPE_IPC = 3,
|
||||
STYPE_SPECIAL = 0x80000000,
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
public struct SHARE_INFO_1
|
||||
{
|
||||
public string shi1_netname;
|
||||
public uint shi1_type;
|
||||
public string shi1_remark;
|
||||
public SHARE_INFO_1(string sharename, uint sharetype, string remark)
|
||||
{
|
||||
this.shi1_netname = sharename;
|
||||
this.shi1_type = sharetype;
|
||||
this.shi1_remark = remark;
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return shi1_netname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,288 +1,288 @@
|
||||
using System;
|
||||
using System.DirectoryServices;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using C4IT.Logging;
|
||||
using C4IT.LIAM;
|
||||
using LiamAD;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
|
||||
namespace LiamAD
|
||||
{
|
||||
/// <summary>
|
||||
/// Helfer für cLiamProviderAD: Erstellt AD Member- und Owner-Gruppen für Services
|
||||
/// nach konfigurierter Namenskonvention und setzt ManagedBy.
|
||||
/// </summary>
|
||||
public class ADServiceGroupCreator
|
||||
{
|
||||
private readonly cLiamProviderAD _provider;
|
||||
private readonly cActiveDirectoryBase _adBase;
|
||||
private readonly string _ldapRoot;
|
||||
private readonly string _user;
|
||||
private readonly string _password;
|
||||
public enum ADGroupType
|
||||
{
|
||||
Security, // Sicherheit
|
||||
Distribution // Verteiler
|
||||
}
|
||||
public ADServiceGroupCreator(cLiamProviderAD provider)
|
||||
{
|
||||
_provider = provider ?? throw new ArgumentNullException(nameof(provider));
|
||||
_adBase = provider.activeDirectoryBase;
|
||||
_ldapRoot = $"LDAP://{provider.Domain}/{provider.GroupPath}";
|
||||
_user = provider.Credential.Identification;
|
||||
_password = new System.Net.NetworkCredential(_user, provider.Credential.Secret).Password;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Erstellt oder findet beide AD-Gruppen (Member & Owner) für einen Service.
|
||||
/// Neu mit: gruppenbereich (Scope) und gruppentyp (für Member-Gruppe).
|
||||
/// Owner-Gruppe ist immer Security.
|
||||
/// </summary>
|
||||
public List<Tuple<string, string, string, string>> EnsureServiceGroups(
|
||||
string serviceName,
|
||||
string description = null,
|
||||
eLiamAccessRoleScopes gruppenbereich = eLiamAccessRoleScopes.Universal,
|
||||
ADGroupType gruppentyp = ADGroupType.Distribution,
|
||||
IEnumerable<string> ownerSidList = null,
|
||||
IEnumerable<string> memberSidList = null)
|
||||
{
|
||||
const int MaxLoop = 50;
|
||||
var result = new List<Tuple<string, string, string, string>>();
|
||||
|
||||
// Konventionen für Member und Owner
|
||||
var ownerConv = _provider.NamingConventions
|
||||
.FirstOrDefault(nc => nc.AccessRole == eLiamAccessRoles.ADOwner);
|
||||
var memberConv = _provider.NamingConventions
|
||||
.FirstOrDefault(nc => nc.AccessRole == eLiamAccessRoles.ADMember);
|
||||
if (ownerConv == null || memberConv == null)
|
||||
throw new InvalidOperationException("Namenskonvention für ADMember oder ADOwner fehlt.");
|
||||
|
||||
// Tags
|
||||
_provider.CustomTags.TryGetValue("ADGroupPrefix", out var prefix);
|
||||
_provider.CustomTags.TryGetValue("ADOwner", out var ownerPostfix);
|
||||
_provider.CustomTags.TryGetValue("ADMember", out var memberPostfix);
|
||||
|
||||
// 1) Owner-Gruppe (immer Security)
|
||||
string ownerName = null;
|
||||
for (int loop = 0; loop <= MaxLoop; loop++)
|
||||
{
|
||||
string loopPart = loop > 0 ? "_" + loop : string.Empty;
|
||||
ownerName = ownerConv.NamingTemplate
|
||||
.Replace("{{ADGroupPrefix}}", prefix ?? string.Empty)
|
||||
.Replace("{{NAME}}", serviceName)
|
||||
.Replace("{{_LOOP}}", loopPart)
|
||||
.Replace("{{GROUPTYPEPOSTFIX}}", ownerPostfix);
|
||||
if (!GroupExists(ownerName)) break;
|
||||
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);
|
||||
AddMembersBySid(ownerName, ownerSidList); // NEU: SIDs als Owner hinzufügen
|
||||
var ownerDn = GetDistinguishedName(ownerName);
|
||||
var ownerSid = GetSid(ownerName);
|
||||
result.Add(Tuple.Create(eLiamAccessRoles.ADOwner.ToString(), ownerSid, ownerName, ownerDn));
|
||||
|
||||
|
||||
// 2) Member-Gruppe (Gruppentyp nach Parameter)
|
||||
string memberName = null;
|
||||
for (int loop = 0; loop <= MaxLoop; loop++)
|
||||
{
|
||||
string loopPart = loop > 0 ? "_" + loop : string.Empty;
|
||||
memberName = memberConv.NamingTemplate
|
||||
.Replace("{{ADGroupPrefix}}", prefix ?? string.Empty)
|
||||
.Replace("{{NAME}}", serviceName)
|
||||
.Replace("{{_LOOP}}", loopPart)
|
||||
.Replace("{{GROUPTYPEPOSTFIX}}", memberPostfix);
|
||||
if (!GroupExists(memberName)) break;
|
||||
if (loop == MaxLoop) throw new InvalidOperationException($"Kein eindeutiger Member-Name für '{serviceName}' nach {MaxLoop} Versuchen.");
|
||||
}
|
||||
EnsureGroup(memberName, memberConv, description, managedByDn: ownerDn, gruppenbereich, gruppentyp);
|
||||
AddMembersBySid(memberName, memberSidList); // NEU: SIDs als Member hinzufügen
|
||||
var memberDn = GetDistinguishedName(memberName);
|
||||
var memberSid = GetSid(memberName);
|
||||
result.Add(Tuple.Create(eLiamAccessRoles.ADMember.ToString(), memberSid, memberName, memberDn));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fügt einer bestehenden Gruppe per SID die entsprechenden AD-Objekte hinzu.
|
||||
/// </summary>
|
||||
private void AddMembersBySid(string groupName, IEnumerable<string> sidList)
|
||||
{
|
||||
if (sidList == null) return;
|
||||
|
||||
// Basis für die Suche: komplette Domäne, nicht nur der OU-Pfad
|
||||
string domainRoot = $"LDAP://{_provider.Domain}";
|
||||
using (var root = new DirectoryEntry(domainRoot, _user, _password, AuthenticationTypes.Secure))
|
||||
using (var grpSearch = new DirectorySearcher(root))
|
||||
{
|
||||
grpSearch.Filter = $"(&(objectCategory=group)(sAMAccountName={groupName}))";
|
||||
var grpRes = grpSearch.FindOne();
|
||||
if (grpRes == null) return;
|
||||
|
||||
var grpEntry = grpRes.GetDirectoryEntry();
|
||||
foreach (var sidStr in sidList)
|
||||
{
|
||||
// Leere oder null überspringen
|
||||
if (string.IsNullOrWhiteSpace(sidStr))
|
||||
continue;
|
||||
|
||||
SecurityIdentifier sid;
|
||||
try
|
||||
{
|
||||
sid = new SecurityIdentifier(sidStr);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Ungültige SID-String-Darstellung überspringen
|
||||
continue;
|
||||
}
|
||||
|
||||
// In LDAP-Filter-Notation umwandeln
|
||||
var bytes = new byte[sid.BinaryLength];
|
||||
sid.GetBinaryForm(bytes, 0);
|
||||
var sb = new StringBuilder();
|
||||
foreach (var b in bytes)
|
||||
sb.AppendFormat("\\{0:X2}", b);
|
||||
string octetSid = sb.ToString();
|
||||
|
||||
// Suche nach dem Objekt in der Domäne
|
||||
using (var usrSearch = new DirectorySearcher(root))
|
||||
{
|
||||
usrSearch.Filter = $"(objectSid={octetSid})";
|
||||
var usrRes = usrSearch.FindOne();
|
||||
if (usrRes == null)
|
||||
continue;
|
||||
|
||||
var userDn = usrRes.Properties["distinguishedName"][0].ToString();
|
||||
// Doppelteinträge vermeiden
|
||||
if (!grpEntry.Properties["member"].Contains(userDn))
|
||||
grpEntry.Properties["member"].Add(userDn);
|
||||
}
|
||||
}
|
||||
|
||||
grpEntry.CommitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wandelt eine SID (String-Form) in das für LDAP nötige Oktet-String-Format um.
|
||||
/// </summary>
|
||||
private string SidStringToLdapFilter(string sidString)
|
||||
{
|
||||
var sid = new SecurityIdentifier(sidString);
|
||||
var bytes = new byte[sid.BinaryLength];
|
||||
sid.GetBinaryForm(bytes, 0);
|
||||
var sb = new StringBuilder();
|
||||
foreach (var b in bytes)
|
||||
sb.AppendFormat("\\{0:X2}", b);
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
private string GetSid(string name)
|
||||
{
|
||||
using (var root = new DirectoryEntry(_ldapRoot, _user, _password, AuthenticationTypes.Secure))
|
||||
using (var ds = new DirectorySearcher(root))
|
||||
{
|
||||
ds.Filter = $"(&(objectCategory=group)(sAMAccountName={name}))";
|
||||
var r = ds.FindOne();
|
||||
if (r == null) return null;
|
||||
var de = r.GetDirectoryEntry();
|
||||
var sidBytes = (byte[])de.Properties["objectSid"][0];
|
||||
return new SecurityIdentifier(sidBytes, 0).Value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string FormatName(cLiamNamingConvention conv, string serviceName, System.Collections.Generic.IDictionary<string, string> tags)
|
||||
{
|
||||
string tmpl = conv.NamingTemplate.Replace("{{NAME}}", serviceName);
|
||||
foreach (var kv in tags)
|
||||
tmpl = tmpl.Replace("{{" + kv.Key + "}}", kv.Value);
|
||||
return tmpl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stellt sicher, dass die Gruppe existiert – neu mit Scope & Type.
|
||||
/// </summary>
|
||||
private void EnsureGroup(
|
||||
string groupName,
|
||||
cLiamNamingConvention conv,
|
||||
string description,
|
||||
string managedByDn,
|
||||
eLiamAccessRoleScopes groupScope,
|
||||
ADGroupType groupType)
|
||||
{
|
||||
if (!GroupExists(groupName))
|
||||
{
|
||||
using (var root = new DirectoryEntry(_ldapRoot, _user, _password, AuthenticationTypes.Secure))
|
||||
{
|
||||
var grp = root.Children.Add("CN=" + groupName, "group");
|
||||
grp.Properties["sAMAccountName"].Value = groupName;
|
||||
grp.Properties["displayName"].Value = groupName;
|
||||
// Hier: Security-Bit (0x80000000) nur, wenn Security, sonst 0
|
||||
int typeBit = (groupType == ADGroupType.Security)
|
||||
? unchecked((int)0x80000000)
|
||||
: 0;
|
||||
// Scope-Bit aus Param
|
||||
grp.Properties["groupType"].Value = unchecked(typeBit | GetScopeBit(groupScope));
|
||||
|
||||
if (!string.IsNullOrEmpty(description))
|
||||
grp.Properties["description"].Value = description;
|
||||
if (managedByDn != null)
|
||||
grp.Properties["managedBy"].Value = managedByDn;
|
||||
grp.CommitChanges();
|
||||
}
|
||||
WaitReplication(groupName, TimeSpan.FromMinutes(2));
|
||||
}
|
||||
}
|
||||
|
||||
private bool GroupExists(string name)
|
||||
{
|
||||
return _adBase.directoryEntry.Children.Cast<DirectoryEntry>()
|
||||
.Any(c => string.Equals(
|
||||
c.Properties["sAMAccountName"]?.Value?.ToString(), name, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
private void WaitReplication(string groupName, TimeSpan timeout)
|
||||
{
|
||||
var sw = System.Diagnostics.Stopwatch.StartNew();
|
||||
while (sw.Elapsed < timeout)
|
||||
{
|
||||
if (GroupExists(groupName))
|
||||
return;
|
||||
Thread.Sleep(2000);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetDistinguishedName(string name)
|
||||
{
|
||||
using (var root = new DirectoryEntry(_ldapRoot, _user, _password, AuthenticationTypes.Secure))
|
||||
using (var ds = new DirectorySearcher(root))
|
||||
{
|
||||
ds.Filter = "(&(objectClass=group)(sAMAccountName=" + name + "))";
|
||||
var res = ds.FindOne();
|
||||
return res?.Properties["distinguishedName"]?[0]?.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private int GetScopeBit(eLiamAccessRoleScopes scope)
|
||||
{
|
||||
switch (scope)
|
||||
{
|
||||
case eLiamAccessRoleScopes.Universal:
|
||||
return 0x8;
|
||||
case eLiamAccessRoleScopes.Global:
|
||||
return 0x2;
|
||||
case eLiamAccessRoleScopes.DomainLocal:
|
||||
return 0x4;
|
||||
default:
|
||||
return 0x8;
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.DirectoryServices;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using C4IT.Logging;
|
||||
using C4IT.LIAM;
|
||||
using LiamAD;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
|
||||
namespace LiamAD
|
||||
{
|
||||
/// <summary>
|
||||
/// Helfer für cLiamProviderAD: Erstellt AD Member- und Owner-Gruppen für Services
|
||||
/// nach konfigurierter Namenskonvention und setzt ManagedBy.
|
||||
/// </summary>
|
||||
public class ADServiceGroupCreator
|
||||
{
|
||||
private readonly cLiamProviderAD _provider;
|
||||
private readonly cActiveDirectoryBase _adBase;
|
||||
private readonly string _ldapRoot;
|
||||
private readonly string _user;
|
||||
private readonly string _password;
|
||||
public enum ADGroupType
|
||||
{
|
||||
Security, // Sicherheit
|
||||
Distribution // Verteiler
|
||||
}
|
||||
public ADServiceGroupCreator(cLiamProviderAD provider)
|
||||
{
|
||||
_provider = provider ?? throw new ArgumentNullException(nameof(provider));
|
||||
_adBase = provider.activeDirectoryBase;
|
||||
_ldapRoot = $"LDAP://{provider.Domain}/{provider.GroupPath}";
|
||||
_user = provider.Credential.Identification;
|
||||
_password = new System.Net.NetworkCredential(_user, provider.Credential.Secret).Password;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Erstellt oder findet beide AD-Gruppen (Member & Owner) für einen Service.
|
||||
/// Neu mit: gruppenbereich (Scope) und gruppentyp (für Member-Gruppe).
|
||||
/// Owner-Gruppe ist immer Security.
|
||||
/// </summary>
|
||||
public List<Tuple<string, string, string, string>> EnsureServiceGroups(
|
||||
string serviceName,
|
||||
string description = null,
|
||||
eLiamAccessRoleScopes gruppenbereich = eLiamAccessRoleScopes.Universal,
|
||||
ADGroupType gruppentyp = ADGroupType.Distribution,
|
||||
IEnumerable<string> ownerSidList = null,
|
||||
IEnumerable<string> memberSidList = null)
|
||||
{
|
||||
const int MaxLoop = 50;
|
||||
var result = new List<Tuple<string, string, string, string>>();
|
||||
|
||||
// Konventionen für Member und Owner
|
||||
var ownerConv = _provider.NamingConventions
|
||||
.FirstOrDefault(nc => nc.AccessRole == eLiamAccessRoles.ADOwner);
|
||||
var memberConv = _provider.NamingConventions
|
||||
.FirstOrDefault(nc => nc.AccessRole == eLiamAccessRoles.ADMember);
|
||||
if (ownerConv == null || memberConv == null)
|
||||
throw new InvalidOperationException("Namenskonvention für ADMember oder ADOwner fehlt.");
|
||||
|
||||
// Tags
|
||||
_provider.CustomTags.TryGetValue("ADGroupPrefix", out var prefix);
|
||||
_provider.CustomTags.TryGetValue("ADOwner", out var ownerPostfix);
|
||||
_provider.CustomTags.TryGetValue("ADMember", out var memberPostfix);
|
||||
|
||||
// 1) Owner-Gruppe (immer Security)
|
||||
string ownerName = null;
|
||||
for (int loop = 0; loop <= MaxLoop; loop++)
|
||||
{
|
||||
string loopPart = loop > 0 ? "_" + loop : string.Empty;
|
||||
ownerName = ownerConv.NamingTemplate
|
||||
.Replace("{{ADGroupPrefix}}", prefix ?? string.Empty)
|
||||
.Replace("{{NAME}}", serviceName)
|
||||
.Replace("{{_LOOP}}", loopPart)
|
||||
.Replace("{{GROUPTYPEPOSTFIX}}", ownerPostfix);
|
||||
if (!GroupExists(ownerName)) break;
|
||||
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);
|
||||
AddMembersBySid(ownerName, ownerSidList); // NEU: SIDs als Owner hinzufügen
|
||||
var ownerDn = GetDistinguishedName(ownerName);
|
||||
var ownerSid = GetSid(ownerName);
|
||||
result.Add(Tuple.Create(eLiamAccessRoles.ADOwner.ToString(), ownerSid, ownerName, ownerDn));
|
||||
|
||||
|
||||
// 2) Member-Gruppe (Gruppentyp nach Parameter)
|
||||
string memberName = null;
|
||||
for (int loop = 0; loop <= MaxLoop; loop++)
|
||||
{
|
||||
string loopPart = loop > 0 ? "_" + loop : string.Empty;
|
||||
memberName = memberConv.NamingTemplate
|
||||
.Replace("{{ADGroupPrefix}}", prefix ?? string.Empty)
|
||||
.Replace("{{NAME}}", serviceName)
|
||||
.Replace("{{_LOOP}}", loopPart)
|
||||
.Replace("{{GROUPTYPEPOSTFIX}}", memberPostfix);
|
||||
if (!GroupExists(memberName)) break;
|
||||
if (loop == MaxLoop) throw new InvalidOperationException($"Kein eindeutiger Member-Name für '{serviceName}' nach {MaxLoop} Versuchen.");
|
||||
}
|
||||
EnsureGroup(memberName, memberConv, description, managedByDn: ownerDn, gruppenbereich, gruppentyp);
|
||||
AddMembersBySid(memberName, memberSidList); // NEU: SIDs als Member hinzufügen
|
||||
var memberDn = GetDistinguishedName(memberName);
|
||||
var memberSid = GetSid(memberName);
|
||||
result.Add(Tuple.Create(eLiamAccessRoles.ADMember.ToString(), memberSid, memberName, memberDn));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fügt einer bestehenden Gruppe per SID die entsprechenden AD-Objekte hinzu.
|
||||
/// </summary>
|
||||
private void AddMembersBySid(string groupName, IEnumerable<string> sidList)
|
||||
{
|
||||
if (sidList == null) return;
|
||||
|
||||
// Basis für die Suche: komplette Domäne, nicht nur der OU-Pfad
|
||||
string domainRoot = $"LDAP://{_provider.Domain}";
|
||||
using (var root = new DirectoryEntry(domainRoot, _user, _password, AuthenticationTypes.Secure))
|
||||
using (var grpSearch = new DirectorySearcher(root))
|
||||
{
|
||||
grpSearch.Filter = $"(&(objectCategory=group)(sAMAccountName={groupName}))";
|
||||
var grpRes = grpSearch.FindOne();
|
||||
if (grpRes == null) return;
|
||||
|
||||
var grpEntry = grpRes.GetDirectoryEntry();
|
||||
foreach (var sidStr in sidList)
|
||||
{
|
||||
// Leere oder null überspringen
|
||||
if (string.IsNullOrWhiteSpace(sidStr))
|
||||
continue;
|
||||
|
||||
SecurityIdentifier sid;
|
||||
try
|
||||
{
|
||||
sid = new SecurityIdentifier(sidStr);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Ungültige SID-String-Darstellung überspringen
|
||||
continue;
|
||||
}
|
||||
|
||||
// In LDAP-Filter-Notation umwandeln
|
||||
var bytes = new byte[sid.BinaryLength];
|
||||
sid.GetBinaryForm(bytes, 0);
|
||||
var sb = new StringBuilder();
|
||||
foreach (var b in bytes)
|
||||
sb.AppendFormat("\\{0:X2}", b);
|
||||
string octetSid = sb.ToString();
|
||||
|
||||
// Suche nach dem Objekt in der Domäne
|
||||
using (var usrSearch = new DirectorySearcher(root))
|
||||
{
|
||||
usrSearch.Filter = $"(objectSid={octetSid})";
|
||||
var usrRes = usrSearch.FindOne();
|
||||
if (usrRes == null)
|
||||
continue;
|
||||
|
||||
var userDn = usrRes.Properties["distinguishedName"][0].ToString();
|
||||
// Doppelteinträge vermeiden
|
||||
if (!grpEntry.Properties["member"].Contains(userDn))
|
||||
grpEntry.Properties["member"].Add(userDn);
|
||||
}
|
||||
}
|
||||
|
||||
grpEntry.CommitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wandelt eine SID (String-Form) in das für LDAP nötige Oktet-String-Format um.
|
||||
/// </summary>
|
||||
private string SidStringToLdapFilter(string sidString)
|
||||
{
|
||||
var sid = new SecurityIdentifier(sidString);
|
||||
var bytes = new byte[sid.BinaryLength];
|
||||
sid.GetBinaryForm(bytes, 0);
|
||||
var sb = new StringBuilder();
|
||||
foreach (var b in bytes)
|
||||
sb.AppendFormat("\\{0:X2}", b);
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
private string GetSid(string name)
|
||||
{
|
||||
using (var root = new DirectoryEntry(_ldapRoot, _user, _password, AuthenticationTypes.Secure))
|
||||
using (var ds = new DirectorySearcher(root))
|
||||
{
|
||||
ds.Filter = $"(&(objectCategory=group)(sAMAccountName={name}))";
|
||||
var r = ds.FindOne();
|
||||
if (r == null) return null;
|
||||
var de = r.GetDirectoryEntry();
|
||||
var sidBytes = (byte[])de.Properties["objectSid"][0];
|
||||
return new SecurityIdentifier(sidBytes, 0).Value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string FormatName(cLiamNamingConvention conv, string serviceName, System.Collections.Generic.IDictionary<string, string> tags)
|
||||
{
|
||||
string tmpl = conv.NamingTemplate.Replace("{{NAME}}", serviceName);
|
||||
foreach (var kv in tags)
|
||||
tmpl = tmpl.Replace("{{" + kv.Key + "}}", kv.Value);
|
||||
return tmpl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stellt sicher, dass die Gruppe existiert – neu mit Scope & Type.
|
||||
/// </summary>
|
||||
private void EnsureGroup(
|
||||
string groupName,
|
||||
cLiamNamingConvention conv,
|
||||
string description,
|
||||
string managedByDn,
|
||||
eLiamAccessRoleScopes groupScope,
|
||||
ADGroupType groupType)
|
||||
{
|
||||
if (!GroupExists(groupName))
|
||||
{
|
||||
using (var root = new DirectoryEntry(_ldapRoot, _user, _password, AuthenticationTypes.Secure))
|
||||
{
|
||||
var grp = root.Children.Add("CN=" + groupName, "group");
|
||||
grp.Properties["sAMAccountName"].Value = groupName;
|
||||
grp.Properties["displayName"].Value = groupName;
|
||||
// Hier: Security-Bit (0x80000000) nur, wenn Security, sonst 0
|
||||
int typeBit = (groupType == ADGroupType.Security)
|
||||
? unchecked((int)0x80000000)
|
||||
: 0;
|
||||
// Scope-Bit aus Param
|
||||
grp.Properties["groupType"].Value = unchecked(typeBit | GetScopeBit(groupScope));
|
||||
|
||||
if (!string.IsNullOrEmpty(description))
|
||||
grp.Properties["description"].Value = description;
|
||||
if (managedByDn != null)
|
||||
grp.Properties["managedBy"].Value = managedByDn;
|
||||
grp.CommitChanges();
|
||||
}
|
||||
WaitReplication(groupName, TimeSpan.FromMinutes(2));
|
||||
}
|
||||
}
|
||||
|
||||
private bool GroupExists(string name)
|
||||
{
|
||||
return _adBase.directoryEntry.Children.Cast<DirectoryEntry>()
|
||||
.Any(c => string.Equals(
|
||||
c.Properties["sAMAccountName"]?.Value?.ToString(), name, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
private void WaitReplication(string groupName, TimeSpan timeout)
|
||||
{
|
||||
var sw = System.Diagnostics.Stopwatch.StartNew();
|
||||
while (sw.Elapsed < timeout)
|
||||
{
|
||||
if (GroupExists(groupName))
|
||||
return;
|
||||
Thread.Sleep(2000);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetDistinguishedName(string name)
|
||||
{
|
||||
using (var root = new DirectoryEntry(_ldapRoot, _user, _password, AuthenticationTypes.Secure))
|
||||
using (var ds = new DirectorySearcher(root))
|
||||
{
|
||||
ds.Filter = "(&(objectClass=group)(sAMAccountName=" + name + "))";
|
||||
var res = ds.FindOne();
|
||||
return res?.Properties["distinguishedName"]?[0]?.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private int GetScopeBit(eLiamAccessRoleScopes scope)
|
||||
{
|
||||
switch (scope)
|
||||
{
|
||||
case eLiamAccessRoleScopes.Universal:
|
||||
return 0x8;
|
||||
case eLiamAccessRoleScopes.Global:
|
||||
return 0x2;
|
||||
case eLiamAccessRoleScopes.DomainLocal:
|
||||
return 0x4;
|
||||
default:
|
||||
return 0x8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
|
||||
Binary file not shown.
@@ -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.pdb
|
||||
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\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\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.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\LiamActiveDirectory.dll
|
||||
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.xml
|
||||
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\LiamBaseClasses.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\LiamBaseClasses.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.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\LiamActiveDirectory.dll
|
||||
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.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
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
88ca960765b758a5c4edcddedf6dc811f2a49d840cd7ade015d7644911a99c77
|
||||
0f439131d442d0ee4d6473d1fe79783624433c39a44374a60e15e079e468a4be
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
|
||||
|
||||
Binary file not shown.
@@ -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.pdb
|
||||
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\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\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.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.pdb
|
||||
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.xml
|
||||
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\LiamBaseClasses.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\LiamBaseClasses.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.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.pdb
|
||||
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.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
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
ab9bb136583040c5ab0b8fc2b80edba3f154caa1532f30973b39973f0def47e6
|
||||
e6f9f5153aa55a3a910f7c5ef0287e4500a3f354c3a1c3198c24d7eea04e0de2
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.ValueTuple" version="4.6.1" targetFramework="net462" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.ValueTuple" version="4.6.1" targetFramework="net462" />
|
||||
</packages>
|
||||
@@ -1,399 +1,399 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
|
||||
using C4IT.Logging;
|
||||
using static C4IT.Logging.cLogManager;
|
||||
|
||||
|
||||
namespace C4IT.LIAM
|
||||
{
|
||||
public enum eLiamAccessRoles
|
||||
{
|
||||
Owner = 1, Write = 2, Read = 3, Traverse = 4,
|
||||
ADOwner = 110, // "AD Owner Group"
|
||||
ADMember = 100, // "AD Member Group"
|
||||
ExchangeMLMember = 200, // "Mailing List Member"
|
||||
ExchangeMLOwner = 210, // "Mailing List Owner"
|
||||
ExchangeSMBFullAccess = 250, // "Shared Mailbox Full Access"
|
||||
ExchangeSMBSendAs = 260, // "Shared Mailbox Send as"
|
||||
ExchangeSMBOwner = 270 // "Shared Mailbox Owner"
|
||||
};
|
||||
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 eLiamDataAreaTypes
|
||||
{
|
||||
Unknown = 0,
|
||||
NtfsShare = 101,
|
||||
NtfsFolder = 102,
|
||||
MsTeamsTeam = 401,
|
||||
MsTeamsChannel = 402,
|
||||
MsTeamsFolder = 403,
|
||||
ActiveDirectoryGroup = 501,
|
||||
ExchangeSharedMailbox = 601,
|
||||
ExchangeDistributionGroup = 602
|
||||
};
|
||||
|
||||
public enum eLiamGroupStrategies { None = 0, Ntfs_AGP = 0, Ntfs_AGDLP = 1 };
|
||||
|
||||
public class cLiamConfiguration
|
||||
{
|
||||
}
|
||||
|
||||
public class cLiamProviderData : ICloneable
|
||||
{
|
||||
|
||||
public eLiamProviderTypes ProviderType { get; set; } = eLiamProviderTypes.Unknown;
|
||||
|
||||
public string Domain { get; set; } = "";
|
||||
|
||||
public string RootPath { get; set; } = "";
|
||||
|
||||
public cLiamCredential Credential { get; set; } = null;
|
||||
|
||||
public int MaxDepth { get; set; } = 1;
|
||||
|
||||
public eLiamGroupStrategies GroupStrategy { get; set; } = eLiamGroupStrategies.None;
|
||||
|
||||
public string DataAreaFilter { get; set; } = "";
|
||||
|
||||
public string DataAreaRegEx { get; set; } = "";
|
||||
|
||||
public string GroupFilter { get; set; } = "";
|
||||
|
||||
public string GroupRegEx { get; set; } = "";
|
||||
|
||||
public string GroupPath { get; set; } = "";
|
||||
|
||||
public string OwnerGroupGlobal { get; set; } = "";
|
||||
public string OwnerGroupLocal { get; set; } = "";
|
||||
public string WriteGroupGlobal { get; set; } = "";
|
||||
public string WriteGroupLocal { get; set; } = "";
|
||||
public string ReadGroupGlobal { get; set; } = "";
|
||||
public string ReadGroupLocal { get; set; } = "";
|
||||
public string TraverseGroup { get; set; } = "";
|
||||
|
||||
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> AdditionalConfiguration { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
public static void Copy(cLiamProviderData From, cLiamProviderData To)
|
||||
{
|
||||
To.ProviderType = From.ProviderType;
|
||||
To.Domain = From.Domain;
|
||||
To.RootPath = From.RootPath;
|
||||
To.Credential = From.Credential;
|
||||
To.MaxDepth = From.MaxDepth;
|
||||
To.GroupStrategy = From.GroupStrategy;
|
||||
To.DataAreaFilter = From.DataAreaFilter;
|
||||
To.DataAreaRegEx = From.DataAreaRegEx;
|
||||
To.GroupFilter = From.GroupFilter;
|
||||
To.GroupRegEx = From.GroupRegEx;
|
||||
To.GroupPath = From.GroupPath;
|
||||
To.CustomTags = From.CustomTags;
|
||||
To.AdditionalConfiguration = From.AdditionalConfiguration;
|
||||
To.CustomTags = From.CustomTags;
|
||||
To.NamingConventions = From.NamingConventions;
|
||||
}
|
||||
|
||||
public cLiamProviderData()
|
||||
{
|
||||
}
|
||||
|
||||
public cLiamProviderData(cLiamProviderData PD)
|
||||
{
|
||||
Copy(PD, this);
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return new cLiamProviderData(this);
|
||||
}
|
||||
public void ReplaceCustomTags()
|
||||
{
|
||||
foreach (var customTag in this.CustomTags)
|
||||
{
|
||||
var Key = customTag.Key;
|
||||
|
||||
foreach (var namingConvention in NamingConventions)
|
||||
{
|
||||
if (customTag.Key == "Filesystem_GroupDomainLocalTag" && namingConvention.Scope == eLiamAccessRoleScopes.DomainLocal || customTag.Key == "Filesystem_GroupGlobalTag" && namingConvention.Scope == eLiamAccessRoleScopes.Global)
|
||||
Key = "SCOPETAG";
|
||||
else
|
||||
Key = customTag.Key;
|
||||
namingConvention.DescriptionTemplate = namingConvention.DescriptionTemplate.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
namingConvention.NamingTemplate = namingConvention.NamingTemplate.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
namingConvention.Wildcard = namingConvention.Wildcard.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
}
|
||||
GroupFilter = GroupFilter.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class cLiamProviderBase : cLiamProviderData
|
||||
{
|
||||
public cLiamConfiguration LiamConfiguration { get; private set; }
|
||||
|
||||
public cLiamProviderBase(cLiamConfiguration Configuration, cLiamProviderData ProviderData) :
|
||||
base(ProviderData)
|
||||
{
|
||||
LiamConfiguration = Configuration;
|
||||
}
|
||||
|
||||
public abstract Task<List<cLiamDataAreaBase>> getDataAreasAsync(int MaxDepth = -1);
|
||||
|
||||
public abstract Task<bool> LogonAsync();
|
||||
public abstract string GetLastErrorMessage();
|
||||
|
||||
public abstract Task<cLiamDataAreaBase> LoadDataArea(string UID);
|
||||
|
||||
public static cLiamProviderBase CreateInstance(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData)
|
||||
{
|
||||
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
var MyPath = Assembly.GetExecutingAssembly()?.Location;
|
||||
if (MyPath == null)
|
||||
return null;
|
||||
|
||||
MyPath = Path.GetDirectoryName(MyPath);
|
||||
var DllPath = Path.Combine(MyPath, $"Liam{ProviderData.ProviderType}.dll");
|
||||
if (!File.Exists(DllPath))
|
||||
{
|
||||
LogEntry($"Couldn not found Data Provider library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
|
||||
var assLocal = Assembly.LoadFrom(DllPath);
|
||||
if (assLocal == null)
|
||||
{
|
||||
LogEntry($"Could not load Data Provider library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
var TP = assLocal.GetTypes();
|
||||
var type = assLocal.GetType("C4IT.LIAM.LiamInitializer");
|
||||
if (type == null)
|
||||
{
|
||||
LogEntry($"Could not found class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
|
||||
var MI = type.GetMethod("CreateInstance");
|
||||
if (MI == null)
|
||||
{
|
||||
LogEntry($"Could not found method 'CreateInstance' in class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
var objDll = MI.Invoke(null, new object[] { LiamConfiguration, ProviderData });
|
||||
var RetVal = objDll as cLiamProviderBase;
|
||||
ProviderData.ReplaceCustomTags();
|
||||
return RetVal;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public abstract Task<List<cLiamDataAreaBase>> getSecurityGroupsAsync(string groupFilter);
|
||||
}
|
||||
|
||||
public class cLiamCredential
|
||||
{
|
||||
public string Domain { get; set; } = "";
|
||||
public string Identification { get; set; } = "";
|
||||
public string Secret { get; set; } = "";
|
||||
}
|
||||
|
||||
public class cLiamNamingConvention
|
||||
{
|
||||
public string Name { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public string NamingTemplate { get; set; } = "";
|
||||
public string DescriptionTemplate { get; set; } = "";
|
||||
public string Wildcard { get; set; } = "";
|
||||
public eLiamAccessRoles AccessRole { get; set; } = eLiamAccessRoles.Read;
|
||||
public eLiamAccessRoleScopes Scope { get; set; } = eLiamAccessRoleScopes.Unknown;
|
||||
public eLiamProviderTypes? ProviderType { get; set; } = null;
|
||||
}
|
||||
|
||||
public class cLiamDataAreaInfo
|
||||
{
|
||||
public string DisplayName { get; protected set; } = null;
|
||||
public string Description { get; protected set; } = null;
|
||||
public string OwnerRef { get; set; } = null;
|
||||
public string UID { get; protected set; } = null;
|
||||
public string CreatedDate { get; protected set; } = null;
|
||||
|
||||
public string TechnicalName { get; protected set; } = "";
|
||||
|
||||
public int Level { get; set; } = -1;
|
||||
|
||||
public string ParentUID { get; protected set; } = null;
|
||||
|
||||
public eLiamDataAreaTypes DataType { get; protected set; } = eLiamDataAreaTypes.Unknown;
|
||||
|
||||
public bool SupportsPermissions { get; protected set; } = false;
|
||||
|
||||
public bool SupportsOwners { get; protected set; } = false;
|
||||
}
|
||||
|
||||
public abstract class cLiamDataAreaBase : cLiamDataAreaInfo
|
||||
{
|
||||
|
||||
public readonly cLiamProviderBase Provider = null;
|
||||
|
||||
public cLiamDataAreaBase(cLiamProviderBase Provider)
|
||||
{
|
||||
this.Provider = Provider;
|
||||
}
|
||||
|
||||
public abstract Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1);
|
||||
|
||||
public static async Task<List<cLiamDataAreaBase>> getChildrenFromListAsync(List<cLiamDataAreaBase> Items, int Depth = -1)
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
var RetVal = new List<cLiamDataAreaBase>();
|
||||
try
|
||||
{
|
||||
if (Items == null)
|
||||
return RetVal;
|
||||
|
||||
if (Depth <= 0)
|
||||
return RetVal;
|
||||
|
||||
foreach (var Entry in Items)
|
||||
{
|
||||
var Childs = await Entry.getChildrenAsync(Depth + 1);
|
||||
if (Childs != null)
|
||||
RetVal.AddRange(Childs);
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
return RetVal;
|
||||
}
|
||||
|
||||
public virtual async Task<List<cLiamUserInfo>> GetOwnersAsync()
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual async Task<List<cLiamPermissionInfo>> GetPermissionsAsync(bool force)
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual async Task<cLiamPermissionResult> GrantPermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role)
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual async Task<bool> RevokePermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role)
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class cLiamUserInfo
|
||||
{
|
||||
public string DisplayName { get; set; } = null;
|
||||
public string GivenName { get; set; } = null;
|
||||
public string SurName { get; set; } = null;
|
||||
public string UserPrincipalName { get; set; } = null;
|
||||
public string EMail { get; set; } = null;
|
||||
public string SID { get; set; } = null;
|
||||
}
|
||||
|
||||
public class cLiamPermissionResult
|
||||
{
|
||||
public bool Valid { get; set; } = false;
|
||||
public string UserReference { get; set; } = null;
|
||||
}
|
||||
|
||||
public class cLiamPermissionInfo
|
||||
{
|
||||
public cLiamUserInfo User;
|
||||
public eLiamAccessRoles AccessRole = eLiamAccessRoles.Read;
|
||||
public bool OnlyEffective = false;
|
||||
}
|
||||
|
||||
|
||||
public class DataAreaEntryBase
|
||||
{
|
||||
public string DisplayName { get; set; }
|
||||
public string TechnicalName { get; set; }
|
||||
public string UID { get; set; }
|
||||
public string TargetType { get; set; }
|
||||
}
|
||||
|
||||
public class SecurityGroupEntry : DataAreaEntryBase
|
||||
{
|
||||
public string Scope { get; set; }
|
||||
}
|
||||
public class DataAreaEntry : DataAreaEntryBase
|
||||
{
|
||||
public string Parent { get; set; }
|
||||
public string ParentUID { get; set; }
|
||||
public string Owner { get; set; }
|
||||
public string Write { get; set; }
|
||||
public string Read { get; set; }
|
||||
public string Traverse { get; set; }
|
||||
public string CreatedDate { get; set; }
|
||||
public string Level { get; set; }
|
||||
public string ConfigurationId { get; set; }
|
||||
public string BaseFolder { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string UniqueId { get; set; }
|
||||
public string DataAreaType { get; set; }
|
||||
}
|
||||
public class LiamApiVersionInfo
|
||||
{
|
||||
public string ProductName { get; set; } = "- unknown -";
|
||||
public string ProductVersion { get; set; } = "";
|
||||
public string AssemblyName { get; set; } = "- unknown -";
|
||||
public string AssemblyVersion { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ProviderCacheEntry
|
||||
{
|
||||
public Guid ID;
|
||||
public Guid ObjectID;
|
||||
public DateTime ValidUntil;
|
||||
public cLiamProviderBase Provider;
|
||||
}
|
||||
|
||||
public class LiamDataAreaEntry
|
||||
{
|
||||
public string DisplayName { get; set; } = "";
|
||||
|
||||
public string UID { get; set; } = "";
|
||||
|
||||
public bool SupportsPermissions { get; set; } = false;
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
|
||||
using C4IT.Logging;
|
||||
using static C4IT.Logging.cLogManager;
|
||||
|
||||
|
||||
namespace C4IT.LIAM
|
||||
{
|
||||
public enum eLiamAccessRoles
|
||||
{
|
||||
Owner = 1, Write = 2, Read = 3, Traverse = 4,
|
||||
ADOwner = 110, // "AD Owner Group"
|
||||
ADMember = 100, // "AD Member Group"
|
||||
ExchangeMLMember = 200, // "Mailing List Member"
|
||||
ExchangeMLOwner = 210, // "Mailing List Owner"
|
||||
ExchangeSMBFullAccess = 250, // "Shared Mailbox Full Access"
|
||||
ExchangeSMBSendAs = 260, // "Shared Mailbox Send as"
|
||||
ExchangeSMBOwner = 270 // "Shared Mailbox Owner"
|
||||
};
|
||||
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 eLiamDataAreaTypes
|
||||
{
|
||||
Unknown = 0,
|
||||
NtfsShare = 101,
|
||||
NtfsFolder = 102,
|
||||
MsTeamsTeam = 401,
|
||||
MsTeamsChannel = 402,
|
||||
MsTeamsFolder = 403,
|
||||
ActiveDirectoryGroup = 501,
|
||||
ExchangeSharedMailbox = 601,
|
||||
ExchangeDistributionGroup = 602
|
||||
};
|
||||
|
||||
public enum eLiamGroupStrategies { None = 0, Ntfs_AGP = 0, Ntfs_AGDLP = 1 };
|
||||
|
||||
public class cLiamConfiguration
|
||||
{
|
||||
}
|
||||
|
||||
public class cLiamProviderData : ICloneable
|
||||
{
|
||||
|
||||
public eLiamProviderTypes ProviderType { get; set; } = eLiamProviderTypes.Unknown;
|
||||
|
||||
public string Domain { get; set; } = "";
|
||||
|
||||
public string RootPath { get; set; } = "";
|
||||
|
||||
public cLiamCredential Credential { get; set; } = null;
|
||||
|
||||
public int MaxDepth { get; set; } = 1;
|
||||
|
||||
public eLiamGroupStrategies GroupStrategy { get; set; } = eLiamGroupStrategies.None;
|
||||
|
||||
public string DataAreaFilter { get; set; } = "";
|
||||
|
||||
public string DataAreaRegEx { get; set; } = "";
|
||||
|
||||
public string GroupFilter { get; set; } = "";
|
||||
|
||||
public string GroupRegEx { get; set; } = "";
|
||||
|
||||
public string GroupPath { get; set; } = "";
|
||||
|
||||
public string OwnerGroupGlobal { get; set; } = "";
|
||||
public string OwnerGroupLocal { get; set; } = "";
|
||||
public string WriteGroupGlobal { get; set; } = "";
|
||||
public string WriteGroupLocal { get; set; } = "";
|
||||
public string ReadGroupGlobal { get; set; } = "";
|
||||
public string ReadGroupLocal { get; set; } = "";
|
||||
public string TraverseGroup { get; set; } = "";
|
||||
|
||||
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> AdditionalConfiguration { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
public static void Copy(cLiamProviderData From, cLiamProviderData To)
|
||||
{
|
||||
To.ProviderType = From.ProviderType;
|
||||
To.Domain = From.Domain;
|
||||
To.RootPath = From.RootPath;
|
||||
To.Credential = From.Credential;
|
||||
To.MaxDepth = From.MaxDepth;
|
||||
To.GroupStrategy = From.GroupStrategy;
|
||||
To.DataAreaFilter = From.DataAreaFilter;
|
||||
To.DataAreaRegEx = From.DataAreaRegEx;
|
||||
To.GroupFilter = From.GroupFilter;
|
||||
To.GroupRegEx = From.GroupRegEx;
|
||||
To.GroupPath = From.GroupPath;
|
||||
To.CustomTags = From.CustomTags;
|
||||
To.AdditionalConfiguration = From.AdditionalConfiguration;
|
||||
To.CustomTags = From.CustomTags;
|
||||
To.NamingConventions = From.NamingConventions;
|
||||
}
|
||||
|
||||
public cLiamProviderData()
|
||||
{
|
||||
}
|
||||
|
||||
public cLiamProviderData(cLiamProviderData PD)
|
||||
{
|
||||
Copy(PD, this);
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return new cLiamProviderData(this);
|
||||
}
|
||||
public void ReplaceCustomTags()
|
||||
{
|
||||
foreach (var customTag in this.CustomTags)
|
||||
{
|
||||
var Key = customTag.Key;
|
||||
|
||||
foreach (var namingConvention in NamingConventions)
|
||||
{
|
||||
if (customTag.Key == "Filesystem_GroupDomainLocalTag" && namingConvention.Scope == eLiamAccessRoleScopes.DomainLocal || customTag.Key == "Filesystem_GroupGlobalTag" && namingConvention.Scope == eLiamAccessRoleScopes.Global)
|
||||
Key = "SCOPETAG";
|
||||
else
|
||||
Key = customTag.Key;
|
||||
namingConvention.DescriptionTemplate = namingConvention.DescriptionTemplate.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
namingConvention.NamingTemplate = namingConvention.NamingTemplate.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
namingConvention.Wildcard = namingConvention.Wildcard.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
}
|
||||
GroupFilter = GroupFilter.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class cLiamProviderBase : cLiamProviderData
|
||||
{
|
||||
public cLiamConfiguration LiamConfiguration { get; private set; }
|
||||
|
||||
public cLiamProviderBase(cLiamConfiguration Configuration, cLiamProviderData ProviderData) :
|
||||
base(ProviderData)
|
||||
{
|
||||
LiamConfiguration = Configuration;
|
||||
}
|
||||
|
||||
public abstract Task<List<cLiamDataAreaBase>> getDataAreasAsync(int MaxDepth = -1);
|
||||
|
||||
public abstract Task<bool> LogonAsync();
|
||||
public abstract string GetLastErrorMessage();
|
||||
|
||||
public abstract Task<cLiamDataAreaBase> LoadDataArea(string UID);
|
||||
|
||||
public static cLiamProviderBase CreateInstance(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData)
|
||||
{
|
||||
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
var MyPath = Assembly.GetExecutingAssembly()?.Location;
|
||||
if (MyPath == null)
|
||||
return null;
|
||||
|
||||
MyPath = Path.GetDirectoryName(MyPath);
|
||||
var DllPath = Path.Combine(MyPath, $"Liam{ProviderData.ProviderType}.dll");
|
||||
if (!File.Exists(DllPath))
|
||||
{
|
||||
LogEntry($"Couldn not found Data Provider library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
|
||||
var assLocal = Assembly.LoadFrom(DllPath);
|
||||
if (assLocal == null)
|
||||
{
|
||||
LogEntry($"Could not load Data Provider library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
var TP = assLocal.GetTypes();
|
||||
var type = assLocal.GetType("C4IT.LIAM.LiamInitializer");
|
||||
if (type == null)
|
||||
{
|
||||
LogEntry($"Could not found class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
|
||||
var MI = type.GetMethod("CreateInstance");
|
||||
if (MI == null)
|
||||
{
|
||||
LogEntry($"Could not found method 'CreateInstance' in class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
var objDll = MI.Invoke(null, new object[] { LiamConfiguration, ProviderData });
|
||||
var RetVal = objDll as cLiamProviderBase;
|
||||
ProviderData.ReplaceCustomTags();
|
||||
return RetVal;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public abstract Task<List<cLiamDataAreaBase>> getSecurityGroupsAsync(string groupFilter);
|
||||
}
|
||||
|
||||
public class cLiamCredential
|
||||
{
|
||||
public string Domain { get; set; } = "";
|
||||
public string Identification { get; set; } = "";
|
||||
public string Secret { get; set; } = "";
|
||||
}
|
||||
|
||||
public class cLiamNamingConvention
|
||||
{
|
||||
public string Name { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public string NamingTemplate { get; set; } = "";
|
||||
public string DescriptionTemplate { get; set; } = "";
|
||||
public string Wildcard { get; set; } = "";
|
||||
public eLiamAccessRoles AccessRole { get; set; } = eLiamAccessRoles.Read;
|
||||
public eLiamAccessRoleScopes Scope { get; set; } = eLiamAccessRoleScopes.Unknown;
|
||||
public eLiamProviderTypes? ProviderType { get; set; } = null;
|
||||
}
|
||||
|
||||
public class cLiamDataAreaInfo
|
||||
{
|
||||
public string DisplayName { get; protected set; } = null;
|
||||
public string Description { get; protected set; } = null;
|
||||
public string OwnerRef { get; set; } = null;
|
||||
public string UID { get; protected set; } = null;
|
||||
public string CreatedDate { get; protected set; } = null;
|
||||
|
||||
public string TechnicalName { get; protected set; } = "";
|
||||
|
||||
public int Level { get; set; } = -1;
|
||||
|
||||
public string ParentUID { get; protected set; } = null;
|
||||
|
||||
public eLiamDataAreaTypes DataType { get; protected set; } = eLiamDataAreaTypes.Unknown;
|
||||
|
||||
public bool SupportsPermissions { get; protected set; } = false;
|
||||
|
||||
public bool SupportsOwners { get; protected set; } = false;
|
||||
}
|
||||
|
||||
public abstract class cLiamDataAreaBase : cLiamDataAreaInfo
|
||||
{
|
||||
|
||||
public readonly cLiamProviderBase Provider = null;
|
||||
|
||||
public cLiamDataAreaBase(cLiamProviderBase Provider)
|
||||
{
|
||||
this.Provider = Provider;
|
||||
}
|
||||
|
||||
public abstract Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1);
|
||||
|
||||
public static async Task<List<cLiamDataAreaBase>> getChildrenFromListAsync(List<cLiamDataAreaBase> Items, int Depth = -1)
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
var RetVal = new List<cLiamDataAreaBase>();
|
||||
try
|
||||
{
|
||||
if (Items == null)
|
||||
return RetVal;
|
||||
|
||||
if (Depth <= 0)
|
||||
return RetVal;
|
||||
|
||||
foreach (var Entry in Items)
|
||||
{
|
||||
var Childs = await Entry.getChildrenAsync(Depth + 1);
|
||||
if (Childs != null)
|
||||
RetVal.AddRange(Childs);
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
return RetVal;
|
||||
}
|
||||
|
||||
public virtual async Task<List<cLiamUserInfo>> GetOwnersAsync()
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual async Task<List<cLiamPermissionInfo>> GetPermissionsAsync(bool force)
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual async Task<cLiamPermissionResult> GrantPermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role)
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual async Task<bool> RevokePermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role)
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class cLiamUserInfo
|
||||
{
|
||||
public string DisplayName { get; set; } = null;
|
||||
public string GivenName { get; set; } = null;
|
||||
public string SurName { get; set; } = null;
|
||||
public string UserPrincipalName { get; set; } = null;
|
||||
public string EMail { get; set; } = null;
|
||||
public string SID { get; set; } = null;
|
||||
}
|
||||
|
||||
public class cLiamPermissionResult
|
||||
{
|
||||
public bool Valid { get; set; } = false;
|
||||
public string UserReference { get; set; } = null;
|
||||
}
|
||||
|
||||
public class cLiamPermissionInfo
|
||||
{
|
||||
public cLiamUserInfo User;
|
||||
public eLiamAccessRoles AccessRole = eLiamAccessRoles.Read;
|
||||
public bool OnlyEffective = false;
|
||||
}
|
||||
|
||||
|
||||
public class DataAreaEntryBase
|
||||
{
|
||||
public string DisplayName { get; set; }
|
||||
public string TechnicalName { get; set; }
|
||||
public string UID { get; set; }
|
||||
public string TargetType { get; set; }
|
||||
}
|
||||
|
||||
public class SecurityGroupEntry : DataAreaEntryBase
|
||||
{
|
||||
public string Scope { get; set; }
|
||||
}
|
||||
public class DataAreaEntry : DataAreaEntryBase
|
||||
{
|
||||
public string Parent { get; set; }
|
||||
public string ParentUID { get; set; }
|
||||
public string Owner { get; set; }
|
||||
public string Write { get; set; }
|
||||
public string Read { get; set; }
|
||||
public string Traverse { get; set; }
|
||||
public string CreatedDate { get; set; }
|
||||
public string Level { get; set; }
|
||||
public string ConfigurationId { get; set; }
|
||||
public string BaseFolder { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string UniqueId { get; set; }
|
||||
public string DataAreaType { get; set; }
|
||||
}
|
||||
public class LiamApiVersionInfo
|
||||
{
|
||||
public string ProductName { get; set; } = "- unknown -";
|
||||
public string ProductVersion { get; set; } = "";
|
||||
public string AssemblyName { get; set; } = "- unknown -";
|
||||
public string AssemblyVersion { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ProviderCacheEntry
|
||||
{
|
||||
public Guid ID;
|
||||
public Guid ObjectID;
|
||||
public DateTime ValidUntil;
|
||||
public cLiamProviderBase Provider;
|
||||
}
|
||||
|
||||
public class LiamDataAreaEntry
|
||||
{
|
||||
public string DisplayName { get; set; } = "";
|
||||
|
||||
public string UID { get; set; } = "";
|
||||
|
||||
public bool SupportsPermissions { get; set; } = false;
|
||||
}
|
||||
}
|
||||
@@ -1,399 +1,399 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
|
||||
using C4IT.Logging;
|
||||
using static C4IT.Logging.cLogManager;
|
||||
|
||||
|
||||
namespace C4IT.LIAM
|
||||
{
|
||||
public enum eLiamAccessRoles
|
||||
{
|
||||
Owner = 1, Write = 2, Read = 3, Traverse = 4,
|
||||
ADOwner = 100, // "AD Owner Group"
|
||||
ADMember = 110, // "AD Member Group"
|
||||
ExchangeMLMember = 200, // "Mailing List Member"
|
||||
ExchangeMLOwner = 210, // "Mailing List Owner"
|
||||
ExchangeSMBFullAccess = 250, // "Shared Mailbox Full Access"
|
||||
ExchangeSMBSendAs = 260, // "Shared Mailbox Send as"
|
||||
ExchangeSMBOwner = 270 // "Shared Mailbox Owner"
|
||||
};
|
||||
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 eLiamDataAreaTypes
|
||||
{
|
||||
Unknown = 0,
|
||||
NtfsShare = 101,
|
||||
NtfsFolder = 102,
|
||||
MsTeamsTeam = 401,
|
||||
MsTeamsChannel = 402,
|
||||
MsTeamsFolder = 403,
|
||||
ActiveDirectoryGroup = 501,
|
||||
ExchangeSharedMailbox = 601,
|
||||
ExchangeDistributionGroup = 602
|
||||
};
|
||||
|
||||
public enum eLiamGroupStrategies { None = 0, Ntfs_AGP = 0, Ntfs_AGDLP = 1 };
|
||||
|
||||
public class cLiamConfiguration
|
||||
{
|
||||
}
|
||||
|
||||
public class cLiamProviderData : ICloneable
|
||||
{
|
||||
|
||||
public eLiamProviderTypes ProviderType { get; set; } = eLiamProviderTypes.Unknown;
|
||||
|
||||
public string Domain { get; set; } = "";
|
||||
|
||||
public string RootPath { get; set; } = "";
|
||||
|
||||
public cLiamCredential Credential { get; set; } = null;
|
||||
|
||||
public int MaxDepth { get; set; } = 1;
|
||||
|
||||
public eLiamGroupStrategies GroupStrategy { get; set; } = eLiamGroupStrategies.None;
|
||||
|
||||
public string DataAreaFilter { get; set; } = "";
|
||||
|
||||
public string DataAreaRegEx { get; set; } = "";
|
||||
|
||||
public string GroupFilter { get; set; } = "";
|
||||
|
||||
public string GroupRegEx { get; set; } = "";
|
||||
|
||||
public string GroupPath { get; set; } = "";
|
||||
|
||||
public string OwnerGroupGlobal { get; set; } = "";
|
||||
public string OwnerGroupLocal { get; set; } = "";
|
||||
public string WriteGroupGlobal { get; set; } = "";
|
||||
public string WriteGroupLocal { get; set; } = "";
|
||||
public string ReadGroupGlobal { get; set; } = "";
|
||||
public string ReadGroupLocal { get; set; } = "";
|
||||
public string TraverseGroup { get; set; } = "";
|
||||
|
||||
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> AdditionalConfiguration { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
public static void Copy(cLiamProviderData From, cLiamProviderData To)
|
||||
{
|
||||
To.ProviderType = From.ProviderType;
|
||||
To.Domain = From.Domain;
|
||||
To.RootPath = From.RootPath;
|
||||
To.Credential = From.Credential;
|
||||
To.MaxDepth = From.MaxDepth;
|
||||
To.GroupStrategy = From.GroupStrategy;
|
||||
To.DataAreaFilter = From.DataAreaFilter;
|
||||
To.DataAreaRegEx = From.DataAreaRegEx;
|
||||
To.GroupFilter = From.GroupFilter;
|
||||
To.GroupRegEx = From.GroupRegEx;
|
||||
To.GroupPath = From.GroupPath;
|
||||
To.CustomTags = From.CustomTags;
|
||||
To.AdditionalConfiguration = From.AdditionalConfiguration;
|
||||
To.CustomTags = From.CustomTags;
|
||||
To.NamingConventions = From.NamingConventions;
|
||||
}
|
||||
|
||||
public cLiamProviderData()
|
||||
{
|
||||
}
|
||||
|
||||
public cLiamProviderData(cLiamProviderData PD)
|
||||
{
|
||||
Copy(PD, this);
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return new cLiamProviderData(this);
|
||||
}
|
||||
public void ReplaceCustomTags()
|
||||
{
|
||||
foreach (var customTag in this.CustomTags)
|
||||
{
|
||||
var Key = customTag.Key;
|
||||
|
||||
foreach (var namingConvention in NamingConventions)
|
||||
{
|
||||
if (customTag.Key == "Filesystem_GroupDomainLocalTag" && namingConvention.Scope == eLiamAccessRoleScopes.DomainLocal || customTag.Key == "Filesystem_GroupGlobalTag" && namingConvention.Scope == eLiamAccessRoleScopes.Global)
|
||||
Key = "SCOPETAG";
|
||||
else
|
||||
Key = customTag.Key;
|
||||
namingConvention.DescriptionTemplate = namingConvention.DescriptionTemplate.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
namingConvention.NamingTemplate = namingConvention.NamingTemplate.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
namingConvention.Wildcard = namingConvention.Wildcard.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
}
|
||||
GroupFilter = GroupFilter.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class cLiamProviderBase : cLiamProviderData
|
||||
{
|
||||
public cLiamConfiguration LiamConfiguration { get; private set; }
|
||||
|
||||
public cLiamProviderBase(cLiamConfiguration Configuration, cLiamProviderData ProviderData) :
|
||||
base(ProviderData)
|
||||
{
|
||||
LiamConfiguration = Configuration;
|
||||
}
|
||||
|
||||
public abstract Task<List<cLiamDataAreaBase>> getDataAreasAsync(int MaxDepth = -1);
|
||||
|
||||
public abstract Task<bool> LogonAsync();
|
||||
public abstract string GetLastErrorMessage();
|
||||
|
||||
public abstract Task<cLiamDataAreaBase> LoadDataArea(string UID);
|
||||
|
||||
public static cLiamProviderBase CreateInstance(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData)
|
||||
{
|
||||
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
var MyPath = Assembly.GetExecutingAssembly()?.Location;
|
||||
if (MyPath == null)
|
||||
return null;
|
||||
|
||||
MyPath = Path.GetDirectoryName(MyPath);
|
||||
var DllPath = Path.Combine(MyPath, $"Liam{ProviderData.ProviderType}.dll");
|
||||
if (!File.Exists(DllPath))
|
||||
{
|
||||
LogEntry($"Couldn not found Data Provider library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
|
||||
var assLocal = Assembly.LoadFrom(DllPath);
|
||||
if (assLocal == null)
|
||||
{
|
||||
LogEntry($"Could not load Data Provider library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
var TP = assLocal.GetTypes();
|
||||
var type = assLocal.GetType("C4IT.LIAM.LiamInitializer");
|
||||
if (type == null)
|
||||
{
|
||||
LogEntry($"Could not found class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
|
||||
var MI = type.GetMethod("CreateInstance");
|
||||
if (MI == null)
|
||||
{
|
||||
LogEntry($"Could not found method 'CreateInstance' in class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
var objDll = MI.Invoke(null, new object[] { LiamConfiguration, ProviderData });
|
||||
var RetVal = objDll as cLiamProviderBase;
|
||||
ProviderData.ReplaceCustomTags();
|
||||
return RetVal;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public abstract Task<List<cLiamDataAreaBase>> getSecurityGroupsAsync(string groupFilter);
|
||||
}
|
||||
|
||||
public class cLiamCredential
|
||||
{
|
||||
public string Domain { get; set; } = "";
|
||||
public string Identification { get; set; } = "";
|
||||
public string Secret { get; set; } = "";
|
||||
}
|
||||
|
||||
public class cLiamNamingConvention
|
||||
{
|
||||
public string Name { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public string NamingTemplate { get; set; } = "";
|
||||
public string DescriptionTemplate { get; set; } = "";
|
||||
public string Wildcard { get; set; } = "";
|
||||
public eLiamAccessRoles AccessRole { get; set; } = eLiamAccessRoles.Read;
|
||||
public eLiamAccessRoleScopes Scope { get; set; } = eLiamAccessRoleScopes.Unknown;
|
||||
public eLiamProviderTypes? ProviderType { get; set; } = null;
|
||||
}
|
||||
|
||||
public class cLiamDataAreaInfo
|
||||
{
|
||||
public string DisplayName { get; protected set; } = null;
|
||||
public string Description { get; protected set; } = null;
|
||||
public string OwnerRef { get; set; } = null;
|
||||
public string UID { get; protected set; } = null;
|
||||
public string CreatedDate { get; protected set; } = null;
|
||||
|
||||
public string TechnicalName { get; protected set; } = "";
|
||||
|
||||
public int Level { get; set; } = -1;
|
||||
|
||||
public string ParentUID { get; protected set; } = null;
|
||||
|
||||
public eLiamDataAreaTypes DataType { get; protected set; } = eLiamDataAreaTypes.Unknown;
|
||||
|
||||
public bool SupportsPermissions { get; protected set; } = false;
|
||||
|
||||
public bool SupportsOwners { get; protected set; } = false;
|
||||
}
|
||||
|
||||
public abstract class cLiamDataAreaBase : cLiamDataAreaInfo
|
||||
{
|
||||
|
||||
public readonly cLiamProviderBase Provider = null;
|
||||
|
||||
public cLiamDataAreaBase(cLiamProviderBase Provider)
|
||||
{
|
||||
this.Provider = Provider;
|
||||
}
|
||||
|
||||
public abstract Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1);
|
||||
|
||||
public static async Task<List<cLiamDataAreaBase>> getChildrenFromListAsync(List<cLiamDataAreaBase> Items, int Depth = -1)
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
var RetVal = new List<cLiamDataAreaBase>();
|
||||
try
|
||||
{
|
||||
if (Items == null)
|
||||
return RetVal;
|
||||
|
||||
if (Depth <= 0)
|
||||
return RetVal;
|
||||
|
||||
foreach (var Entry in Items)
|
||||
{
|
||||
var Childs = await Entry.getChildrenAsync(Depth + 1);
|
||||
if (Childs != null)
|
||||
RetVal.AddRange(Childs);
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
return RetVal;
|
||||
}
|
||||
|
||||
public virtual async Task<List<cLiamUserInfo>> GetOwnersAsync()
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual async Task<List<cLiamPermissionInfo>> GetPermissionsAsync(bool force)
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual async Task<cLiamPermissionResult> GrantPermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role)
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual async Task<bool> RevokePermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role)
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class cLiamUserInfo
|
||||
{
|
||||
public string DisplayName { get; set; } = null;
|
||||
public string GivenName { get; set; } = null;
|
||||
public string SurName { get; set; } = null;
|
||||
public string UserPrincipalName { get; set; } = null;
|
||||
public string EMail { get; set; } = null;
|
||||
public string SID { get; set; } = null;
|
||||
}
|
||||
|
||||
public class cLiamPermissionResult
|
||||
{
|
||||
public bool Valid { get; set; } = false;
|
||||
public string UserReference { get; set; } = null;
|
||||
}
|
||||
|
||||
public class cLiamPermissionInfo
|
||||
{
|
||||
public cLiamUserInfo User;
|
||||
public eLiamAccessRoles AccessRole = eLiamAccessRoles.Read;
|
||||
public bool OnlyEffective = false;
|
||||
}
|
||||
|
||||
|
||||
public class DataAreaEntryBase
|
||||
{
|
||||
public string DisplayName { get; set; }
|
||||
public string TechnicalName { get; set; }
|
||||
public string UID { get; set; }
|
||||
public string TargetType { get; set; }
|
||||
}
|
||||
|
||||
public class SecurityGroupEntry : DataAreaEntryBase
|
||||
{
|
||||
public string Scope { get; set; }
|
||||
}
|
||||
public class DataAreaEntry : DataAreaEntryBase
|
||||
{
|
||||
public string Parent { get; set; }
|
||||
public string ParentUID { get; set; }
|
||||
public string Owner { get; set; }
|
||||
public string Write { get; set; }
|
||||
public string Read { get; set; }
|
||||
public string Traverse { get; set; }
|
||||
public string CreatedDate { get; set; }
|
||||
public string Level { get; set; }
|
||||
public string ConfigurationId { get; set; }
|
||||
public string BaseFolder { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string UniqueId { get; set; }
|
||||
public string DataAreaType { get; set; }
|
||||
}
|
||||
public class LiamApiVersionInfo
|
||||
{
|
||||
public string ProductName { get; set; } = "- unknown -";
|
||||
public string ProductVersion { get; set; } = "";
|
||||
public string AssemblyName { get; set; } = "- unknown -";
|
||||
public string AssemblyVersion { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ProviderCacheEntry
|
||||
{
|
||||
public Guid ID;
|
||||
public Guid ObjectID;
|
||||
public DateTime ValidUntil;
|
||||
public cLiamProviderBase Provider;
|
||||
}
|
||||
|
||||
public class LiamDataAreaEntry
|
||||
{
|
||||
public string DisplayName { get; set; } = "";
|
||||
|
||||
public string UID { get; set; } = "";
|
||||
|
||||
public bool SupportsPermissions { get; set; } = false;
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
|
||||
using C4IT.Logging;
|
||||
using static C4IT.Logging.cLogManager;
|
||||
|
||||
|
||||
namespace C4IT.LIAM
|
||||
{
|
||||
public enum eLiamAccessRoles
|
||||
{
|
||||
Owner = 1, Write = 2, Read = 3, Traverse = 4,
|
||||
ADOwner = 100, // "AD Owner Group"
|
||||
ADMember = 110, // "AD Member Group"
|
||||
ExchangeMLMember = 200, // "Mailing List Member"
|
||||
ExchangeMLOwner = 210, // "Mailing List Owner"
|
||||
ExchangeSMBFullAccess = 250, // "Shared Mailbox Full Access"
|
||||
ExchangeSMBSendAs = 260, // "Shared Mailbox Send as"
|
||||
ExchangeSMBOwner = 270 // "Shared Mailbox Owner"
|
||||
};
|
||||
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 eLiamDataAreaTypes
|
||||
{
|
||||
Unknown = 0,
|
||||
NtfsShare = 101,
|
||||
NtfsFolder = 102,
|
||||
MsTeamsTeam = 401,
|
||||
MsTeamsChannel = 402,
|
||||
MsTeamsFolder = 403,
|
||||
ActiveDirectoryGroup = 501,
|
||||
ExchangeSharedMailbox = 601,
|
||||
ExchangeDistributionGroup = 602
|
||||
};
|
||||
|
||||
public enum eLiamGroupStrategies { None = 0, Ntfs_AGP = 0, Ntfs_AGDLP = 1 };
|
||||
|
||||
public class cLiamConfiguration
|
||||
{
|
||||
}
|
||||
|
||||
public class cLiamProviderData : ICloneable
|
||||
{
|
||||
|
||||
public eLiamProviderTypes ProviderType { get; set; } = eLiamProviderTypes.Unknown;
|
||||
|
||||
public string Domain { get; set; } = "";
|
||||
|
||||
public string RootPath { get; set; } = "";
|
||||
|
||||
public cLiamCredential Credential { get; set; } = null;
|
||||
|
||||
public int MaxDepth { get; set; } = 1;
|
||||
|
||||
public eLiamGroupStrategies GroupStrategy { get; set; } = eLiamGroupStrategies.None;
|
||||
|
||||
public string DataAreaFilter { get; set; } = "";
|
||||
|
||||
public string DataAreaRegEx { get; set; } = "";
|
||||
|
||||
public string GroupFilter { get; set; } = "";
|
||||
|
||||
public string GroupRegEx { get; set; } = "";
|
||||
|
||||
public string GroupPath { get; set; } = "";
|
||||
|
||||
public string OwnerGroupGlobal { get; set; } = "";
|
||||
public string OwnerGroupLocal { get; set; } = "";
|
||||
public string WriteGroupGlobal { get; set; } = "";
|
||||
public string WriteGroupLocal { get; set; } = "";
|
||||
public string ReadGroupGlobal { get; set; } = "";
|
||||
public string ReadGroupLocal { get; set; } = "";
|
||||
public string TraverseGroup { get; set; } = "";
|
||||
|
||||
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> AdditionalConfiguration { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
public static void Copy(cLiamProviderData From, cLiamProviderData To)
|
||||
{
|
||||
To.ProviderType = From.ProviderType;
|
||||
To.Domain = From.Domain;
|
||||
To.RootPath = From.RootPath;
|
||||
To.Credential = From.Credential;
|
||||
To.MaxDepth = From.MaxDepth;
|
||||
To.GroupStrategy = From.GroupStrategy;
|
||||
To.DataAreaFilter = From.DataAreaFilter;
|
||||
To.DataAreaRegEx = From.DataAreaRegEx;
|
||||
To.GroupFilter = From.GroupFilter;
|
||||
To.GroupRegEx = From.GroupRegEx;
|
||||
To.GroupPath = From.GroupPath;
|
||||
To.CustomTags = From.CustomTags;
|
||||
To.AdditionalConfiguration = From.AdditionalConfiguration;
|
||||
To.CustomTags = From.CustomTags;
|
||||
To.NamingConventions = From.NamingConventions;
|
||||
}
|
||||
|
||||
public cLiamProviderData()
|
||||
{
|
||||
}
|
||||
|
||||
public cLiamProviderData(cLiamProviderData PD)
|
||||
{
|
||||
Copy(PD, this);
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return new cLiamProviderData(this);
|
||||
}
|
||||
public void ReplaceCustomTags()
|
||||
{
|
||||
foreach (var customTag in this.CustomTags)
|
||||
{
|
||||
var Key = customTag.Key;
|
||||
|
||||
foreach (var namingConvention in NamingConventions)
|
||||
{
|
||||
if (customTag.Key == "Filesystem_GroupDomainLocalTag" && namingConvention.Scope == eLiamAccessRoleScopes.DomainLocal || customTag.Key == "Filesystem_GroupGlobalTag" && namingConvention.Scope == eLiamAccessRoleScopes.Global)
|
||||
Key = "SCOPETAG";
|
||||
else
|
||||
Key = customTag.Key;
|
||||
namingConvention.DescriptionTemplate = namingConvention.DescriptionTemplate.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
namingConvention.NamingTemplate = namingConvention.NamingTemplate.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
namingConvention.Wildcard = namingConvention.Wildcard.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
}
|
||||
GroupFilter = GroupFilter.Replace($"{{{{{Key}}}}}", customTag.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class cLiamProviderBase : cLiamProviderData
|
||||
{
|
||||
public cLiamConfiguration LiamConfiguration { get; private set; }
|
||||
|
||||
public cLiamProviderBase(cLiamConfiguration Configuration, cLiamProviderData ProviderData) :
|
||||
base(ProviderData)
|
||||
{
|
||||
LiamConfiguration = Configuration;
|
||||
}
|
||||
|
||||
public abstract Task<List<cLiamDataAreaBase>> getDataAreasAsync(int MaxDepth = -1);
|
||||
|
||||
public abstract Task<bool> LogonAsync();
|
||||
public abstract string GetLastErrorMessage();
|
||||
|
||||
public abstract Task<cLiamDataAreaBase> LoadDataArea(string UID);
|
||||
|
||||
public static cLiamProviderBase CreateInstance(cLiamConfiguration LiamConfiguration, cLiamProviderData ProviderData)
|
||||
{
|
||||
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
var MyPath = Assembly.GetExecutingAssembly()?.Location;
|
||||
if (MyPath == null)
|
||||
return null;
|
||||
|
||||
MyPath = Path.GetDirectoryName(MyPath);
|
||||
var DllPath = Path.Combine(MyPath, $"Liam{ProviderData.ProviderType}.dll");
|
||||
if (!File.Exists(DllPath))
|
||||
{
|
||||
LogEntry($"Couldn not found Data Provider library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
|
||||
var assLocal = Assembly.LoadFrom(DllPath);
|
||||
if (assLocal == null)
|
||||
{
|
||||
LogEntry($"Could not load Data Provider library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
var TP = assLocal.GetTypes();
|
||||
var type = assLocal.GetType("C4IT.LIAM.LiamInitializer");
|
||||
if (type == null)
|
||||
{
|
||||
LogEntry($"Could not found class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
|
||||
var MI = type.GetMethod("CreateInstance");
|
||||
if (MI == null)
|
||||
{
|
||||
LogEntry($"Could not found method 'CreateInstance' in class 'C4IT.LIAM.LiamInitializer' in library '{DllPath}'", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
var objDll = MI.Invoke(null, new object[] { LiamConfiguration, ProviderData });
|
||||
var RetVal = objDll as cLiamProviderBase;
|
||||
ProviderData.ReplaceCustomTags();
|
||||
return RetVal;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public abstract Task<List<cLiamDataAreaBase>> getSecurityGroupsAsync(string groupFilter);
|
||||
}
|
||||
|
||||
public class cLiamCredential
|
||||
{
|
||||
public string Domain { get; set; } = "";
|
||||
public string Identification { get; set; } = "";
|
||||
public string Secret { get; set; } = "";
|
||||
}
|
||||
|
||||
public class cLiamNamingConvention
|
||||
{
|
||||
public string Name { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public string NamingTemplate { get; set; } = "";
|
||||
public string DescriptionTemplate { get; set; } = "";
|
||||
public string Wildcard { get; set; } = "";
|
||||
public eLiamAccessRoles AccessRole { get; set; } = eLiamAccessRoles.Read;
|
||||
public eLiamAccessRoleScopes Scope { get; set; } = eLiamAccessRoleScopes.Unknown;
|
||||
public eLiamProviderTypes? ProviderType { get; set; } = null;
|
||||
}
|
||||
|
||||
public class cLiamDataAreaInfo
|
||||
{
|
||||
public string DisplayName { get; protected set; } = null;
|
||||
public string Description { get; protected set; } = null;
|
||||
public string OwnerRef { get; set; } = null;
|
||||
public string UID { get; protected set; } = null;
|
||||
public string CreatedDate { get; protected set; } = null;
|
||||
|
||||
public string TechnicalName { get; protected set; } = "";
|
||||
|
||||
public int Level { get; set; } = -1;
|
||||
|
||||
public string ParentUID { get; protected set; } = null;
|
||||
|
||||
public eLiamDataAreaTypes DataType { get; protected set; } = eLiamDataAreaTypes.Unknown;
|
||||
|
||||
public bool SupportsPermissions { get; protected set; } = false;
|
||||
|
||||
public bool SupportsOwners { get; protected set; } = false;
|
||||
}
|
||||
|
||||
public abstract class cLiamDataAreaBase : cLiamDataAreaInfo
|
||||
{
|
||||
|
||||
public readonly cLiamProviderBase Provider = null;
|
||||
|
||||
public cLiamDataAreaBase(cLiamProviderBase Provider)
|
||||
{
|
||||
this.Provider = Provider;
|
||||
}
|
||||
|
||||
public abstract Task<List<cLiamDataAreaBase>> getChildrenAsync(int Depth = -1);
|
||||
|
||||
public static async Task<List<cLiamDataAreaBase>> getChildrenFromListAsync(List<cLiamDataAreaBase> Items, int Depth = -1)
|
||||
{
|
||||
var CM = MethodBase.GetCurrentMethod();
|
||||
LogMethodBegin(CM);
|
||||
var RetVal = new List<cLiamDataAreaBase>();
|
||||
try
|
||||
{
|
||||
if (Items == null)
|
||||
return RetVal;
|
||||
|
||||
if (Depth <= 0)
|
||||
return RetVal;
|
||||
|
||||
foreach (var Entry in Items)
|
||||
{
|
||||
var Childs = await Entry.getChildrenAsync(Depth + 1);
|
||||
if (Childs != null)
|
||||
RetVal.AddRange(Childs);
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(CM);
|
||||
}
|
||||
return RetVal;
|
||||
}
|
||||
|
||||
public virtual async Task<List<cLiamUserInfo>> GetOwnersAsync()
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual async Task<List<cLiamPermissionInfo>> GetPermissionsAsync(bool force)
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual async Task<cLiamPermissionResult> GrantPermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role)
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual async Task<bool> RevokePermissionAsync(cLiamUserInfo User, eLiamAccessRoles Role)
|
||||
{
|
||||
await Task.Delay(0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class cLiamUserInfo
|
||||
{
|
||||
public string DisplayName { get; set; } = null;
|
||||
public string GivenName { get; set; } = null;
|
||||
public string SurName { get; set; } = null;
|
||||
public string UserPrincipalName { get; set; } = null;
|
||||
public string EMail { get; set; } = null;
|
||||
public string SID { get; set; } = null;
|
||||
}
|
||||
|
||||
public class cLiamPermissionResult
|
||||
{
|
||||
public bool Valid { get; set; } = false;
|
||||
public string UserReference { get; set; } = null;
|
||||
}
|
||||
|
||||
public class cLiamPermissionInfo
|
||||
{
|
||||
public cLiamUserInfo User;
|
||||
public eLiamAccessRoles AccessRole = eLiamAccessRoles.Read;
|
||||
public bool OnlyEffective = false;
|
||||
}
|
||||
|
||||
|
||||
public class DataAreaEntryBase
|
||||
{
|
||||
public string DisplayName { get; set; }
|
||||
public string TechnicalName { get; set; }
|
||||
public string UID { get; set; }
|
||||
public string TargetType { get; set; }
|
||||
}
|
||||
|
||||
public class SecurityGroupEntry : DataAreaEntryBase
|
||||
{
|
||||
public string Scope { get; set; }
|
||||
}
|
||||
public class DataAreaEntry : DataAreaEntryBase
|
||||
{
|
||||
public string Parent { get; set; }
|
||||
public string ParentUID { get; set; }
|
||||
public string Owner { get; set; }
|
||||
public string Write { get; set; }
|
||||
public string Read { get; set; }
|
||||
public string Traverse { get; set; }
|
||||
public string CreatedDate { get; set; }
|
||||
public string Level { get; set; }
|
||||
public string ConfigurationId { get; set; }
|
||||
public string BaseFolder { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string UniqueId { get; set; }
|
||||
public string DataAreaType { get; set; }
|
||||
}
|
||||
public class LiamApiVersionInfo
|
||||
{
|
||||
public string ProductName { get; set; } = "- unknown -";
|
||||
public string ProductVersion { get; set; } = "";
|
||||
public string AssemblyName { get; set; } = "- unknown -";
|
||||
public string AssemblyVersion { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ProviderCacheEntry
|
||||
{
|
||||
public Guid ID;
|
||||
public Guid ObjectID;
|
||||
public DateTime ValidUntil;
|
||||
public cLiamProviderBase Provider;
|
||||
}
|
||||
|
||||
public class LiamDataAreaEntry
|
||||
{
|
||||
public string DisplayName { get; set; } = "";
|
||||
|
||||
public string UID { get; set; } = "";
|
||||
|
||||
public bool SupportsPermissions { get; set; } = false;
|
||||
}
|
||||
}
|
||||
@@ -1,61 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LiamBaseClasses</RootNamespace>
|
||||
<AssemblyName>LiamBaseClasses</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>false</Deterministic>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="C4IT.LIAM.Base.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LiamHelper\LiamHelper.csproj">
|
||||
<Project>{6b0e73a6-f918-42d5-9525-d59d4d16283d}</Project>
|
||||
<Name>LiamHelper</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{3531C9E6-CF6E-458E-B604-4A5A8D1C7AB0}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LiamBaseClasses</RootNamespace>
|
||||
<AssemblyName>LiamBaseClasses</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>false</Deterministic>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="C4IT.LIAM.Base.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LiamHelper\LiamHelper.csproj">
|
||||
<Project>{6b0e73a6-f918-42d5-9525-d59d4d16283d}</Project>
|
||||
<Name>LiamHelper</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -1,10 +1,10 @@
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle("LIAM support library for basic classes & interfaces")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("3531c9e6-cf6e-458e-b604-4a5a8d1c7ab0")]
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle("LIAM support library for basic classes & interfaces")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("3531c9e6-cf6e-458e-b604-4a5a8d1c7ab0")]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
3908855f9633bf09d020c2efbd1fa153a9ad8a91b6e76b39255ee0403b9907f8
|
||||
d0283af9d4075f4a557253c483f33e9a0d4fae295f6ce748fa39a1e639aafbb6
|
||||
|
||||
@@ -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.pdb
|
||||
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\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.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\LiamBaseClasses.dll
|
||||
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Debug\LiamBaseClasses.pdb
|
||||
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\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\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.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\LiamBaseClasses.dll
|
||||
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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
77f86ea35cc63f1fe117fbff3ddf1a527617a8ddb75413eb5ef7f6b4cf6c8399
|
||||
135510e8387d9e004d20f72096af679b01eba0ea20db7534ef81cc95461b16c6
|
||||
|
||||
@@ -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.pdb
|
||||
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\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.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\LiamBaseClasses.dll
|
||||
C:\Workspace\C4IT DEV LIAM WEB Service\LiamBaseClasses\obj\Release\LiamBaseClasses.pdb
|
||||
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\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\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.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\LiamBaseClasses.dll
|
||||
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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
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
@@ -1,7 +1,8 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using System.DirectoryServices;
|
||||
@@ -9,187 +10,254 @@ using System.Diagnostics;
|
||||
using System.Threading;
|
||||
using System.Management.Automation.Runspaces;
|
||||
using System.Security.Principal;
|
||||
|
||||
namespace C4IT.LIAM
|
||||
{
|
||||
using C4IT.Logging;
|
||||
using static C4IT.Logging.cLogManager;
|
||||
|
||||
namespace C4IT.LIAM
|
||||
{
|
||||
public partial class ExchangeManager
|
||||
{
|
||||
/// <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)
|
||||
private static readonly TimeSpan PowerShellInvokeTimeout = TimeSpan.FromSeconds(120);
|
||||
|
||||
private static Collection<PSObject> InvokePowerShellWithTimeout(PowerShell ps, TimeSpan timeout, string operationName)
|
||||
{
|
||||
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++)
|
||||
IAsyncResult asyncResult = null;
|
||||
try
|
||||
{
|
||||
// nur einfügen, wenn loop > 0
|
||||
var loopPart = loop > 0 ? $"_{loop}" : string.Empty;
|
||||
asyncResult = ps.BeginInvoke();
|
||||
if (!asyncResult.AsyncWaitHandle.WaitOne(timeout))
|
||||
{
|
||||
try
|
||||
{
|
||||
ps.Stop();
|
||||
}
|
||||
catch (Exception stopEx)
|
||||
{
|
||||
LogException(stopEx);
|
||||
}
|
||||
|
||||
// Platzhalter im Template ersetzen
|
||||
groupName = namingConvention.NamingTemplate
|
||||
.Replace("{{ADGroupPrefix}}", prefix ?? string.Empty)
|
||||
.Replace("{{NAME}}", baseName)
|
||||
.Replace("{{_LOOP}}", loopPart)
|
||||
.Replace("{{GROUPTYPEPOSTFIX}}", typePostfix ?? string.Empty);
|
||||
throw new TimeoutException(
|
||||
$"PowerShell operation '{operationName}' timed out after {timeout.TotalSeconds:0} seconds.");
|
||||
}
|
||||
|
||||
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)
|
||||
var results = ps.EndInvoke(asyncResult);
|
||||
if (ps.HadErrors)
|
||||
{
|
||||
var errorMessage = CollectPowerShellErrors(ps);
|
||||
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;
|
||||
string.IsNullOrWhiteSpace(errorMessage)
|
||||
? $"PowerShell operation '{operationName}' failed without detailed error output."
|
||||
: $"PowerShell operation '{operationName}' failed: {errorMessage}");
|
||||
}
|
||||
|
||||
newGroup.CommitChanges();
|
||||
}
|
||||
|
||||
// 6. Auf Replikation warten (optional)
|
||||
const int replicationTimeoutMinutes = 2;
|
||||
if (!WaitForGroupReplication(groupName, TimeSpan.FromMinutes(replicationTimeoutMinutes)))
|
||||
return results;
|
||||
}
|
||||
finally
|
||||
{
|
||||
throw new TimeoutException(
|
||||
$"Die AD-Gruppe '{groupName}' konnte innerhalb von {replicationTimeoutMinutes} Minuten nicht repliziert werden.");
|
||||
if (asyncResult != null)
|
||||
asyncResult.AsyncWaitHandle.Close();
|
||||
}
|
||||
|
||||
return groupName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wartet darauf, dass die Gruppe nach der Erstellung im AD repliziert ist.
|
||||
/// </summary>
|
||||
private bool WaitForGroupReplication(string groupName, TimeSpan timeout)
|
||||
private static string CollectPowerShellErrors(PowerShell ps)
|
||||
{
|
||||
var sw = Stopwatch.StartNew();
|
||||
var pollInterval = TimeSpan.FromSeconds(5);
|
||||
if (ps?.Streams?.Error == null || ps.Streams.Error.Count <= 0)
|
||||
return string.Empty;
|
||||
|
||||
while (sw.Elapsed < timeout)
|
||||
{
|
||||
var found = GetSecurityGroups(groupName)
|
||||
.Any(g => string.Equals(
|
||||
g.Properties["sAMAccountName"]?.Value?.ToString(),
|
||||
groupName,
|
||||
StringComparison.OrdinalIgnoreCase));
|
||||
var errors = ps.Streams.Error
|
||||
.Select(e => e.Exception?.Message ?? e.ToString())
|
||||
.Where(m => !string.IsNullOrWhiteSpace(m))
|
||||
.Take(3);
|
||||
|
||||
if (found) return true;
|
||||
Thread.Sleep(pollInterval);
|
||||
}
|
||||
|
||||
return false;
|
||||
return string.Join(" | ", errors);
|
||||
}
|
||||
|
||||
/// <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)
|
||||
private static string GetSharedMailboxCreateErrorCode(Exception ex)
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
return ex is TimeoutException ? "EXCH_SHAREDMAILBOX_TIMEOUT" : "EXCH_SHAREDMAILBOX_CREATE_FAILED";
|
||||
}
|
||||
|
||||
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>
|
||||
/// Erstellt eine Shared Mailbox samt zugehöriger AD-Gruppen (FullAccess, SendAs, Owner) und setzt die nötigen Berechtigungen.
|
||||
/// </summary>
|
||||
@@ -199,22 +267,63 @@ namespace C4IT.LIAM
|
||||
string displayName = 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();
|
||||
|
||||
// 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);
|
||||
|
||||
// Create mailbox
|
||||
using (Runspace rs = CreateRunspace())
|
||||
try
|
||||
{
|
||||
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())
|
||||
{
|
||||
ps.Runspace = rs;
|
||||
|
||||
ps.AddCommand("New-Mailbox");
|
||||
ps.AddParameter("Name", name);
|
||||
ps.AddParameter("Alias", alias);
|
||||
@@ -224,47 +333,77 @@ namespace C4IT.LIAM
|
||||
ps.AddParameter("DisplayName", displayName);
|
||||
if (!string.IsNullOrEmpty(primarySmtpAddress))
|
||||
ps.AddParameter("PrimarySmtpAddress", primarySmtpAddress);
|
||||
ps.Invoke();
|
||||
AddMailboxPermission(name, fullAccessGroup, "FullAccess");
|
||||
AddSendAsPermission(name, sendAsGroup).GetAwaiter().GetResult();
|
||||
|
||||
InvokePowerShellWithTimeout(ps, PowerShellInvokeTimeout, $"New-Mailbox '{alias}'");
|
||||
|
||||
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
|
||||
DirectoryEntry mbEntry = FindAdObject("(&(objectClass=user)(mailNickname=" + alias + "))");
|
||||
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)
|
||||
// Retrieve mailbox GUID
|
||||
DirectoryEntry mbEntry = FindAdObject("(&(objectClass=user)(mailNickname=" + alias + "))");
|
||||
if (mbEntry != null && mbEntry.Properties.Contains("objectGUID") && mbEntry.Properties["objectGUID"].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));
|
||||
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];
|
||||
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>
|
||||
/// Erstellt eine Distribution Group samt zugehöriger AD-Gruppen (Member, Owner) und setzt die nötigen Berechtigungen.
|
||||
/// </summary>
|
||||
@@ -274,17 +413,56 @@ namespace C4IT.LIAM
|
||||
string displayName = 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();
|
||||
|
||||
// Ensure AD groups
|
||||
string memberGroup = EnsureSecurityGroup(eLiamAccessRoles.ExchangeMLMember, name);
|
||||
string ownerGroup = EnsureSecurityGroup(eLiamAccessRoles.ExchangeMLOwner, name);
|
||||
|
||||
SetManagedBy(memberGroup, ownerGroup);
|
||||
|
||||
// Create distribution group
|
||||
using (Runspace rs = CreateRunspace())
|
||||
try
|
||||
{
|
||||
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())
|
||||
{
|
||||
ps.Runspace = rs;
|
||||
@@ -296,13 +474,14 @@ namespace C4IT.LIAM
|
||||
ps.AddParameter("DisplayName", displayName);
|
||||
if (!string.IsNullOrEmpty(primarySmtpAddress))
|
||||
ps.AddParameter("PrimarySmtpAddress", primarySmtpAddress);
|
||||
ps.Invoke();
|
||||
InvokePowerShellWithTimeout(ps, PowerShellInvokeTimeout, $"New-DistributionGroup '{alias}'");
|
||||
|
||||
// b) GUID holen
|
||||
// GUID holen
|
||||
ps.Commands.Clear();
|
||||
ps.AddCommand("Get-DistributionGroup")
|
||||
.AddParameter("Identity", name);
|
||||
var dg = ps.Invoke().FirstOrDefault();
|
||||
var dg = InvokePowerShellWithTimeout(ps, PowerShellInvokeTimeout, $"Get-DistributionGroup '{name}'")
|
||||
.FirstOrDefault();
|
||||
if (dg != null && dg.Properties["Guid"] != null)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
AddMemberToDistributionGroup(name, memberGroup);
|
||||
SetDistributionGroupManagedBy(name, ownerGroup);
|
||||
ps.Commands.Clear();
|
||||
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
|
||||
};
|
||||
|
||||
|
||||
// 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)
|
||||
for (int i = 0; i < dRoles.Length; i++)
|
||||
{
|
||||
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));
|
||||
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];
|
||||
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);
|
||||
}
|
||||
|
||||
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())
|
||||
catch (Exception ex)
|
||||
{
|
||||
ps.Runspace = runspace;
|
||||
ps.AddCommand("Set-DistributionGroup")
|
||||
.AddParameter("Identity", groupName)
|
||||
.AddParameter("ManagedBy", managerGroup)
|
||||
.AddParameter("ErrorAction", "SilentlyContinue");
|
||||
ps.Invoke();
|
||||
errorCode = GetDistributionGroupCreateErrorCode(ex);
|
||||
errorMessage = ex.Message;
|
||||
LogEntry($"Distribution group creation failed [{errorCode}] {errorMessage}", LogLevels.Error);
|
||||
LogException(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <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;
|
||||
ps.AddCommand("Set-DistributionGroup")
|
||||
.AddParameter("Identity", groupName)
|
||||
.AddParameter("ManagedBy", managerGroup)
|
||||
.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,102 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{12586A29-BB1E-49B4-B971-88E520D6A77C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LiamExchange</RootNamespace>
|
||||
<AssemblyName>LiamExchange</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.DirectoryServices.AccountManagement" />
|
||||
<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>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<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>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="C4IT.LIAM.Exchange.cs" />
|
||||
<Compile Include="ExchangeManager.Extensions.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LiamBaseClasses\LiamBaseClasses.csproj">
|
||||
<Project>{3531c9e6-cf6e-458e-b604-4a5a8d1c7ab0}</Project>
|
||||
<Name>LiamBaseClasses</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LiamHelper\LiamHelper.csproj">
|
||||
<Project>{6b0e73a6-f918-42d5-9525-d59d4d16283d}</Project>
|
||||
<Name>LiamHelper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LiamNtfs\LiamNtfs.csproj">
|
||||
<Project>{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}</Project>
|
||||
<Name>LiamNtfs</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="C4IT.LIAM.ExchangeManager.cs" />
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{12586A29-BB1E-49B4-B971-88E520D6A77C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LiamExchange</RootNamespace>
|
||||
<AssemblyName>LiamExchange</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.DirectoryServices.AccountManagement" />
|
||||
<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>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<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>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="C4IT.LIAM.Exchange.cs" />
|
||||
<Compile Include="ExchangeManager.Extensions.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LiamBaseClasses\LiamBaseClasses.csproj">
|
||||
<Project>{3531c9e6-cf6e-458e-b604-4a5a8d1c7ab0}</Project>
|
||||
<Name>LiamBaseClasses</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LiamHelper\LiamHelper.csproj">
|
||||
<Project>{6b0e73a6-f918-42d5-9525-d59d4d16283d}</Project>
|
||||
<Name>LiamHelper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LiamNtfs\LiamNtfs.csproj">
|
||||
<Project>{7F3085F7-1B7A-4DB2-B66F-1B69CCB0002F}</Project>
|
||||
<Name>LiamNtfs</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="C4IT.LIAM.ExchangeManager.cs" />
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -1,10 +1,10 @@
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
|
||||
@@ -1,33 +1,19 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("LiamExchange")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("LiamExchange")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 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
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[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")]
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("LIAM Exchange Module")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 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
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[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")]
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<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" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<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" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<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" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<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" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1,38 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><doc>
|
||||
<assembly>
|
||||
<name>System.Buffers</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:System.Buffers.ArrayPool`1">
|
||||
<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>
|
||||
</member>
|
||||
<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>
|
||||
</member>
|
||||
<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>
|
||||
<returns>A new instance of the <see cref="System.Buffers.ArrayPool`1"></see> class.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<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>
|
||||
<returns>A new instance of the <see cref="System.Buffers.ArrayPool`1"></see> class with the specified configuration.</returns>
|
||||
</member>
|
||||
<member name="M:System.Buffers.ArrayPool`1.Rent(System.Int32)">
|
||||
<summary>Retrieves a buffer that is at least the requested length.</summary>
|
||||
<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>
|
||||
</member>
|
||||
<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>
|
||||
<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&#39;s contents are left unchanged.</param>
|
||||
</member>
|
||||
<member name="P:System.Buffers.ArrayPool`1.Shared">
|
||||
<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>
|
||||
</member>
|
||||
</members>
|
||||
<?xml version="1.0" encoding="utf-8"?><doc>
|
||||
<assembly>
|
||||
<name>System.Buffers</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:System.Buffers.ArrayPool`1">
|
||||
<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>
|
||||
</member>
|
||||
<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>
|
||||
</member>
|
||||
<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>
|
||||
<returns>A new instance of the <see cref="System.Buffers.ArrayPool`1"></see> class.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<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>
|
||||
<returns>A new instance of the <see cref="System.Buffers.ArrayPool`1"></see> class with the specified configuration.</returns>
|
||||
</member>
|
||||
<member name="M:System.Buffers.ArrayPool`1.Rent(System.Int32)">
|
||||
<summary>Retrieves a buffer that is at least the requested length.</summary>
|
||||
<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>
|
||||
</member>
|
||||
<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>
|
||||
<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&#39;s contents are left unchanged.</param>
|
||||
</member>
|
||||
<member name="P:System.Buffers.ArrayPool`1.Shared">
|
||||
<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>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,355 +1,355 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><doc>
|
||||
<assembly>
|
||||
<name>System.Memory</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:System.Span`1">
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="M:System.Span`1.#ctor(`0[])">
|
||||
<param name="array"></param>
|
||||
</member>
|
||||
<member name="M:System.Span`1.#ctor(System.Void*,System.Int32)">
|
||||
<param name="pointer"></param>
|
||||
<param name="length"></param>
|
||||
</member>
|
||||
<member name="M:System.Span`1.#ctor(`0[],System.Int32)">
|
||||
<param name="array"></param>
|
||||
<param name="start"></param>
|
||||
</member>
|
||||
<member name="M:System.Span`1.#ctor(`0[],System.Int32,System.Int32)">
|
||||
<param name="array"></param>
|
||||
<param name="start"></param>
|
||||
<param name="length"></param>
|
||||
</member>
|
||||
<member name="M:System.Span`1.Clear">
|
||||
|
||||
</member>
|
||||
<member name="M:System.Span`1.CopyTo(System.Span{`0})">
|
||||
<param name="destination"></param>
|
||||
</member>
|
||||
<member name="M:System.Span`1.DangerousCreate(System.Object,`0@,System.Int32)">
|
||||
<param name="obj"></param>
|
||||
<param name="objectData"></param>
|
||||
<param name="length"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.DangerousGetPinnableReference">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.Span`1.Empty">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.Equals(System.Object)">
|
||||
<param name="obj"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.Fill(`0)">
|
||||
<param name="value"></param>
|
||||
</member>
|
||||
<member name="M:System.Span`1.GetHashCode">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.Span`1.IsEmpty">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.Span`1.Item(System.Int32)">
|
||||
<param name="index"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.Span`1.Length">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.op_Equality(System.Span{`0},System.Span{`0})">
|
||||
<param name="left"></param>
|
||||
<param name="right"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.op_Implicit(System.ArraySegment{T})~System.Span{T}">
|
||||
<param name="arraySegment"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.op_Implicit(System.Span{T})~System.ReadOnlySpan{T}">
|
||||
<param name="span"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.op_Implicit(T[])~System.Span{T}">
|
||||
<param name="array"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.op_Inequality(System.Span{`0},System.Span{`0})">
|
||||
<param name="left"></param>
|
||||
<param name="right"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.Slice(System.Int32)">
|
||||
<param name="start"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.Slice(System.Int32,System.Int32)">
|
||||
<param name="start"></param>
|
||||
<param name="length"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.ToArray">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.TryCopyTo(System.Span{`0})">
|
||||
<param name="destination"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:System.SpanExtensions">
|
||||
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.AsBytes``1(System.ReadOnlySpan{``0})">
|
||||
<param name="source"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.AsBytes``1(System.Span{``0})">
|
||||
<param name="source"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.AsSpan(System.String)">
|
||||
<param name="text"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.AsSpan``1(System.ArraySegment{``0})">
|
||||
<param name="arraySegment"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.AsSpan``1(``0[])">
|
||||
<param name="array"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.CopyTo``1(``0[],System.Span{``0})">
|
||||
<param name="array"></param>
|
||||
<param name="destination"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf(System.Span{System.Byte},System.Byte)">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf(System.ReadOnlySpan{System.Byte},System.Byte)">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf``1(System.ReadOnlySpan{``0},``0)">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf``1(System.Span{``0},System.ReadOnlySpan{``0})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf``1(System.Span{``0},``0)">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.Byte,System.Byte,System.Byte)">
|
||||
<param name="span"></param>
|
||||
<param name="value0"></param>
|
||||
<param name="value1"></param>
|
||||
<param name="value2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.Byte,System.Byte,System.Byte)">
|
||||
<param name="span"></param>
|
||||
<param name="value0"></param>
|
||||
<param name="value1"></param>
|
||||
<param name="value2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.Byte,System.Byte)">
|
||||
<param name="span"></param>
|
||||
<param name="value0"></param>
|
||||
<param name="value1"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="span"></param>
|
||||
<param name="values"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="span"></param>
|
||||
<param name="values"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.Byte,System.Byte)">
|
||||
<param name="span"></param>
|
||||
<param name="value0"></param>
|
||||
<param name="value1"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.NonPortableCast``2(System.ReadOnlySpan{``0})">
|
||||
<param name="source"></param>
|
||||
<typeparam name="TFrom"></typeparam>
|
||||
<typeparam name="TTo"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.NonPortableCast``2(System.Span{``0})">
|
||||
<param name="source"></param>
|
||||
<typeparam name="TFrom"></typeparam>
|
||||
<typeparam name="TTo"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.SequenceEqual(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="first"></param>
|
||||
<param name="second"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.SequenceEqual(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="first"></param>
|
||||
<param name="second"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.SequenceEqual``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})">
|
||||
<param name="first"></param>
|
||||
<param name="second"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.SequenceEqual``1(System.Span{``0},System.ReadOnlySpan{``0})">
|
||||
<param name="first"></param>
|
||||
<param name="second"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.StartsWith(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.StartsWith(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.StartsWith``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.StartsWith``1(System.Span{``0},System.ReadOnlySpan{``0})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:System.ReadOnlySpan`1">
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.#ctor(`0[])">
|
||||
<param name="array"></param>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.#ctor(System.Void*,System.Int32)">
|
||||
<param name="pointer"></param>
|
||||
<param name="length"></param>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.#ctor(`0[],System.Int32)">
|
||||
<param name="array"></param>
|
||||
<param name="start"></param>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.#ctor(`0[],System.Int32,System.Int32)">
|
||||
<param name="array"></param>
|
||||
<param name="start"></param>
|
||||
<param name="length"></param>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.CopyTo(System.Span{`0})">
|
||||
<param name="destination"></param>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.DangerousCreate(System.Object,`0@,System.Int32)">
|
||||
<param name="obj"></param>
|
||||
<param name="objectData"></param>
|
||||
<param name="length"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.DangerousGetPinnableReference">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.ReadOnlySpan`1.Empty">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.Equals(System.Object)">
|
||||
<param name="obj"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.GetHashCode">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.ReadOnlySpan`1.IsEmpty">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.ReadOnlySpan`1.Item(System.Int32)">
|
||||
<param name="index"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.ReadOnlySpan`1.Length">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.op_Equality(System.ReadOnlySpan{`0},System.ReadOnlySpan{`0})">
|
||||
<param name="left"></param>
|
||||
<param name="right"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.op_Implicit(System.ArraySegment{T})~System.ReadOnlySpan{T}">
|
||||
<param name="arraySegment"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.op_Implicit(T[])~System.ReadOnlySpan{T}">
|
||||
<param name="array"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.op_Inequality(System.ReadOnlySpan{`0},System.ReadOnlySpan{`0})">
|
||||
<param name="left"></param>
|
||||
<param name="right"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.Slice(System.Int32)">
|
||||
<param name="start"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.Slice(System.Int32,System.Int32)">
|
||||
<param name="start"></param>
|
||||
<param name="length"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.ToArray">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.TryCopyTo(System.Span{`0})">
|
||||
<param name="destination"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
<?xml version="1.0" encoding="utf-8"?><doc>
|
||||
<assembly>
|
||||
<name>System.Memory</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:System.Span`1">
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="M:System.Span`1.#ctor(`0[])">
|
||||
<param name="array"></param>
|
||||
</member>
|
||||
<member name="M:System.Span`1.#ctor(System.Void*,System.Int32)">
|
||||
<param name="pointer"></param>
|
||||
<param name="length"></param>
|
||||
</member>
|
||||
<member name="M:System.Span`1.#ctor(`0[],System.Int32)">
|
||||
<param name="array"></param>
|
||||
<param name="start"></param>
|
||||
</member>
|
||||
<member name="M:System.Span`1.#ctor(`0[],System.Int32,System.Int32)">
|
||||
<param name="array"></param>
|
||||
<param name="start"></param>
|
||||
<param name="length"></param>
|
||||
</member>
|
||||
<member name="M:System.Span`1.Clear">
|
||||
|
||||
</member>
|
||||
<member name="M:System.Span`1.CopyTo(System.Span{`0})">
|
||||
<param name="destination"></param>
|
||||
</member>
|
||||
<member name="M:System.Span`1.DangerousCreate(System.Object,`0@,System.Int32)">
|
||||
<param name="obj"></param>
|
||||
<param name="objectData"></param>
|
||||
<param name="length"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.DangerousGetPinnableReference">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.Span`1.Empty">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.Equals(System.Object)">
|
||||
<param name="obj"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.Fill(`0)">
|
||||
<param name="value"></param>
|
||||
</member>
|
||||
<member name="M:System.Span`1.GetHashCode">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.Span`1.IsEmpty">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.Span`1.Item(System.Int32)">
|
||||
<param name="index"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.Span`1.Length">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.op_Equality(System.Span{`0},System.Span{`0})">
|
||||
<param name="left"></param>
|
||||
<param name="right"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.op_Implicit(System.ArraySegment{T})~System.Span{T}">
|
||||
<param name="arraySegment"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.op_Implicit(System.Span{T})~System.ReadOnlySpan{T}">
|
||||
<param name="span"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.op_Implicit(T[])~System.Span{T}">
|
||||
<param name="array"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.op_Inequality(System.Span{`0},System.Span{`0})">
|
||||
<param name="left"></param>
|
||||
<param name="right"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.Slice(System.Int32)">
|
||||
<param name="start"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.Slice(System.Int32,System.Int32)">
|
||||
<param name="start"></param>
|
||||
<param name="length"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.ToArray">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Span`1.TryCopyTo(System.Span{`0})">
|
||||
<param name="destination"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:System.SpanExtensions">
|
||||
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.AsBytes``1(System.ReadOnlySpan{``0})">
|
||||
<param name="source"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.AsBytes``1(System.Span{``0})">
|
||||
<param name="source"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.AsSpan(System.String)">
|
||||
<param name="text"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.AsSpan``1(System.ArraySegment{``0})">
|
||||
<param name="arraySegment"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.AsSpan``1(``0[])">
|
||||
<param name="array"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.CopyTo``1(``0[],System.Span{``0})">
|
||||
<param name="array"></param>
|
||||
<param name="destination"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf(System.Span{System.Byte},System.Byte)">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf(System.ReadOnlySpan{System.Byte},System.Byte)">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf``1(System.ReadOnlySpan{``0},``0)">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf``1(System.Span{``0},System.ReadOnlySpan{``0})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOf``1(System.Span{``0},``0)">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.Byte,System.Byte,System.Byte)">
|
||||
<param name="span"></param>
|
||||
<param name="value0"></param>
|
||||
<param name="value1"></param>
|
||||
<param name="value2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.Byte,System.Byte,System.Byte)">
|
||||
<param name="span"></param>
|
||||
<param name="value0"></param>
|
||||
<param name="value1"></param>
|
||||
<param name="value2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.Byte,System.Byte)">
|
||||
<param name="span"></param>
|
||||
<param name="value0"></param>
|
||||
<param name="value1"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="span"></param>
|
||||
<param name="values"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="span"></param>
|
||||
<param name="values"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.Byte,System.Byte)">
|
||||
<param name="span"></param>
|
||||
<param name="value0"></param>
|
||||
<param name="value1"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.NonPortableCast``2(System.ReadOnlySpan{``0})">
|
||||
<param name="source"></param>
|
||||
<typeparam name="TFrom"></typeparam>
|
||||
<typeparam name="TTo"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.NonPortableCast``2(System.Span{``0})">
|
||||
<param name="source"></param>
|
||||
<typeparam name="TFrom"></typeparam>
|
||||
<typeparam name="TTo"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.SequenceEqual(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="first"></param>
|
||||
<param name="second"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.SequenceEqual(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="first"></param>
|
||||
<param name="second"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.SequenceEqual``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})">
|
||||
<param name="first"></param>
|
||||
<param name="second"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.SequenceEqual``1(System.Span{``0},System.ReadOnlySpan{``0})">
|
||||
<param name="first"></param>
|
||||
<param name="second"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.StartsWith(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.StartsWith(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.StartsWith``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.SpanExtensions.StartsWith``1(System.Span{``0},System.ReadOnlySpan{``0})">
|
||||
<param name="span"></param>
|
||||
<param name="value"></param>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:System.ReadOnlySpan`1">
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.#ctor(`0[])">
|
||||
<param name="array"></param>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.#ctor(System.Void*,System.Int32)">
|
||||
<param name="pointer"></param>
|
||||
<param name="length"></param>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.#ctor(`0[],System.Int32)">
|
||||
<param name="array"></param>
|
||||
<param name="start"></param>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.#ctor(`0[],System.Int32,System.Int32)">
|
||||
<param name="array"></param>
|
||||
<param name="start"></param>
|
||||
<param name="length"></param>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.CopyTo(System.Span{`0})">
|
||||
<param name="destination"></param>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.DangerousCreate(System.Object,`0@,System.Int32)">
|
||||
<param name="obj"></param>
|
||||
<param name="objectData"></param>
|
||||
<param name="length"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.DangerousGetPinnableReference">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.ReadOnlySpan`1.Empty">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.Equals(System.Object)">
|
||||
<param name="obj"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.GetHashCode">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.ReadOnlySpan`1.IsEmpty">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.ReadOnlySpan`1.Item(System.Int32)">
|
||||
<param name="index"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:System.ReadOnlySpan`1.Length">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.op_Equality(System.ReadOnlySpan{`0},System.ReadOnlySpan{`0})">
|
||||
<param name="left"></param>
|
||||
<param name="right"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.op_Implicit(System.ArraySegment{T})~System.ReadOnlySpan{T}">
|
||||
<param name="arraySegment"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.op_Implicit(T[])~System.ReadOnlySpan{T}">
|
||||
<param name="array"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.op_Inequality(System.ReadOnlySpan{`0},System.ReadOnlySpan{`0})">
|
||||
<param name="left"></param>
|
||||
<param name="right"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.Slice(System.Int32)">
|
||||
<param name="start"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.Slice(System.Int32,System.Int32)">
|
||||
<param name="start"></param>
|
||||
<param name="length"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.ToArray">
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.ReadOnlySpan`1.TryCopyTo(System.Span{`0})">
|
||||
<param name="destination"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,291 +1,291 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>System.Runtime.CompilerServices.Unsafe</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:System.Runtime.CompilerServices.Unsafe">
|
||||
<summary>Contains generic, low-level functionality for manipulating pointers.</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.Int32)">
|
||||
<summary>Adds an element offset to the given reference.</summary>
|
||||
<param name="source">The reference to add the offset to.</param>
|
||||
<param name="elementOffset">The offset to add.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the addition of offset to pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.IntPtr)">
|
||||
<summary>Adds an element offset to the given reference.</summary>
|
||||
<param name="source">The reference to add the offset to.</param>
|
||||
<param name="elementOffset">The offset to add.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the addition of offset to pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.UIntPtr)">
|
||||
<summary>Adds an element offset to the given reference.</summary>
|
||||
<param name="source">The reference to add the offset to.</param>
|
||||
<param name="elementOffset">The offset to add.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the addition of offset to pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(System.Void*,System.Int32)">
|
||||
<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="elementOffset">The offset to add.</param>
|
||||
<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>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.AddByteOffset``1(``0@,System.IntPtr)">
|
||||
<summary>Adds a byte offset to the given reference.</summary>
|
||||
<param name="source">The reference to add the offset to.</param>
|
||||
<param name="byteOffset">The offset to add.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the addition of byte offset to pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.AddByteOffset``1(``0@,System.UIntPtr)">
|
||||
<summary>Adds a byte offset to the given reference.</summary>
|
||||
<param name="source">The reference to add the offset to.</param>
|
||||
<param name="byteOffset">The offset to add.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the addition of byte offset to pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.AreSame``1(``0@,``0@)">
|
||||
<summary>Determines whether the specified references point to the same location.</summary>
|
||||
<param name="left">The first reference to compare.</param>
|
||||
<param name="right">The second reference to compare.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>
|
||||
<see langword="true" /> if <paramref name="left" /> and <paramref name="right" /> point to the same location; otherwise, <see langword="false" />.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.As``1(System.Object)">
|
||||
<summary>Casts the given object to the specified type.</summary>
|
||||
<param name="o">The object to cast.</param>
|
||||
<typeparam name="T">The type which the object will be cast to.</typeparam>
|
||||
<returns>The original object, casted to the given type.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="source">The reference to reinterpret.</param>
|
||||
<typeparam name="TFrom">The type of reference to reinterpret.</typeparam>
|
||||
<typeparam name="TTo">The desired type of the reference.</typeparam>
|
||||
<returns>A reference to a value of type <typeparamref name="TTo" />.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.AsPointer``1(``0@)">
|
||||
<summary>Returns a pointer to the given by-ref parameter.</summary>
|
||||
<param name="value">The object whose pointer is obtained.</param>
|
||||
<typeparam name="T">The type of object.</typeparam>
|
||||
<returns>A pointer to the given value.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.AsRef``1(``0@)">
|
||||
<summary>Reinterprets the given read-only reference as a reference.</summary>
|
||||
<param name="source">The read-only reference to reinterpret.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A reference to a value of type <typeparamref name="T" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="source">The location of the value to reference.</param>
|
||||
<typeparam name="T">The type of the interpreted location.</typeparam>
|
||||
<returns>A reference to a value of type <typeparamref name="T" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="origin">The reference to origin.</param>
|
||||
<param name="target">The reference to target.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>Byte offset from origin to target i.e. <paramref name="target" /> - <paramref name="origin" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The location to copy to.</param>
|
||||
<param name="source">A pointer to the value to copy.</param>
|
||||
<typeparam name="T">The type of value to copy.</typeparam>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The location to copy to.</param>
|
||||
<param name="source">A reference to the value to copy.</param>
|
||||
<typeparam name="T">The type of value to copy.</typeparam>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The destination address to copy to.</param>
|
||||
<param name="source">The source address to copy from.</param>
|
||||
<param name="byteCount">The number of bytes to copy.</param>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The destination address to copy to.</param>
|
||||
<param name="source">The source address to copy from.</param>
|
||||
<param name="byteCount">The number of bytes to copy.</param>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The destination address to copy to.</param>
|
||||
<param name="source">The source address to copy from.</param>
|
||||
<param name="byteCount">The number of bytes to copy.</param>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The destination address to copy to.</param>
|
||||
<param name="source">The source address to copy from.</param>
|
||||
<param name="byteCount">The number of bytes to copy.</param>
|
||||
</member>
|
||||
<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>
|
||||
<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="byteCount">The number of bytes to initialize.</param>
|
||||
</member>
|
||||
<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>
|
||||
<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="byteCount">The number of bytes to initialize.</param>
|
||||
</member>
|
||||
<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>
|
||||
<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="byteCount">The number of bytes to initialize.</param>
|
||||
</member>
|
||||
<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>
|
||||
<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="byteCount">The number of bytes to initialize.</param>
|
||||
</member>
|
||||
<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>
|
||||
<param name="left">The first value to compare.</param>
|
||||
<param name="right">The second value to compare.</param>
|
||||
<typeparam name="T">The type of the reference.</typeparam>
|
||||
<returns>
|
||||
<see langword="true" /> if <paramref name="left" /> is greater than <paramref name="right" />; otherwise, <see langword="false" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="left">The first value to compare.</param>
|
||||
<param name="right">The second value to compare.</param>
|
||||
<typeparam name="T">The type of the reference.</typeparam>
|
||||
<returns>
|
||||
<see langword="true" /> if <paramref name="left" /> is less than <paramref name="right" />; otherwise, <see langword="false" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="source">The reference to check.</param>
|
||||
<typeparam name="T">The type of the reference.</typeparam>
|
||||
<returns>
|
||||
<see langword="true" /> if <paramref name="source" /> is a null reference; otherwise, <see langword="false" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<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>
|
||||
</member>
|
||||
<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>
|
||||
<param name="source">The location to read from.</param>
|
||||
<typeparam name="T">The type to read.</typeparam>
|
||||
<returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="source">The location to read from.</param>
|
||||
<typeparam name="T">The type to read.</typeparam>
|
||||
<returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="source">The location to read from.</param>
|
||||
<typeparam name="T">The type to read.</typeparam>
|
||||
<returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.SizeOf``1">
|
||||
<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>
|
||||
<returns>The size of an object of type <typeparamref name="T" />.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.SkipInit``1(``0@)">
|
||||
<summary>Bypasses definite assignment rules for a given value.</summary>
|
||||
<param name="value">The uninitialized object.</param>
|
||||
<typeparam name="T">The type of the uninitialized object.</typeparam>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.Int32)">
|
||||
<summary>Subtracts an element offset from the given reference.</summary>
|
||||
<param name="source">The reference to subtract the offset from.</param>
|
||||
<param name="elementOffset">The offset to subtract.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the subtraction of offset from pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.IntPtr)">
|
||||
<summary>Subtracts an element offset from the given reference.</summary>
|
||||
<param name="source">The reference to subtract the offset from.</param>
|
||||
<param name="elementOffset">The offset to subtract.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the subtraction of offset from pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.UIntPtr)">
|
||||
<summary>Subtracts an element offset from the given reference.</summary>
|
||||
<param name="source">The reference to subtract the offset from.</param>
|
||||
<param name="elementOffset">The offset to subtract.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the subraction of offset from pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(System.Void*,System.Int32)">
|
||||
<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="elementOffset">The offset to subtract.</param>
|
||||
<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>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.SubtractByteOffset``1(``0@,System.IntPtr)">
|
||||
<summary>Subtracts a byte offset from the given reference.</summary>
|
||||
<param name="source">The reference to subtract the offset from.</param>
|
||||
<param name="byteOffset">The offset to subtract.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the subtraction of byte offset from pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.SubtractByteOffset``1(``0@,System.UIntPtr)">
|
||||
<summary>Subtracts a byte offset from the given reference.</summary>
|
||||
<param name="source">The reference to subtract the offset from.</param>
|
||||
<param name="byteOffset">The offset to subtract.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the subraction of byte offset from pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Unbox``1(System.Object)">
|
||||
<summary>Returns a <see langword="mutable ref" /> to a boxed value.</summary>
|
||||
<param name="box">The value to unbox.</param>
|
||||
<typeparam name="T">The type to be unboxed.</typeparam>
|
||||
<exception cref="T:System.NullReferenceException">
|
||||
<paramref name="box" /> is <see langword="null" />, and <typeparamref name="T" /> is a non-nullable value type.</exception>
|
||||
<exception cref="T:System.InvalidCastException">
|
||||
<paramref name="box" /> is not a boxed value type.
|
||||
|
||||
-or-
|
||||
|
||||
<paramref name="box" /> is not a boxed <typeparamref name="T" />.</exception>
|
||||
<exception cref="T:System.TypeLoadException">
|
||||
<typeparamref name="T" /> cannot be found.</exception>
|
||||
<returns>A <see langword="mutable ref" /> to the boxed value <paramref name="box" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The location to write to.</param>
|
||||
<param name="value">The value to write.</param>
|
||||
<typeparam name="T">The type of value to write.</typeparam>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The location to write to.</param>
|
||||
<param name="value">The value to write.</param>
|
||||
<typeparam name="T">The type of value to write.</typeparam>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The location to write to.</param>
|
||||
<param name="value">The value to write.</param>
|
||||
<typeparam name="T">The type of value to write.</typeparam>
|
||||
</member>
|
||||
</members>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>System.Runtime.CompilerServices.Unsafe</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:System.Runtime.CompilerServices.Unsafe">
|
||||
<summary>Contains generic, low-level functionality for manipulating pointers.</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.Int32)">
|
||||
<summary>Adds an element offset to the given reference.</summary>
|
||||
<param name="source">The reference to add the offset to.</param>
|
||||
<param name="elementOffset">The offset to add.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the addition of offset to pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.IntPtr)">
|
||||
<summary>Adds an element offset to the given reference.</summary>
|
||||
<param name="source">The reference to add the offset to.</param>
|
||||
<param name="elementOffset">The offset to add.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the addition of offset to pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.UIntPtr)">
|
||||
<summary>Adds an element offset to the given reference.</summary>
|
||||
<param name="source">The reference to add the offset to.</param>
|
||||
<param name="elementOffset">The offset to add.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the addition of offset to pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(System.Void*,System.Int32)">
|
||||
<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="elementOffset">The offset to add.</param>
|
||||
<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>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.AddByteOffset``1(``0@,System.IntPtr)">
|
||||
<summary>Adds a byte offset to the given reference.</summary>
|
||||
<param name="source">The reference to add the offset to.</param>
|
||||
<param name="byteOffset">The offset to add.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the addition of byte offset to pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.AddByteOffset``1(``0@,System.UIntPtr)">
|
||||
<summary>Adds a byte offset to the given reference.</summary>
|
||||
<param name="source">The reference to add the offset to.</param>
|
||||
<param name="byteOffset">The offset to add.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the addition of byte offset to pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.AreSame``1(``0@,``0@)">
|
||||
<summary>Determines whether the specified references point to the same location.</summary>
|
||||
<param name="left">The first reference to compare.</param>
|
||||
<param name="right">The second reference to compare.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>
|
||||
<see langword="true" /> if <paramref name="left" /> and <paramref name="right" /> point to the same location; otherwise, <see langword="false" />.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.As``1(System.Object)">
|
||||
<summary>Casts the given object to the specified type.</summary>
|
||||
<param name="o">The object to cast.</param>
|
||||
<typeparam name="T">The type which the object will be cast to.</typeparam>
|
||||
<returns>The original object, casted to the given type.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="source">The reference to reinterpret.</param>
|
||||
<typeparam name="TFrom">The type of reference to reinterpret.</typeparam>
|
||||
<typeparam name="TTo">The desired type of the reference.</typeparam>
|
||||
<returns>A reference to a value of type <typeparamref name="TTo" />.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.AsPointer``1(``0@)">
|
||||
<summary>Returns a pointer to the given by-ref parameter.</summary>
|
||||
<param name="value">The object whose pointer is obtained.</param>
|
||||
<typeparam name="T">The type of object.</typeparam>
|
||||
<returns>A pointer to the given value.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.AsRef``1(``0@)">
|
||||
<summary>Reinterprets the given read-only reference as a reference.</summary>
|
||||
<param name="source">The read-only reference to reinterpret.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A reference to a value of type <typeparamref name="T" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="source">The location of the value to reference.</param>
|
||||
<typeparam name="T">The type of the interpreted location.</typeparam>
|
||||
<returns>A reference to a value of type <typeparamref name="T" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="origin">The reference to origin.</param>
|
||||
<param name="target">The reference to target.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>Byte offset from origin to target i.e. <paramref name="target" /> - <paramref name="origin" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The location to copy to.</param>
|
||||
<param name="source">A pointer to the value to copy.</param>
|
||||
<typeparam name="T">The type of value to copy.</typeparam>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The location to copy to.</param>
|
||||
<param name="source">A reference to the value to copy.</param>
|
||||
<typeparam name="T">The type of value to copy.</typeparam>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The destination address to copy to.</param>
|
||||
<param name="source">The source address to copy from.</param>
|
||||
<param name="byteCount">The number of bytes to copy.</param>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The destination address to copy to.</param>
|
||||
<param name="source">The source address to copy from.</param>
|
||||
<param name="byteCount">The number of bytes to copy.</param>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The destination address to copy to.</param>
|
||||
<param name="source">The source address to copy from.</param>
|
||||
<param name="byteCount">The number of bytes to copy.</param>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The destination address to copy to.</param>
|
||||
<param name="source">The source address to copy from.</param>
|
||||
<param name="byteCount">The number of bytes to copy.</param>
|
||||
</member>
|
||||
<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>
|
||||
<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="byteCount">The number of bytes to initialize.</param>
|
||||
</member>
|
||||
<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>
|
||||
<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="byteCount">The number of bytes to initialize.</param>
|
||||
</member>
|
||||
<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>
|
||||
<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="byteCount">The number of bytes to initialize.</param>
|
||||
</member>
|
||||
<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>
|
||||
<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="byteCount">The number of bytes to initialize.</param>
|
||||
</member>
|
||||
<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>
|
||||
<param name="left">The first value to compare.</param>
|
||||
<param name="right">The second value to compare.</param>
|
||||
<typeparam name="T">The type of the reference.</typeparam>
|
||||
<returns>
|
||||
<see langword="true" /> if <paramref name="left" /> is greater than <paramref name="right" />; otherwise, <see langword="false" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="left">The first value to compare.</param>
|
||||
<param name="right">The second value to compare.</param>
|
||||
<typeparam name="T">The type of the reference.</typeparam>
|
||||
<returns>
|
||||
<see langword="true" /> if <paramref name="left" /> is less than <paramref name="right" />; otherwise, <see langword="false" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="source">The reference to check.</param>
|
||||
<typeparam name="T">The type of the reference.</typeparam>
|
||||
<returns>
|
||||
<see langword="true" /> if <paramref name="source" /> is a null reference; otherwise, <see langword="false" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<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>
|
||||
</member>
|
||||
<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>
|
||||
<param name="source">The location to read from.</param>
|
||||
<typeparam name="T">The type to read.</typeparam>
|
||||
<returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="source">The location to read from.</param>
|
||||
<typeparam name="T">The type to read.</typeparam>
|
||||
<returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="source">The location to read from.</param>
|
||||
<typeparam name="T">The type to read.</typeparam>
|
||||
<returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.SizeOf``1">
|
||||
<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>
|
||||
<returns>The size of an object of type <typeparamref name="T" />.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.SkipInit``1(``0@)">
|
||||
<summary>Bypasses definite assignment rules for a given value.</summary>
|
||||
<param name="value">The uninitialized object.</param>
|
||||
<typeparam name="T">The type of the uninitialized object.</typeparam>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.Int32)">
|
||||
<summary>Subtracts an element offset from the given reference.</summary>
|
||||
<param name="source">The reference to subtract the offset from.</param>
|
||||
<param name="elementOffset">The offset to subtract.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the subtraction of offset from pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.IntPtr)">
|
||||
<summary>Subtracts an element offset from the given reference.</summary>
|
||||
<param name="source">The reference to subtract the offset from.</param>
|
||||
<param name="elementOffset">The offset to subtract.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the subtraction of offset from pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.UIntPtr)">
|
||||
<summary>Subtracts an element offset from the given reference.</summary>
|
||||
<param name="source">The reference to subtract the offset from.</param>
|
||||
<param name="elementOffset">The offset to subtract.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the subraction of offset from pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(System.Void*,System.Int32)">
|
||||
<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="elementOffset">The offset to subtract.</param>
|
||||
<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>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.SubtractByteOffset``1(``0@,System.IntPtr)">
|
||||
<summary>Subtracts a byte offset from the given reference.</summary>
|
||||
<param name="source">The reference to subtract the offset from.</param>
|
||||
<param name="byteOffset">The offset to subtract.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the subtraction of byte offset from pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.SubtractByteOffset``1(``0@,System.UIntPtr)">
|
||||
<summary>Subtracts a byte offset from the given reference.</summary>
|
||||
<param name="source">The reference to subtract the offset from.</param>
|
||||
<param name="byteOffset">The offset to subtract.</param>
|
||||
<typeparam name="T">The type of reference.</typeparam>
|
||||
<returns>A new reference that reflects the subraction of byte offset from pointer.</returns>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.Unsafe.Unbox``1(System.Object)">
|
||||
<summary>Returns a <see langword="mutable ref" /> to a boxed value.</summary>
|
||||
<param name="box">The value to unbox.</param>
|
||||
<typeparam name="T">The type to be unboxed.</typeparam>
|
||||
<exception cref="T:System.NullReferenceException">
|
||||
<paramref name="box" /> is <see langword="null" />, and <typeparamref name="T" /> is a non-nullable value type.</exception>
|
||||
<exception cref="T:System.InvalidCastException">
|
||||
<paramref name="box" /> is not a boxed value type.
|
||||
|
||||
-or-
|
||||
|
||||
<paramref name="box" /> is not a boxed <typeparamref name="T" />.</exception>
|
||||
<exception cref="T:System.TypeLoadException">
|
||||
<typeparamref name="T" /> cannot be found.</exception>
|
||||
<returns>A <see langword="mutable ref" /> to the boxed value <paramref name="box" />.</returns>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The location to write to.</param>
|
||||
<param name="value">The value to write.</param>
|
||||
<typeparam name="T">The type of value to write.</typeparam>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The location to write to.</param>
|
||||
<param name="value">The value to write.</param>
|
||||
<typeparam name="T">The type of value to write.</typeparam>
|
||||
</member>
|
||||
<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>
|
||||
<param name="destination">The location to write to.</param>
|
||||
<param name="value">The value to write.</param>
|
||||
<typeparam name="T">The type of value to write.</typeparam>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>System.ValueTuple</name>
|
||||
</assembly>
|
||||
<members>
|
||||
</members>
|
||||
</doc>
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>System.ValueTuple</name>
|
||||
</assembly>
|
||||
<members>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<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" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<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" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user