From 7ebd07cf143fab8b65d0b8d6d5017315ff427830 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 1 Apr 2019 16:49:24 +0200 Subject: [PATCH] Add ADSync Test Project, ActiveDirectoryInterface --- ADSyncTest/ADSyncTest.vbproj | 142 ++++++++++++++++++ ADSyncTest/App.config | 6 + ADSyncTest/Form1.Designer.vb | 61 ++++++++ ADSyncTest/Form1.resx | 120 +++++++++++++++ ADSyncTest/Form1.vb | 21 +++ ADSyncTest/My Project/Application.Designer.vb | 38 +++++ ADSyncTest/My Project/Application.myapp | 11 ++ ADSyncTest/My Project/AssemblyInfo.vb | 35 +++++ ADSyncTest/My Project/Resources.Designer.vb | 62 ++++++++ ADSyncTest/My Project/Resources.resx | 117 +++++++++++++++ ADSyncTest/My Project/Settings.Designer.vb | 73 +++++++++ ADSyncTest/My Project/Settings.settings | 7 + ADSyncTest/packages.config | 4 + DDMonorepo.sln | 7 + .../ActiveDirectoryInterface.vb | 124 +++++++++++++++ .../ActiveDirectoryGroup.vb | 13 ++ Modules.Interfaces/Interfaces.vbproj | 13 +- Modules.Interfaces/ZUGFeRDInterface.vb | 2 +- .../CrossIndustryDocumentType.vb | 0 .../{ => ZUGFeRDInterface}/Exceptions.vb | 0 .../pdf_zugferd_lib.dll | Bin .../pdf_zugferd_lib.lib | Bin .../pdf_zugferd_test.exe | Bin Modules.Interfaces/packages.config | 1 - 24 files changed, 850 insertions(+), 7 deletions(-) create mode 100644 ADSyncTest/ADSyncTest.vbproj create mode 100644 ADSyncTest/App.config create mode 100644 ADSyncTest/Form1.Designer.vb create mode 100644 ADSyncTest/Form1.resx create mode 100644 ADSyncTest/Form1.vb create mode 100644 ADSyncTest/My Project/Application.Designer.vb create mode 100644 ADSyncTest/My Project/Application.myapp create mode 100644 ADSyncTest/My Project/AssemblyInfo.vb create mode 100644 ADSyncTest/My Project/Resources.Designer.vb create mode 100644 ADSyncTest/My Project/Resources.resx create mode 100644 ADSyncTest/My Project/Settings.Designer.vb create mode 100644 ADSyncTest/My Project/Settings.settings create mode 100644 ADSyncTest/packages.config create mode 100644 Modules.Interfaces/ActiveDirectoryInterface.vb create mode 100644 Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryGroup.vb rename Modules.Interfaces/{ => ZUGFeRDInterface}/CrossIndustryDocumentType.vb (100%) rename Modules.Interfaces/{ => ZUGFeRDInterface}/Exceptions.vb (100%) rename Modules.Interfaces/{ => ZUGFeRDInterface}/pdf_zugferd_lib.dll (100%) rename Modules.Interfaces/{ => ZUGFeRDInterface}/pdf_zugferd_lib.lib (100%) rename Modules.Interfaces/{ => ZUGFeRDInterface}/pdf_zugferd_test.exe (100%) diff --git a/ADSyncTest/ADSyncTest.vbproj b/ADSyncTest/ADSyncTest.vbproj new file mode 100644 index 00000000..9698bbf5 --- /dev/null +++ b/ADSyncTest/ADSyncTest.vbproj @@ -0,0 +1,142 @@ + + + + + Debug + AnyCPU + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E} + WinExe + ADSyncTest.My.MyApplication + ADSyncTest + ADSyncTest + 512 + WindowsForms + v4.6.1 + true + + + AnyCPU + true + full + true + true + bin\Debug\ + ADSyncTest.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + AnyCPU + pdbonly + false + true + true + bin\Release\ + ADSyncTest.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + + ..\packages\NLog.4.5.11\lib\net45\NLog.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + Form1.vb + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + Form1.vb + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + + + {AB6F09BF-E794-4F6A-94BB-C97C0BA84D64} + Interfaces + + + {903B2D7D-3B80-4BE9-8713-7447B704E1B0} + Logging + + + + \ No newline at end of file diff --git a/ADSyncTest/App.config b/ADSyncTest/App.config new file mode 100644 index 00000000..5534e287 --- /dev/null +++ b/ADSyncTest/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ADSyncTest/Form1.Designer.vb b/ADSyncTest/Form1.Designer.vb new file mode 100644 index 00000000..25f72448 --- /dev/null +++ b/ADSyncTest/Form1.Designer.vb @@ -0,0 +1,61 @@ + _ +Partial Class Form1 + Inherits System.Windows.Forms.Form + + 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Wird vom Windows Form-Designer benötigt. + Private components As System.ComponentModel.IContainer + + 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. + 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. + 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. + _ + Private Sub InitializeComponent() + Me.Button1 = New System.Windows.Forms.Button() + Me.ListBox1 = New System.Windows.Forms.ListBox() + Me.SuspendLayout() + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(12, 12) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(227, 52) + Me.Button1.TabIndex = 0 + Me.Button1.Text = "Sync" + Me.Button1.UseVisualStyleBackColor = True + ' + 'ListBox1 + ' + Me.ListBox1.FormattingEnabled = True + Me.ListBox1.Location = New System.Drawing.Point(245, 12) + Me.ListBox1.Name = "ListBox1" + Me.ListBox1.Size = New System.Drawing.Size(543, 420) + Me.ListBox1.TabIndex = 1 + ' + 'Form1 + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.ListBox1) + Me.Controls.Add(Me.Button1) + Me.Name = "Form1" + Me.Text = "Form1" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents Button1 As Button + Friend WithEvents ListBox1 As ListBox +End Class diff --git a/ADSyncTest/Form1.resx b/ADSyncTest/Form1.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/ADSyncTest/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ADSyncTest/Form1.vb b/ADSyncTest/Form1.vb new file mode 100644 index 00000000..2514f9b0 --- /dev/null +++ b/ADSyncTest/Form1.vb @@ -0,0 +1,21 @@ +Imports DigitalData.Modules.Interfaces +Imports DigitalData.Modules.Logging + +Public Class Form1 + Private _sync As ActiveDirectoryInterface + Private _logConfig As LogConfig + Private _logger As Logger + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + _logConfig = New LogConfig(LogConfig.PathType.CurrentDirectory) + _logger = _logConfig.GetLogger() + _sync = New ActiveDirectoryInterface(_logConfig) + _sync.Authenticate() + + Dim oGroups = _sync.ListGroups() + + For Each oGroup In oGroups + ListBox1.Items.Add(oGroup.SAMAccountName) + Next + End Sub +End Class diff --git a/ADSyncTest/My Project/Application.Designer.vb b/ADSyncTest/My Project/Application.Designer.vb new file mode 100644 index 00000000..2d8e77ac --- /dev/null +++ b/ADSyncTest/My Project/Application.Designer.vb @@ -0,0 +1,38 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + 'NOTE: This file is auto-generated; do not modify it directly. To make changes, + ' or if you encounter build errors in this file, go to the Project Designer + ' (go to Project Properties or double-click the My Project node in + ' Solution Explorer), and make changes on the Application tab. + ' + Partial Friend Class MyApplication + + _ + Public Sub New() + MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) + Me.IsSingleInstance = false + Me.EnableVisualStyles = true + Me.SaveMySettingsOnExit = true + Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses + End Sub + + _ + Protected Overrides Sub OnCreateMainForm() + Me.MainForm = Global.ADSyncTest.Form1 + End Sub + End Class +End Namespace diff --git a/ADSyncTest/My Project/Application.myapp b/ADSyncTest/My Project/Application.myapp new file mode 100644 index 00000000..1243847f --- /dev/null +++ b/ADSyncTest/My Project/Application.myapp @@ -0,0 +1,11 @@ + + + true + Form1 + false + 0 + true + 0 + 0 + true + diff --git a/ADSyncTest/My Project/AssemblyInfo.vb b/ADSyncTest/My Project/AssemblyInfo.vb new file mode 100644 index 00000000..3184d7f5 --- /dev/null +++ b/ADSyncTest/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' Allgemeine Informationen über eine Assembly werden über die folgenden +' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +' die einer Assembly zugeordnet sind. + +' Werte der Assemblyattribute überprüfen + + + + + + + + + + +'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird. + + +' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +' +' Hauptversion +' Nebenversion +' Buildnummer +' Revision +' +' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +' übernehmen, indem Sie "*" eingeben: +' + + + diff --git a/ADSyncTest/My Project/Resources.Designer.vb b/ADSyncTest/My Project/Resources.Designer.vb new file mode 100644 index 00000000..7dc5da1d --- /dev/null +++ b/ADSyncTest/My Project/Resources.Designer.vb @@ -0,0 +1,62 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("ADSyncTest.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set(ByVal value As Global.System.Globalization.CultureInfo) + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/ADSyncTest/My Project/Resources.resx b/ADSyncTest/My Project/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/ADSyncTest/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ADSyncTest/My Project/Settings.Designer.vb b/ADSyncTest/My Project/Settings.Designer.vb new file mode 100644 index 00000000..54718620 --- /dev/null +++ b/ADSyncTest/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.ADSyncTest.My.MySettings + Get + Return Global.ADSyncTest.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/ADSyncTest/My Project/Settings.settings b/ADSyncTest/My Project/Settings.settings new file mode 100644 index 00000000..85b890b3 --- /dev/null +++ b/ADSyncTest/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ADSyncTest/packages.config b/ADSyncTest/packages.config new file mode 100644 index 00000000..f89fa324 --- /dev/null +++ b/ADSyncTest/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/DDMonorepo.sln b/DDMonorepo.sln index dd0beef4..f75b5acb 100644 --- a/DDMonorepo.sln +++ b/DDMonorepo.sln @@ -67,6 +67,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DDEDMLicenseService", "DDLi EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "License", "Modules.License\License.vbproj", "{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}" EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ADSyncTest", "ADSyncTest\ADSyncTest.vbproj", "{7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -165,6 +167,10 @@ Global {5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Release|Any CPU.Build.0 = Release|Any CPU + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -193,6 +199,7 @@ Global {5B1171DC-FFFE-4813-A20D-786AAE47B320} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {CBE9322E-67A1-4CC5-B25F-4A1B4C9FC55C} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} {5EBACBFA-F11A-4BBF-8D02-91461F2293ED} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286} diff --git a/Modules.Interfaces/ActiveDirectoryInterface.vb b/Modules.Interfaces/ActiveDirectoryInterface.vb new file mode 100644 index 00000000..75a724bf --- /dev/null +++ b/Modules.Interfaces/ActiveDirectoryInterface.vb @@ -0,0 +1,124 @@ +Imports System.DirectoryServices +Imports DigitalData.Modules.Logging + +Public Class ActiveDirectoryInterface + Private _logConfig As LogConfig + Private _logger As Logger + + Private _rootPath As String + Private _rootNode As DirectoryEntry + + Private Const SEARCH_LIMIT = 50000 + + Private Const SAMACCOUNTNAME = "samaccountname" + Private Const OBJECTCLASS = "objectClass" + Private Const CN = "cn" + Private Const DESCRIPTION = "description" + Private Const DISINGUISHEDNAME = "distinguishedName" + Private Const NAME = "name" + Private Const OBJECTCATEGORY = "objectCategory" + + Public Sub New(LogConfig As LogConfig, Optional RootPath As String = Nothing) + _logConfig = LogConfig + _logger = _logConfig.GetLogger() + If RootPath Is Nothing Then + _rootPath = $"LDAP://{Environment.UserDomainName}" + Else + _rootPath = RootPath + End If + End Sub + + Private Function GetRootNode() As DirectoryEntry + Dim oEntry As New DirectoryEntry(_rootPath) With { + .AuthenticationType = AuthenticationTypes.Secure, + .Password = Nothing, + .Username = Nothing + } + + Return oEntry + End Function + Private Function GetRootNode(Username As String, Password As String) As DirectoryEntry + Dim oEntry As New DirectoryEntry(_rootPath) With { + .AuthenticationType = AuthenticationTypes.Secure, + .Password = Username, + .Username = Password + } + + Return oEntry + End Function + + Public Sub Authenticate() + Try + Dim oEntry = GetRootNode() + oEntry.RefreshCache() + + _rootNode = oEntry + Catch ex As Exception + _logger.Error(ex) + _logger.Warn("Could not authenticate with Active Directory.") + End Try + End Sub + Public Sub Authenticate(Username As String, Password As String) + Try + Dim oEntry = GetRootNode(Username, Password) + oEntry.RefreshCache() + + _rootNode = oEntry + Catch ex As Exception + _logger.Error(ex) + _logger.Warn("Could not authenticate with Active Directory.") + End Try + End Sub + + Public Function ListGroups() As List(Of ADGroup) + Return ListGroups(_rootNode) + End Function + + Public Function ListGroups(RootNode As DirectoryEntry) As List(Of ADGroup) + Dim oGroups As New List(Of ADGroup) + + Try + Dim oFilterQuery As String = "(&(objectClass=group) (samAccountName=*))" + Dim oDirectorySearcher As New DirectorySearcher(RootNode) With { + .SearchScope = SearchScope.Subtree, + .SizeLimit = SEARCH_LIMIT, + .Filter = oFilterQuery + } + Dim oResults As SearchResultCollection = oDirectorySearcher.FindAll() + + _logger.Info("Found {0} Groups.", oResults.Count) + + Return GroupResultsToList(oResults) + Catch ex As Exception + _logger.Error(ex) + Return oGroups + End Try + End Function + + Private Function GroupResultsToList(Results As SearchResultCollection) As List(Of ADGroup) + Dim oGroups As New List(Of ADGroup) + + For Each oResult As SearchResult In Results + oGroups.Add(New ADGroup() With { + .Name = TryGetProperty(oResult, NAME), + .SAMAccountName = TryGetProperty(oResult, SAMACCOUNTNAME), + .CN = TryGetProperty(oResult, CN), + .Description = TryGetProperty(oResult, DESCRIPTION), + .DistinguishedName = TryGetProperty(oResult, DISINGUISHEDNAME), + .ObjectCategory = TryGetProperty(oResult, OBJECTCATEGORY), + .ObjectClass = TryGetProperty(oResult, OBJECTCLASS) + }) + Next + + Return oGroups + End Function + + Private Function TryGetProperty(Result As SearchResult, PropertyName As String) As String + Try + Return Result.Properties.Item(PropertyName).Item(0) + Catch ex As Exception + _logger.Warn("Property {0} not found") + Return String.Empty + End Try + End Function +End Class diff --git a/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryGroup.vb b/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryGroup.vb new file mode 100644 index 00000000..8535f34b --- /dev/null +++ b/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryGroup.vb @@ -0,0 +1,13 @@ +Public Class ADGroup + Public SAMAccountName As String + Public ObjectClass As String + Public CN As String + Public Description As String + Public DistinguishedName As String + Public Name As String + Public ObjectCategory As String + + Public Overrides Function ToString() As String + Return $"SAMAccountName={SAMAccountName}, ObjectClass={ObjectClass}, CN={CN}, Description={Description}, DistinguishedName={DistinguishedName}, Name={Name}, ObjectCategory={ObjectCategory}" + End Function +End Class diff --git a/Modules.Interfaces/Interfaces.vbproj b/Modules.Interfaces/Interfaces.vbproj index e3996de3..5da6ef29 100644 --- a/Modules.Interfaces/Interfaces.vbproj +++ b/Modules.Interfaces/Interfaces.vbproj @@ -50,6 +50,7 @@ + @@ -72,7 +73,9 @@ - + + + True @@ -88,7 +91,7 @@ Settings.settings True - + @@ -110,7 +113,7 @@ Settings.Designer.vb - + PreserveNewest @@ -121,10 +124,10 @@ - + PreserveNewest - + PreserveNewest diff --git a/Modules.Interfaces/ZUGFeRDInterface.vb b/Modules.Interfaces/ZUGFeRDInterface.vb index 67531f29..39a91fe1 100644 --- a/Modules.Interfaces/ZUGFeRDInterface.vb +++ b/Modules.Interfaces/ZUGFeRDInterface.vb @@ -9,7 +9,7 @@ Public Class ZUGFeRDInterface Private _logConfig As LogConfig Private _logger As Logger - Private Const ZUGFERD_CONVERTER_EXE = "pdf_zugferd_test.exe" + Private Const ZUGFERD_CONVERTER_EXE = "ZUGFeRDInterface\pdf_zugferd_test.exe" Private Const ZUGFERD_CONVERTER_SUCCESS_MESSAGE = "Document contains ZUGFeRD data." Public Enum ErrorType diff --git a/Modules.Interfaces/CrossIndustryDocumentType.vb b/Modules.Interfaces/ZUGFeRDInterface/CrossIndustryDocumentType.vb similarity index 100% rename from Modules.Interfaces/CrossIndustryDocumentType.vb rename to Modules.Interfaces/ZUGFeRDInterface/CrossIndustryDocumentType.vb diff --git a/Modules.Interfaces/Exceptions.vb b/Modules.Interfaces/ZUGFeRDInterface/Exceptions.vb similarity index 100% rename from Modules.Interfaces/Exceptions.vb rename to Modules.Interfaces/ZUGFeRDInterface/Exceptions.vb diff --git a/Modules.Interfaces/pdf_zugferd_lib.dll b/Modules.Interfaces/ZUGFeRDInterface/pdf_zugferd_lib.dll similarity index 100% rename from Modules.Interfaces/pdf_zugferd_lib.dll rename to Modules.Interfaces/ZUGFeRDInterface/pdf_zugferd_lib.dll diff --git a/Modules.Interfaces/pdf_zugferd_lib.lib b/Modules.Interfaces/ZUGFeRDInterface/pdf_zugferd_lib.lib similarity index 100% rename from Modules.Interfaces/pdf_zugferd_lib.lib rename to Modules.Interfaces/ZUGFeRDInterface/pdf_zugferd_lib.lib diff --git a/Modules.Interfaces/pdf_zugferd_test.exe b/Modules.Interfaces/ZUGFeRDInterface/pdf_zugferd_test.exe similarity index 100% rename from Modules.Interfaces/pdf_zugferd_test.exe rename to Modules.Interfaces/ZUGFeRDInterface/pdf_zugferd_test.exe diff --git a/Modules.Interfaces/packages.config b/Modules.Interfaces/packages.config index dba90a58..f89fa324 100644 --- a/Modules.Interfaces/packages.config +++ b/Modules.Interfaces/packages.config @@ -1,5 +1,4 @@  - \ No newline at end of file