diff --git a/Encryption/Compression.vb b/Encryption/Compression.vb deleted file mode 100644 index a1d5027e..00000000 --- a/Encryption/Compression.vb +++ /dev/null @@ -1,70 +0,0 @@ -Imports System.IO -Imports System.IO.Compression -Imports DigitalData.Modules.Logging - -Public Class Compression - Private ReadOnly _logger As Logger - - Public Sub New(LogConfig As LogConfig) - _logger = LogConfig.GetLogger() - End Sub - - Public Async Function CompressAsync(data As Byte()) As Task(Of Byte()) - Return Await Task.Run(Function() As Byte() - Return Compress(data) - End Function) - End Function - - Public Function Compress(data As Byte()) As Byte() - Try - ' ByteArray in Stream umwandeln - Using originalStream As New MemoryStream(data) - ' Ziel Stream erstellen - Using compressedStream As New MemoryStream() - ' Gzip-Stream erstellen, der alle Daten komprimiert und zu compressedStream durchleitet - ' - ' > MemoryStream > GzipStream > MemoryStream - ' originalStream --> compressionStream --> compressedFileStream - ' - Using compressionStream As New GZipStream(compressedStream, CompressionMode.Compress) - originalStream.CopyTo(compressionStream) - compressionStream.Close() - Return compressedStream.ToArray() - End Using - End Using - End Using - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Public Async Function DecompressAsync(data As Byte()) As Task(Of Byte()) - Return Await Task.Run(Function() As Byte() - Return Decompress(data) - End Function) - End Function - - Public Function Decompress(data As Byte()) As Byte() - Try - ' ByteArray in Stream umwandeln - Using compressedStream As New MemoryStream(data) - ' Ziel Stream erstellen - Using decompressedStream As New MemoryStream() - ' Gzip-Stream erstellen, der alle Daten komprimiert und zu compressedStream durchleitet - ' - ' > MemoryStream > GzipStream > MemoryStream - ' compressedStream --> decompressionStream --> decompressedStream - ' - Using decompressionStream As New GZipStream(compressedStream, CompressionMode.Decompress) - decompressionStream.CopyTo(decompressedStream) - Return decompressedStream.ToArray() - End Using - End Using - End Using - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function -End Class diff --git a/Encryption/Encryption.vb b/Encryption/Encryption.vb deleted file mode 100644 index 1ec620de..00000000 --- a/Encryption/Encryption.vb +++ /dev/null @@ -1,148 +0,0 @@ -Imports System.IO -Imports System.Security.Cryptography -Imports System.Text.Encoding -Imports DigitalData.Modules.Logging - -''' -''' https://stackoverflow.com/questions/10168240/encrypting-decrypting-a-string-in-c-sharp -''' -Public Class Encryption - ' This constant is used to determine the keysize of the encryption algorithm in bits. - ' We divide this by 8 within the code below to get the equivalent number of bytes. - Private Const KEY_SIZE As Integer = 256 - ' This constant determines the number of iterations for the password bytes generation function. - Private Const DERIVATION_ITERATIONS As Integer = 1000 - Private Const BLOCK_SIZE As Integer = 256 - - Private _paddingMode As PaddingMode = PaddingMode.Zeros - Private _cipherMode As CipherMode = CipherMode.CBC - - Private ReadOnly _password As String - Private _logger As Logger - - Public Sub New(LogConfig As LogConfig, Password As String) - _logger = LogConfig.GetLogger() - - If IsNothing(Password) Then - Throw New ArgumentNullException("Password") - End If - - _password = Password - End Sub - - Public Async Function EncryptAsync(PlainTextBytes As Byte()) As Task(Of Byte()) - Return Await Task.Run(Function() As Byte() - Return Encrypt(PlainTextBytes) - End Function) - End Function - - Public Function Encrypt(PlainText As String) As String - Try - Dim oBytes As Byte() = UTF8.GetBytes(PlainText) - Dim oEncrypted As Byte() = Encrypt(oBytes) - Return UTF8.GetString(oEncrypted) - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Public Function Encrypt(PlainTextBytes As Byte()) As Byte() - Try - ' Salt and IV is randomly generated each time, but is preprended to encrypted cipher text - ' so that the same Salt and IV values can be used when decrypting. - Dim oSaltStringBytes = Generate256BitsOfRandomEntropy() - Dim oIvStringBytes = Generate256BitsOfRandomEntropy() - Using oPassword = New Rfc2898DeriveBytes(_password, oSaltStringBytes, DERIVATION_ITERATIONS) - Dim oKeyBytes = oPassword.GetBytes(KEY_SIZE / 8) - Using oSymmetricKey = New RijndaelManaged() - oSymmetricKey.BlockSize = BLOCK_SIZE - oSymmetricKey.Mode = _cipherMode - oSymmetricKey.Padding = _paddingMode - - Using oEncryptor = oSymmetricKey.CreateEncryptor(oKeyBytes, oIvStringBytes) - Using oMemoryStream = New MemoryStream() - Using oCryptoStream = New CryptoStream(oMemoryStream, oEncryptor, CryptoStreamMode.Write) - oCryptoStream.Write(PlainTextBytes, 0, PlainTextBytes.Length) - oCryptoStream.FlushFinalBlock() - ' Create the final bytes as a concatenation of the random salt bytes, the random iv bytes and the cipher bytes. - Dim oCipherTextBytes = oSaltStringBytes - oCipherTextBytes = oCipherTextBytes.Concat(oIvStringBytes).ToArray() - oCipherTextBytes = oCipherTextBytes.Concat(oMemoryStream.ToArray()).ToArray() - oMemoryStream.Close() - oCryptoStream.Close() - Return oCipherTextBytes - End Using - End Using - End Using - End Using - End Using - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Public Async Function DecryptAsync(CipherTextBytesWithSaltAndIv As Byte()) As Task(Of Byte()) - Return Await Task.Run(Function() As Byte() - Return Decrypt(CipherTextBytesWithSaltAndIv) - End Function) - End Function - - Public Function Decrypt(CipherTextPlainWithSaltAndIv As String) As String - Try - Dim oBytes As Byte() = UTF8.GetBytes(CipherTextPlainWithSaltAndIv) - Dim oDecrypted As Byte() = Decrypt(oBytes) - Return UTF8.GetString(oDecrypted) - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Public Function Decrypt(CipherTextBytesWithSaltAndIv As Byte()) As Byte() - Try - ' Get the complete stream of bytes that represent: - ' [32 bytes of Salt] + [32 bytes of IV] + [n bytes of CipherText] - ' Get the saltbytes by extracting the first 32 bytes from the supplied cipherText bytes. - Dim oSaltStringBytes = CipherTextBytesWithSaltAndIv.Take(KEY_SIZE / 8).ToArray() - ' Get the IV bytes by extracting the next 32 bytes from the supplied cipherText bytes. - Dim oIvStringBytes = CipherTextBytesWithSaltAndIv.Skip(KEY_SIZE / 8).Take(KEY_SIZE / 8).ToArray() - ' Get the actual cipher text bytes by removing the first 64 bytes from the cipherText string. - Dim oCipherTextBytes = CipherTextBytesWithSaltAndIv.Skip((KEY_SIZE / 8) * 2).Take(CipherTextBytesWithSaltAndIv.Length - ((KEY_SIZE / 8) * 2)).ToArray() - - Using oPassword = New Rfc2898DeriveBytes(_password, oSaltStringBytes, DERIVATION_ITERATIONS) - Dim oKeyBytes = oPassword.GetBytes(KEY_SIZE / 8) - Using oSymmetricKey = New RijndaelManaged() - oSymmetricKey.BlockSize = BLOCK_SIZE - oSymmetricKey.Mode = _cipherMode - oSymmetricKey.Padding = _paddingMode - Using oDecryptor = oSymmetricKey.CreateDecryptor(oKeyBytes, oIvStringBytes) - Using oMemoryStream = New MemoryStream(oCipherTextBytes) - Using oCryptoStream = New CryptoStream(oMemoryStream, oDecryptor, CryptoStreamMode.Read) - Dim oPlainTextBytes = New Byte(oCipherTextBytes.Length - 1) {} - Dim oDecryptedByteCount = oCryptoStream.Read(oPlainTextBytes, 0, oPlainTextBytes.Length) - oMemoryStream.Close() - oCryptoStream.Close() - Return oPlainTextBytes - End Using - End Using - End Using - End Using - End Using - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Private Shared Function Generate256BitsOfRandomEntropy() As Byte() - Dim oRandomBytes = New Byte(31) {} - ' 32 Bytes will give us 256 bits. - Using oRNGCsp = New RNGCryptoServiceProvider() - ' Fill the array with cryptographically secure random bytes. - oRNGCsp.GetBytes(oRandomBytes) - End Using - Return oRandomBytes - End Function -End Class diff --git a/Encryption/Encryption.vbproj b/Encryption/Encryption.vbproj deleted file mode 100644 index 2be3a057..00000000 --- a/Encryption/Encryption.vbproj +++ /dev/null @@ -1,123 +0,0 @@ - - - - - Debug - AnyCPU - {8A8F20FC-C46E-41AC-BEE7-218366CFFF99} - Library - DigitalData.Modules.Encryption - DigitalData.Modules.Encryption - 512 - Windows - v4.6.1 - true - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Encryption.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Encryption.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - True - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - \ No newline at end of file diff --git a/Encryption/EncryptionLegacy.vb b/Encryption/EncryptionLegacy.vb deleted file mode 100644 index fd578da6..00000000 --- a/Encryption/EncryptionLegacy.vb +++ /dev/null @@ -1,85 +0,0 @@ -Imports System.Security.Cryptography -Imports System.Data -Imports System.Data.SqlClient - -Public Class EncryptionLegacy - Private TripleDes As New TripleDESCryptoServiceProvider - Private DEFAULT_KEY As String = "!35452didalog=" - Private SALT_VALUE As String = "!Didalog35452Heuchelheim=" - - Sub New() - TripleDes.Key = TruncateHash(DEFAULT_KEY, TripleDes.KeySize \ 8) - TripleDes.IV = TruncateHash("", TripleDes.BlockSize \ 8) - End Sub - - Sub New(ByVal key As String) - ' Initialize the crypto provider. - TripleDes.Key = TruncateHash(key, TripleDes.KeySize \ 8) - TripleDes.IV = TruncateHash("", TripleDes.BlockSize \ 8) - End Sub - - Private Function TruncateHash(ByVal key As String, ByVal length As Integer) As Byte() - Dim sha1 As New SHA1CryptoServiceProvider - - ' Hash the key. - Dim keyBytes() As Byte = - System.Text.Encoding.Unicode.GetBytes(key) - Dim hash() As Byte = sha1.ComputeHash(keyBytes) - - ' Truncate or pad the hash. - ReDim Preserve hash(length - 1) - Return hash - End Function - - - Public Function EncryptData(ByVal plaintext As String) As String - Try - ' Convert the plaintext string to a byte array. - Dim plaintextBytes() As Byte = - System.Text.Encoding.Unicode.GetBytes(SALT_VALUE & plaintext) - - ' Create the stream. - Dim ms As New System.IO.MemoryStream - ' Create the encoder to write to the stream. - Dim encStream As New CryptoStream(ms, - TripleDes.CreateEncryptor(), - System.Security.Cryptography.CryptoStreamMode.Write) - - ' Use the crypto stream to write the byte array to the stream. - encStream.Write(plaintextBytes, 0, plaintextBytes.Length) - encStream.FlushFinalBlock() - - ' Convert the encrypted stream to a printable string. - Return Convert.ToBase64String(ms.ToArray) - Catch ex As Exception - Return plaintext - End Try - End Function - - 'Entschlüsselt die Zeichenfolge - - Public Function DecryptData(ByVal EncryptedText As String) As String - Try - ' Convert the encrypted text string to a byte array. - Dim oEncryptedBytes() As Byte = Convert.FromBase64String(EncryptedText) - - ' Create the stream. - Dim oMemoryStream As New System.IO.MemoryStream - ' Create the decoder to write to the stream. - Dim oCryptoStream As New CryptoStream(oMemoryStream, - TripleDes.CreateDecryptor(), - System.Security.Cryptography.CryptoStreamMode.Write) - - ' Use the crypto stream to write the byte array to the stream. - oCryptoStream.Write(oEncryptedBytes, 0, oEncryptedBytes.Length) - oCryptoStream.FlushFinalBlock() - Dim oResult = System.Text.Encoding.Unicode.GetString(oMemoryStream.ToArray) - oResult = oResult.Replace(SALT_VALUE, "") - ' Convert the plaintext stream to a string. - Return oResult - Catch ex As Exception - Return EncryptedText - End Try - End Function -End Class - diff --git a/Encryption/My Project/Application.Designer.vb b/Encryption/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Encryption/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Encryption/My Project/Application.myapp b/Encryption/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Encryption/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Encryption/My Project/AssemblyInfo.vb b/Encryption/My Project/AssemblyInfo.vb deleted file mode 100644 index 3056b6c6..00000000 --- a/Encryption/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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 wird für die typelib-ID verwendet, 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, -' indem Sie "*" wie unten gezeigt eingeben: -' - - - diff --git a/Encryption/My Project/Resources.Designer.vb b/Encryption/My Project/Resources.Designer.vb deleted file mode 100644 index 662b74ed..00000000 --- a/Encryption/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Encryption.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Encryption/My Project/Resources.resx b/Encryption/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Encryption/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Encryption/My Project/Settings.Designer.vb b/Encryption/My Project/Settings.Designer.vb deleted file mode 100644 index 06a993e2..00000000 --- a/Encryption/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Encryption.My.MySettings - Get - Return Global.DigitalData.Modules.Encryption.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Encryption/My Project/Settings.settings b/Encryption/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Encryption/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Encryption/packages.config b/Encryption/packages.config deleted file mode 100644 index 63f3075e..00000000 --- a/Encryption/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/LookupControlGui/App.config b/LookupControlGui/App.config deleted file mode 100644 index 5534e287..00000000 --- a/LookupControlGui/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/LookupControlGui/LookupControlGui.vbproj b/LookupControlGui/LookupControlGui.vbproj deleted file mode 100644 index fc58da83..00000000 --- a/LookupControlGui/LookupControlGui.vbproj +++ /dev/null @@ -1,133 +0,0 @@ - - - - - Debug - AnyCPU - {B65E24B3-D334-455D-A0BF-B33B8358B013} - WinExe - LookupControlGui.My.MyApplication - LookupControlGui - LookupControlGui - 512 - WindowsForms - v4.6.1 - true - - - AnyCPU - true - full - true - true - bin\Debug\ - LookupControlGui.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - AnyCPU - pdbonly - false - true - true - bin\Release\ - LookupControlGui.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Form - - - frmLookup.vb - Form - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - frmLookup.vb - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {3dcd6d1a-c830-4241-b7e4-27430e7ea483} - LookupControl - - - - \ No newline at end of file diff --git a/LookupControlGui/LookupControlGui.vbproj.bak b/LookupControlGui/LookupControlGui.vbproj.bak deleted file mode 100644 index 67dddd2e..00000000 --- a/LookupControlGui/LookupControlGui.vbproj.bak +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Debug - AnyCPU - {B65E24B3-D334-455D-A0BF-B33B8358B013} - WinExe - LookupControlGui.My.MyApplication - LookupControlGui - LookupControlGui - 512 - WindowsForms - v4.6.1 - true - - - AnyCPU - true - full - true - true - bin\Debug\ - LookupControlGui.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - AnyCPU - pdbonly - false - true - true - bin\Release\ - LookupControlGui.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Form - - - frmLookup.vb - Form - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - frmLookup.vb - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {3dcd6d1a-c830-4241-b7e4-27430e7ea483} - LookupControl - - - - \ No newline at end of file diff --git a/LookupControlGui/My Project/Application.Designer.vb b/LookupControlGui/My Project/Application.Designer.vb deleted file mode 100644 index 7eb96be9..00000000 --- a/LookupControlGui/My Project/Application.Designer.vb +++ /dev/null @@ -1,38 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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.LookupControlGui.frmLookup - End Sub - End Class -End Namespace diff --git a/LookupControlGui/My Project/Application.myapp b/LookupControlGui/My Project/Application.myapp deleted file mode 100644 index 1243847f..00000000 --- a/LookupControlGui/My Project/Application.myapp +++ /dev/null @@ -1,11 +0,0 @@ - - - true - Form1 - false - 0 - true - 0 - 0 - true - diff --git a/LookupControlGui/My Project/AssemblyInfo.vb b/LookupControlGui/My Project/AssemblyInfo.vb deleted file mode 100644 index 66ae7a4b..00000000 --- a/LookupControlGui/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/LookupControlGui/My Project/Resources.Designer.vb b/LookupControlGui/My Project/Resources.Designer.vb deleted file mode 100644 index 3cf88756..00000000 --- a/LookupControlGui/My Project/Resources.Designer.vb +++ /dev/null @@ -1,62 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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("LookupControlGui.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/LookupControlGui/My Project/Resources.resx b/LookupControlGui/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/LookupControlGui/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/LookupControlGui/My Project/Settings.Designer.vb b/LookupControlGui/My Project/Settings.Designer.vb deleted file mode 100644 index dcfe7c8c..00000000 --- a/LookupControlGui/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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.LookupControlGui.My.MySettings - Get - Return Global.LookupControlGui.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/LookupControlGui/My Project/Settings.settings b/LookupControlGui/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/LookupControlGui/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/LookupControlGui/frmLookup.Designer.vb b/LookupControlGui/frmLookup.Designer.vb deleted file mode 100644 index 12ca51ed..00000000 --- a/LookupControlGui/frmLookup.Designer.vb +++ /dev/null @@ -1,321 +0,0 @@ - -Partial Class frmLookup - 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() - Dim EditorButtonImageOptions1 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() - Dim SerializableAppearanceObject1 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject2 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject3 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject4 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim EditorButtonImageOptions2 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() - Dim SerializableAppearanceObject5 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject6 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject7 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject8 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmLookup)) - Dim EditorButtonImageOptions3 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() - Dim SerializableAppearanceObject9 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject10 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject11 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject12 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim EditorButtonImageOptions4 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() - Dim SerializableAppearanceObject13 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject14 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject15 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject16 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim EditorButtonImageOptions5 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() - Dim SerializableAppearanceObject17 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject18 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject19 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject20 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim EditorButtonImageOptions6 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() - Dim SerializableAppearanceObject21 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject22 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject23 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject24 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim EditorButtonImageOptions7 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() - Dim SerializableAppearanceObject25 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject26 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject27 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject28 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim EditorButtonImageOptions8 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() - Dim SerializableAppearanceObject29 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject30 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject31 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject32 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim EditorButtonImageOptions9 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() - Dim SerializableAppearanceObject33 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject34 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject35 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject36 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim EditorButtonImageOptions10 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() - Dim SerializableAppearanceObject37 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject38 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject39 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject40 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Me.Button1 = New System.Windows.Forms.Button() - Me.LookupControl = New DigitalData.Controls.LookupGrid.LookupControl2() - Me.LookupControl21View = New DevExpress.XtraGrid.Views.Grid.GridView() - Me.Label1 = New System.Windows.Forms.Label() - Me.LookupControl21 = New DigitalData.Controls.LookupGrid.LookupControl2() - Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView() - Me.Label2 = New System.Windows.Forms.Label() - Me.LookupControl22 = New DigitalData.Controls.LookupGrid.LookupControl2() - Me.GridView2 = New DevExpress.XtraGrid.Views.Grid.GridView() - Me.Label3 = New System.Windows.Forms.Label() - Me.LookupControl23 = New DigitalData.Controls.LookupGrid.LookupControl2() - Me.GridView3 = New DevExpress.XtraGrid.Views.Grid.GridView() - Me.Label4 = New System.Windows.Forms.Label() - Me.LookupControl24 = New DigitalData.Controls.LookupGrid.LookupControl2() - Me.GridView4 = New DevExpress.XtraGrid.Views.Grid.GridView() - Me.Label5 = New System.Windows.Forms.Label() - CType(Me.LookupControl.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LookupControl21View, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LookupControl21.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LookupControl22.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.GridView2, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LookupControl23.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.GridView3, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LookupControl24.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.GridView4, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SuspendLayout() - ' - 'Button1 - ' - Me.Button1.Location = New System.Drawing.Point(12, 12) - Me.Button1.Name = "Button1" - Me.Button1.Size = New System.Drawing.Size(94, 23) - Me.Button1.TabIndex = 2 - Me.Button1.Text = "Get Text" - Me.Button1.UseVisualStyleBackColor = True - ' - 'LookupControl - ' - Me.LookupControl.AllowAddNewValues = False - Me.LookupControl.DataSource = Nothing - Me.LookupControl.Location = New System.Drawing.Point(393, 31) - Me.LookupControl.MultiSelect = True - Me.LookupControl.Name = "LookupControl" - Me.LookupControl.PreventDuplicates = False - Me.LookupControl.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo, "", -1, True, True, False, EditorButtonImageOptions1, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject1, SerializableAppearanceObject2, SerializableAppearanceObject3, SerializableAppearanceObject4, "", "openDropdown", Nothing, DevExpress.Utils.ToolTipAnchor.[Default]), New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis, "", -1, True, True, False, EditorButtonImageOptions2, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject5, SerializableAppearanceObject6, SerializableAppearanceObject7, SerializableAppearanceObject8, "", "openLookupForm", Nothing, DevExpress.Utils.ToolTipAnchor.[Default])}) - Me.LookupControl.Properties.DataSource = CType(resources.GetObject("LookupControl.Properties.DataSource"), Object) - Me.LookupControl.Properties.NullText = "Keine Datensätze ausgewählt" - Me.LookupControl.Properties.PopupView = Me.LookupControl21View - Me.LookupControl.SelectedValues = CType(resources.GetObject("LookupControl.SelectedValues"), System.Collections.Generic.List(Of String)) - Me.LookupControl.Size = New System.Drawing.Size(342, 20) - Me.LookupControl.TabIndex = 3 - ' - 'LookupControl21View - ' - Me.LookupControl21View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus - Me.LookupControl21View.Name = "LookupControl21View" - Me.LookupControl21View.OptionsSelection.EnableAppearanceFocusedCell = False - Me.LookupControl21View.OptionsView.ShowGroupPanel = False - ' - 'Label1 - ' - Me.Label1.AutoSize = True - Me.Label1.Location = New System.Drawing.Point(390, 15) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(91, 13) - Me.Label1.TabIndex = 4 - Me.Label1.Text = "Multiselect = True" - ' - 'LookupControl21 - ' - Me.LookupControl21.AllowAddNewValues = False - Me.LookupControl21.DataSource = Nothing - Me.LookupControl21.Location = New System.Drawing.Point(393, 89) - Me.LookupControl21.MultiSelect = True - Me.LookupControl21.Name = "LookupControl21" - Me.LookupControl21.PreventDuplicates = False - Me.LookupControl21.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo, "", -1, True, True, False, EditorButtonImageOptions3, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject9, SerializableAppearanceObject10, SerializableAppearanceObject11, SerializableAppearanceObject12, "", "openDropdown", Nothing, DevExpress.Utils.ToolTipAnchor.[Default]), New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis, "", -1, True, True, False, EditorButtonImageOptions4, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject13, SerializableAppearanceObject14, SerializableAppearanceObject15, SerializableAppearanceObject16, "", "openLookupForm", Nothing, DevExpress.Utils.ToolTipAnchor.[Default])}) - Me.LookupControl21.Properties.DataSource = CType(resources.GetObject("LookupControl21.Properties.DataSource"), Object) - Me.LookupControl21.Properties.NullText = "Keine Datensätze ausgewählt" - Me.LookupControl21.Properties.PopupView = Me.GridView1 - Me.LookupControl21.SelectedValues = CType(resources.GetObject("LookupControl21.SelectedValues"), System.Collections.Generic.List(Of String)) - Me.LookupControl21.Size = New System.Drawing.Size(342, 20) - Me.LookupControl21.TabIndex = 3 - ' - 'GridView1 - ' - Me.GridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus - Me.GridView1.Name = "GridView1" - Me.GridView1.OptionsSelection.EnableAppearanceFocusedCell = False - Me.GridView1.OptionsView.ShowGroupPanel = False - ' - 'Label2 - ' - Me.Label2.AutoSize = True - Me.Label2.Location = New System.Drawing.Point(390, 73) - Me.Label2.Name = "Label2" - Me.Label2.Size = New System.Drawing.Size(88, 13) - Me.Label2.TabIndex = 4 - Me.Label2.Text = "ReadOnly = True" - ' - 'LookupControl22 - ' - Me.LookupControl22.AllowAddNewValues = False - Me.LookupControl22.DataSource = Nothing - Me.LookupControl22.Location = New System.Drawing.Point(393, 147) - Me.LookupControl22.MultiSelect = False - Me.LookupControl22.Name = "LookupControl22" - Me.LookupControl22.PreventDuplicates = False - Me.LookupControl22.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo, "", -1, True, True, False, EditorButtonImageOptions5, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject17, SerializableAppearanceObject18, SerializableAppearanceObject19, SerializableAppearanceObject20, "", "openDropdown", Nothing, DevExpress.Utils.ToolTipAnchor.[Default]), New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis, "", -1, True, True, False, EditorButtonImageOptions6, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject21, SerializableAppearanceObject22, SerializableAppearanceObject23, SerializableAppearanceObject24, "", "openLookupForm", Nothing, DevExpress.Utils.ToolTipAnchor.[Default])}) - Me.LookupControl22.Properties.DataSource = CType(resources.GetObject("LookupControl22.Properties.DataSource"), Object) - Me.LookupControl22.Properties.NullText = "" - Me.LookupControl22.Properties.PopupView = Me.GridView2 - Me.LookupControl22.SelectedValues = CType(resources.GetObject("LookupControl22.SelectedValues"), System.Collections.Generic.List(Of String)) - Me.LookupControl22.Size = New System.Drawing.Size(342, 20) - Me.LookupControl22.TabIndex = 3 - ' - 'GridView2 - ' - Me.GridView2.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus - Me.GridView2.Name = "GridView2" - Me.GridView2.OptionsSelection.EnableAppearanceFocusedCell = False - Me.GridView2.OptionsView.ShowGroupPanel = False - ' - 'Label3 - ' - Me.Label3.AutoSize = True - Me.Label3.Location = New System.Drawing.Point(390, 131) - Me.Label3.Name = "Label3" - Me.Label3.Size = New System.Drawing.Size(96, 13) - Me.Label3.TabIndex = 4 - Me.Label3.Text = "MultiSelect = False" - ' - 'LookupControl23 - ' - Me.LookupControl23.AllowAddNewValues = False - Me.LookupControl23.DataSource = Nothing - Me.LookupControl23.Location = New System.Drawing.Point(393, 197) - Me.LookupControl23.MultiSelect = False - Me.LookupControl23.Name = "LookupControl23" - Me.LookupControl23.PreventDuplicates = False - Me.LookupControl23.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo, "", -1, True, True, False, EditorButtonImageOptions7, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject25, SerializableAppearanceObject26, SerializableAppearanceObject27, SerializableAppearanceObject28, "", "openDropdown", Nothing, DevExpress.Utils.ToolTipAnchor.[Default]), New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis, "", -1, True, True, False, EditorButtonImageOptions8, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject29, SerializableAppearanceObject30, SerializableAppearanceObject31, SerializableAppearanceObject32, "", "openLookupForm", Nothing, DevExpress.Utils.ToolTipAnchor.[Default])}) - Me.LookupControl23.Properties.DataSource = CType(resources.GetObject("LookupControl23.Properties.DataSource"), Object) - Me.LookupControl23.Properties.NullText = "" - Me.LookupControl23.Properties.PopupView = Me.GridView3 - Me.LookupControl23.SelectedValues = CType(resources.GetObject("LookupControl23.SelectedValues"), System.Collections.Generic.List(Of String)) - Me.LookupControl23.Size = New System.Drawing.Size(342, 20) - Me.LookupControl23.TabIndex = 3 - ' - 'GridView3 - ' - Me.GridView3.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus - Me.GridView3.Name = "GridView3" - Me.GridView3.OptionsSelection.EnableAppearanceFocusedCell = False - Me.GridView3.OptionsView.ShowGroupPanel = False - ' - 'Label4 - ' - Me.Label4.AutoSize = True - Me.Label4.Location = New System.Drawing.Point(390, 181) - Me.Label4.Name = "Label4" - Me.Label4.Size = New System.Drawing.Size(89, 13) - Me.Label4.TabIndex = 4 - Me.Label4.Text = "100.000 Records" - ' - 'LookupControl24 - ' - Me.LookupControl24.AllowAddNewValues = True - Me.LookupControl24.DataSource = Nothing - Me.LookupControl24.Location = New System.Drawing.Point(393, 251) - Me.LookupControl24.MultiSelect = False - Me.LookupControl24.Name = "LookupControl24" - Me.LookupControl24.PreventDuplicates = False - Me.LookupControl24.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo, "", -1, True, True, False, EditorButtonImageOptions9, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject33, SerializableAppearanceObject34, SerializableAppearanceObject35, SerializableAppearanceObject36, "", "openDropdown", Nothing, DevExpress.Utils.ToolTipAnchor.[Default]), New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis, "", -1, True, True, False, EditorButtonImageOptions10, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject37, SerializableAppearanceObject38, SerializableAppearanceObject39, SerializableAppearanceObject40, "", "openLookupForm", Nothing, DevExpress.Utils.ToolTipAnchor.[Default])}) - Me.LookupControl24.Properties.DataSource = CType(resources.GetObject("LookupControl24.Properties.DataSource"), Object) - Me.LookupControl24.Properties.NullText = "" - Me.LookupControl24.Properties.PopupView = Me.GridView4 - Me.LookupControl24.SelectedValues = CType(resources.GetObject("LookupControl24.SelectedValues"), System.Collections.Generic.List(Of String)) - Me.LookupControl24.Size = New System.Drawing.Size(342, 20) - Me.LookupControl24.TabIndex = 3 - ' - 'GridView4 - ' - Me.GridView4.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus - Me.GridView4.Name = "GridView4" - Me.GridView4.OptionsSelection.EnableAppearanceFocusedCell = False - Me.GridView4.OptionsView.ShowGroupPanel = False - ' - 'Label5 - ' - Me.Label5.AutoSize = True - Me.Label5.Location = New System.Drawing.Point(390, 235) - Me.Label5.Name = "Label5" - Me.Label5.Size = New System.Drawing.Size(167, 13) - Me.Label5.TabIndex = 4 - Me.Label5.Text = "Empty List but New Values = True" - ' - '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.Label5) - Me.Controls.Add(Me.Label4) - Me.Controls.Add(Me.Label3) - Me.Controls.Add(Me.Label2) - Me.Controls.Add(Me.LookupControl24) - Me.Controls.Add(Me.LookupControl23) - Me.Controls.Add(Me.LookupControl22) - Me.Controls.Add(Me.Label1) - Me.Controls.Add(Me.LookupControl21) - Me.Controls.Add(Me.LookupControl) - Me.Controls.Add(Me.Button1) - Me.Name = "Form1" - Me.Text = "Form1" - CType(Me.LookupControl.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LookupControl21View, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LookupControl21.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LookupControl22.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.GridView2, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LookupControl23.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.GridView3, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LookupControl24.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.GridView4, System.ComponentModel.ISupportInitialize).EndInit() - Me.ResumeLayout(False) - Me.PerformLayout() - - End Sub - Friend WithEvents Button1 As Button - Friend WithEvents LookupControl As DigitalData.Controls.LookupGrid.LookupControl2 - Friend WithEvents LookupControl21View As DevExpress.XtraGrid.Views.Grid.GridView - Friend WithEvents Label1 As Label - Friend WithEvents LookupControl21 As DigitalData.Controls.LookupGrid.LookupControl2 - Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView - Friend WithEvents Label2 As Label - Friend WithEvents LookupControl22 As DigitalData.Controls.LookupGrid.LookupControl2 - Friend WithEvents GridView2 As DevExpress.XtraGrid.Views.Grid.GridView - Friend WithEvents Label3 As Label - Friend WithEvents LookupControl23 As DigitalData.Controls.LookupGrid.LookupControl2 - Friend WithEvents GridView3 As DevExpress.XtraGrid.Views.Grid.GridView - Friend WithEvents Label4 As Label - Friend WithEvents LookupControl24 As DigitalData.Controls.LookupGrid.LookupControl2 - Friend WithEvents GridView4 As DevExpress.XtraGrid.Views.Grid.GridView - Friend WithEvents Label5 As Label -End Class diff --git a/LookupControlGui/frmLookup.resx b/LookupControlGui/frmLookup.resx deleted file mode 100644 index aca14e68..00000000 --- a/LookupControlGui/frmLookup.resx +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u - ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u - PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB - AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0 - ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs= - - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u - ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u - PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB - AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0 - ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs= - - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u - ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u - PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB - AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0 - ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs= - - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u - ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u - PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB - AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0 - ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs= - - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u - ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u - PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB - AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0 - ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs= - - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u - ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u - PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB - AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0 - ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs= - - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u - ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u - PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB - AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0 - ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs= - - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u - ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u - PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB - AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0 - ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs= - - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u - ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u - PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB - AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0 - ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs= - - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u - ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u - PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB - AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0 - ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs= - - - \ No newline at end of file diff --git a/LookupControlGui/frmLookup.vb b/LookupControlGui/frmLookup.vb deleted file mode 100644 index 800e2449..00000000 --- a/LookupControlGui/frmLookup.vb +++ /dev/null @@ -1,60 +0,0 @@ -Public Class frmLookup - Private _Datasource As New List(Of String) - - Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load - For index = 1 To 1000000 - _Datasource.Add($"item-{index}") - Next - - Dim oDatatable = GetDatatable(10) - Dim oSelectedValues = _Datasource.Take(1).ToList() - - LookupControl.DataSource = oDatatable - LookupControl.SelectedValues = oSelectedValues - LookupControl.ReadOnly = False - - LookupControl21.DataSource = oDatatable - LookupControl21.SelectedValues = oSelectedValues - LookupControl21.ReadOnly = True - - LookupControl22.DataSource = oDatatable - LookupControl22.SelectedValues = oSelectedValues - LookupControl22.ReadOnly = False - LookupControl22.MultiSelect = False - - LookupControl22.SelectedValues = New List(Of String) From {"", Nothing, "LOL", "Foo"} - - LookupControl23.DataSource = GetDatatable(100000) - - AddHandler LookupControl.SelectedValuesChanged, Sub(_sender As Object, SelectedValues As List(Of String)) - MsgBox("Selected Values: " & String.Join(",", SelectedValues.ToArray)) - End Sub - - AddHandler LookupControl21.SelectedValuesChanged, Sub(_sender As Object, SelectedValues As List(Of String)) - MsgBox("Selected Values: " & String.Join(",", SelectedValues.ToArray)) - End Sub - - AddHandler LookupControl22.SelectedValuesChanged, Sub(_sender As Object, SelectedValues As List(Of String)) - MsgBox("Selected Values: " & String.Join(",", SelectedValues.ToArray)) - End Sub - End Sub - - Private Function GetDatatable(Limit As Integer) As DataTable - Dim oDatatable As New DataTable - Dim oColumns As New List(Of DataColumn) From { - New DataColumn("Col1", GetType(String)), - New DataColumn("Col2", GetType(String)) - } - - oDatatable.Columns.AddRange(oColumns.ToArray) - - For Each Item In _Datasource.Take(Limit) - Dim oRow = oDatatable.NewRow() - oRow.Item("Col1") = Item - oRow.Item("Col2") = Item & "_" & "SomeLong Random(String) !!!111einself" - oDatatable.Rows.Add(oRow) - Next - - Return oDatatable - End Function -End Class diff --git a/Mailfunctions/Mail.vb b/Mailfunctions/Mail.vb deleted file mode 100644 index a9d612fa..00000000 --- a/Mailfunctions/Mail.vb +++ /dev/null @@ -1,13 +0,0 @@ -Imports DigitalData.Modules.Logging -Public Class Mail - Private LogConfig As LogConfig - Private Logger As DigitalData.Modules.Logging.Logger - Public Sub New(LogConfig As LogConfig) - LogConfig = LogConfig - Logger = LogConfig.GetLogger() - Logger.Info("MailingClass initialized") - End Sub - Public Function Connecttest() - - End Function -End Class diff --git a/Mailfunctions/Mailfunctions.vbproj b/Mailfunctions/Mailfunctions.vbproj deleted file mode 100644 index 6e56ce83..00000000 --- a/Mailfunctions/Mailfunctions.vbproj +++ /dev/null @@ -1,120 +0,0 @@ - - - - - Debug - AnyCPU - {C9827B8D-9EF9-411A-A6BF-4807794F8C8F} - Library - Mailfunctions - Mailfunctions - 512 - Windows - v4.7.2 - true - - - true - full - true - true - bin\Debug\ - Mailfunctions.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - Mailfunctions.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - ..\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll - - - P:\Visual Studio Projekte\Bibliotheken\Limilabs\Mail.dll\Mail.dll - - - - ..\packages\NLog.4.7.11\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - \ No newline at end of file diff --git a/Mailfunctions/My Project/Application.Designer.vb b/Mailfunctions/My Project/Application.Designer.vb deleted file mode 100644 index 88dd01c7..00000000 --- a/Mailfunctions/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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 - diff --git a/Mailfunctions/My Project/Application.myapp b/Mailfunctions/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Mailfunctions/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Mailfunctions/My Project/AssemblyInfo.vb b/Mailfunctions/My Project/AssemblyInfo.vb deleted file mode 100644 index 0d865ee5..00000000 --- a/Mailfunctions/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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 wird für die typelib-ID verwendet, 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, -' indem Sie "*" wie unten gezeigt eingeben: -' - - - diff --git a/Mailfunctions/My Project/Resources.Designer.vb b/Mailfunctions/My Project/Resources.Designer.vb deleted file mode 100644 index 702d170b..00000000 --- a/Mailfunctions/My Project/Resources.Designer.vb +++ /dev/null @@ -1,62 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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("Mailfunctions.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/Mailfunctions/My Project/Resources.resx b/Mailfunctions/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Mailfunctions/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Mailfunctions/My Project/Settings.Designer.vb b/Mailfunctions/My Project/Settings.Designer.vb deleted file mode 100644 index fd3119d4..00000000 --- a/Mailfunctions/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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.Mailfunctions.My.MySettings - Get - Return Global.Mailfunctions.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Mailfunctions/My Project/Settings.settings b/Mailfunctions/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Mailfunctions/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Mailfunctions/packages.config b/Mailfunctions/packages.config deleted file mode 100644 index 25ba1cdf..00000000 --- a/Mailfunctions/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Modules.Base/Base/Base.vbproj b/Modules.Base/Base/Base.vbproj deleted file mode 100644 index 9a6697eb..00000000 --- a/Modules.Base/Base/Base.vbproj +++ /dev/null @@ -1,119 +0,0 @@ - - - - - Debug - AnyCPU - {6EA0C51F-C2B1-4462-8198-3DE0B32B74F8} - Library - DigitalData.Modules.Base - DigitalData.Modules.Base - 512 - Windows - v4.6.1 - true - - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Base.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Base.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - True - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - \ No newline at end of file diff --git a/Modules.Base/Base/BaseClass.vb b/Modules.Base/Base/BaseClass.vb deleted file mode 100644 index e12a99c1..00000000 --- a/Modules.Base/Base/BaseClass.vb +++ /dev/null @@ -1,16 +0,0 @@ -Imports DigitalData.Modules.Logging - -''' -''' BaseClass that sets up a Logger. -''' -Public Class BaseClass - Protected LogConfig As LogConfig - Protected Logger As Logger - - Public Sub New(LogConfig As LogConfig) - Dim oClassName = Me.GetType().Name - - Me.LogConfig = LogConfig - Me.Logger = LogConfig.GetLogger(oClassName) - End Sub -End Class \ No newline at end of file diff --git a/Modules.Base/Base/ECM.vb b/Modules.Base/Base/ECM.vb deleted file mode 100644 index bf04d74b..00000000 --- a/Modules.Base/Base/ECM.vb +++ /dev/null @@ -1,7 +0,0 @@ -Public Class ECM - Public Enum Product - ProcessManager - GlobalIndexer - ClipboardWatcher - End Enum -End Class diff --git a/Modules.Base/Base/IDB/Attributes.vb b/Modules.Base/Base/IDB/Attributes.vb deleted file mode 100644 index bf7bd740..00000000 --- a/Modules.Base/Base/IDB/Attributes.vb +++ /dev/null @@ -1,15 +0,0 @@ -Namespace IDB - Public Class Attributes - Public Const ATTRIBUTE_DOCTYPE = "Doctype" - Public Const ATTRIBUTE_DYNAMIC_FOLDER = "Dynamic Folder" - - Public Const ATTRIBUTE_ORIGIN_FILENAME = "OriginFileName" - Public Const ATTRIBUTE_ORIGIN_CHANGED = "OriginChangedDatetime" - Public Const ATTRIBUTE_ORIGIN_CREATED = "OriginCreationDatetime" - - Public Const ATTRIBUTE_DISPLAY_FILENAME = "DisplayFileName" - Public Const ATTRIBUTE_DISPLAY_FILENAME1 = "DisplayFileName1" - - End Class - -End Namespace \ No newline at end of file diff --git a/Modules.Base/Base/IDB/Database.vb b/Modules.Base/Base/IDB/Database.vb deleted file mode 100644 index 8afd0a7e..00000000 --- a/Modules.Base/Base/IDB/Database.vb +++ /dev/null @@ -1,11 +0,0 @@ - -Namespace IDB - Public Class Database - Public Enum NamedDatabase - ECM - IDB - End Enum - End Class - -End Namespace - diff --git a/Modules.Base/Base/IDB/FileStore.vb b/Modules.Base/Base/IDB/FileStore.vb deleted file mode 100644 index f1dc29e0..00000000 --- a/Modules.Base/Base/IDB/FileStore.vb +++ /dev/null @@ -1,20 +0,0 @@ -Namespace IDB - Public Class FileStore - Public Const FILE_STORE_INVALID_OBEJCT_ID = 0 - - Public Const FILE_CHANGED_QUESTION = "QUESTION VERSION" - Public Const FILE_CHANGED_OVERWRITE = "AUTO REPLACE" - Public Const FILE_CHANGED_VERSION = "AUTO VERSION" - - Public Const OBJECT_STATE_FILE_ADDED = "File added" - Public Const OBJECT_STATE_FILE_VERSIONED = "File versioned" - Public Const OBJECT_STATE_FILE_CHANGED = "File changed" - Public Const OBJECT_STATE_FILE_OPENED = "File opened" - Public Const OBJECT_STATE_FILE_DELETED = "File deleted" - Public Const OBJECT_STATE_METADATA_CHANGED = "Metadata changed" - Public Const OBJECT_STATE_ATTRIBUTEVALUE_DELETED = "Attributevalue deleted" - Public Const OBJECT_STATE_FILE_CHECKED_OUT = "File Checked Out" - Public Const OBJECT_STATE_FILE_CHECKED_IN = "File Checked In" - End Class - -End Namespace \ No newline at end of file diff --git a/Modules.Base/Base/My Project/Application.Designer.vb b/Modules.Base/Base/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.Base/Base/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.Base/Base/My Project/Application.myapp b/Modules.Base/Base/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.Base/Base/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.Base/Base/My Project/AssemblyInfo.vb b/Modules.Base/Base/My Project/AssemblyInfo.vb deleted file mode 100644 index 8d8f92b9..00000000 --- a/Modules.Base/Base/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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 wird für die typelib-ID verwendet, 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, -' indem Sie "*" wie unten gezeigt eingeben: -' - - - diff --git a/Modules.Base/Base/My Project/Resources.Designer.vb b/Modules.Base/Base/My Project/Resources.Designer.vb deleted file mode 100644 index 6d58bf07..00000000 --- a/Modules.Base/Base/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Base.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.Base/Base/My Project/Resources.resx b/Modules.Base/Base/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.Base/Base/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.Base/Base/My Project/Settings.Designer.vb b/Modules.Base/Base/My Project/Settings.Designer.vb deleted file mode 100644 index 4e796c27..00000000 --- a/Modules.Base/Base/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Base.My.MySettings - Get - Return Global.DigitalData.Modules.Base.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Base/Base/My Project/Settings.settings b/Modules.Base/Base/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.Base/Base/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.Base/Base/README.txt b/Modules.Base/Base/README.txt deleted file mode 100644 index 58cbced4..00000000 --- a/Modules.Base/Base/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -BASE MODULE -=========== - -This module is intended for often used constants and datastructures. -Therefor it is important that this module does not have any dependencies on other modules!! \ No newline at end of file diff --git a/Modules.Config/Config.vbproj b/Modules.Config/Config.vbproj deleted file mode 100644 index 1d94a8cb..00000000 --- a/Modules.Config/Config.vbproj +++ /dev/null @@ -1,131 +0,0 @@ - - - - - Debug - AnyCPU - {44982F9B-6116-44E2-85D0-F39650B1EF99} - Library - DigitalData.Modules.Config - DigitalData.Modules.Config - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Config.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Config.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {8a8f20fc-c46e-41ac-bee7-218366cfff99} - Encryption - - - {991d0231-4623-496d-8bd0-9ca906029cbc} - Filesystem - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - \ No newline at end of file diff --git a/Modules.Config/ConfigAttributes.vb b/Modules.Config/ConfigAttributes.vb deleted file mode 100644 index a9e1787e..00000000 --- a/Modules.Config/ConfigAttributes.vb +++ /dev/null @@ -1,35 +0,0 @@ -Public Class ConfigAttributes - ''' - ''' The primary connection string. Will not be saved to userconfig. - ''' - Public Class ConnectionStringAttribute - Inherits Attribute - End Class - - ''' - ''' The test connection string. Will not be saved to userconfig. - ''' - Public Class ConnectionStringTestAttribute - Inherits Attribute - End Class - - ''' - ''' The app serverSQL connection string. Will not be saved to userconfig. - ''' - Public Class ConnectionStringAppServerAttribute - Inherits Attribute - End Class - ''' - ''' The EDMIapp server . Will not be saved to userconfig. - ''' - Public Class EDMIAppServerAttribute - Inherits Attribute - End Class - - ''' - ''' Global setting. Will not be saved to userconfig. - ''' - Public Class GlobalSettingAttribute - Inherits Attribute - End Class -End Class diff --git a/Modules.Config/ConfigManager.vb b/Modules.Config/ConfigManager.vb deleted file mode 100644 index 8b24bf69..00000000 --- a/Modules.Config/ConfigManager.vb +++ /dev/null @@ -1,388 +0,0 @@ -Imports System.IO -Imports System.Reflection -Imports System.Xml.Serialization -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Encryption -Imports DigitalData.Modules.Config.ConfigAttributes - -Public Class ConfigManager(Of T) - Private Const USER_CONFIG_NAME As String = "UserConfig.xml" - Private Const COMPUTER_CONFIG_NAME As String = "ComputerConfig.xml" - Private Const APP_CONFIG_NAME As String = "AppConfig.xml" - - Private ReadOnly _LogConfig As LogConfig - Private ReadOnly _Logger As Logger - Private ReadOnly _File As Filesystem.File - - Private ReadOnly _UserDirectory As String - Private ReadOnly _UserConfigPath As String - Private ReadOnly _ComputerDirectory As String - Private ReadOnly _ComputerConfigPath As String - Private ReadOnly _AppConfigDirectory As String - Private ReadOnly _AppConfigPath As String - - Private ReadOnly _TestMode As Boolean = False - - Private ReadOnly _Blueprint As T - Private ReadOnly _BlueprintType As Type - Private ReadOnly _Serializer As XmlSerializer - - Private ReadOnly _ExcludedAttributes = New List(Of Type) From { - GetType(ConnectionStringAttribute), - GetType(ConnectionStringAppServerAttribute), - GetType(ConnectionStringTestAttribute), - GetType(EDMIAppServerAttribute), - GetType(GlobalSettingAttribute) - } - - Private ReadOnly _ConnectionStringAttributes = New List(Of Type) From { - GetType(ConnectionStringAttribute), - GetType(ConnectionStringAppServerAttribute), - GetType(ConnectionStringTestAttribute) - } - - ''' - ''' Signals that all properties will be written to (and read from) the UserConfig.xml - ''' - ''' If Value is `True`: - ''' - AppConfig.xml does NOT exist - ''' - ComputerConfig.xml does NOT exist - ''' - ConnectionStrings will be saved to or read from UserConfig.xml - ''' - ''' If Value is `False`: - ''' - No ConnectionStrings will be saved to or read from UserConfig.xml - ''' - ''' Can be overwritten by optional parameter `ForceUserConfig` - ''' - Private _WriteAllValuesToUserConfig As Boolean = False - - ''' - ''' Returns the currently loaded config object - ''' - ''' - Public ReadOnly Property Config As T - - ''' - ''' Path to the current user config. - ''' - ''' - Public ReadOnly Property UserConfigPath As String - Get - Return _UserConfigPath - End Get - End Property - - ''' - ''' Path to the current computer config. - ''' - ''' - Public ReadOnly Property ComputerConfigPath As String - Get - Return _ComputerConfigPath - End Get - End Property - - ''' - ''' Path to the current Application config. - ''' - ''' - Public ReadOnly Property AppConfigPath As String - Get - Return _AppConfigPath - End Get - End Property - - ''' - ''' Creates a new instance of the ConfigManager - ''' - ''' - ''' LogConfig instance - ''' The path to check for a user config file, eg. AppData (Usually Application.UserAppDataPath or Application.LocalUserAppDataPath) - ''' The path to check for a computer config file, eg. ProgramData (Usually Application.CommonAppDataPath) - ''' The path to check for a third config file. This is useful when running the Application in an environment where AppData/ProgramData directories are not available - ''' Override values from ComputerConfig with UserConfig - Public Sub New(LogConfig As LogConfig, UserConfigPath As String, ComputerConfigPath As String, Optional ApplicationStartupPath As String = "", Optional ForceUserConfig As Boolean = False) - _LogConfig = LogConfig - _Logger = LogConfig.GetLogger() - _File = New Filesystem.File(_LogConfig) - - _Blueprint = Activator.CreateInstance(Of T) - _BlueprintType = _Blueprint.GetType - _Serializer = New XmlSerializer(_BlueprintType) - - _UserDirectory = _File.CreateDirectory(UserConfigPath) - _UserConfigPath = Path.Combine(_UserDirectory, USER_CONFIG_NAME) - - If ComputerConfigPath <> String.Empty Then - If IO.File.Exists(ComputerConfigPath) Then - _ComputerDirectory = _File.CreateDirectory(ComputerConfigPath, False) - Else - _ComputerDirectory = ComputerConfigPath - End If - _ComputerConfigPath = Path.Combine(_ComputerDirectory, COMPUTER_CONFIG_NAME) - End If - - If ApplicationStartupPath <> String.Empty Then - _Logger.Info($"AppConfig is being used: [{ApplicationStartupPath}]") - _AppConfigPath = Path.Combine(ApplicationStartupPath, APP_CONFIG_NAME) - End If - - _WriteAllValuesToUserConfig = ForceUserConfig - - _Config = LoadConfig() - End Sub - - ''' - ''' Creates a new ConfigManager with a single (user)config path - ''' - ''' LogConfig instance - ''' The path to check for a user config file, eg. AppData (Usually Application.UserAppDataPath or Application.LocalUserAppDataPath) - Public Sub New(LogConfig As LogConfig, ConfigPath As String) - MyClass.New(LogConfig, ConfigPath, String.Empty, String.Empty, ForceUserConfig:=True) - End Sub - - ''' - ''' Save the current config object to `UserConfigPath` - ''' - ''' Force saving all attributes including the attributes marked as excluded - ''' True if save was successful, False otherwise - Public Function Save(Optional ForceAll As Boolean = False) As Boolean - Try - WriteToFile(Config, _UserConfigPath, ForceAll) - Return True - Catch ex As Exception - _Logger.Error(ex) - Return False - End Try - End Function - - ''' - ''' Reloads the config object from file. - ''' - ''' True if reload was successful, False otherwise - Public Function Reload() As Boolean - Try - _Config = LoadConfig() - Return True - Catch ex As Exception - _Logger.Error(ex) - Return False - End Try - End Function - - ''' - ''' Copies all properties from Source to Target, except those who have an attribute - ''' listed in ExcludedAttributeTypes - ''' - ''' Source config object - ''' Target config object - ''' List of Attribute type to exclude - Private Sub CopyValues(Source As T, Target As T, Optional ExcludedAttributeTypes As List(Of Type) = Nothing) - Dim oType As Type = GetType(T) - Dim oExcludedAttributeTypes = IIf(IsNothing(ExcludedAttributeTypes), New List(Of Type), ExcludedAttributeTypes) - Dim oProperties = oType.GetProperties(). - Where(Function(p) p.CanRead And p.CanWrite). - Where(Function(p) - For Each oAttributeType As Type In oExcludedAttributeTypes - If Attribute.IsDefined(p, oAttributeType) Then - Return False - End If - Next - Return True - End Function) - - For Each oProperty As PropertyInfo In oProperties - ' TODO: Process individual Subfields of class-objects - ' to allow for the PasswordAttribute to be set on class properies aka nested properties - - Dim oValue = oProperty.GetValue(Source, Nothing) - If Not IsNothing(oValue) Then - oProperty.SetValue(Target, oValue, Nothing) - End If - Next - End Sub - - ''' - ''' Filters a config object by copying all values except `ExcludedAttributeTypes` - ''' - ''' Config object - ''' List of Attribute type to exclude - ''' - Private Function FilterValues(ByVal Data As T, ExcludedAttributeTypes As List(Of Type)) As T - Dim oResult As T = Activator.CreateInstance(Of T) - - CopyValues(Data, oResult, ExcludedAttributeTypes) - Return oResult - End Function - - Private Function LoadConfig() As T - ' first create an empty/default config object - Dim oConfig As T = Activator.CreateInstance(_BlueprintType) - - ' try to load the special app config - oConfig = LoadAppConfig(oConfig) - - ' try to load the computer config - oConfig = LoadComputerConfig(oConfig) - - ' now try to load userconfig - oConfig = LoadUserConfig(oConfig) - Return oConfig - End Function - - Private Function LoadAppConfig(ByVal Config As T) As T - If Not String.IsNullOrEmpty(_AppConfigPath) AndAlso File.Exists(_AppConfigPath) Then - Try - Dim oAppConfig = ReadFromFile(_AppConfigPath) - CopyValues(oAppConfig, Config) - - _Logger.Info("AppConfig exists and will be used. [{0}]", _AppConfigPath) - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("ApplicationConfig could not be loaded!") - End Try - - _WriteAllValuesToUserConfig = False - Else - _Logger.Debug("ApplicationConfig does not exist.") - _WriteAllValuesToUserConfig = True - End If - - Return Config - End Function - - Private Function LoadComputerConfig(ByVal Config As T) As T - If _WriteAllValuesToUserConfig = False Then - _Logger.Info("AppConfig exists. ComputerConfig will NOT be used") - ElseIf File.Exists(_ComputerConfigPath) Then - Try - Dim oComputerConfig = ReadFromFile(_ComputerConfigPath) - CopyValues(oComputerConfig, Config) - - _Logger.Info("ComputerConfig exists and will be used. [{0}]", _ComputerConfigPath) - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("Computer config could not be loaded!") - End Try - _WriteAllValuesToUserConfig = False - Else - _Logger.Debug("Computer config does not exist.") - _WriteAllValuesToUserConfig = True - End If - - Return Config - End Function - - Private Function LoadUserConfig(ByVal Config As T) As T - If File.Exists(_UserConfigPath) Then - Try - Dim oUserConfig = ReadFromFile(_UserConfigPath) - _Logger.Debug("UserConfig exists and will be used. [{0}]", _UserConfigPath) - - ' if user config exists - If Not IsNothing(oUserConfig) Then - ' Copy values from user config to final config - If _WriteAllValuesToUserConfig Then - CopyValues(oUserConfig, Config, New List(Of Type)) - Else - CopyValues(oUserConfig, Config, _ExcludedAttributes) - End If - End If - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("User config could not be loaded!") - End Try - Else - _Logger.Debug("User config does not exist. Default config will be created") - WriteToFile(Config, _UserConfigPath, False) - End If - - Return Config - End Function - - Private Function TestHasAttribute(Config As T, AttributeType As Type) As Boolean - For Each oProperty As PropertyInfo In Config.GetType.GetProperties() - If Attribute.IsDefined(oProperty, GetType(ConnectionStringAttribute)) Then - Return True - End If - Next - - Return False - End Function - - ''' - ''' Serialize a config object to byte array - ''' - ''' - ''' - Private Function Serialize(Data As T) As Byte() - Try - _Logger.Debug("Serializing config object") - - Using oStream = New MemoryStream() - _Serializer.Serialize(oStream, Data) - _Logger.Debug("Object serialized.") - Return oStream.ToArray() - End Using - Catch ex As Exception - _Logger.Error(ex) - Throw ex - End Try - End Function - - ''' - ''' Write an object to disk as xml - ''' - ''' The object to write - ''' The file name to write to - Private Sub WriteToFile(Data As T, Path As String, ForceAll As Boolean) - Try - _Logger.Debug("Saving config to: {0}", Path) - - ' If config was loaded from computer config, - ' DO NOT save connection string, etc. to user config - If _WriteAllValuesToUserConfig = False And ForceAll = False Then - Data = FilterValues(Data, _ExcludedAttributes) - End If - - Dim oBytes = Serialize(Data) - - Using oFileStream = New FileStream(Path, FileMode.Create, FileAccess.Write) - oFileStream.Write(oBytes, 0, oBytes.Length) - oFileStream.Flush() - End Using - Catch ex As Exception - _Logger.Warn("Could not save config to {0}", Path) - _Logger.Error(ex) - Throw ex - End Try - End Sub - - ''' - ''' Reads an xml from disk and deserializes to object - ''' - ''' - Private Function ReadFromFile(Path As String) As T - Try - _Logger.Debug("Loading config from: {0}", Path) - Dim oConfig As T - - Using oReader As New StreamReader(Path) - oConfig = _Serializer.Deserialize(oReader) - End Using - - ' If oConfig is Nothing, a config file was created but nothing was written to it. - ' In this case we need to create oConfig from defaults so we have at least some config object - If oConfig Is Nothing Then - _Logger.Debug("Config file is valid but empty. Loading default values") - oConfig = Activator.CreateInstance(_BlueprintType) - End If - - Return oConfig - Catch ex As Exception - _Logger.Warn("Could not load config from {0}", Path) - _Logger.Error(ex) - Throw ex - End Try - End Function -End Class diff --git a/Modules.Config/ConfigSample.vb b/Modules.Config/ConfigSample.vb deleted file mode 100644 index 9bed8b6c..00000000 --- a/Modules.Config/ConfigSample.vb +++ /dev/null @@ -1,20 +0,0 @@ -Imports DigitalData.Modules.Config.ConfigAttributes - -Public Class ConfigSample - - - Public Property ConnectionString As String - - - Public Property ConnectionStringTest As String - - - Public Property ConnectionStringAppServer As String - - - Public Property EDMIAppServer As String - - Public Property GlobalSetting As Integer - - Public Property SomeSetting As Boolean -End Class diff --git a/Modules.Config/ConfigUtils.vb b/Modules.Config/ConfigUtils.vb deleted file mode 100644 index 04fa7773..00000000 --- a/Modules.Config/ConfigUtils.vb +++ /dev/null @@ -1,119 +0,0 @@ -Imports DigitalData.Modules.Logging - -Public Class ConfigUtils - Private _Logger As Logger - Private _File As Filesystem.File - - Private Const MIGRATE_DIRECTORY As String = "Migrate" - - - Public Sub New(LogConfig As LogConfig) - _Logger = LogConfig.GetLogger() - _File = New Filesystem.File(LogConfig) - End Sub - - Public Function TestMigrationNeeded(TargetDirectory As String) As Boolean - If IO.Directory.Exists(TargetDirectory) Then - Return False - Else - Return True - End If - End Function - - Public Sub MigrateConfig(SourceDirectory As String, TargetDirectory As String, Optional FilePattern As String = "*.*") - If IO.Directory.Exists(TargetDirectory) Then - _Logger.Warn("Config Migration aborted because new config directory [{0}] already exists!", TargetDirectory) - Exit Sub - End If - - _Logger.Debug("Creating TargetDirectory [{0}]", TargetDirectory) - ' Create target directory - Try - IO.Directory.CreateDirectory(TargetDirectory) - Catch ex As Exception - _Logger.Warn("Config Migration aborted because new config directory [{0}] could not be created!", TargetDirectory) - _Logger.Error(ex) - Exit Sub - End Try - - ' Create Migration directory - Dim oMigrationDirectory = IO.Path.Combine(SourceDirectory, MIGRATE_DIRECTORY) - _Logger.Debug("Creating MigrationDirectory [{0}]", oMigrationDirectory) - Try - IO.Directory.CreateDirectory(oMigrationDirectory) - Catch ex As Exception - _Logger.Warn("Config Migration aborted because migration directory [{0}] could not be created!", oMigrationDirectory) - _Logger.Error(ex) - Exit Sub - End Try - - ' Copy individual files from top level directory - For Each oPath In IO.Directory.EnumerateFiles(SourceDirectory, FilePattern) - Dim oFileInfo = New IO.FileInfo(oPath) - - _Logger.NewBlock($"File {oFileInfo.Name}") - _Logger.Debug("Processing file [{0}]", oFileInfo.Name) - - _Logger.Debug("Copying [{0}] to TargetDirectory..", oFileInfo.Name) - ' Copy to target directory - Try - IO.File.Copy(oPath, IO.Path.Combine(TargetDirectory, oFileInfo.Name)) - Catch ex As Exception - _Logger.Warn("Could not move old config file {0} to new config location {1}", oFileInfo.Name, TargetDirectory) - _Logger.Error(ex) - End Try - - _Logger.Debug("Moving [{0}] to MigrationDirectory..", oFileInfo.Name) - ' Move to migration directory - Try - IO.File.Move(oPath, IO.Path.Combine(oMigrationDirectory, oFileInfo.Name)) - Catch ex As Exception - _Logger.Warn("Could not move old config file {0} to migration directory {1}", oFileInfo.Name, oMigrationDirectory) - _Logger.Error(ex) - End Try - Next - - For Each oDirectoryPath In IO.Directory.EnumerateDirectories(SourceDirectory, "*", IO.SearchOption.TopDirectoryOnly) - Dim oDirInfo As New IO.DirectoryInfo(oDirectoryPath) - - _Logger.NewBlock($"Directory {oDirInfo.Name}") - _Logger.Debug("Processing directory [{0}]", oDirInfo.Name) - - ' Don't copy TargetDirectory if subpath of SourceDirectory or if MigrationDirectory - If oDirInfo.FullName = TargetDirectory Or oDirInfo.FullName = oMigrationDirectory Then - _Logger.Debug("Directory [{0}] should not be copied. Skipping.", oDirInfo.Name) - Continue For - End If - - ' Copy directory to TargetDirectory - Dim oNewDirectoryPath = IO.Path.Combine(TargetDirectory, oDirInfo.Name) - _Logger.Debug("Copying [{0}] to TargetDirectory..", oDirInfo.Name) - Try - _File.CopyDirectory(oDirInfo.FullName, oNewDirectoryPath, True) - Catch ex As Exception - _Logger.Warn("Could not move directory [{0}] to new path [{1}]", oDirInfo.FullName, oNewDirectoryPath) - _Logger.Error(ex) - End Try - - _Logger.Debug("Copying [{0}] to MigrationDirectory..", oDirInfo.Name) - ' Copy directory to MigrationDirectory - Dim oMigrationDirectoryPath = IO.Path.Combine(oMigrationDirectory, oDirInfo.Name) - Try - _File.CopyDirectory(oDirInfo.FullName, oMigrationDirectoryPath, True) - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("Could not move directory [{0}] to migration directory [{1}]", oDirInfo.FullName, oMigrationDirectoryPath) - End Try - - _Logger.Debug("Deleting [{0}]..", oDirInfo.Name) - ' Delete directory - Try - IO.Directory.Delete(oDirInfo.FullName, True) - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("Could not delete directory [{0}]", oDirInfo.FullName) - End Try - Next - End Sub - -End Class diff --git a/Modules.Config/My Project/Application.Designer.vb b/Modules.Config/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.Config/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.Config/My Project/Application.myapp b/Modules.Config/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.Config/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.Config/My Project/AssemblyInfo.vb b/Modules.Config/My Project/AssemblyInfo.vb deleted file mode 100644 index d92cd28b..00000000 --- a/Modules.Config/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.Config/My Project/Resources.Designer.vb b/Modules.Config/My Project/Resources.Designer.vb deleted file mode 100644 index 3c533e50..00000000 --- a/Modules.Config/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Config.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.Config/My Project/Resources.resx b/Modules.Config/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.Config/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.Config/My Project/Settings.Designer.vb b/Modules.Config/My Project/Settings.Designer.vb deleted file mode 100644 index 323842b0..00000000 --- a/Modules.Config/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Config.My.MySettings - Get - Return Global.DigitalData.Modules.Config.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Config/My Project/Settings.settings b/Modules.Config/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.Config/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.Config/SampleConfig.vb b/Modules.Config/SampleConfig.vb deleted file mode 100644 index ba775c22..00000000 --- a/Modules.Config/SampleConfig.vb +++ /dev/null @@ -1,70 +0,0 @@ -Imports Config -Imports NLog - -''' -''' Sample Config Class inheriting from BaseConfig -''' -''' -''' -''' Things this class should do: -''' -''' - Provide defaults for all values -''' - Load the current config using the LoadConfig method of BaseConfig -''' - If no configfile was found, it should create a new datatable with only default values -''' - If a configfile was found, it should merge the values from this file with the defaults from this class -''' - For each propertyname defined in PropertyNames -''' - Check for existing value in datatable -''' - If a value is present, use it -''' - If no value is exists, use the default value -''' - Assign the resulting values to class properties -''' - Save the new config to disk -''' -Public Class SampleConfig - Inherits BaseConfig - - Private _logger As Logger - - Public ReadOnly ConnectionString As String - Public ReadOnly UniversalViewer As String - - Public Overloads ReadOnly Property PropertyNames As Dictionary(Of String, String) - Get - Return New Dictionary(Of String, String) From { - {"ConnectionString", ""}, - {"UniversalViewer", ""} - } - End Get - End Property - - Public Sub New(LogFactory As LogFactory) - MyBase.New(LogFactory) - - _logger = LogFactory.GetCurrentClassLogger() - - ' Load the existing values from the config file into PropertyNames - ' overwriting the default values - Dim oDataTable = LoadConfig() - - For Each oRow As DataRow In oDataTable.Rows - Dim oValue = oRow.Item(_configValue) - Dim oKey = oRow.Item(_configKey) - - PropertyNames.Item(oKey) = oValue - Next - - ' Assign the merged properties to class properties, optionally converting them beforehand - For Each oProperty As KeyValuePair(Of String, String) In PropertyNames - Select Case oProperty.Key - Case "ConnectionString" - ConnectionString = oProperty.Value - Case "UniversalViewer" - UniversalViewer = oProperty.Value - Case Else - _logger.Warn("Property {0} was found in PropertyNames but was not assigned to a config property", oProperty.Key) - End Select - Next - - ' Convert the dictionary back to a datatable and save it - SaveConfig(ConvertToDataTable(PropertyNames)) - End Sub -End Class diff --git a/Modules.Config/packages.config b/Modules.Config/packages.config deleted file mode 100644 index 63f3075e..00000000 --- a/Modules.Config/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Modules.Database/Adapters/Firebird.vb b/Modules.Database/Adapters/Firebird.vb deleted file mode 100644 index a3b24da3..00000000 --- a/Modules.Database/Adapters/Firebird.vb +++ /dev/null @@ -1,350 +0,0 @@ -Imports FirebirdSql.Data.FirebirdClient -Imports System.Text.RegularExpressions -Imports DigitalData.Modules.Logging -Imports System.ComponentModel - -''' -''' MODULE: Firebird -''' -''' VERSION: 0.0.0.4 -''' -''' DATE: 18.12.2018 -''' -''' DESCRIPTION: -''' -''' DEPENDENCIES: NLog, >= 4.5.10 -''' -''' EntityFramework.Firebird, >= 6.4.0 -''' -''' FirebirdSql.Data.FirebirdClient, >= 6.4.0 -''' -''' PARAMETERS: LogConfig, DigitalData.Modules.Logging.LogConfig -''' The LogFactory containing the current log config. Used to instanciate the class logger for this and any dependent class -''' -''' DataSource, String -''' The server where the database lives, for example 127.0.0.1 or dd-vmx09-vm03 -''' -''' Database, String -''' The location of the Database in the format `127.0.0.1:E:\Path\To\Database.FDB` -''' -''' User, String -''' The user name to connect as -''' -''' Password, String -''' The user's password -''' -''' PROPERTIES: ConnectionEstablished, Boolean -''' If the last opened connection was successful -''' -''' ConnectionFailed, Boolean -''' If the last opened connection failed -''' -''' ConnectionString, String -''' The used connectionstring -''' -''' EXAMPLES: -''' -''' REMARKS: If the connection fails due to "wrong username or password", the cause might be that the server harddrive is full.. -''' -Public Class Firebird - Private _Logger As Logger - Private _LogConfig As LogConfig - Private _connectionServer As String - Private _connectionDatabase As String - Private _connectionUsername As String - Private _connectionPassword As String - Private _connectionString As String - Public _DBInitialized As Boolean = False - - Public Const MAX_POOL_SIZE = 1000 - - Public Enum TransactionMode - - NoTransaction - - ExternalTransaction - - WithTransaction - End Enum - - Public ReadOnly Property ConnectionString As String - Get - Return _connectionString - End Get - End Property - - Public ReadOnly Property DatabaseName As String - Get - Dim oRegex As New Regex("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:") - Dim oPath As String = oRegex.Replace(_connectionDatabase, "") - Dim oFileInfo As New IO.FileInfo(oPath) - Return oFileInfo.Name - End Get - End Property - - ''' - ''' - ''' - ''' The LogFactory containing the current log config. Used to instanciate the class logger for this and any dependent class - ''' The server where the database lives, for example 127.0.0.1 or dd-vmx09-vm03 - ''' The location of the Database in the format `127.0.0.1:E:\Path\To\Database.FDB` - ''' The user name to connect as - ''' The user's password - ''' - Public Sub New(LogConfig As LogConfig, Datasource As String, Database As String, User As String, Password As String) - Try - _LogConfig = LogConfig - _Logger = _LogConfig.GetLogger() - Dim oConnectionString = GetConnectionString(Datasource, Database, User, Password) - - _connectionServer = Datasource - _connectionDatabase = Database - _connectionUsername = User - _connectionPassword = Password - _connectionString = oConnectionString - - _Logger.Debug("Connecting to database..") - - ' Test the connection - Dim oConnection = GetConnection() - ' If initial connection was successfully, close it - oConnection.Close() - - If oConnection Is Nothing Then - Throw New Exceptions.DatabaseException() - Else - _DBInitialized = True - End If - - _Logger.Debug("Connection sucessfully established!") - Catch ex As Exception - _Logger.Error(ex) - End Try - - End Sub - - Public Function GetConnection() As FbConnection - Try - Dim oConnection = New FbConnection(_connectionString) - oConnection.Open() - - Return oConnection - Catch ex As Exception - _Logger.Error(ex) - Return Nothing - End Try - End Function - - ''' - ''' Builds a connectionstring from the provided arguments. - ''' - ''' The database server where to connect to - ''' The datasource, eg. the path of the FDB-file - ''' The user used to connect to the database - ''' The password of the connecting user - ''' A connectionstring - Private Function GetConnectionString(DataSource As String, Database As String, User As String, Password As String) As String - Return New FbConnectionStringBuilder With { - .DataSource = DataSource, - .Database = Database, - .UserID = User, - .Password = Password, - .Charset = "UTF8", - .MaxPoolSize = MAX_POOL_SIZE - }.ToString() - End Function - - Private Function MaybeGetTransaction(Connection As FbConnection, Mode As TransactionMode, Transaction As FbTransaction) As FbTransaction - If Mode = TransactionMode.NoTransaction Then - Return Nothing - ElseIf Mode = TransactionMode.ExternalTransaction Then - Return Transaction - Else - Return Connection.BeginTransaction() - End If - End Function - - Private Function MaybeCommitTransaction(Transaction As FbTransaction, TransactionMode As TransactionMode) As Boolean - Select Case TransactionMode - Case TransactionMode.NoTransaction - Return True - Case TransactionMode.ExternalTransaction - Return True - Case TransactionMode.WithTransaction - Try - Transaction.Commit() - Return True - Catch ex As Exception - _Logger.Error(ex) - Return False - End Try - Case Else - Return True - End Select - End Function - - ''' - ''' Executes a non-query command. - ''' - ''' The command to execute - ''' The Firebird connection to use - ''' True, if command was executed sucessfully. Otherwise false. - Public Function ExecuteNonQueryWithConnection(SqlCommand As String, Connection As FbConnection, Optional TransactionMode As TransactionMode = TransactionMode.WithTransaction, Optional Transaction As FbTransaction = Nothing) As Boolean - _Logger.Debug("Executing Non-Query: {0}", SqlCommand) - - If Connection Is Nothing Then - _Logger.Warn("Connection is nothing!") - Return Nothing - End If - - Dim oTransaction = MaybeGetTransaction(Connection, TransactionMode, Transaction) - - Try - Dim oCommand As New FbCommand With { - .CommandText = SqlCommand, - .Connection = Connection - } - - If Not IsNothing(oTransaction) Then - oCommand.Transaction = oTransaction - End If - - oCommand.ExecuteNonQuery() - _Logger.Debug("Command executed!") - Catch ex As Exception - _Logger.Error(ex, $"Error in ExecuteNonQuery while executing command: [{SqlCommand}]") - _Logger.Warn($"Unexpected error in ExecuteNonQueryWithConnection: [{SqlCommand}]") - Throw ex - Finally - MaybeCommitTransaction(oTransaction, TransactionMode) - End Try - - Return True - End Function - - ''' - ''' Executes a non-query command. - ''' - ''' The command to execute - ''' True, if command was executed sucessfully. Otherwise false. - Public Function ExecuteNonQuery(SqlCommand As String) As Boolean - Using oConnection As FbConnection = GetConnection() - Return ExecuteNonQueryWithConnection(SqlCommand, oConnection) - End Using - End Function - - ''' - ''' Executes a non-query command inside the specified transaction. - ''' - ''' The command to execute - ''' True, if command was executed sucessfully. Otherwise false. - Public Function ExecuteNonQuery(SqlCommand As String, Transaction As FbTransaction) As Boolean - Using oConnection As FbConnection = GetConnection() - Return ExecuteNonQueryWithConnection(SqlCommand, oConnection, TransactionMode.ExternalTransaction, Transaction) - End Using - End Function - - ''' - ''' Executes a sql query resulting in a scalar value. - ''' - ''' The query to execute - ''' The Firebird connection to use - ''' The scalar value if the command was executed successfully. Nothing otherwise. - Public Function GetScalarValueWithConnection(SqlQuery As String, Connection As FbConnection, Optional TransactionMode As TransactionMode = TransactionMode.WithTransaction, Optional Transaction As FbTransaction = Nothing) As Object - _Logger.Debug("Fetching Scalar-Value: {0}", SqlQuery) - - If Connection Is Nothing Then - _Logger.Warn("Connection is nothing!") - Return Nothing - End If - - Dim oTransaction = MaybeGetTransaction(Connection, TransactionMode, Transaction) - Dim oResult As Object - - Try - Dim oCommand As New FbCommand With { - .CommandText = SqlQuery, - .Connection = Connection, - .Transaction = oTransaction - } - oResult = oCommand.ExecuteScalar() - Catch ex As Exception - _Logger.Error(ex, $"Error in ReturnScalar while executing command: [{SqlQuery}]") - Throw ex - Finally - MaybeCommitTransaction(oTransaction, TransactionMode) - End Try - - Return oResult - End Function - - ''' - ''' Executes a sql query resulting in a scalar value. - ''' - ''' The query to execute - ''' The scalar value if the command was executed successfully. Nothing otherwise. - Public Function GetScalarValue(SqlQuery As String) As Object - Dim oConnection As FbConnection = GetConnection() - Dim oScalarValue As Object = GetScalarValueWithConnection(SqlQuery, oConnection) - oConnection.Close() - - Return oScalarValue - End Function - - ''' - ''' Executes a sql query resulting in a table of values. - ''' - ''' The query to execute - ''' The Firebird connection to use - ''' A datatable containing the results if the command was executed successfully. Nothing otherwise. - Public Function GetDatatableWithConnection(SqlQuery As String, Connection As FbConnection, Optional TransactionMode As TransactionMode = TransactionMode.NoTransaction, Optional Transaction As FbTransaction = Nothing) As DataTable - _Logger.Debug("Fetching Datatable: {0}", SqlQuery) - - If Connection Is Nothing Then - _Logger.Warn("Connection is nothing!") - Return Nothing - End If - - Dim oTransaction = MaybeGetTransaction(Connection, TransactionMode, Transaction) - Dim oDatatable As New DataTable() With { - .TableName = "DDRESULT" - } - - Try - Dim oAdapter As New FbDataAdapter(New FbCommand With { - .CommandText = SqlQuery, - .Connection = Connection, - .Transaction = oTransaction - }) - - oAdapter.Fill(oDatatable) - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("Error in GetDatatableWithConnection while executing command: [{0}]", SqlQuery) - Throw ex - Finally - MaybeCommitTransaction(oTransaction, TransactionMode) - End Try - - Return oDatatable - End Function - - ''' - ''' Executes a sql query resulting in a table of values. - ''' - ''' The query to execute - ''' A datatable containing the results if the command was executed successfully. Nothing otherwise. - Public Function GetDatatable(SqlQuery As String, Optional TransactionMode As TransactionMode = TransactionMode.NoTransaction, Optional Transaction As FbTransaction = Nothing) As DataTable - Try - Dim oConnection As FbConnection = GetConnection() - Dim oDatatable As DataTable = GetDatatableWithConnection(SqlQuery, oConnection, TransactionMode, Transaction) - oConnection.Close() - - Return oDatatable - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("Error in GetDatatable while executing command: '{0}'", SqlQuery) - Throw ex - End Try - End Function -End Class diff --git a/Modules.Database/Adapters/MSSQLServer.vb b/Modules.Database/Adapters/MSSQLServer.vb deleted file mode 100644 index 604febc9..00000000 --- a/Modules.Database/Adapters/MSSQLServer.vb +++ /dev/null @@ -1,518 +0,0 @@ -Imports System.ComponentModel -Imports System.Data.Common -Imports System.Data.SqlClient -Imports DigitalData.Modules.Encryption -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Base - -Public Class MSSQLServer - Implements IDatabase - - Public Property DBInitialized As Boolean = False Implements IDatabase.DBInitialized - Public Property CurrentConnectionString As String = "" Implements IDatabase.CurrentConnectionString - - Private ReadOnly QueryTimeout As Integer - Private ReadOnly Logger As Logger - - Public Enum TransactionMode - - NoTransaction - - ExternalTransaction - - WithTransaction - End Enum - - Public Sub New(pLogConfig As LogConfig, pConnectionString As String, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) - Logger = pLogConfig.GetLogger() - QueryTimeout = pTimeout - - Try - CurrentConnectionString = pConnectionString - DBInitialized = TestCanConnect(CurrentConnectionString) - Catch ex As Exception - DBInitialized = False - Logger.Error(ex) - End Try - End Sub - - Public Sub New(pLogConfig As LogConfig, Server As String, Database As String, UserId As String, Password As String, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) - Logger = pLogConfig.GetLogger() - QueryTimeout = Timeout - - Try - CurrentConnectionString = GetConnectionString(Server, Database, UserId, Password) - DBInitialized = TestCanConnect(CurrentConnectionString) - Catch ex As Exception - DBInitialized = False - Logger.Error(ex) - End Try - End Sub - - ''' - ''' Encrypts a connection string password. - ''' - ''' A connection string with a plain-text password - ''' The connection string with the password encrypted. - - Public Shared Function EncryptConnectionString(pConnectionString As String) As String - Dim oEncryption As New EncryptionLegacy() - Dim oBuilder As New SqlConnectionStringBuilder() With {.ConnectionString = pConnectionString} - Dim oEncryptedPassword = oEncryption.EncryptData(oBuilder.Password) - oBuilder.Password = oEncryptedPassword - - Return oBuilder.ToString() - End Function - - ''' - ''' Decrypts a connection string password. - ''' - ''' A connection string with a encrypted password - ''' The connection string with the password decrypted. - - Public Shared Function DecryptConnectionString(pConnectionString As String) As String - Dim oEncryption As New EncryptionLegacy() - Dim oBuilder As New SqlConnectionStringBuilder() With {.ConnectionString = pConnectionString} - Dim oDecryptedPassword = oEncryption.DecryptData(oBuilder.Password) - oBuilder.Password = oDecryptedPassword - - Return oBuilder.ToString() - End Function - - - Public Function GetConnectionString(Server As String, Database As String, UserId As String, Password As String) As String - Dim oConnectionStringBuilder As New SqlConnectionStringBuilder() With { - .DataSource = Server, - .InitialCatalog = Database, - .UserID = UserId, - .Password = Password - } - - Return oConnectionStringBuilder.ToString - End Function - - - Public Function GetConnection() As SqlConnection - Try - Dim oConnection = GetSQLConnection() - Return oConnection - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - End Function - - - Private Function MaybeGetTransaction(Connection As SqlConnection, Mode As TransactionMode, Transaction As SqlTransaction) As SqlTransaction - If Connection Is Nothing Then - Throw New ArgumentNullException("Connection") - End If - - If Mode = TransactionMode.NoTransaction Then - Return Nothing - ElseIf Mode = TransactionMode.ExternalTransaction Then - Return Transaction - Else - Return Connection.BeginTransaction() - End If - End Function - - - Private Function MaybeCommitTransaction(Transaction As SqlTransaction, TransactionMode As TransactionMode) As Boolean - Select Case TransactionMode - Case TransactionMode.NoTransaction - Return True - Case TransactionMode.ExternalTransaction - Return True - Case TransactionMode.WithTransaction - Try - Transaction.Commit() - Return True - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - Case Else - Return True - End Select - End Function - - Public Function GetConnectionStringForId(pConnectionId As Integer) As String - Return Get_ConnectionStringforID(pConnectionId) - End Function - - Public Function Get_ConnectionStringforID(pConnectionId As Integer) As String - Dim oConnectionString As String = String.Empty - - Logger.Debug("Getting ConnectionString for ConnectionId [{0}]", pConnectionId) - - If pConnectionId = 0 Then - Logger.Warn("ConnectionId was 0. Falling back to default connection.") - Return String.Empty - End If - - Try - Dim oTable As DataTable = GetDatatable($"SELECT * FROM TBDD_CONNECTION WHERE GUID = {pConnectionId}") - If oTable.Rows.Count = 1 Then - Dim oRow As DataRow = oTable.Rows(0) - Dim oProvider = oRow.Item("SQL_PROVIDER").ToString.ToUpper - Dim oServer = oRow.Item("SERVER") - Dim oDatabase = oRow.Item("DATENBANK") - Dim oUser = oRow.Item("USERNAME") - Dim oPassword = oRow.Item("PASSWORD") - - Select Case oProvider - Case "MS-SQL" - If oUser = "WINAUTH" Then - oConnectionString = $"Server={oServer};Database={oDatabase};Trusted_Connection=True;" - Else - oConnectionString = $"Server={oServer};Database={oDatabase};User Id={oUser};Password={oPassword};" - End If - - Case "ORACLE" - If oRow.Item("BEMERKUNG").ToString.Contains("without tnsnames") Then - oConnectionString = $"Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={oServer})(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME={oDatabase})));User Id={oUser};Password={oPassword};" - Else - oConnectionString = $"Data Source={oServer};Persist Security Info=True;User Id={oUser};Password={oPassword};Unicode=True" - End If - - Case Else - Logger.Warn("Provider [{0}] not supported!", oProvider) - - End Select - - Else - Logger.Warn("No entry for Connection-ID: [{0}] ", pConnectionId.ToString) - End If - - Catch ex As Exception - Logger.Error(ex) - Logger.Warn("Error in Get_ConnectionStringforID") - End Try - - Return DecryptConnectionString(oConnectionString) - End Function - - - Private Function TestCanConnect() As Boolean - Return TestCanConnect(CurrentConnectionString) - End Function - - Private Function TestCanConnect(pConnectionString As String) As Boolean - Try - Logger.Debug("Testing connection to [{0}]", MaskConnectionString(pConnectionString)) - - Dim oDecryptedConnectionString = DecryptConnectionString(pConnectionString) - Dim oConnection As New SqlConnection(oDecryptedConnectionString) - OpenSQLConnection(oConnection) - oConnection.Close() - Return True - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - End Function - - ''' - ''' This Function intentionally has no try..catch block to have any errors caught outside - ''' - ''' - ''' - Private Function OpenSQLConnection(Connection As SqlConnection) As SqlConnection - If Connection.State = ConnectionState.Closed Then - Connection.Open() - End If - - Return Connection - End Function - - - Private Function GetSQLConnection() As SqlConnection - Return GetConnection(CurrentConnectionString) - End Function - - Private Function GetConnection(pConnectionString As String) As SqlConnection - Try - Dim oConnection As New SqlConnection(pConnectionString) - oConnection = OpenSQLConnection(oConnection) - - Dim oMaskedConnectionString = MaskConnectionString(pConnectionString) - Logger.Debug("The Following Connection is open: {0}", oMaskedConnectionString) - - Return oConnection - Catch ex As Exception - Logger.Error(ex) - - Return Nothing - End Try - End Function - - - Private Function MaskConnectionString(pConnectionString As String) As String - Try - If pConnectionString Is Nothing OrElse pConnectionString.Length = 0 Then - Logger.Warn("Connection String is empty!") - Throw New ArgumentNullException("pConnectionString") - End If - - Dim oBuilder As New SqlConnectionStringBuilder() With {.ConnectionString = pConnectionString} - Dim oConnectionString = pConnectionString.Replace(oBuilder.Password, "XXXXX") - Return oConnectionString - Catch ex As Exception - Logger.Error(ex) - Return "Invalid ConnectionString" - End Try - End Function - - ' - Public Function GetDatatable(SqlCommand As String) As DataTable Implements IDatabase.GetDatatable - Return GetDatatable(SqlCommand, QueryTimeout) - End Function - - ''' - ''' Returns a datatable for a sql-statement - ''' - ''' sqlcommand for datatable (select XYZ from TableORView) - ''' Returns a datatable - Public Function GetDatatable(SqlCommand As String, Timeout As Integer) As DataTable Implements IDatabase.GetDatatable - Using oSqlConnection = GetSQLConnection() - Return GetDatatableWithConnectionObject(SqlCommand, oSqlConnection, TransactionMode.WithTransaction, Nothing, Timeout) - End Using - End Function - - ' - Public Function GetDatatable(SqlCommand As String, Transaction As SqlTransaction, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable - Using oSqlConnection = GetSQLConnection() - Return GetDatatableWithConnectionObject(SqlCommand, oSqlConnection, TransactionMode.ExternalTransaction, Transaction, Timeout) - End Using - End Function - - ' - Public Async Function GetDatatableAsync(SqlCommand As String, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As Task(Of DataTable) - Return Await Task.Run(Function() GetDatatable(SqlCommand, Timeout)) - End Function - - ' - Public Function GetDatatableWithConnection(SqlCommand As String, pConnectionString As String, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable - Using oConnection = GetConnection(pConnectionString) - Return GetDatatableWithConnectionObject(SqlCommand, oConnection, Timeout:=Timeout) - End Using - End Function - - Public Function GetDatatableWithConnectionObject(SqlCommand As String, SqlConnection As SqlConnection, - Optional TransactionMode As TransactionMode = TransactionMode.WithTransaction, - Optional Transaction As SqlTransaction = Nothing, - Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable - Dim oTransaction As SqlTransaction = MaybeGetTransaction(SqlConnection, TransactionMode, Transaction) - Dim oTable As New DataTable() With {.TableName = Constants.DEFAULT_TABLE} - - Try - Dim oAdapter As New SqlDataAdapter(New SqlCommand With { - .CommandText = SqlCommand, - .Connection = SqlConnection, - .Transaction = oTransaction, - .CommandTimeout = Timeout - }) - - Logger.Debug("GetDatatableWithConnectionObject: Running Query [{0}]", SqlCommand) - - oAdapter.Fill(oTable) - Catch ex As Exception - Logger.Error(ex) - Logger.Warn("GetDatatableWithConnectionObject: Error in GetDatatableWithConnection while executing command: [{0}]", SqlCommand) - Throw ex - Finally - MaybeCommitTransaction(oTransaction, TransactionMode) - End Try - - Return oTable - End Function - - ' - Public Function ExecuteNonQuery(SQLCommand As String) As Boolean Implements IDatabase.ExecuteNonQuery - Using oConnection = GetSQLConnection() - Return ExecuteNonQueryWithConnectionObject(SQLCommand, oConnection, TransactionMode.WithTransaction, Nothing, QueryTimeout) - End Using - End Function - - ' - Public Function ExecuteNonQuery(SQLCommand As String, Timeout As Integer) As Boolean Implements IDatabase.ExecuteNonQuery - Using oConnection = GetSQLConnection() - Return ExecuteNonQueryWithConnectionObject(SQLCommand, oConnection, TransactionMode.WithTransaction, Nothing, Timeout) - End Using - End Function - - ' - Public Function ExecuteNonQuery(SQLCommand As String, Transaction As SqlTransaction, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As Boolean - Using oConnection = GetSQLConnection() - Return ExecuteNonQueryWithConnectionObject(SQLCommand, Transaction.Connection, TransactionMode.ExternalTransaction, Transaction, Timeout) - End Using - End Function - - ' - Public Async Function ExecuteNonQueryAsync(SQLCommand As String, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As Task(Of Boolean) - Return Await Task.Run(Function() ExecuteNonQuery(SQLCommand, Timeout)) - End Function - - ' - Public Function ExecuteNonQueryWithConnection(pSQLCommand As String, ConnString As String, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As Boolean - Using oConnection = GetConnection(ConnString) - Return ExecuteNonQueryWithConnectionObject(pSQLCommand, oConnection, TransactionMode.WithTransaction, Nothing, Timeout) - End Using - End Function - - Public Function ExecuteNonQueryWithConnectionObject(SqlCommand As String, SqlConnection As SqlConnection, - Optional TransactionMode As TransactionMode = TransactionMode.WithTransaction, - Optional Transaction As SqlTransaction = Nothing, - Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As Boolean - Dim oTransaction As SqlTransaction = MaybeGetTransaction(SqlConnection, TransactionMode, Transaction) - - Try - Logger.Debug("ExecuteNonQueryWithConnectionObject: Running Command [{0}]", SqlCommand) - - Using oSQLCOmmand = SqlConnection.CreateCommand() - oSQLCOmmand.CommandText = SqlCommand - oSQLCOmmand.CommandTimeout = Timeout - oSQLCOmmand.Transaction = oTransaction - oSQLCOmmand.ExecuteNonQuery() - End Using - - Return True - Catch ex As Exception - Logger.Error(ex) - Logger.Warn("ExecuteNonQueryWithConnectionObject: Error in ExecuteNonQueryWithConnectionObject while executing command: [{0}]-[{1}]", SqlCommand, SqlConnection.ConnectionString) - Return False - Finally - MaybeCommitTransaction(oTransaction, TransactionMode) - End Try - End Function - - ' - Public Function GetScalarValue(SQLQuery As String) As Object Implements IDatabase.GetScalarValue - Using oConnection As SqlConnection = GetSQLConnection() - Return GetScalarValueWithConnectionObject(SQLQuery, oConnection) - End Using - End Function - - ' - Public Function GetScalarValue(SQLCommand As String, Timeout As Integer) As Object Implements IDatabase.GetScalarValue - Using oConnection = GetSQLConnection() - Return GetScalarValueWithConnectionObject(SQLCommand, oConnection, TransactionMode.WithTransaction, Nothing, Timeout) - End Using - End Function - - ' - Public Function GetScalarValue(SQLCommand As String, Transaction As SqlTransaction, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As Object - Using oConnection = GetSQLConnection() - Return GetScalarValueWithConnectionObject(SQLCommand, oConnection, TransactionMode.ExternalTransaction, Transaction, Timeout) - End Using - End Function - - ' - Public Async Function GetScalarValueAsync(SQLQuery As String, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As Task(Of Object) - Return Await Task.Run(Function() GetScalarValue(SQLQuery, Timeout)) - End Function - - ' - Public Function GetScalarValueWithConnection(SQLCommand As String, pConnectionString As String, Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As Object - Using oConnection = GetConnection(pConnectionString) - Return GetScalarValueWithConnectionObject(SQLCommand, oConnection, TransactionMode.WithTransaction, Nothing, Timeout) - End Using - End Function - - Public Function GetScalarValueWithConnectionObject(SqlCommand As String, SqlConnection As SqlConnection, - Optional TransactionMode As TransactionMode = TransactionMode.WithTransaction, - Optional Transaction As SqlTransaction = Nothing, - Optional Timeout As Integer = Constants.DEFAULT_TIMEOUT) As Object - - Dim oTransaction As SqlTransaction = MaybeGetTransaction(SqlConnection, TransactionMode, Transaction) - Dim oResult As Object = Nothing - - Try - Using oSQLCOmmand = SqlConnection.CreateCommand() - oSQLCOmmand.CommandText = SqlCommand - oSQLCOmmand.CommandTimeout = Timeout - oSQLCOmmand.Transaction = oTransaction - - oResult = oSQLCOmmand.ExecuteScalar() - End Using - Catch ex As Exception - Logger.Error(ex) - Logger.Warn("GetDatatableWithConnectionObject: Error in GetDatatableWithConnection while executing command: [{0}]", SqlCommand) - Finally - MaybeCommitTransaction(oTransaction, TransactionMode) - End Try - - Return oResult - End Function - - Public Function GetScalarValue(SQLCommand As SqlCommand, OutputParameter As String, Timeout As Integer) As Object - Try - If TestCanConnect() = False Then - Return Nothing - End If - - Logger.Debug("GetScalarValue: Running Query [{0}]", SQLCommand) - - If SQLCommand.CommandText.Contains(" ") Then - SQLCommand.CommandType = CommandType.Text - Else - SQLCommand.CommandType = CommandType.StoredProcedure - End If - - Using oConnection As SqlConnection = GetSQLConnection() - - SQLCommand.Connection = oConnection - SQLCommand.Parameters(OutputParameter).Direction = ParameterDirection.Output - SQLCommand.CommandTimeout = Timeout - SQLCommand.ExecuteNonQuery() - oConnection.Close() - - Return SQLCommand.Parameters(OutputParameter).Value - End Using - Catch ex As Exception - Logger.Error(ex) - Logger.Warn($"GetScalarValue failed SQLCommand [{SQLCommand}]") - - Return Nothing - End Try - End Function - - ' - Public Function GetScalarValue(SQLCommand As SqlCommand, OutputParameter As String) As Object - Return GetScalarValue(SQLCommand, OutputParameter, QueryTimeout) - End Function - - ''' - ''' Executes the passed sql-statement in asyncmode - ''' - ''' the sql statement - ''' Optional Timeout - ''' - Public Sub NewExecuteNonQueryAsync(SqlCommand As String, Optional commandtimeout As Integer = Constants.DEFAULT_TIMEOUT) - Logger.Debug("NewExecuteNonQueryAsync: Running Query [{0}]", SqlCommand) - - Try - Dim oCallback As New AsyncCallback(AddressOf NewExecuteNonQueryAsync_Callback) - - Using oConnection As SqlConnection = GetSQLConnection() - Using oSQLCOmmand = oConnection.CreateCommand() - oSQLCOmmand.CommandText = SqlCommand - oSQLCOmmand.CommandTimeout = commandtimeout - oSQLCOmmand.BeginExecuteNonQuery(oCallback, oSQLCOmmand) - End Using - End Using - Catch ex As Exception - Logger.Error(ex) - Logger.Warn($"NewExecuteNonQueryAsync failed SQLCommand [{SqlCommand}]") - - End Try - End Sub - - ' - Private Sub NewExecuteNonQueryAsync_Callback(ByVal result As IAsyncResult) - Dim command As SqlCommand = CType(result.AsyncState, SqlCommand) - Dim res = command.EndExecuteNonQuery(result) - Logger.Info("Finished executing Async database operation: {0}", command.CommandText) - End Sub -End Class diff --git a/Modules.Database/Adapters/ODBC.vb b/Modules.Database/Adapters/ODBC.vb deleted file mode 100644 index 2d95c07d..00000000 --- a/Modules.Database/Adapters/ODBC.vb +++ /dev/null @@ -1,179 +0,0 @@ -Imports System.Data.Odbc -Imports DigitalData.Modules.Logging - -Public Class ODBC - Private _Logger As Logger - Private _LogConfig As LogConfig - - Private _connectionDatasource As String - Private _connectionUsername As String - Private _connectionPassword As String - Private _connectionString As String - - Public Sub New(LogConfig As LogConfig, Datasource As String, User As String, Password As String) - Try - _LogConfig = LogConfig - _Logger = _LogConfig.GetLogger() - - _connectionDatasource = Datasource - _connectionPassword = Password - _connectionUsername = User - _connectionString = GetConnectionString(Datasource, User, Password) - - _Logger.Debug("Connecting to database..") - - ' Test the connection - Dim oConnection = GetConnection() - - If oConnection Is Nothing Then - Throw New Exceptions.DatabaseException() - End If - - ' If initial connection was successfully, close it - oConnection.Close() - - _Logger.Debug("Connection sucessfully established!") - Catch ex As Exception - _Logger.Error(ex) - End Try - End Sub - - Public Function GetConnection() As OdbcConnection - Try - Dim oConnection As New OdbcConnection(_connectionString) - oConnection.Open() - - Return oConnection - Catch ex As Exception - _Logger.Error(ex) - Return Nothing - End Try - End Function - - Public Function GetConnectionString(Datasource As String, User As String, Password As String) As Object - Return $"DSN={Datasource};UID={User};PWD={Password}" - End Function - - ''' - ''' Executes a non-query command. - ''' - ''' The command to execute - ''' The Firebird connection to use - ''' True, if command was executed sucessfully. Otherwise false. - Public Function ExecuteNonQueryWithConnection(SqlQuery As String, Connection As OdbcConnection) As Object - _Logger.Debug("Fetching Non-Query: {0}", SqlQuery) - - Dim oResult As Object - - If Connection Is Nothing Then - _Logger.Warn("Connection is nothing!") - Return Nothing - End If - - Try - Dim oCommand As New OdbcCommand(SqlQuery, Connection) - oResult = oCommand.ExecuteNonQuery() - Catch ex As Exception - _Logger.Error(ex, $"Error in ExecuteNonQueryWithConnection while executing command: '{SqlQuery}'") - Throw ex - End Try - - Return oResult - End Function - - ''' - ''' Executes a non-query command. - ''' - ''' The command to execute - ''' True, if command was executed sucessfully. Otherwise false. - Public Function ExecuteNonQuery(SqlCommand As String) As Boolean - Dim oConnection As OdbcConnection = GetConnection() - Dim oScalarValue As Object = ExecuteNonQueryWithConnection(SqlCommand, oConnection) - oConnection.Close() - - Return oScalarValue - End Function - - ''' - ''' Executes a sql query resulting in a scalar value. - ''' - ''' The query to execute - ''' The Firebird connection to use - ''' The scalar value if the command was executed successfully. Nothing otherwise. - Public Function GetScalarValueWithConnection(SqlQuery As String, Connection As OdbcConnection) As Object - _Logger.Debug("Fetching Datatable: {0}", SqlQuery) - - Dim oResult As Object - - If Connection Is Nothing Then - _Logger.Warn("Connection is nothing!") - Return Nothing - End If - - Try - Dim oCommand As New OdbcCommand(SqlQuery, Connection) - oResult = oCommand.ExecuteScalar() - Catch ex As Exception - _Logger.Error(ex, $"Error in GetDatatableWithConnection while executing command: '{SqlQuery}'") - Throw ex - End Try - - Return oResult - End Function - - ''' - ''' Executes a sql query resulting in a table of values. - ''' - ''' The query to execute - ''' A datatable containing the results if the command was executed successfully. Nothing otherwise. - Public Function GetScalarValue(SqlQuery As String) As Object - Dim oConnection As OdbcConnection = GetConnection() - Dim oDatatable As DataTable = GetDatatableWithConnection(SqlQuery, oConnection) - oConnection.Close() - - Return oDatatable - End Function - - ''' - ''' Executes a sql query resulting in a table of values. - ''' - ''' The query to execute - ''' The Firebird connection to use - ''' A datatable containing the results if the command was executed successfully. Nothing otherwise. - Public Function GetDatatableWithConnection(SqlQuery As String, Connection As OdbcConnection) As DataTable - _Logger.Debug("Fetching Datatable: {0}", SqlQuery) - - Dim oDatatable As New DataTable() With { - .TableName = "DDRESULT" - } - - If Connection Is Nothing Then - _Logger.Warn("Connection is nothing!") - Return Nothing - End If - - Try - - Dim oAdapter As New OdbcDataAdapter(SqlQuery, Connection) - oAdapter.Fill(oDatatable) - Catch ex As Exception - _Logger.Error(ex, $"Error in GetDatatableWithConnection while executing command: '{SqlQuery}'") - Throw ex - End Try - - Return oDatatable - End Function - - ''' - ''' Executes a sql query resulting in a table of values. - ''' - ''' The query to execute - ''' A datatable containing the results if the command was executed successfully. Nothing otherwise. - Public Function GetDatatable(SqlQuery As String) As DataTable - Dim oConnection As OdbcConnection = GetConnection() - Dim oDatatable As DataTable = GetDatatableWithConnection(SqlQuery, oConnection) - oConnection.Close() - - Return oDatatable - End Function -End Class diff --git a/Modules.Database/Adapters/Oracle.vb b/Modules.Database/Adapters/Oracle.vb deleted file mode 100644 index c87a62e6..00000000 --- a/Modules.Database/Adapters/Oracle.vb +++ /dev/null @@ -1,253 +0,0 @@ -Imports DigitalData.Modules.Encryption -Imports DigitalData.Modules.Logging -Imports Oracle.ManagedDataAccess.Client - -Public Class Oracle - Implements IDatabase - - Public Property DBInitialized As Boolean = False Implements IDatabase.DBInitialized - Public Property CurrentConnectionString As String = "" Implements IDatabase.CurrentConnectionString - - Private ReadOnly _Timeout As Integer - Private ReadOnly _Logger As Logger - - Public Sub New(LogConfig As LogConfig, ConnectionString As String, Optional Timeout As Integer = 120) - _Timeout = Timeout - _Logger = LogConfig.GetLogger() - - ConnectionString = ConnectionString - DBInitialized = TestCanConnect(ConnectionString) - End Sub - - Public Sub New(LogConfig As LogConfig, Server As String, Database As String, UserId As String, Password As String, Optional Timeout As Integer = 120) - _Timeout = Timeout - _Logger = LogConfig.GetLogger() - - CurrentConnectionString = GetConnectionString(Server, Database, UserId, Password) - DBInitialized = TestCanConnect(CurrentConnectionString) - End Sub - - Private Function TestCanConnect(ConnectionString As String) As Boolean - Try - Dim oSQLconnect As New OracleConnection - oSQLconnect.ConnectionString = ConnectionString - oSQLconnect.Open() - oSQLconnect.Close() - Return True - Catch ex As Exception - _Logger.Error(ex) - Return False - End Try - End Function - - Public Shared Function GetConnectionString(Server As String, Database As String, UserId As String, Password As String) As String - Dim oConnectionString = $"Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={Server})(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME={Database})));User Id={UserId};Password={Password};" - Return oConnectionString - End Function - - ''' - ''' Encrypts a connection string password. - ''' - ''' A connection string with a plain-text password - ''' The connection string with the password encrypted. - - Public Shared Function EncryptConnectionString(ConnectionString As String) As String - Dim oEncryption As New EncryptionLegacy() - Dim oBuilder As New OracleConnectionStringBuilder() With {.ConnectionString = ConnectionString} - Dim oEncryptedPassword = oEncryption.EncryptData(oBuilder.Password) - oBuilder.Password = oEncryptedPassword - - Return oBuilder.ToString() - End Function - - ''' - ''' Decrypts a connection string password. - ''' - ''' A connection string with a encrypted password - ''' The connection string with the password decrypted. - - Public Shared Function DecryptConnectionString(ConnectionString As String) As String - Dim oEncryption As New EncryptionLegacy() - Dim oBuilder As New OracleConnectionStringBuilder() With {.ConnectionString = ConnectionString} - Dim oDecryptedPassword = oEncryption.DecryptData(oBuilder.Password) - oBuilder.Password = oDecryptedPassword - - Return oBuilder.ToString() - End Function - - - ''' - ''' Executes the passed sql-statement - ''' - ''' the sql statement - ''' Returns true if properly executed, else false - Public Function NewExecutenonQuery(executeStatement As String) As Boolean - Try - Dim oSQLconnect As New OracleConnection - Dim oSQLCOmmand As OracleCommand - oSQLconnect.ConnectionString = CurrentConnectionString - oSQLconnect.Open() - oSQLCOmmand = oSQLconnect.CreateCommand() - oSQLCOmmand.CommandText = executeStatement - oSQLCOmmand.CommandTimeout = _Timeout - oSQLCOmmand.ExecuteNonQuery() - oSQLCOmmand.Dispose() - oSQLconnect.Close() - Return True - Catch ex As Exception - _Logger.Error(ex) - _Logger.Debug("executeStatement: " & executeStatement) - Return False - End Try - End Function - - ''' - ''' Executes the passed sql-statement as Scalar - ''' - ''' the sql statement - ''' Returns the scalarvalue - Public Function NewExecuteScalar(executeStatement As String) - Dim result - Try - Dim oSQLconnect As New OracleConnection - Dim oSQLCOmmand As OracleCommand - oSQLconnect.ConnectionString = CurrentConnectionString - oSQLconnect.Open() - oSQLCOmmand = oSQLconnect.CreateCommand() - oSQLCOmmand.CommandText = executeStatement - oSQLCOmmand.CommandTimeout = _Timeout - result = oSQLCOmmand.ExecuteScalar() - oSQLCOmmand.Dispose() - oSQLconnect.Close() - Return result - Catch ex As Exception - _Logger.Error(ex) - _Logger.Debug("executeStatement: " & executeStatement) - Throw ex - End Try - End Function - - Public Function GetDatatable(pSQLCommand As String, pTimeout As Integer) As DataTable Implements IDatabase.GetDatatable - Try - Using oConnection = GetConnection(CurrentConnectionString) - Dim oSQLCommand As OracleCommand - oSQLCommand = oConnection.CreateCommand() - oSQLCommand.CommandText = pSQLCommand - oSQLCommand.CommandTimeout = pTimeout - - Dim oAdapter As OracleDataAdapter = New OracleDataAdapter(oSQLCommand) - Dim oTable As DataTable = New DataTable() - - _Logger.Debug("GetDatatable: Running Query [{0}]", oSQLCommand) - - oAdapter.Fill(oTable) - - Return oTable - End Using - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("GetDatatable: Error in GetDatatable while executing command: [{0}]", pSQLCommand) - Return Nothing - End Try - End Function - - Private Function GetDatatable(pSQLCommand As String) As DataTable Implements IDatabase.GetDatatable - Return GetDatatable(pSQLCommand, _Timeout) - End Function - - Public Function ExecuteNonQuery(pSQLCommand As String, pTimeout As Integer) As Boolean Implements IDatabase.ExecuteNonQuery - Try - Using oConnection = GetConnection(CurrentConnectionString) - Dim oSQLCOmmand As OracleCommand - oSQLCOmmand = oConnection.CreateCommand() - oSQLCOmmand.CommandText = pSQLCommand - oSQLCOmmand.CommandTimeout = pTimeout - - - _Logger.Debug("ExecuteNonQuery: Running Query [{0}]", oSQLCOmmand) - oSQLCOmmand.ExecuteNonQuery() - oSQLCOmmand.Dispose() - Return True - End Using - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("ExecuteNonQuery: Error in ExecuteNonQuery while executing command: [{0}]", pSQLCommand) - Return False - End Try - End Function - - Public Function ExecuteNonQuery(pSQLCommand As String) As Boolean Implements IDatabase.ExecuteNonQuery - Return ExecuteNonQuery(pSQLCommand, _Timeout) - End Function - - Public Function GetScalarValue(pSQLCommand As String, pTimeout As Integer) As Object Implements IDatabase.GetScalarValue - Dim result - Try - Using oConnection = GetConnection(CurrentConnectionString) - Dim oSQLCOmmand As OracleCommand - oSQLCOmmand = oConnection.CreateCommand() - oSQLCOmmand.CommandText = pSQLCommand - oSQLCOmmand.CommandTimeout = pTimeout - - _Logger.Debug("GetScalarValue: Running Query [{0}]", oSQLCOmmand) - result = oSQLCOmmand.ExecuteScalar() - - Return result - End Using - - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("GetScalarValue: Error in GetScalarValue while executing command: [{0}]", pSQLCommand) - Throw ex - End Try - End Function - - Public Function GetScalarValue(pSQLCommand As String) As Object Implements IDatabase.GetScalarValue - Return GetScalarValue(pSQLCommand, _Timeout) - End Function - - Private Function GetConnection(ConnectionString As String) As OracleConnection - Try - Dim oConnection As New OracleConnection(ConnectionString) - oConnection = OpenSQLConnection(oConnection) - - Dim oMaskedConnectionString = MaskConnectionString(ConnectionString) - _Logger.Debug("The Following Connection is open: {0}", oMaskedConnectionString) - - Return oConnection - Catch ex As Exception - _Logger.Error(ex) - - Return Nothing - End Try - End Function - - ''' - ''' This Function intentionally has no try..catch block to have any errors caught outside - ''' - ''' - ''' - Private Function OpenSQLConnection(Connection As OracleConnection) As OracleConnection - If Connection.State = ConnectionState.Closed Then - Connection.Open() - End If - - Return Connection - End Function - - - Private Function MaskConnectionString(ConnectionString As String) As String - Try - If ConnectionString Is Nothing OrElse ConnectionString.Length = 0 Then - Throw New ArgumentNullException("ConnectionString") - End If - - Dim oBuilder As New OracleConnectionStringBuilder() With {.ConnectionString = ConnectionString} - Dim oConnectionString = ConnectionString.Replace(oBuilder.Password, "XXXXX") - Return oConnectionString - Catch ex As Exception - _Logger.Error(ex) - Return "Invalid ConnectionString" - End Try - End Function -End Class diff --git a/Modules.Database/App.config b/Modules.Database/App.config deleted file mode 100644 index c64db477..00000000 --- a/Modules.Database/App.config +++ /dev/null @@ -1,23 +0,0 @@ - - - - -
- - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.Database/ConnectionString.vb b/Modules.Database/ConnectionString.vb deleted file mode 100644 index ec5575f1..00000000 --- a/Modules.Database/ConnectionString.vb +++ /dev/null @@ -1,20 +0,0 @@ -Public Class ConnectionString - Public Enum ConnectionStringType - MSSQLServer - ODBC - Oracle - End Enum - - Public Shared Function GetConnectionStringType(pConnectionString As String) As ConnectionStringType - ' This variable only exists to shorten the if-conditions - Dim c = pConnectionString - - If (c.Contains("Server=") Or c.Contains("Data Source=")) And (c.Contains("Database=") Or c.Contains("Initial Catalog=")) Then - Return ConnectionStringType.MSSQLServer - ElseIf (c.Contains("dsn=")) Then - Return ConnectionStringType.ODBC - Else - Return ConnectionStringType.Oracle - End If - End Function -End Class diff --git a/Modules.Database/Constants.vb b/Modules.Database/Constants.vb deleted file mode 100644 index 3827c68b..00000000 --- a/Modules.Database/Constants.vb +++ /dev/null @@ -1,8 +0,0 @@ -Public Class Constants - Public Const PROVIDER_MSSQL = "MS-SQL" - Public Const PROVIDER_ORACLE = "ORACLE" - Public Const PROVIDER_ODBC = "ODBC" - - Public Const DEFAULT_TIMEOUT = 120 - Public Const DEFAULT_TABLE = "DDRESULT" -End Class diff --git a/Modules.Database/Database.vbproj b/Modules.Database/Database.vbproj deleted file mode 100644 index fb7aa339..00000000 --- a/Modules.Database/Database.vbproj +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - Debug - AnyCPU - {EAF0EA75-5FA7-485D-89C7-B2D843B03A96} - Library - DigitalData.Modules.Database - DigitalData.Modules.Database - 512 - Windows - v4.6.1 - - - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Database.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Database.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - ..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll - - - ..\packages\EntityFramework.Firebird.6.4.0\lib\net452\EntityFramework.Firebird.dll - - - ..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll - - - ..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - Designer - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {8a8f20fc-c46e-41ac-bee7-218366cfff99} - Encryption - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - - - Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - - - - - \ No newline at end of file diff --git a/Modules.Database/Dispatcher.vb b/Modules.Database/Dispatcher.vb deleted file mode 100644 index aa53df79..00000000 --- a/Modules.Database/Dispatcher.vb +++ /dev/null @@ -1,89 +0,0 @@ -Imports DigitalData.Modules.Base -Imports DigitalData.Modules.Logging - -Public Class Dispatcher - Public ReadOnly Property Connections As New List(Of DispatcherConnection) - - Public ReadOnly Logger As Logger - Public ReadOnly LogConfig As LogConfig - - Public Sub New(pLogConfig As LogConfig, pConnections As List(Of DispatcherConnection)) - LogConfig = pLogConfig - Logger = pLogConfig.GetLogger() - Connections = pConnections - End Sub - - Public Function GetDatatable(pSQLCommand As String, pConnectionId As Integer) As DataTable - Dim oAdapter As IDatabase = GetAdapterClass(pConnectionId) - Return oAdapter.GetDatatable(pSQLCommand) - End Function - - Public Function ExectueNonQuery(pSQLCommand As String, pConnectionId As Integer) As Boolean - Dim oAdapter As IDatabase = GetAdapterClass(pConnectionId) - Return oAdapter.ExecuteNonQuery(pSQLCommand) - End Function - - Public Function GetScalarValue(pSQLCommand As String, pConnectionId As Integer) As Object - Dim oAdapter As IDatabase = GetAdapterClass(pConnectionId) - Return oAdapter.GetScalarValue(pSQLCommand) - End Function - - Private Function GetConnection(pConnectionId As Integer) As DispatcherConnection - Dim oConnection As DispatcherConnection = Connections. - Where(Function(conn) conn.Id = pConnectionId). - FirstOrDefault() - - If oConnection IsNot Nothing Then - Logger.Debug("Resolved ConnectionId [{0}] into Connection [{1}]", pConnectionId, oConnection.Name) - End If - - Return oConnection - End Function - - Private Function GetAdapterClass(pConnectionId As Integer) As IDatabase - Dim oConnection = GetConnection(pConnectionId) - Dim oArgs As New List(Of Object) From {LogConfig, oConnection.ConnectionString, Constants.DEFAULT_TIMEOUT} - Logger.Debug("Creating database adapter object for type [{0}]", ConnectionType.MSSQL) - - ' TODO: Cache Database instances to avoid constructing them for every call - - Select Case oConnection.ConnectionType - Case ConnectionType.MSSQL - Return New MSSQLServer(LogConfig, oConnection.ConnectionString, Constants.DEFAULT_TIMEOUT) - - Case ConnectionType.Oracle - Return New Oracle(LogConfig, oConnection.ConnectionString, Constants.DEFAULT_TIMEOUT) - - Case ConnectionType.Firebird - Dim oBuilder As New FirebirdSql.Data.FirebirdClient.FbConnectionStringBuilder(oConnection.ConnectionString) - Return New Firebird(LogConfig, oBuilder.DataSource, oBuilder.Database, oBuilder.UserID, oBuilder.Password) - - Case ConnectionType.ODBC - 'Dim oBuilder As New Data.Odbc.OdbcConnectionStringBuilder(pConnection.ConnectionString) - 'Return New ODBC(LogConfig) - Return Nothing - - Case Else - Return Nothing - End Select - End Function - - Public Enum ConnectionType - MSSQL - Oracle - ODBC - Firebird - End Enum - - Public Class DispatcherOptions - Public Property QueryTimeout As Integer = Constants.DEFAULT_TIMEOUT - End Class - - Public Class DispatcherConnection - Public Property Id As Integer - Public Property Name As String - Public Property ConnectionString As String - Public Property ConnectionType As ConnectionType - End Class -End Class - diff --git a/Modules.Database/Exceptions.vb b/Modules.Database/Exceptions.vb deleted file mode 100644 index 4f86f7e4..00000000 --- a/Modules.Database/Exceptions.vb +++ /dev/null @@ -1,18 +0,0 @@ -Public Class Exceptions - - Public Class DatabaseException - Inherits Exception - - Public Sub New() - End Sub - - Public Sub New(message As String) - MyBase.New(message) - End Sub - - Public Sub New(message As String, innerException As Exception) - MyBase.New(message, innerException) - End Sub - End Class - -End Class diff --git a/Modules.Database/IDatabase.vb b/Modules.Database/IDatabase.vb deleted file mode 100644 index a473b393..00000000 --- a/Modules.Database/IDatabase.vb +++ /dev/null @@ -1,18 +0,0 @@ -Imports System.Data.Common - -Public Interface IDatabase - ''' - ''' Returns true if the initial connection to the configured database was successful. - ''' - Property DBInitialized As Boolean - Property CurrentConnectionString As String - - Function GetDatatable(SqlCommand As String, Timeout As Integer) As DataTable - Function GetDatatable(SqlCommand As String) As DataTable - - Function ExecuteNonQuery(SQLCommand As String, Timeout As Integer) As Boolean - Function ExecuteNonQuery(SQLCommand As String) As Boolean - - Function GetScalarValue(SQLQuery As String, Timeout As Integer) As Object - Function GetScalarValue(SQLQuery As String) As Object -End Interface diff --git a/Modules.Database/My Project/Application.Designer.vb b/Modules.Database/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.Database/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.Database/My Project/Application.myapp b/Modules.Database/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.Database/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.Database/My Project/AssemblyInfo.vb b/Modules.Database/My Project/AssemblyInfo.vb deleted file mode 100644 index c5de1916..00000000 --- a/Modules.Database/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.Database/My Project/Resources.Designer.vb b/Modules.Database/My Project/Resources.Designer.vb deleted file mode 100644 index 975b72a9..00000000 --- a/Modules.Database/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Database.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.Database/My Project/Resources.resx b/Modules.Database/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.Database/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.Database/My Project/Settings.Designer.vb b/Modules.Database/My Project/Settings.Designer.vb deleted file mode 100644 index 50b18d21..00000000 --- a/Modules.Database/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Database.My.MySettings - Get - Return Global.DigitalData.Modules.Database.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Database/My Project/Settings.settings b/Modules.Database/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.Database/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.Database/TableCache.vb b/Modules.Database/TableCache.vb deleted file mode 100644 index 28a1e39d..00000000 --- a/Modules.Database/TableCache.vb +++ /dev/null @@ -1,17 +0,0 @@ -Public Class TableCache - Private Items As New Dictionary(Of String, DataTable) - - Public Function [Get](SQLCommand As String) - Dim oKey As String = SQLCommand.ToUpper - If Items.ContainsKey(oKey) Then - Return Items.Item(oKey) - Else - - End If - End Function - - Private Function SaveTable() - - End Function - -End Class diff --git a/Modules.Database/packages.config b/Modules.Database/packages.config deleted file mode 100644 index 0cbaa359..00000000 --- a/Modules.Database/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Modules.EDMI.File.Test/EDMI.File.Test.vbproj b/Modules.EDMI.File.Test/EDMI.File.Test.vbproj deleted file mode 100644 index c269bd8e..00000000 --- a/Modules.EDMI.File.Test/EDMI.File.Test.vbproj +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - Debug - AnyCPU - {16857A4E-2609-47E6-9C35-7669D64DD040} - Library - EDMI.File.Test - EDMI.File.Test - 512 - Windows - v4.7.2 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - - true - full - true - true - bin\Debug\ - EDMI.File.Test.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - EDMI.File.Test.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - ..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - - - ..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {1477032d-7a02-4c5f-b026-a7117da4bc6b} - EDMI.File - - - {903B2D7D-3B80-4BE9-8713-7447B704E1B0} - Logging - - - - - - - Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - - - - - \ No newline at end of file diff --git a/Modules.EDMI.File.Test/My Project/Application.Designer.vb b/Modules.EDMI.File.Test/My Project/Application.Designer.vb deleted file mode 100644 index 88dd01c7..00000000 --- a/Modules.EDMI.File.Test/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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 - diff --git a/Modules.EDMI.File.Test/My Project/Application.myapp b/Modules.EDMI.File.Test/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.EDMI.File.Test/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.EDMI.File.Test/My Project/AssemblyInfo.vb b/Modules.EDMI.File.Test/My Project/AssemblyInfo.vb deleted file mode 100644 index d81985a1..00000000 --- a/Modules.EDMI.File.Test/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,18 +0,0 @@ -Imports System -Imports System.Reflection -Imports System.Runtime.InteropServices - - - - - - - - - - - - -' - - diff --git a/Modules.EDMI.File.Test/My Project/Resources.Designer.vb b/Modules.EDMI.File.Test/My Project/Resources.Designer.vb deleted file mode 100644 index 3a5490d9..00000000 --- a/Modules.EDMI.File.Test/My Project/Resources.Designer.vb +++ /dev/null @@ -1,62 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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("EDMI.File.Test.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/Modules.EDMI.File.Test/My Project/Resources.resx b/Modules.EDMI.File.Test/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.EDMI.File.Test/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.EDMI.File.Test/My Project/Settings.Designer.vb b/Modules.EDMI.File.Test/My Project/Settings.Designer.vb deleted file mode 100644 index 1157b717..00000000 --- a/Modules.EDMI.File.Test/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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.EDMI.File.Test.My.MySettings - Get - Return Global.EDMI.File.Test.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.EDMI.File.Test/My Project/Settings.settings b/Modules.EDMI.File.Test/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.EDMI.File.Test/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.EDMI.File.Test/PathTest.vb b/Modules.EDMI.File.Test/PathTest.vb deleted file mode 100644 index b0531bd4..00000000 --- a/Modules.EDMI.File.Test/PathTest.vb +++ /dev/null @@ -1,22 +0,0 @@ -Imports System.Text -Imports DigitalData.Modules.Logging -Imports Microsoft.VisualStudio.TestTools.UnitTesting -Imports DigitalData.Modules.EDMI - - Public Class PathTest - - ' Public Sub TestMethod1() - ' Dim oLogConfig As New LogConfig(LogConfig.PathType.Temp) - ' Dim oTempPath = System.IO.Path.GetTempPath() - ' Dim oPath As New DigitalData.Modules.EDMI.File.Path(oLogConfig, oTempPath) - ' Dim oNow As DateTime = DateTime.Now - ' Dim oYear = oNow.Year - ' Dim oMonth = oNow.Month.ToString.PadLeft(2, "0") - ' Dim oDay = oNow.Day.ToString.PadLeft(2, "0") - - - ' Assert.AreEqual(oPath.GetFullPath("TestDocumentType"), $"{oTempPath}EDMI\Active\TestDocumentType\{oYear}\{oMonth}\{oDay}") - ' Assert.AreEqual(oPath.GetArchivePath("TestDocumentType"), $"{oTempPath}EDMI\Archive\TestDocumentType\{oYear}\{oMonth}\{oDay}") - 'End Sub - -End Class \ No newline at end of file diff --git a/Modules.EDMI.File.Test/packages.config b/Modules.EDMI.File.Test/packages.config deleted file mode 100644 index f84cb106..00000000 --- a/Modules.EDMI.File.Test/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Modules.EDMI.File/Archive.vb b/Modules.EDMI.File/Archive.vb deleted file mode 100644 index ddaddebe..00000000 --- a/Modules.EDMI.File/Archive.vb +++ /dev/null @@ -1,39 +0,0 @@ -Imports System.IO -Imports DigitalData.Modules.Logging - -Public Class Archive - Private ReadOnly _LogConfig As LogConfig - Private ReadOnly _Logger As Logger - - Public Sub New(LogConfig As LogConfig) - _LogConfig = LogConfig - _Logger = LogConfig.GetLogger() - End Sub - - ''' - ''' Sets a retention-period for a give file path by setting the file attributes LastAccessTime and ReadOnly - ''' - ''' - ''' If greater than 0, sets this plus the current date as LastAccessTime - ''' If true, sets ReadOnly Attribute - Public Sub SetRetention(FilePath As String, RetentionTimeInDays As Integer, [ReadOnly] As Boolean) - Try - If RetentionTimeInDays > 0 Then - _Logger.Info("Setting LastAccessTime for file [{0}]", FilePath) - IO.File.SetLastAccessTime(FilePath, Date.Now.AddDays(RetentionTimeInDays)) - End If - Catch ex As Exception - _Logger.Error(ex) - End Try - - Try - If [ReadOnly] Then - _Logger.Info("Setting ReadOnly Attribute for file [{0}]", FilePath) - Dim oAttributes = IO.File.GetAttributes(FilePath) Or FileAttributes.ReadOnly - IO.File.SetAttributes(FilePath, oAttributes) - End If - Catch ex As Exception - _Logger.Error(ex) - End Try - End Sub -End Class diff --git a/Modules.EDMI.File/EDMI.File.vbproj b/Modules.EDMI.File/EDMI.File.vbproj deleted file mode 100644 index ba20ad95..00000000 --- a/Modules.EDMI.File/EDMI.File.vbproj +++ /dev/null @@ -1,121 +0,0 @@ - - - - - Debug - AnyCPU - {1477032D-7A02-4C5F-B026-A7117DA4BC6B} - Library - DigitalData.Modules.EDMI.File - DigitalData.Modules.EDMI.File - 512 - Windows - v4.7.2 - true - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.EDMI.File.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.EDMI.File.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {903B2D7D-3B80-4BE9-8713-7447B704E1B0} - Logging - - - - \ No newline at end of file diff --git a/Modules.EDMI.File/My Project/Application.Designer.vb b/Modules.EDMI.File/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.EDMI.File/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.EDMI.File/My Project/Application.myapp b/Modules.EDMI.File/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.EDMI.File/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.EDMI.File/My Project/AssemblyInfo.vb b/Modules.EDMI.File/My Project/AssemblyInfo.vb deleted file mode 100644 index 3ce8de0f..00000000 --- a/Modules.EDMI.File/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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 wird für die typelib-ID verwendet, 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, -' indem Sie "*" wie unten gezeigt eingeben: -' - - - diff --git a/Modules.EDMI.File/My Project/Resources.Designer.vb b/Modules.EDMI.File/My Project/Resources.Designer.vb deleted file mode 100644 index d1edc291..00000000 --- a/Modules.EDMI.File/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.EDMI.File.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.EDMI.File/My Project/Resources.resx b/Modules.EDMI.File/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.EDMI.File/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.EDMI.File/My Project/Settings.Designer.vb b/Modules.EDMI.File/My Project/Settings.Designer.vb deleted file mode 100644 index f8429069..00000000 --- a/Modules.EDMI.File/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.EDMI.File.My.MySettings - Get - Return Global.DigitalData.Modules.EDMI.File.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.EDMI.File/My Project/Settings.settings b/Modules.EDMI.File/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.EDMI.File/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.EDMI.File/Path.vb b/Modules.EDMI.File/Path.vb deleted file mode 100644 index 3b57e9d6..00000000 --- a/Modules.EDMI.File/Path.vb +++ /dev/null @@ -1,50 +0,0 @@ -Imports DigitalData.Modules.Logging -Imports System.IO - -Public Class Path - Private ReadOnly _LogConfig As LogConfig - Private ReadOnly _Logger As Logger - Private ReadOnly _BasePath As String - - Public Sub New(LogConfig As LogConfig, DatastoreBasePath As String) - _LogConfig = LogConfig - _Logger = LogConfig.GetLogger() - _BasePath = DatastoreBasePath - End Sub - - Public Function GetFullPath(DocumentType As String, Optional FileName As String = "") As String - Dim oParts = New List(Of String) From {_BasePath} - oParts.AddRange(Do_GetRelativePath(DocumentType, FileName)) - - Return IO.Path.Combine(oParts.ToArray()) - End Function - - Public Function GetFullPathFromRelativePath(RelativePath As String) As String - Dim oParts = New List(Of String) From {_BasePath} - oParts.Add(RelativePath) - Return IO.Path.Combine(oParts.ToArray) - End Function - - Public Function GetRelativePath(DocumentType As String, Optional FileName As String = "") As String - Return IO.Path.Combine(Do_GetRelativePath(DocumentType, FileName).ToArray) - End Function - - Private Function Do_GetRelativePath(DocumentType As String, Optional FileName As String = "") As List(Of String) - Dim oPathParts As New List(Of String) From {DocumentType} - oPathParts.AddRange(GetDatePath()) - oPathParts.Add(FileName) - - Return oPathParts - End Function - - Private Function GetDatePath() As List(Of String) - Dim oDate = DateTime.Now - Dim oResultList As New List(Of String) From { - oDate.Year, - oDate.Month.ToString.PadLeft(2, "0"), - oDate.Day.ToString.PadLeft(2, "0") - } - - Return oResultList - End Function -End Class diff --git a/Modules.EDMI.File/packages.config b/Modules.EDMI.File/packages.config deleted file mode 100644 index d4e65ac3..00000000 --- a/Modules.EDMI.File/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Client.vb b/Modules.EDMIAPI/Client.vb deleted file mode 100644 index e93b60d8..00000000 --- a/Modules.EDMIAPI/Client.vb +++ /dev/null @@ -1,1039 +0,0 @@ -Imports System.IO -Imports System.ServiceModel -Imports DigitalData.Modules.EDMI.API.Constants -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.EDMI.API.Rights -Imports DigitalData.Modules.Language.Utils -Imports DigitalData.Modules.Logging - -Public Class Client - ' Constants - Private Const UPDATE_INTERVAL_IN_MINUTES As Integer = 1 - - Private Const KIND_TYPE_DOC = "DOC" - - ' Helper Classes - Private ReadOnly LogConfig As LogConfig - Private ReadOnly Logger As Logger - Private ReadOnly ChannelManager As Channel - - ' Runtime Variables - Private _ServerAddress As ServerAddressStruct - Private _ClientConfig As GlobalStateClientConfiguration - Private _CachedTables As New List(Of String) - Private _IsOnline As Boolean - Private _Channel As IEDMIServiceChannel - - ' Update Timer - Private WithEvents UpdateTimer As New Timers.Timer - - ' Public Variables - Public ReadOnly Property CachedTables - Get - Return _CachedTables - End Get - End Property - - Public ReadOnly Property ClientConfig As GlobalStateClientConfiguration - Get - If _ClientConfig Is Nothing Then - Throw New ApplicationException("ClientConfig is empty! Please connect to the service before accessing this property") - End If - - Return _ClientConfig - End Get - End Property - - Public ReadOnly Property IsOnline As Boolean - Get - Return _IsOnline - End Get - End Property - - Public ReadOnly Property ServerAddress As String - Get - Return $"{_ServerAddress.Host}:{_ServerAddress.Port}" - End Get - End Property - - ''' - ''' Parse a IPAddress:Port String into its parts - ''' - ''' A Server Address, for example: 192.168.1.50, 192.168.1.50:9000, 192.168.1.50;9000 - Public Shared Function ParseServiceAddress(AddressWithOptionalPort As String) As Tuple(Of String, Integer) - Dim oConnection As New Connection() - Dim oAddress As ServerAddressStruct = oConnection.ParseServiceAddress(AddressWithOptionalPort) - - Return New Tuple(Of String, Integer)(oAddress.Host, oAddress.Port) - End Function - - ''' - ''' Creates a new EDMI Client object - ''' - ''' LogConfig object - ''' The IP address/hostname and port, separated by semicolon or colon, ex. 1.2.3.4:9000 - Public Sub New(pLogConfig As LogConfig, pServiceAdress As String) - LogConfig = pLogConfig - Logger = pLogConfig.GetLogger() - - UpdateTimer.Interval = 60 * 1000 * UPDATE_INTERVAL_IN_MINUTES - UpdateTimer.Start() - - Try - Dim oConnection = New Connection() - _ServerAddress = oConnection.ParseServiceAddress(pServiceAdress) - ChannelManager = New Channel(pLogConfig, _ServerAddress) - AddHandler ChannelManager.Reconnect, AddressOf Reconnect - - Logger.Debug("Ready for connection to Service at: [{0}:{1}]", _ServerAddress.Host, _ServerAddress.Port) - - Catch ex As Exception - Logger.Error(ex) - End Try - End Sub - - ''' - ''' Creates a new EDMI Client object - ''' - ''' LogConfig object - ''' The IP address to connect to - ''' The Port number to use for the connection - Public Sub New(pLogConfig As LogConfig, pIPAddress As String, pPortNumber As Integer) - LogConfig = pLogConfig - Logger = pLogConfig.GetLogger() - - UpdateTimer.Interval = 60 * 1000 * UPDATE_INTERVAL_IN_MINUTES - UpdateTimer.Start() - - Try - Dim oConnection = New Connection() - _ServerAddress = oConnection.ParseServiceAddress(pIPAddress, pPortNumber) - ChannelManager = New Channel(pLogConfig, _ServerAddress) - AddHandler ChannelManager.Reconnect, AddressOf Reconnect - - Logger.Debug("Ready for connection to Service at: [{0}:{1}]", _ServerAddress.Host, _ServerAddress.Port) - - Catch ex As Exception - Logger.Error(ex) - End Try - End Sub - - ''' - ''' Connect to the service - ''' - ''' True if connection was successful, false otherwise - Public Function Connect() As Boolean - Try - _Channel = ChannelManager.GetChannel() - - Logger.Debug("Opening channel..") - _Channel.Open() - - Dim oResponse = _Channel.GetClientConfig() - If oResponse.OK Then - _ClientConfig = oResponse.ClientConfig - Else - Logger.Warn("Client Configuration could not be loaded: [{0}]", oResponse.ErrorMessage) - End If - - Logger.Info($"Connection to AppService [{ServerAddress}] successfully established!") - - _IsOnline = True - - Return True - Catch ex As Exception - _IsOnline = False - - Logger.Error(ex) - Return False - End Try - End Function - - ''' - ''' Aborts the channel and creates a new connection - ''' - Public Sub Reconnect() - Logger.Warn("Connection faulted. Trying to reconnect..") - - Try - _Channel.Abort() - _Channel = ChannelManager.GetChannel() - _Channel.Open() - - _IsOnline = True - Catch ex As Exception - Logger.Error(ex) - End Try - End Sub - - Private Async Function UpdateTimer_Elapsed(sender As Object, e As Timers.ElapsedEventArgs) As Task Handles UpdateTimer.Elapsed - Try - Dim oTables As String() = Await _Channel.GetCachedTablesAsync() - _CachedTables = oTables. - Select(Function(table) table.ToUpper). - ToList() - Catch ex As Exception - Logger.Warn("Update of CachedTable was not successful!") - Logger.Error(ex) - _CachedTables = New List(Of String) - End Try - End Function - - ''' - ''' Imports a file from a filepath, creating a IDB ObjectId and Filesystem Object - ''' - ''' Type of ObjectStore. Can be WORK or ARCHIVE. - ''' Business entity that the new file object should belong to. - ''' Other file import options - ''' When local filepath was not found - ''' When there was a error in the Service - ''' The ObjectId of the newly generated filesystem object - Public Async Function NewFileAsync(pFilePath As String, pObjectStoreName As String, pObjectKind As String, pIDBDoctypeId As Long, Optional pImportOptions As Options.NewFileOptions = Nothing) As Task(Of Long) - Try - Dim oNewFile As New Modules.IDB.NewFile(LogConfig, _Channel) - Return Await oNewFile.RunAsync(pFilePath, pObjectStoreName, pObjectKind, pIDBDoctypeId, pImportOptions) - - Catch ex As Exception - Logger.Error(ex) - Return Nothing - - End Try - End Function - - Public Async Function UpdateFileAsync(pObjectId As Long, pFilePath As String, Optional pImportOptions As Options.UpdateFileOptions = Nothing) As Task(Of Long) - Try - Dim oUpdateFile As New Modules.IDB.UpdateFile(LogConfig, _Channel) - Return Await oUpdateFile.RunAsync(pFilePath, pObjectId, pImportOptions) - - Catch ex As Exception - Logger.Error(ex) - Return Nothing - - End Try - End Function - - Public Async Function SetObjectStateAsync(pObjectId As Long, pState As String, Optional pOptions As Options.SetObjectStateOptions = Nothing) As Task(Of Boolean) - Try - Dim oSetObjectState As New Modules.IDB.SetObjectState(LogConfig, _Channel) - Return Await oSetObjectState.RunAsync(pObjectId, pState, pOptions) - - Catch ex As Exception - Logger.Error(ex) - Return False - - End Try - End Function - - Public Async Function SetAttributeValueAsync(pObjectId As Long, pName As String, pValue As Object, Optional pOptions As Options.SetAttributeValueOptions = Nothing) As Task(Of Boolean) - Try - Dim oSetAttributeValue As New Modules.IDB.SetAttributeValue(LogConfig, _Channel) - Return Await oSetAttributeValue.RunAsync(pObjectId, pName, pValue, pOptions) - - Catch ex As Exception - Logger.Error(ex) - Return False - - End Try - End Function - - Public Async Function CheckOutFile(pObjectId As Long, pComment As String, Optional pOptions As Options.CheckOutInOptions = Nothing) As Task(Of Long) - Try - Dim oCheckOutFile As New Modules.IDB.CheckOutFile(LogConfig, _Channel) - Return Await oCheckOutFile.RunAsync(pObjectId, pComment, pOptions) - - Catch ex As Exception - Logger.Error(ex) - Return Nothing - - End Try - End Function - - Public Async Function CheckOutFile(pObjectId As Long, Optional pOptions As Options.CheckOutInOptions = Nothing) As Task(Of Long) - Try - Dim oCheckOutFile As New Modules.IDB.CheckOutFile(LogConfig, _Channel) - Return Await oCheckOutFile.RunAsync(pObjectId, String.Empty, pOptions) - - Catch ex As Exception - Logger.Error(ex) - Return Nothing - - End Try - End Function - - Public Async Function CheckInFile(pObjectId As Long, Optional pOptions As Options.CheckOutInOptions = Nothing) As Task(Of Long) - Try - Dim oCheckInFile As New Modules.IDB.CheckInFile(LogConfig, _Channel) - Return Await oCheckInFile.RunAsync(pObjectId, pOptions) - - Catch ex As Exception - Logger.Error(ex) - Return Nothing - - End Try - End Function - - Public Async Function ImportFileAsync( - pFilePath As String, - pAttributeValues As List(Of UserAttributeValue), - pObjectStoreName As String, - pObjectKind As String, - pIDBDoctypeId As String, - Optional pImportOptions As Options.ImportFileOptions = Nothing) As Task(Of ImportFileResponse) - Try - Dim oImportFile As New Modules.IDB.ImportFile(LogConfig, _Channel) - Return Await oImportFile.RunAsync(pFilePath, pAttributeValues, pObjectStoreName, pObjectKind, pIDBDoctypeId, pImportOptions) - - Catch ex As Exception - Logger.Error(ex) - Return Nothing - - End Try - End Function - - Public Async Function Globix_ImportFileAsync( - pFilePath As String, - pProfileId As Integer, - pAttributeValues As List(Of UserAttributeValue), - pObjectStoreName As String, - pObjectKind As String, - pIDBDoctypeId As String, - Optional pImportOptions As Options.ImportFileOptions = Nothing) As Task(Of Globix_ImportFileResponse) - Try - Dim oImportFile As New Modules.Globix.ImportFile(LogConfig, _Channel) - Return Await oImportFile.RunAsync(pFilePath, pProfileId, pAttributeValues, pObjectStoreName, pObjectKind, pIDBDoctypeId, pImportOptions) - - Catch ex As Exception - Logger.Error(ex) - Return Nothing - - End Try - End Function - - Public Function Zooflow_GetFileObject(pObjectId As Long, pLoadFileContents As Boolean) As FileObject - Try - Dim oGetFileObject As New Modules.Zooflow.GetFileObject(LogConfig, _Channel) - Dim oFileObject = oGetFileObject.Run(pObjectId, pLoadFileContents) - Return oFileObject - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - End Function - - - Public Async Function ZooFlow_GetFileObjectAsync(pObjectId As Long, pLoadFileContents As Boolean) As Task(Of FileObject) - Try - Dim oGetFileObject As New Modules.Zooflow.GetFileObject(LogConfig, Me) - Dim oFileObject = Await oGetFileObject.RunAsync(pObjectId, pLoadFileContents) - Return oFileObject - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - End Function - - ''' - ''' Sets a value to an attribute - ''' - ''' IDB ObjectId - ''' Name of the attribute - ''' - ''' - ''' - 'Public Function SetVariableValue(pObjectId As Long, pAttributeName As String, pValue As Object, Optional pOptions As Options.SetVariableValueOptions = Nothing) As Boolean - ' Try - ' ' Set default options - ' If pOptions Is Nothing Then - ' pOptions = New Options.SetVariableValueOptions() - ' End If - - ' Dim oOptions As New Options.GetVariableValueOptions With { - ' .Language = pOptions.Language, - ' .Username = pOptions.Username - ' } - - ' Try - ' Dim oResponse = Channel.TestObjectIdExists(New TestObjectIdExistsRequest With {.ObjectId = pObjectId}) - ' If oResponse.Exists = False Then - ' Return False - ' End If - - ' Catch ex As Exception - ' Logger.Error(ex) - ' Return False - ' End Try - - ' Dim oType = pValue.GetType.Name - - ' If oType = GetType(DataTable).Name Then - ' Dim oValueTable As DataTable = pValue - ' Dim oCurrentValue As VariableValue - - ' ' Get current value - ' oCurrentValue = GetVariableValue(pObjectId, pAttributeName, oOptions) - - ' ' If current value is datatable - ' If oCurrentValue.Type = GetType(DataTable) Then - - ' ' Convert value to Datatable - ' Dim oTable As DataTable = oCurrentValue.Value - - ' If oTable.Rows.Count > 1 Then - - ' 'now Checking whether the old row still remains in Vector? If not it will be deleted as it cannot be replaced in multivalues - ' For Each oRow As DataRow In oTable.Rows - ' Dim oExists As Boolean = False - ' For Each oNewValueRow As DataRow In oValueTable.Rows - ' Logger.Debug($"Checking oldValue[{oCurrentValue}] vs NewValue [{oNewValueRow.Item(1)}]") - - ' If oNewValueRow.Item(1).ToString.ToUpper = oRow.Item(0).ToString.ToUpper Then - ' oExists = True - ' Exit For - ' End If - ' Next - - ' If oExists = False Then - ' Logger.Debug($"Value [{oRow.Item(0)}] no longer existing in Vector-Attribute [{pAttributeName}] - will be deleted!") - ' DeleteTermObjectFromMetadata(pObjectId, pAttributeName, oRow.Item(0)) - ' End If - - ' Next - ' End If - ' Else - ' If oValueTable.Rows.Count > 1 Then - - ' 'now Checking whether the old row still remains in Vector? If not it will be deleted as it cannot be replaced in multivalues - ' Dim oExists As Boolean = False - ' For Each oNewValueRow As DataRow In oValueTable.Rows - ' Logger.Debug($"Checking oldValue[{oCurrentValue}] vs NewValue [{oNewValueRow.Item(1)}]") - - ' If oNewValueRow.Item(1).ToString.ToUpper = oCurrentValue.ToString.ToUpper Then - ' oExists = True - ' Exit For - ' End If - - ' Next - ' If oExists = False Then - ' Logger.Debug($"Value [{oCurrentValue}] no longer existing in Vector-Attribute [{pAttributeName}] - will be deleted!") - ' DeleteTermObjectFromMetadata(pObjectId, pAttributeName, oCurrentValue.Value) - ' End If - - ' Else - ' Logger.Debug($"Value [{oCurrentValue}] of Attribute [{pAttributeName}] obviously was updated during runtime - will be deleted!") - ' DeleteTermObjectFromMetadata(pObjectId, pAttributeName, oCurrentValue.Value) - - ' End If - - ' End If - - ' For Each oNewValueRow As DataRow In oValueTable.Rows - ' Dim oResult As Boolean = NewObjectData(pObjectId, pAttributeName, pValue, New Options.NewObjectOptions With { - ' .Language = pOptions.Language, - ' .Username = pOptions.Username - ' }) - - ' If oResult = False Then - ' Return False - ' End If - ' Next - ' Return True - ' Else - ' Return NewObjectData(pObjectId, pAttributeName, pValue, New Options.NewObjectOptions With { - ' .Language = pOptions.Language, - ' .Username = pOptions.Username - ' }) - ' End If - - ' Catch ex As Exception - ' Logger.Error(ex) - ' Return False - ' End Try - 'End Function - - ''' - ''' - ''' - ''' - ''' - ''' - ''' - Public Function GetVariableValue(pObjectId As Long, pAttributeName As String, Optional pOptions As Options.GetVariableValueOptions = Nothing) As VariableValue - If pOptions Is Nothing Then - pOptions = New Options.GetVariableValueOptions() - End If - - Try - Dim oArgs = New GetAttributeValueRequest With { - .ObjectId = pObjectId, - .AttributeName = pAttributeName, - .User = New UserState() With { - .UserName = pOptions.Username, - .Language = pOptions.Language - } - } - Dim oResponse = _Channel.GetAttributeValue(oArgs) - If oResponse.OK = False Then - Return New VariableValue() - - End If - - Return New VariableValue(oResponse.Value) - - Catch ex As Exception - Logger.Error(ex) - Return New VariableValue() - - End Try - End Function - - Private Function GetValueByType(pRow As DataRow, pTypeString As String) As Object - Try - Dim oAttributeValue As Object - - Select Case pTypeString - Case Constants.AttributeTypeName.BIT - oAttributeValue = pRow.Item("ValueBigInt") - - Case Constants.AttributeTypeName.BIG_INTEGER - oAttributeValue = pRow.Item("ValueBigInt") - - Case Constants.AttributeTypeName.DATE - oAttributeValue = pRow.Item("ValueDate") - - Case Constants.AttributeTypeName.DATETIME - oAttributeValue = pRow.Item("ValueDate") - - Case Constants.AttributeTypeName.DECIMAL - oAttributeValue = pRow.Item("ValueDecimal") - - Case Constants.AttributeTypeName.FLOAT - oAttributeValue = pRow.Item("ValueDecimal") - - Case Constants.AttributeTypeName.VARCHAR - oAttributeValue = pRow.Item("ValueText") - - Case Constants.AttributeTypeName.VECTOR_INTEGER - oAttributeValue = pRow.Item("ValueBigInt") - - Case Constants.AttributeTypeName.VECTOR_STRING - oAttributeValue = pRow.Item("ValueText") - - Case Else - oAttributeValue = Nothing - End Select - - Return oAttributeValue - - Catch ex As Exception - Logger.Error(ex) - Return Nothing - - End Try - End Function - - Private Function GetAttributesForObject(pObjectId As Long, pLanguage As String) As List(Of ObjectAttribute) - Dim oAttributes As New List(Of ObjectAttribute) - - Try - Dim oResult As TableResult = _Channel.ReturnDatatable_MSSQL_IDB($"EXEC [PRIDB_GET_VALUE_DT] {pObjectId}, '{pLanguage}'") - - If oResult.OK = False Then - Throw New ApplicationException(oResult.ErrorMessage) - End If - - If oResult.Table Is Nothing OrElse oResult.Table.Rows.Count = 0 Then - Return Nothing - End If - - For Each oRow As DataRow In oResult.Table.Rows - Dim oAttribute As New ObjectAttribute With { - .Id = oRow.Item("AttributeId"), - .Title = oRow.Item("AttributeTitle"), - .Type = oRow.Item("AttributeType"), - .ValueBigInt = NotNull(oRow.Item("ValueBigInt"), Nothing), - .ValueDate = NotNull(oRow.Item("ValueDate"), Nothing), - .ValueDecimal = NotNull(oRow.Item("ValueDecimal"), Nothing), - .ValueText = NotNull(oRow.Item("ValueText"), Nothing) - } - - oAttributes.Add(oAttribute) - Next - - Return oAttributes - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - End Function - - Private Function NewObjectData(pObjectId As Long, pAttributeName As String, pValue As Object, pOptions As Options.NewObjectOptions) - If pOptions Is Nothing Then - pOptions = New Options.NewObjectOptions() - End If - - Dim oLanguage = GetUserLanguage(pOptions.Language) - Dim oUsername = GetUserName(pOptions.Username) - - Dim oSql = $"DECLARE @NEW_OBJ_MD_ID BIGINT - EXEC PRIDB_NEW_OBJ_DATA({pObjectId}, '{pAttributeName}', '{oUsername}', '{pValue}', '{oLanguage}', 0, @OMD_ID = @NEW_OBJ_MD_ID OUTPUT)" - Dim oResult = _Channel.ExecuteNonQuery_MSSQL_IDB(oSql) - - If oResult.OK = False Then - Logger.Warn("Error while deleting Term object") - Logger.Error(oResult.ErrorMessage) - End If - - Return oResult.OK - End Function - - Private Function DeleteTermObjectFromMetadata(pObjectId As Long, pAttributeName As String, pTerm2Delete As String, Optional pUsername As String = "", Optional pLanguage As String = "") As Boolean - Try - Dim oLanguage = GetUserLanguage(pLanguage) - Dim oUsername = GetUserName(pUsername) - - Dim oIdIsForeign As Integer = 1 - Dim oDELSQL = $"EXEC PRIDB_DELETE_TERM_OBJECT_METADATA {pObjectId},'{pAttributeName}','{pTerm2Delete}','{oUsername}','{oLanguage}',{oIdIsForeign}" - Dim oResult = _Channel.ExecuteNonQuery_MSSQL_IDB(oDELSQL) - - If oResult.OK = False Then - Logger.Warn("Error while deleting Term object") - Logger.Error(oResult.ErrorMessage) - End If - - Return oResult.OK - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - End Function - -#Region "GetDatatable" - Public Function GetDatatableFromIDB(pSQL As String) As GetDatatableResponse - Try - Dim oResponse = _Channel.ReturnDatatable(New GetDatatableRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.IDB - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Function GetDatatableFromECM(pSQL As String) As GetDatatableResponse - Try - Dim oResponse = _Channel.ReturnDatatable(New GetDatatableRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.ECM - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Function GetDatatableFromConnection(pSQL As String, pConnectionId As Integer) As GetDatatableResponse - Try - Dim oResponse = _Channel.ReturnDatatable(New GetDatatableRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.None, - .ConnectionId = pConnectionId - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Async Function GetDatatableFromIDBAsync(pSQL As String) As Task(Of GetDatatableResponse) - Try - Dim oResponse = Await _Channel.ReturnDatatableAsync(New GetDatatableRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.IDB - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Async Function GetDatatableFromECMAsync(pSQL As String) As Task(Of GetDatatableResponse) - Try - Dim oResponse = Await _Channel.ReturnDatatableAsync(New GetDatatableRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.ECM - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Async Function GetDatatableFromConnectionAsync(pSQL As String, Optional pConnectionId As Integer = 0) As Task(Of GetDatatableResponse) - Try - Dim oResponse = Await _Channel.ReturnDatatableAsync(New GetDatatableRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.None, - .ConnectionId = pConnectionId - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function -#End Region - -#Region "GetScalarValue" - Public Function GetScalarValueFromIDB(pSQL As String) As GetScalarValueResponse - Try - Dim oResponse = _Channel.ReturnScalarValue(New GetScalarValueRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.IDB - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Function GetScalarValueFromECM(pSQL As String) As GetScalarValueResponse - Try - Dim oResponse = _Channel.ReturnScalarValue(New GetScalarValueRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.ECM - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Function GetScalarValueFromConnection(pSQL As String, pConnectionId As Integer) As GetScalarValueResponse - Try - Dim oResponse = _Channel.ReturnScalarValue(New GetScalarValueRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.None, - .ConnectionId = pConnectionId - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Async Function GetScalarValueFromIDBAsync(pSQL As String) As Task(Of GetScalarValueResponse) - Try - Dim oResponse = Await _Channel.ReturnScalarValueAsync(New GetScalarValueRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.IDB - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Async Function GetScalarValueFromECMAsync(pSQL As String) As Task(Of GetScalarValueResponse) - Try - Dim oResponse = Await _Channel.ReturnScalarValueAsync(New GetScalarValueRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.ECM - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Async Function GetScalarValueFromConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of GetScalarValueResponse) - Try - Dim oResponse = Await _Channel.ReturnScalarValueAsync(New GetScalarValueRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.None, - .ConnectionId = pConnectionId - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function -#End Region - -#Region "ExecuteNonQuery" - Public Function ExecuteNonQueryFromIDB(pSQL As String) As ExecuteNonQueryResponse - Try - Dim oResponse = _Channel.ExecuteNonQuery(New ExecuteNonQueryRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.IDB - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Function ExecuteNonQueryFromECM(pSQL As String) As ExecuteNonQueryResponse - Try - Dim oResponse = _Channel.ExecuteNonQuery(New ExecuteNonQueryRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.ECM - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Function ExecuteNonQueryFromConnection(pSQL As String, pConnectionId As Integer) As ExecuteNonQueryResponse - Try - Dim oResponse = _Channel.ExecuteNonQuery(New ExecuteNonQueryRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.None, - .ConnectionId = pConnectionId - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Async Function ExecuteNonQueryFromIDBAsync(pSQL As String) As Task(Of ExecuteNonQueryResponse) - Try - Dim oResponse = Await _Channel.ExecuteNonQueryAsync(New ExecuteNonQueryRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.IDB - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Async Function ExecuteNonQueryFromECMAsync(pSQL As String) As Task(Of ExecuteNonQueryResponse) - Try - Dim oResponse = Await _Channel.ExecuteNonQueryAsync(New ExecuteNonQueryRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.ECM - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Async Function ExecuteNonQueryFromConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of ExecuteNonQueryResponse) - Try - Dim oResponse = Await _Channel.ExecuteNonQueryAsync(New ExecuteNonQueryRequest() With { - .SqlCommand = pSQL, - .NamedDatabase = DatabaseName.None, - .ConnectionId = pConnectionId - }) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function -#End Region - - - Public Function GetDatatableByName(DatatableName As String, Optional FilterExpression As String = "", Optional SortByColumn As String = "") As TableResult - Try - Dim oResponse = _Channel.ReturnDatatableFromCache(DatatableName, FilterExpression, SortByColumn) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Public Async Function GetDatatableByNameAsync(DatatableName As String, Optional FilterExpression As String = "", Optional SortByColumn As String = "") As Task(Of TableResult) - Try - Dim oResponse = Await _Channel.ReturnDatatableFromCacheAsync(DatatableName, FilterExpression, SortByColumn) - Return oResponse - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - - - ''' - ''' Return infos about a file object - ''' - ''' - ''' - ''' - Public Function GetDocumentInfo(UserId As Long, ObjectId As Long) As DocumentInfo - Try - Dim oResponse As DocumentInfoResponse = _Channel.GetFileInfoByObjectId(New DocumentInfoRequest With { - .ObjectId = ObjectId, - .UserId = UserId - }) - - Return New DocumentInfo With { - .AccessRight = oResponse.FileRight, - .FullPath = oResponse.FullPath - } - - Catch ex As FaultException(Of ObjectDoesNotExistFault) - Logger.Error(ex) - Throw ex - - Catch ex As FaultException - Logger.Error(ex) - Throw ex - - Catch ex As Exception - Logger.Error(ex) - Throw ex - - End Try - End Function - - Public Async Function GetDocumentInfoAsync(UserId As Long, ObjectId As Long) As Task(Of DocumentInfo) - Try - Dim oParams = New DocumentInfoRequest With { - .ObjectId = ObjectId, - .UserId = UserId - } - Dim oResponse As DocumentInfoResponse = Await _Channel.GetFileInfoByObjectIdAsync(oParams) - - Return New DocumentInfo With { - .AccessRight = oResponse.FileRight, - .FullPath = oResponse.FullPath - } - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - -#Region "Private Functions" - - - Private Function GetUserLanguage(pOverrideLanguage As String) As String - Return NotNull(pOverrideLanguage, Threading.Thread.CurrentThread.CurrentUICulture.Name) - End Function - - Private Function GetUserName(pOverrideName) As String - Return NotNull(pOverrideName, Environment.UserName) - End Function -#End Region - -#Region "Response Classes" - Public Class StreamedFile - Public Stream As MemoryStream - Public FileName As String - End Class - - Public Class FileList - Public Datatable As DataTable - End Class - - Public Class DocumentInfo - Public Id As Long - Public FullPath As String - Public AccessRight As AccessRight - End Class - - Public Class VariableValue - Public ReadOnly Property IsVector As Boolean = False - - Public Property Value As Object - Public Property Type As Type - - Public Sub New() - MyClass.New(Nothing) - End Sub - - Public Sub New(pValue As Object) - ' Check if value is a collection - If TypeOf pValue Is IEnumerable Then - IsVector = True - End If - - ' Try to determine the type - If IsNothing(pValue) Then - Type = Nothing - Else - Type = pValue.GetType - End If - - Value = pValue - End Sub - End Class - - -#End Region - - Public Class ObjectAttribute - Public Property Id As Long - Public Property Title As String - Public Property Type As String - - Public Property ValueBigInt As Long - Public Property ValueText As String - Public Property ValueDecimal As Decimal - Public Property ValueDate As DateTime - - Public ReadOnly Property Value As Object - Get - Return GetValue() - End Get - End Property - - Private Function GetValue() As Object - Select Case Type - Case AttributeTypeName.VECTOR_INTEGER - Return ValueBigInt - - Case AttributeTypeName.BIG_INTEGER - Return ValueBigInt - - Case AttributeTypeName.VECTOR_STRING - Return ValueText - - Case AttributeTypeName.VARCHAR - Return ValueText - - Case AttributeTypeName.BIT - Return IIf(ValueBigInt = 1, True, False) - - Case AttributeTypeName.DATE - Return ValueDate - - Case AttributeTypeName.DATETIME - Return ValueDate - - Case AttributeTypeName.DECIMAL - Return ValueDecimal - - Case AttributeTypeName.FLOAT - Return ValueDecimal - - Case Else - Return Nothing - End Select - End Function - End Class -End Class diff --git a/Modules.EDMIAPI/Client/Channel.vb b/Modules.EDMIAPI/Client/Channel.vb deleted file mode 100644 index 8a8f1d41..00000000 --- a/Modules.EDMIAPI/Client/Channel.vb +++ /dev/null @@ -1,64 +0,0 @@ -Imports System.ServiceModel -Imports System.Xml -Imports DigitalData.Modules.Base -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.Logging - -Public Class Channel - Inherits BaseClass - - Private ReadOnly ChannelFactory As ChannelFactory(Of IEDMIServiceChannel) - - Public Event Reconnect As EventHandler - - Public Shared Function GetBinding(Optional AuthenticationMode As TcpClientCredentialType = TcpClientCredentialType.Windows) As NetTcpBinding - Return New NetTcpBinding() With { - .MaxReceivedMessageSize = Constants.ChannelSettings.MAX_RECEIVED_MESSAGE_SIZE, - .MaxBufferSize = Constants.ChannelSettings.MAX_BUFFER_SIZE, - .MaxBufferPoolSize = Constants.ChannelSettings.MAX_BUFFER_POOL_SIZE, - .TransferMode = TransferMode.Streamed, - .Security = New NetTcpSecurity() With { - .Mode = SecurityMode.Transport, - .Transport = New TcpTransportSecurity() With { - .ClientCredentialType = AuthenticationMode - } - }, - .ReaderQuotas = New XmlDictionaryReaderQuotas() With { - .MaxArrayLength = Constants.ChannelSettings.MAX_ARRAY_LENGTH, - .MaxStringContentLength = Constants.ChannelSettings.MAX_STRING_CONTENT_LENGTH - } - } - End Function - - Public Sub New(pLogConfig As LogConfig, pServerAddress As ServerAddressStruct) - MyBase.New(pLogConfig) - ChannelFactory = GetChannelFactory(pServerAddress) - End Sub - - ''' - ''' Creates a channel and adds a Faulted-Handler - ''' - ''' A channel object - Public Function GetChannel() As IEDMIServiceChannel - Try - Logger.Debug("Creating channel.") - Dim oChannel = ChannelFactory.CreateChannel() - - AddHandler oChannel.Faulted, Sub() RaiseEvent Reconnect(Me, Nothing) - - Return oChannel - Catch ex As Exception - Logger.Error(ex) - Throw ex - End Try - End Function - - Private Function GetChannelFactory(pServerAddress As ServerAddressStruct) As ChannelFactory(Of IEDMIServiceChannel) - Dim oBinding = GetBinding() - Dim oAddress = New EndpointAddress($"net.tcp://{pServerAddress.Host}:{pServerAddress.Port}/DigitalData/Services/Main") - Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress) - Return oFactory - End Function -End Class - - diff --git a/Modules.EDMIAPI/Client/Connection.vb b/Modules.EDMIAPI/Client/Connection.vb deleted file mode 100644 index 09ba6276..00000000 --- a/Modules.EDMIAPI/Client/Connection.vb +++ /dev/null @@ -1,31 +0,0 @@ -Imports DigitalData.Modules.Base -Imports DigitalData.Modules.Logging - -Public Class Connection - Public Function ParseServiceAddress(pHost As String, pPort As Integer) As ServerAddressStruct - Dim oAddress As ServerAddressStruct - - oAddress.Host = pHost - oAddress.Port = pPort - - Return oAddress - End Function - - Public Function ParseServiceAddress(pAddress As String) As ServerAddressStruct - Dim oAddressList As List(Of String) - Dim oAddress As ServerAddressStruct - - If pAddress.Contains(";"c) Then - oAddressList = pAddress.Split(";"c).ToList - ElseIf pAddress.Contains(":"c) Then - oAddressList = pAddress.Split(":"c).ToList - Else - oAddressList = New List(Of String) From {pAddress, Constants.DEFAULT_SERVICE_PORT} - End If - - oAddress.Host = oAddressList.First() - oAddress.Port = oAddressList.Item(1) - - Return oAddress - End Function -End Class diff --git a/Modules.EDMIAPI/Client/NewFile.vb b/Modules.EDMIAPI/Client/NewFile.vb deleted file mode 100644 index 7410fcff..00000000 --- a/Modules.EDMIAPI/Client/NewFile.vb +++ /dev/null @@ -1,11 +0,0 @@ -Imports DigitalData.Modules.Logging - -Public Class NewFile - Private ReadOnly LogConfig As LogConfig - Private ReadOnly Logger As Logger - - Public Sub New(pLogConfig As LogConfig) - LogConfig = pLogConfig - Logger = LogConfig.GetLogger() - End Sub -End Class diff --git a/Modules.EDMIAPI/Client/Options.vb b/Modules.EDMIAPI/Client/Options.vb deleted file mode 100644 index 5ded31a1..00000000 --- a/Modules.EDMIAPI/Client/Options.vb +++ /dev/null @@ -1,78 +0,0 @@ -Public Class Options - - Public MustInherit Class BaseOptions - ''' - ''' Windows username of the user responsible for the request. Defaults to the currently logged in user. - ''' - Public Property Username As String = Environment.UserName - - ''' - ''' Language code of the client responsible for the request. Defaults to the language of the current client. - ''' - ''' - Public Property Language As String = Threading.Thread.CurrentThread.CurrentUICulture.Name - End Class - - ''' - ''' Import options for NewFileAsync. - ''' - Public Class NewFileOptions - Inherits BaseOptions - - ''' - ''' Date when the file was imported. Can be in the past. Defaults to now. - ''' - Public Property DateImported As Date = Date.Now - End Class - - ''' - ''' Import options for NewFileAsync. - ''' - Public Class CheckOutInOptions - Inherits BaseOptions - End Class - - Public Class UpdateFileOptions - Inherits BaseOptions - - ''' - ''' Should the changes in the file result in a new version? Otherwise the old file will be overridden. - ''' - Public Property CreateNewFileVersion As Boolean = False - End Class - - Public Class ImportFileOptions - Inherits BaseOptions - - ''' - ''' Date when the file was imported. Can be in the past. Defaults to now. - ''' - Public Property DateImported As Date = Date.Now - End Class - - Public Class SetObjectStateOptions - Inherits BaseOptions - - ''' - ''' Date when the file was imported. Can be in the past. Defaults to now. - ''' - Public Property DateImported As Date = Date.Now - End Class - - Public Class SetAttributeValueOptions - Inherits BaseOptions - End Class - - - Public Class GetVariableValueOptions - Inherits BaseOptions - End Class - - Public Class SetVariableValueOptions - Inherits BaseOptions - End Class - - Public Class NewObjectOptions - Inherits BaseOptions - End Class -End Class \ No newline at end of file diff --git a/Modules.EDMIAPI/Client/Rights.vb b/Modules.EDMIAPI/Client/Rights.vb deleted file mode 100644 index dc6ce6bf..00000000 --- a/Modules.EDMIAPI/Client/Rights.vb +++ /dev/null @@ -1,7 +0,0 @@ -Public Class Rights - Public Enum AccessRight - VIEW_ONLY = 1 - VIEW_EXPORT = 2 - FULL = 4 - End Enum -End Class diff --git a/Modules.EDMIAPI/Client/ServerAddressStruct.vb b/Modules.EDMIAPI/Client/ServerAddressStruct.vb deleted file mode 100644 index a4e9d386..00000000 --- a/Modules.EDMIAPI/Client/ServerAddressStruct.vb +++ /dev/null @@ -1,4 +0,0 @@ -Public Structure ServerAddressStruct - Public Host As String - Public Port As Integer -End Structure \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Arrays.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Arrays.xsd deleted file mode 100644 index c7a5d70f..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Arrays.xsd +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.CheckInOutFileResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.CheckInOutFileResponse.datasource deleted file mode 100644 index 8cee8348..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.CheckInOutFileResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.CheckInOutFileResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentInfoResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentInfoResponse.datasource deleted file mode 100644 index 0f899425..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentInfoResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentInfoResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentInfoResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentInfoResponse1.datasource deleted file mode 100644 index 0f899425..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentInfoResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentInfoResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse.datasource deleted file mode 100644 index ba63f700..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse1.datasource deleted file mode 100644 index ba63f700..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse.datasource deleted file mode 100644 index 9c6b26fa..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse1.datasource deleted file mode 100644 index 9c6b26fa..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ExecuteNonQueryResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ExecuteNonQueryResponse.datasource deleted file mode 100644 index 8bb4d79f..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ExecuteNonQueryResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.ExecuteNonQueryResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ExecuteNonQueryResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ExecuteNonQueryResponse1.datasource deleted file mode 100644 index 8bb4d79f..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ExecuteNonQueryResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.ExecuteNonQueryResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetAttributeValueResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetAttributeValueResponse.datasource deleted file mode 100644 index 396f87b7..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetAttributeValueResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.GetAttributeValueResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetAttributeValueResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetAttributeValueResponse1.datasource deleted file mode 100644 index 396f87b7..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetAttributeValueResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.GetAttributeValueResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetClientConfigResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetClientConfigResponse.datasource deleted file mode 100644 index 8d9e62a6..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetClientConfigResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.GetClientConfigResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetClientConfigResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetClientConfigResponse1.datasource deleted file mode 100644 index 8d9e62a6..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetClientConfigResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.GetClientConfigResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetDatatableResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetDatatableResponse.datasource deleted file mode 100644 index 47b7add3..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetDatatableResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.GetDatatableResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetDatatableResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetDatatableResponse1.datasource deleted file mode 100644 index 47b7add3..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetDatatableResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.GetDatatableResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetFileObjectResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetFileObjectResponse.datasource deleted file mode 100644 index df13dd7d..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetFileObjectResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.GetFileObjectResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetFileObjectResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetFileObjectResponse1.datasource deleted file mode 100644 index df13dd7d..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetFileObjectResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.GetFileObjectResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetScalarValueResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetScalarValueResponse.datasource deleted file mode 100644 index 4df80cb8..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetScalarValueResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.GetScalarValueResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetScalarValueResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetScalarValueResponse1.datasource deleted file mode 100644 index 4df80cb8..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.GetScalarValueResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.GetScalarValueResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.Globix_ImportFileResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.Globix_ImportFileResponse.datasource deleted file mode 100644 index 6a352c0d..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.Globix_ImportFileResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.Globix_ImportFileResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ImportFileResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ImportFileResponse.datasource deleted file mode 100644 index d3e7710e..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ImportFileResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.ImportFileResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ImportFileResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ImportFileResponse1.datasource deleted file mode 100644 index d3e7710e..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ImportFileResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.ImportFileResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.NewFileResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.NewFileResponse.datasource deleted file mode 100644 index bebd9f37..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.NewFileResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.NewFileResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.NewFileResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.NewFileResponse1.datasource deleted file mode 100644 index bebd9f37..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.NewFileResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.NewFileResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.NonQueryResult.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.NonQueryResult.datasource deleted file mode 100644 index 08cbd66d..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.NonQueryResult.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.NonQueryResult, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.NonQueryResult1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.NonQueryResult1.datasource deleted file mode 100644 index 08cbd66d..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.NonQueryResult1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.NonQueryResult, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.RightsAccessRight.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.RightsAccessRight.datasource deleted file mode 100644 index b7dc0d4c..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.RightsAccessRight.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.RightsAccessRight, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.RightsAccessRight1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.RightsAccessRight1.datasource deleted file mode 100644 index b7dc0d4c..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.RightsAccessRight1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.RightsAccessRight, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ScalarResult.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ScalarResult.datasource deleted file mode 100644 index b025563c..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ScalarResult.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.ScalarResult, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ScalarResult1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ScalarResult1.datasource deleted file mode 100644 index b025563c..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.ScalarResult1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.ScalarResult, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.SetAttributeValueResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.SetAttributeValueResponse.datasource deleted file mode 100644 index f00b50c6..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.SetAttributeValueResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.SetAttributeValueResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.SetAttributeValueResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.SetAttributeValueResponse1.datasource deleted file mode 100644 index f00b50c6..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.SetAttributeValueResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.SetAttributeValueResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult.datasource deleted file mode 100644 index ec10938e..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult1.datasource deleted file mode 100644 index ec10938e..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.TestObjectIdExistsResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.TestObjectIdExistsResponse.datasource deleted file mode 100644 index d646db66..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.TestObjectIdExistsResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.TestObjectIdExistsResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.TestObjectIdExistsResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.TestObjectIdExistsResponse1.datasource deleted file mode 100644 index d646db66..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.TestObjectIdExistsResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.TestObjectIdExistsResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.UpdateFileResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.UpdateFileResponse.datasource deleted file mode 100644 index e22df5f3..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.UpdateFileResponse.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.UpdateFileResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.UpdateFileResponse1.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.UpdateFileResponse1.datasource deleted file mode 100644 index e22df5f3..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.UpdateFileResponse1.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - DigitalData.Modules.EDMI.API.EDMIServiceReference.UpdateFileResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.xsd deleted file mode 100644 index b79942a2..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - 1 - - - - - - - 2 - - - - - - - 4 - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.ZooFlow.State.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.ZooFlow.State.xsd deleted file mode 100644 index 631e9bfc..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.ZooFlow.State.xsd +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Exceptions.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Exceptions.xsd deleted file mode 100644 index 1b35f58a..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Exceptions.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Messages.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Messages.xsd deleted file mode 100644 index 3a7241eb..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Messages.xsd +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Base.GetClientConfig.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Base.GetClientConfig.xsd deleted file mode 100644 index c3b34d10..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Base.GetClientConfig.xsd +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Database.ExecuteNonQuery.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Database.ExecuteNonQuery.xsd deleted file mode 100644 index 145bef4f..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Database.ExecuteNonQuery.xsd +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Database.GetDatatable.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Database.GetDatatable.xsd deleted file mode 100644 index 68b9405d..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Database.GetDatatable.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Database.GetScalarValue.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Database.GetScalarValue.xsd deleted file mode 100644 index 2453f626..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Database.GetScalarValue.xsd +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Database.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Database.xsd deleted file mode 100644 index bdacc43e..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.Database.xsd +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile.xsd deleted file mode 100644 index e1de3685..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.CheckInOutFile.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.CheckInOutFile.xsd deleted file mode 100644 index 5464821b..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.CheckInOutFile.xsd +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.GetAttributeValue.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.GetAttributeValue.xsd deleted file mode 100644 index 42fbf75b..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.GetAttributeValue.xsd +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.GetFileObject.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.GetFileObject.xsd deleted file mode 100644 index cfdf11f8..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.GetFileObject.xsd +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.ImportFile.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.ImportFile.xsd deleted file mode 100644 index d602e42f..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.ImportFile.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.NewFile.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.NewFile.xsd deleted file mode 100644 index bc77b760..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.NewFile.xsd +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.SetAttributeValue.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.SetAttributeValue.xsd deleted file mode 100644 index 1e183ac1..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.SetAttributeValue.xsd +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.UpdateFile.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.UpdateFile.xsd deleted file mode 100644 index df44e7f6..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.UpdateFile.xsd +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.xsd deleted file mode 100644 index 70b45152..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Methods.IDB.xsd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.wsdl b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.wsdl deleted file mode 100644 index b2a391ba..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.wsdl +++ /dev/null @@ -1,380 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.xsd deleted file mode 100644 index 4ac19ce4..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.xsd +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd deleted file mode 100644 index 326edd8a..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Message.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Message.xsd deleted file mode 100644 index 6a19fc3f..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Message.xsd +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.svcmap b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.svcmap deleted file mode 100644 index bc5505c0..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.svcmap +++ /dev/null @@ -1,58 +0,0 @@ - - - - false - true - true - - false - false - false - - - true - Auto - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb deleted file mode 100644 index b7ca66f0..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb +++ /dev/null @@ -1,3401 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System -Imports System.Runtime.Serialization - -Namespace EDMIServiceReference - - _ - Partial Public Class BaseResponse - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private ErrorDetailsField As String - - _ - Private ErrorMessageField As String - - _ - Private OKField As Boolean - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property ErrorDetails() As String - Get - Return Me.ErrorDetailsField - End Get - Set - If (Object.ReferenceEquals(Me.ErrorDetailsField, value) <> true) Then - Me.ErrorDetailsField = value - Me.RaisePropertyChanged("ErrorDetails") - End If - End Set - End Property - - _ - Public Property ErrorMessage() As String - Get - Return Me.ErrorMessageField - End Get - Set - If (Object.ReferenceEquals(Me.ErrorMessageField, value) <> true) Then - Me.ErrorMessageField = value - Me.RaisePropertyChanged("ErrorMessage") - End If - End Set - End Property - - _ - Public Property OK() As Boolean - Get - Return Me.OKField - End Get - Set - If (Me.OKField.Equals(value) <> true) Then - Me.OKField = value - Me.RaisePropertyChanged("OK") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class TableResult - Inherits EDMIServiceReference.BaseResponse - - _ - Private TableField As System.Data.DataTable - - _ - Public Property Table() As System.Data.DataTable - Get - Return Me.TableField - End Get - Set - If (Object.ReferenceEquals(Me.TableField, value) <> true) Then - Me.TableField = value - Me.RaisePropertyChanged("Table") - End If - End Set - End Property - End Class - - _ - Partial Public Class ScalarResult - Inherits EDMIServiceReference.BaseResponse - - _ - Private ScalarField As Object - - _ - Public Property Scalar() As Object - Get - Return Me.ScalarField - End Get - Set - If (Object.ReferenceEquals(Me.ScalarField, value) <> true) Then - Me.ScalarField = value - Me.RaisePropertyChanged("Scalar") - End If - End Set - End Property - End Class - - _ - Partial Public Class NonQueryResult - Inherits EDMIServiceReference.BaseResponse - End Class - - _ - Partial Public Class GetDatatableResponse - Inherits EDMIServiceReference.BaseResponse - - _ - Private TableField As System.Data.DataTable - - _ - Public Property Table() As System.Data.DataTable - Get - Return Me.TableField - End Get - Set - If (Object.ReferenceEquals(Me.TableField, value) <> true) Then - Me.TableField = value - Me.RaisePropertyChanged("Table") - End If - End Set - End Property - End Class - - _ - Partial Public Class GetScalarValueResponse - Inherits EDMIServiceReference.BaseResponse - - _ - Private ScalarField As Object - - _ - Public Property Scalar() As Object - Get - Return Me.ScalarField - End Get - Set - If (Object.ReferenceEquals(Me.ScalarField, value) <> true) Then - Me.ScalarField = value - Me.RaisePropertyChanged("Scalar") - End If - End Set - End Property - End Class - - _ - Partial Public Class ExecuteNonQueryResponse - Inherits EDMIServiceReference.BaseResponse - - _ - Private ResultField As Boolean - - _ - Public Property Result() As Boolean - Get - Return Me.ResultField - End Get - Set - If (Me.ResultField.Equals(value) <> true) Then - Me.ResultField = value - Me.RaisePropertyChanged("Result") - End If - End Set - End Property - End Class - - _ - Partial Public Class NewFileResponse - Inherits EDMIServiceReference.BaseResponse - - _ - Private ObjectIdField As Long - - _ - Public Property ObjectId() As Long - Get - Return Me.ObjectIdField - End Get - Set - If (Me.ObjectIdField.Equals(value) <> true) Then - Me.ObjectIdField = value - Me.RaisePropertyChanged("ObjectId") - End If - End Set - End Property - End Class - - _ - Partial Public Class UpdateFileResponse - Inherits EDMIServiceReference.BaseResponse - - _ - Private ObjectIdField As Long - - _ - Public Property ObjectId() As Long - Get - Return Me.ObjectIdField - End Get - Set - If (Me.ObjectIdField.Equals(value) <> true) Then - Me.ObjectIdField = value - Me.RaisePropertyChanged("ObjectId") - End If - End Set - End Property - End Class - - _ - Partial Public Class SetAttributeValueResponse - Inherits EDMIServiceReference.BaseResponse - - _ - Private ObjectIdField As Long - - _ - Public Property ObjectId() As Long - Get - Return Me.ObjectIdField - End Get - Set - If (Me.ObjectIdField.Equals(value) <> true) Then - Me.ObjectIdField = value - Me.RaisePropertyChanged("ObjectId") - End If - End Set - End Property - End Class - - _ - Partial Public Class GetAttributeValueResponse - Inherits EDMIServiceReference.BaseResponse - - _ - Private ObjectIdField As Long - - _ - Private ValueField As Object - - _ - Public Property ObjectId() As Long - Get - Return Me.ObjectIdField - End Get - Set - If (Me.ObjectIdField.Equals(value) <> true) Then - Me.ObjectIdField = value - Me.RaisePropertyChanged("ObjectId") - End If - End Set - End Property - - _ - Public Property Value() As Object - Get - Return Me.ValueField - End Get - Set - If (Object.ReferenceEquals(Me.ValueField, value) <> true) Then - Me.ValueField = value - Me.RaisePropertyChanged("Value") - End If - End Set - End Property - End Class - - _ - Partial Public Class GetFileObjectResponse - Inherits EDMIServiceReference.BaseResponse - - _ - Private FileObjectField As EDMIServiceReference.FileObject - - _ - Public Property FileObject() As EDMIServiceReference.FileObject - Get - Return Me.FileObjectField - End Get - Set - If (Object.ReferenceEquals(Me.FileObjectField, value) <> true) Then - Me.FileObjectField = value - Me.RaisePropertyChanged("FileObject") - End If - End Set - End Property - End Class - - _ - Partial Public Class CheckInOutFileResponse - Inherits EDMIServiceReference.BaseResponse - - _ - Private ObjectIdField As Long - - _ - Public Property ObjectId() As Long - Get - Return Me.ObjectIdField - End Get - Set - If (Me.ObjectIdField.Equals(value) <> true) Then - Me.ObjectIdField = value - Me.RaisePropertyChanged("ObjectId") - End If - End Set - End Property - End Class - - _ - Partial Public Class ImportFileResponse - Inherits EDMIServiceReference.BaseResponse - - _ - Private ObjectIdField As Long - - _ - Public Property ObjectId() As Long - Get - Return Me.ObjectIdField - End Get - Set - If (Me.ObjectIdField.Equals(value) <> true) Then - Me.ObjectIdField = value - Me.RaisePropertyChanged("ObjectId") - End If - End Set - End Property - End Class - - _ - Partial Public Class Globix_ImportFileResponse - Inherits EDMIServiceReference.BaseResponse - - _ - Private ObjectIdField As Long - - _ - Public Property ObjectId() As Long - Get - Return Me.ObjectIdField - End Get - Set - If (Me.ObjectIdField.Equals(value) <> true) Then - Me.ObjectIdField = value - Me.RaisePropertyChanged("ObjectId") - End If - End Set - End Property - End Class - - _ - Partial Public Class GetClientConfigResponse - Inherits EDMIServiceReference.BaseResponse - - _ - Private ClientConfigField As EDMIServiceReference.GlobalStateClientConfiguration - - _ - Public Property ClientConfig() As EDMIServiceReference.GlobalStateClientConfiguration - Get - Return Me.ClientConfigField - End Get - Set - If (Object.ReferenceEquals(Me.ClientConfigField, value) <> true) Then - Me.ClientConfigField = value - Me.RaisePropertyChanged("ClientConfig") - End If - End Set - End Property - End Class - - _ - Partial Public Class GlobalStateClientConfiguration - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private ConnectionStringECMField As String - - _ - Private ConnectionStringIDBField As String - - _ - Private DocumentTypesField() As EDMIServiceReference.GlobalStateDoctype - - _ - Private ForceDirectDatabaseAccessField As Boolean - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property ConnectionStringECM() As String - Get - Return Me.ConnectionStringECMField - End Get - Set - If (Object.ReferenceEquals(Me.ConnectionStringECMField, value) <> true) Then - Me.ConnectionStringECMField = value - Me.RaisePropertyChanged("ConnectionStringECM") - End If - End Set - End Property - - _ - Public Property ConnectionStringIDB() As String - Get - Return Me.ConnectionStringIDBField - End Get - Set - If (Object.ReferenceEquals(Me.ConnectionStringIDBField, value) <> true) Then - Me.ConnectionStringIDBField = value - Me.RaisePropertyChanged("ConnectionStringIDB") - End If - End Set - End Property - - _ - Public Property DocumentTypes() As EDMIServiceReference.GlobalStateDoctype() - Get - Return Me.DocumentTypesField - End Get - Set - If (Object.ReferenceEquals(Me.DocumentTypesField, value) <> true) Then - Me.DocumentTypesField = value - Me.RaisePropertyChanged("DocumentTypes") - End If - End Set - End Property - - _ - Public Property ForceDirectDatabaseAccess() As Boolean - Get - Return Me.ForceDirectDatabaseAccessField - End Get - Set - If (Me.ForceDirectDatabaseAccessField.Equals(value) <> true) Then - Me.ForceDirectDatabaseAccessField = value - Me.RaisePropertyChanged("ForceDirectDatabaseAccess") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class GlobalStateDoctype - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private FileChangedActionField As String - - _ - Private NameField As String - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property FileChangedAction() As String - Get - Return Me.FileChangedActionField - End Get - Set - If (Object.ReferenceEquals(Me.FileChangedActionField, value) <> true) Then - Me.FileChangedActionField = value - Me.RaisePropertyChanged("FileChangedAction") - End If - End Set - End Property - - _ - Public Property Name() As String - Get - Return Me.NameField - End Get - Set - If (Object.ReferenceEquals(Me.NameField, value) <> true) Then - Me.NameField = value - Me.RaisePropertyChanged("Name") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class UnexpectedErrorFault - Inherits EDMIServiceReference.BaseFault - End Class - - _ - Partial Public Class BaseFault - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private ErrorMessageField As String - - _ - Private InnerExceptionField As System.Exception - - _ - Private IsRecoverableField As Boolean - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property ErrorMessage() As String - Get - Return Me.ErrorMessageField - End Get - Set - If (Object.ReferenceEquals(Me.ErrorMessageField, value) <> true) Then - Me.ErrorMessageField = value - Me.RaisePropertyChanged("ErrorMessage") - End If - End Set - End Property - - _ - Public Property InnerException() As System.Exception - Get - Return Me.InnerExceptionField - End Get - Set - If (Object.ReferenceEquals(Me.InnerExceptionField, value) <> true) Then - Me.InnerExceptionField = value - Me.RaisePropertyChanged("InnerException") - End If - End Set - End Property - - _ - Public Property IsRecoverable() As Boolean - Get - Return Me.IsRecoverableField - End Get - Set - If (Me.IsRecoverableField.Equals(value) <> true) Then - Me.IsRecoverableField = value - Me.RaisePropertyChanged("IsRecoverable") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class DataTableDoesNotExistFault - Inherits EDMIServiceReference.BaseFault - End Class - - _ - Partial Public Class ObjectDoesNotExistFault - Inherits EDMIServiceReference.BaseFault - End Class - - _ - Partial Public Class GetDatatableRequest - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private ConnectionIdField As Integer - - _ - Private DatabaseTypeField As EDMIServiceReference.DatabaseType - - _ - Private NamedDatabaseField As EDMIServiceReference.DatabaseName - - _ - Private SqlCommandField As String - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property ConnectionId() As Integer - Get - Return Me.ConnectionIdField - End Get - Set - If (Me.ConnectionIdField.Equals(value) <> true) Then - Me.ConnectionIdField = value - Me.RaisePropertyChanged("ConnectionId") - End If - End Set - End Property - - _ - Public Property DatabaseType() As EDMIServiceReference.DatabaseType - Get - Return Me.DatabaseTypeField - End Get - Set - If (Me.DatabaseTypeField.Equals(value) <> true) Then - Me.DatabaseTypeField = value - Me.RaisePropertyChanged("DatabaseType") - End If - End Set - End Property - - _ - Public Property NamedDatabase() As EDMIServiceReference.DatabaseName - Get - Return Me.NamedDatabaseField - End Get - Set - If (Me.NamedDatabaseField.Equals(value) <> true) Then - Me.NamedDatabaseField = value - Me.RaisePropertyChanged("NamedDatabase") - End If - End Set - End Property - - _ - Public Property SqlCommand() As String - Get - Return Me.SqlCommandField - End Get - Set - If (Object.ReferenceEquals(Me.SqlCommandField, value) <> true) Then - Me.SqlCommandField = value - Me.RaisePropertyChanged("SqlCommand") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Public Enum DatabaseType As Integer - - _ - MSSQL = 0 - - _ - Oracle = 1 - - _ - ODBC = 2 - End Enum - - _ - Public Enum DatabaseName As Integer - - _ - None = 0 - - _ - ECM = 1 - - _ - IDB = 2 - End Enum - - _ - Partial Public Class GetScalarValueRequest - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private ConnectionIdField As Integer - - _ - Private DatabaseTypeField As EDMIServiceReference.DatabaseType - - _ - Private NamedDatabaseField As EDMIServiceReference.DatabaseName - - _ - Private SqlCommandField As String - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property ConnectionId() As Integer - Get - Return Me.ConnectionIdField - End Get - Set - If (Me.ConnectionIdField.Equals(value) <> true) Then - Me.ConnectionIdField = value - Me.RaisePropertyChanged("ConnectionId") - End If - End Set - End Property - - _ - Public Property DatabaseType() As EDMIServiceReference.DatabaseType - Get - Return Me.DatabaseTypeField - End Get - Set - If (Me.DatabaseTypeField.Equals(value) <> true) Then - Me.DatabaseTypeField = value - Me.RaisePropertyChanged("DatabaseType") - End If - End Set - End Property - - _ - Public Property NamedDatabase() As EDMIServiceReference.DatabaseName - Get - Return Me.NamedDatabaseField - End Get - Set - If (Me.NamedDatabaseField.Equals(value) <> true) Then - Me.NamedDatabaseField = value - Me.RaisePropertyChanged("NamedDatabase") - End If - End Set - End Property - - _ - Public Property SqlCommand() As String - Get - Return Me.SqlCommandField - End Get - Set - If (Object.ReferenceEquals(Me.SqlCommandField, value) <> true) Then - Me.SqlCommandField = value - Me.RaisePropertyChanged("SqlCommand") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class ExecuteNonQueryRequest - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private ConnectionIdField As Integer - - _ - Private DatabaseTypeField As EDMIServiceReference.DatabaseType - - _ - Private NamedDatabaseField As EDMIServiceReference.DatabaseName - - _ - Private SqlCommandField As String - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property ConnectionId() As Integer - Get - Return Me.ConnectionIdField - End Get - Set - If (Me.ConnectionIdField.Equals(value) <> true) Then - Me.ConnectionIdField = value - Me.RaisePropertyChanged("ConnectionId") - End If - End Set - End Property - - _ - Public Property DatabaseType() As EDMIServiceReference.DatabaseType - Get - Return Me.DatabaseTypeField - End Get - Set - If (Me.DatabaseTypeField.Equals(value) <> true) Then - Me.DatabaseTypeField = value - Me.RaisePropertyChanged("DatabaseType") - End If - End Set - End Property - - _ - Public Property NamedDatabase() As EDMIServiceReference.DatabaseName - Get - Return Me.NamedDatabaseField - End Get - Set - If (Me.NamedDatabaseField.Equals(value) <> true) Then - Me.NamedDatabaseField = value - Me.RaisePropertyChanged("NamedDatabase") - End If - End Set - End Property - - _ - Public Property SqlCommand() As String - Get - Return Me.SqlCommandField - End Get - Set - If (Object.ReferenceEquals(Me.SqlCommandField, value) <> true) Then - Me.SqlCommandField = value - Me.RaisePropertyChanged("SqlCommand") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class NewFileRequest - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private FileField As EDMIServiceReference.FileProperties - - _ - Private IDBDoctypeIdField As Long - - _ - Private KindTypeField As String - - _ - Private StoreNameField As String - - _ - Private UserField As EDMIServiceReference.UserState - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property File() As EDMIServiceReference.FileProperties - Get - Return Me.FileField - End Get - Set - If (Object.ReferenceEquals(Me.FileField, value) <> true) Then - Me.FileField = value - Me.RaisePropertyChanged("File") - End If - End Set - End Property - - _ - Public Property IDBDoctypeId() As Long - Get - Return Me.IDBDoctypeIdField - End Get - Set - If (Me.IDBDoctypeIdField.Equals(value) <> true) Then - Me.IDBDoctypeIdField = value - Me.RaisePropertyChanged("IDBDoctypeId") - End If - End Set - End Property - - _ - Public Property KindType() As String - Get - Return Me.KindTypeField - End Get - Set - If (Object.ReferenceEquals(Me.KindTypeField, value) <> true) Then - Me.KindTypeField = value - Me.RaisePropertyChanged("KindType") - End If - End Set - End Property - - _ - Public Property StoreName() As String - Get - Return Me.StoreNameField - End Get - Set - If (Object.ReferenceEquals(Me.StoreNameField, value) <> true) Then - Me.StoreNameField = value - Me.RaisePropertyChanged("StoreName") - End If - End Set - End Property - - _ - Public Property User() As EDMIServiceReference.UserState - Get - Return Me.UserField - End Get - Set - If (Object.ReferenceEquals(Me.UserField, value) <> true) Then - Me.UserField = value - Me.RaisePropertyChanged("User") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class FileProperties - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private FileChangedAtField As String - - _ - Private FileChecksumField As String - - _ - Private FileContentsField() As Byte - - _ - Private FileCreatedAtField As String - - _ - Private FileImportedAtField As Date - - _ - Private FileInfoRawField As System.IO.FileInfo - - _ - Private FileNameField As String - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property FileChangedAt() As String - Get - Return Me.FileChangedAtField - End Get - Set - If (Object.ReferenceEquals(Me.FileChangedAtField, value) <> true) Then - Me.FileChangedAtField = value - Me.RaisePropertyChanged("FileChangedAt") - End If - End Set - End Property - - _ - Public Property FileChecksum() As String - Get - Return Me.FileChecksumField - End Get - Set - If (Object.ReferenceEquals(Me.FileChecksumField, value) <> true) Then - Me.FileChecksumField = value - Me.RaisePropertyChanged("FileChecksum") - End If - End Set - End Property - - _ - Public Property FileContents() As Byte() - Get - Return Me.FileContentsField - End Get - Set - If (Object.ReferenceEquals(Me.FileContentsField, value) <> true) Then - Me.FileContentsField = value - Me.RaisePropertyChanged("FileContents") - End If - End Set - End Property - - _ - Public Property FileCreatedAt() As String - Get - Return Me.FileCreatedAtField - End Get - Set - If (Object.ReferenceEquals(Me.FileCreatedAtField, value) <> true) Then - Me.FileCreatedAtField = value - Me.RaisePropertyChanged("FileCreatedAt") - End If - End Set - End Property - - _ - Public Property FileImportedAt() As Date - Get - Return Me.FileImportedAtField - End Get - Set - If (Me.FileImportedAtField.Equals(value) <> true) Then - Me.FileImportedAtField = value - Me.RaisePropertyChanged("FileImportedAt") - End If - End Set - End Property - - _ - Public Property FileInfoRaw() As System.IO.FileInfo - Get - Return Me.FileInfoRawField - End Get - Set - If (Object.ReferenceEquals(Me.FileInfoRawField, value) <> true) Then - Me.FileInfoRawField = value - Me.RaisePropertyChanged("FileInfoRaw") - End If - End Set - End Property - - _ - Public Property FileName() As String - Get - Return Me.FileNameField - End Get - Set - If (Object.ReferenceEquals(Me.FileNameField, value) <> true) Then - Me.FileNameField = value - Me.RaisePropertyChanged("FileName") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class UserAttributeValue - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private ControlNameField As String - - _ - Private IdField As Integer - - _ - Private NameField As String - - _ - Private ValuesField() As String - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property ControlName() As String - Get - Return Me.ControlNameField - End Get - Set - If (Object.ReferenceEquals(Me.ControlNameField, value) <> true) Then - Me.ControlNameField = value - Me.RaisePropertyChanged("ControlName") - End If - End Set - End Property - - _ - Public Property Id() As Integer - Get - Return Me.IdField - End Get - Set - If (Me.IdField.Equals(value) <> true) Then - Me.IdField = value - Me.RaisePropertyChanged("Id") - End If - End Set - End Property - - _ - Public Property Name() As String - Get - Return Me.NameField - End Get - Set - If (Object.ReferenceEquals(Me.NameField, value) <> true) Then - Me.NameField = value - Me.RaisePropertyChanged("Name") - End If - End Set - End Property - - _ - Public Property Values() As String() - Get - Return Me.ValuesField - End Get - Set - If (Object.ReferenceEquals(Me.ValuesField, value) <> true) Then - Me.ValuesField = value - Me.RaisePropertyChanged("Values") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class UserState - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private DateFormatField As String - - _ - Private EmailField As String - - _ - Private GivenNameField As String - - _ - Private HideBasicConfigField As Boolean - - _ - Private IsAdminField As Boolean - - _ - Private LanguageField As String - - _ - Private LanguageIdField As Integer - - _ - Private MachineNameField As String - - _ - Private ShortNameField As String - - _ - Private SurnameField As String - - _ - Private UserIdField As Integer - - _ - Private UserNameField As String - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property DateFormat() As String - Get - Return Me.DateFormatField - End Get - Set - If (Object.ReferenceEquals(Me.DateFormatField, value) <> true) Then - Me.DateFormatField = value - Me.RaisePropertyChanged("DateFormat") - End If - End Set - End Property - - _ - Public Property Email() As String - Get - Return Me.EmailField - End Get - Set - If (Object.ReferenceEquals(Me.EmailField, value) <> true) Then - Me.EmailField = value - Me.RaisePropertyChanged("Email") - End If - End Set - End Property - - _ - Public Property GivenName() As String - Get - Return Me.GivenNameField - End Get - Set - If (Object.ReferenceEquals(Me.GivenNameField, value) <> true) Then - Me.GivenNameField = value - Me.RaisePropertyChanged("GivenName") - End If - End Set - End Property - - _ - Public Property HideBasicConfig() As Boolean - Get - Return Me.HideBasicConfigField - End Get - Set - If (Me.HideBasicConfigField.Equals(value) <> true) Then - Me.HideBasicConfigField = value - Me.RaisePropertyChanged("HideBasicConfig") - End If - End Set - End Property - - _ - Public Property IsAdmin() As Boolean - Get - Return Me.IsAdminField - End Get - Set - If (Me.IsAdminField.Equals(value) <> true) Then - Me.IsAdminField = value - Me.RaisePropertyChanged("IsAdmin") - End If - End Set - End Property - - _ - Public Property Language() As String - Get - Return Me.LanguageField - End Get - Set - If (Object.ReferenceEquals(Me.LanguageField, value) <> true) Then - Me.LanguageField = value - Me.RaisePropertyChanged("Language") - End If - End Set - End Property - - _ - Public Property LanguageId() As Integer - Get - Return Me.LanguageIdField - End Get - Set - If (Me.LanguageIdField.Equals(value) <> true) Then - Me.LanguageIdField = value - Me.RaisePropertyChanged("LanguageId") - End If - End Set - End Property - - _ - Public Property MachineName() As String - Get - Return Me.MachineNameField - End Get - Set - If (Object.ReferenceEquals(Me.MachineNameField, value) <> true) Then - Me.MachineNameField = value - Me.RaisePropertyChanged("MachineName") - End If - End Set - End Property - - _ - Public Property ShortName() As String - Get - Return Me.ShortNameField - End Get - Set - If (Object.ReferenceEquals(Me.ShortNameField, value) <> true) Then - Me.ShortNameField = value - Me.RaisePropertyChanged("ShortName") - End If - End Set - End Property - - _ - Public Property Surname() As String - Get - Return Me.SurnameField - End Get - Set - If (Object.ReferenceEquals(Me.SurnameField, value) <> true) Then - Me.SurnameField = value - Me.RaisePropertyChanged("Surname") - End If - End Set - End Property - - _ - Public Property UserId() As Integer - Get - Return Me.UserIdField - End Get - Set - If (Me.UserIdField.Equals(value) <> true) Then - Me.UserIdField = value - Me.RaisePropertyChanged("UserId") - End If - End Set - End Property - - _ - Public Property UserName() As String - Get - Return Me.UserNameField - End Get - Set - If (Object.ReferenceEquals(Me.UserNameField, value) <> true) Then - Me.UserNameField = value - Me.RaisePropertyChanged("UserName") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class UpdateFileRequest - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private CreateNewVersionField As Boolean - - _ - Private FileField As EDMIServiceReference.FileProperties - - _ - Private ObjectIdField As Long - - _ - Private UserField As EDMIServiceReference.UserState - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property CreateNewVersion() As Boolean - Get - Return Me.CreateNewVersionField - End Get - Set - If (Me.CreateNewVersionField.Equals(value) <> true) Then - Me.CreateNewVersionField = value - Me.RaisePropertyChanged("CreateNewVersion") - End If - End Set - End Property - - _ - Public Property File() As EDMIServiceReference.FileProperties - Get - Return Me.FileField - End Get - Set - If (Object.ReferenceEquals(Me.FileField, value) <> true) Then - Me.FileField = value - Me.RaisePropertyChanged("File") - End If - End Set - End Property - - _ - Public Property ObjectId() As Long - Get - Return Me.ObjectIdField - End Get - Set - If (Me.ObjectIdField.Equals(value) <> true) Then - Me.ObjectIdField = value - Me.RaisePropertyChanged("ObjectId") - End If - End Set - End Property - - _ - Public Property User() As EDMIServiceReference.UserState - Get - Return Me.UserField - End Get - Set - If (Object.ReferenceEquals(Me.UserField, value) <> true) Then - Me.UserField = value - Me.RaisePropertyChanged("User") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class SetAttributeValueRequest - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private AttributeNameField As String - - _ - Private AttributeValueField As String - - _ - Private LanguageField As String - - _ - Private ObjectIdField As Long - - _ - Private WhoField As String - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property AttributeName() As String - Get - Return Me.AttributeNameField - End Get - Set - If (Object.ReferenceEquals(Me.AttributeNameField, value) <> true) Then - Me.AttributeNameField = value - Me.RaisePropertyChanged("AttributeName") - End If - End Set - End Property - - _ - Public Property AttributeValue() As String - Get - Return Me.AttributeValueField - End Get - Set - If (Object.ReferenceEquals(Me.AttributeValueField, value) <> true) Then - Me.AttributeValueField = value - Me.RaisePropertyChanged("AttributeValue") - End If - End Set - End Property - - _ - Public Property Language() As String - Get - Return Me.LanguageField - End Get - Set - If (Object.ReferenceEquals(Me.LanguageField, value) <> true) Then - Me.LanguageField = value - Me.RaisePropertyChanged("Language") - End If - End Set - End Property - - _ - Public Property ObjectId() As Long - Get - Return Me.ObjectIdField - End Get - Set - If (Me.ObjectIdField.Equals(value) <> true) Then - Me.ObjectIdField = value - Me.RaisePropertyChanged("ObjectId") - End If - End Set - End Property - - _ - Public Property Who() As String - Get - Return Me.WhoField - End Get - Set - If (Object.ReferenceEquals(Me.WhoField, value) <> true) Then - Me.WhoField = value - Me.RaisePropertyChanged("Who") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class GetAttributeValueRequest - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private AttributeNameField As String - - _ - Private ObjectIdField As Long - - _ - Private UserField As EDMIServiceReference.UserState - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property AttributeName() As String - Get - Return Me.AttributeNameField - End Get - Set - If (Object.ReferenceEquals(Me.AttributeNameField, value) <> true) Then - Me.AttributeNameField = value - Me.RaisePropertyChanged("AttributeName") - End If - End Set - End Property - - _ - Public Property ObjectId() As Long - Get - Return Me.ObjectIdField - End Get - Set - If (Me.ObjectIdField.Equals(value) <> true) Then - Me.ObjectIdField = value - Me.RaisePropertyChanged("ObjectId") - End If - End Set - End Property - - _ - Public Property User() As EDMIServiceReference.UserState - Get - Return Me.UserField - End Get - Set - If (Object.ReferenceEquals(Me.UserField, value) <> true) Then - Me.UserField = value - Me.RaisePropertyChanged("User") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class GetFileObjectRequest - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private LoadFileContentsField As Boolean - - _ - Private ObjectIdField As Long - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property LoadFileContents() As Boolean - Get - Return Me.LoadFileContentsField - End Get - Set - If (Me.LoadFileContentsField.Equals(value) <> true) Then - Me.LoadFileContentsField = value - Me.RaisePropertyChanged("LoadFileContents") - End If - End Set - End Property - - _ - Public Property ObjectId() As Long - Get - Return Me.ObjectIdField - End Get - Set - If (Me.ObjectIdField.Equals(value) <> true) Then - Me.ObjectIdField = value - Me.RaisePropertyChanged("ObjectId") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class FileObject - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - Private _AccessRightsField As String - - Private _FileContentsField() As Byte - - Private _FileExtensionField As String - - Private _FileHashField As String - - Private _FilePathField As String - - Private _FileSizeField As Long - - Private _ObjectIdField As Long - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property _AccessRights() As String - Get - Return Me._AccessRightsField - End Get - Set - If (Object.ReferenceEquals(Me._AccessRightsField, value) <> true) Then - Me._AccessRightsField = value - Me.RaisePropertyChanged("_AccessRights") - End If - End Set - End Property - - _ - Public Property _FileContents() As Byte() - Get - Return Me._FileContentsField - End Get - Set - If (Object.ReferenceEquals(Me._FileContentsField, value) <> true) Then - Me._FileContentsField = value - Me.RaisePropertyChanged("_FileContents") - End If - End Set - End Property - - _ - Public Property _FileExtension() As String - Get - Return Me._FileExtensionField - End Get - Set - If (Object.ReferenceEquals(Me._FileExtensionField, value) <> true) Then - Me._FileExtensionField = value - Me.RaisePropertyChanged("_FileExtension") - End If - End Set - End Property - - _ - Public Property _FileHash() As String - Get - Return Me._FileHashField - End Get - Set - If (Object.ReferenceEquals(Me._FileHashField, value) <> true) Then - Me._FileHashField = value - Me.RaisePropertyChanged("_FileHash") - End If - End Set - End Property - - _ - Public Property _FilePath() As String - Get - Return Me._FilePathField - End Get - Set - If (Object.ReferenceEquals(Me._FilePathField, value) <> true) Then - Me._FilePathField = value - Me.RaisePropertyChanged("_FilePath") - End If - End Set - End Property - - _ - Public Property _FileSize() As Long - Get - Return Me._FileSizeField - End Get - Set - If (Me._FileSizeField.Equals(value) <> true) Then - Me._FileSizeField = value - Me.RaisePropertyChanged("_FileSize") - End If - End Set - End Property - - _ - Public Property _ObjectId() As Long - Get - Return Me._ObjectIdField - End Get - Set - If (Me._ObjectIdField.Equals(value) <> true) Then - Me._ObjectIdField = value - Me.RaisePropertyChanged("_ObjectId") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class CheckInOutFileRequest - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private ActionField As EDMIServiceReference.CheckInOutFileAction - - _ - Private CommentField As String - - _ - Private ObjectIdField As Long - - _ - Private UserField As EDMIServiceReference.UserState - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property Action() As EDMIServiceReference.CheckInOutFileAction - Get - Return Me.ActionField - End Get - Set - If (Me.ActionField.Equals(value) <> true) Then - Me.ActionField = value - Me.RaisePropertyChanged("Action") - End If - End Set - End Property - - _ - Public Property Comment() As String - Get - Return Me.CommentField - End Get - Set - If (Object.ReferenceEquals(Me.CommentField, value) <> true) Then - Me.CommentField = value - Me.RaisePropertyChanged("Comment") - End If - End Set - End Property - - _ - Public Property ObjectId() As Long - Get - Return Me.ObjectIdField - End Get - Set - If (Me.ObjectIdField.Equals(value) <> true) Then - Me.ObjectIdField = value - Me.RaisePropertyChanged("ObjectId") - End If - End Set - End Property - - _ - Public Property User() As EDMIServiceReference.UserState - Get - Return Me.UserField - End Get - Set - If (Object.ReferenceEquals(Me.UserField, value) <> true) Then - Me.UserField = value - Me.RaisePropertyChanged("User") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Public Enum CheckInOutFileAction As Integer - - _ - CheckIn = 0 - - _ - CheckOut = 1 - End Enum - - _ - Partial Public Class ImportFileRequest - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private AttributeValuesField() As EDMIServiceReference.UserAttributeValue - - _ - Private FileField As EDMIServiceReference.FileProperties - - _ - Private IDBDoctypeIdField As Long - - _ - Private KindTypeField As String - - _ - Private ProfileIdField As Integer - - _ - Private StoreNameField As String - - _ - Private UserField As EDMIServiceReference.UserState - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property AttributeValues() As EDMIServiceReference.UserAttributeValue() - Get - Return Me.AttributeValuesField - End Get - Set - If (Object.ReferenceEquals(Me.AttributeValuesField, value) <> true) Then - Me.AttributeValuesField = value - Me.RaisePropertyChanged("AttributeValues") - End If - End Set - End Property - - _ - Public Property File() As EDMIServiceReference.FileProperties - Get - Return Me.FileField - End Get - Set - If (Object.ReferenceEquals(Me.FileField, value) <> true) Then - Me.FileField = value - Me.RaisePropertyChanged("File") - End If - End Set - End Property - - _ - Public Property IDBDoctypeId() As Long - Get - Return Me.IDBDoctypeIdField - End Get - Set - If (Me.IDBDoctypeIdField.Equals(value) <> true) Then - Me.IDBDoctypeIdField = value - Me.RaisePropertyChanged("IDBDoctypeId") - End If - End Set - End Property - - _ - Public Property KindType() As String - Get - Return Me.KindTypeField - End Get - Set - If (Object.ReferenceEquals(Me.KindTypeField, value) <> true) Then - Me.KindTypeField = value - Me.RaisePropertyChanged("KindType") - End If - End Set - End Property - - _ - Public Property ProfileId() As Integer - Get - Return Me.ProfileIdField - End Get - Set - If (Me.ProfileIdField.Equals(value) <> true) Then - Me.ProfileIdField = value - Me.RaisePropertyChanged("ProfileId") - End If - End Set - End Property - - _ - Public Property StoreName() As String - Get - Return Me.StoreNameField - End Get - Set - If (Object.ReferenceEquals(Me.StoreNameField, value) <> true) Then - Me.StoreNameField = value - Me.RaisePropertyChanged("StoreName") - End If - End Set - End Property - - _ - Public Property User() As EDMIServiceReference.UserState - Get - Return Me.UserField - End Get - Set - If (Object.ReferenceEquals(Me.UserField, value) <> true) Then - Me.UserField = value - Me.RaisePropertyChanged("User") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Partial Public Class Globix_ImportFileRequest - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged - - _ - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - _ - Private AttributeValuesField() As EDMIServiceReference.UserAttributeValue - - _ - Private FileField As EDMIServiceReference.FileProperties - - _ - Private IDBDoctypeIdField As Long - - _ - Private KindTypeField As String - - _ - Private ProfileIdField As Integer - - _ - Private StoreNameField As String - - _ - Private UserField As EDMIServiceReference.UserState - - _ - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set - Me.extensionDataField = value - End Set - End Property - - _ - Public Property AttributeValues() As EDMIServiceReference.UserAttributeValue() - Get - Return Me.AttributeValuesField - End Get - Set - If (Object.ReferenceEquals(Me.AttributeValuesField, value) <> true) Then - Me.AttributeValuesField = value - Me.RaisePropertyChanged("AttributeValues") - End If - End Set - End Property - - _ - Public Property File() As EDMIServiceReference.FileProperties - Get - Return Me.FileField - End Get - Set - If (Object.ReferenceEquals(Me.FileField, value) <> true) Then - Me.FileField = value - Me.RaisePropertyChanged("File") - End If - End Set - End Property - - _ - Public Property IDBDoctypeId() As Long - Get - Return Me.IDBDoctypeIdField - End Get - Set - If (Me.IDBDoctypeIdField.Equals(value) <> true) Then - Me.IDBDoctypeIdField = value - Me.RaisePropertyChanged("IDBDoctypeId") - End If - End Set - End Property - - _ - Public Property KindType() As String - Get - Return Me.KindTypeField - End Get - Set - If (Object.ReferenceEquals(Me.KindTypeField, value) <> true) Then - Me.KindTypeField = value - Me.RaisePropertyChanged("KindType") - End If - End Set - End Property - - _ - Public Property ProfileId() As Integer - Get - Return Me.ProfileIdField - End Get - Set - If (Me.ProfileIdField.Equals(value) <> true) Then - Me.ProfileIdField = value - Me.RaisePropertyChanged("ProfileId") - End If - End Set - End Property - - _ - Public Property StoreName() As String - Get - Return Me.StoreNameField - End Get - Set - If (Object.ReferenceEquals(Me.StoreNameField, value) <> true) Then - Me.StoreNameField = value - Me.RaisePropertyChanged("StoreName") - End If - End Set - End Property - - _ - Public Property User() As EDMIServiceReference.UserState - Get - Return Me.UserField - End Get - Set - If (Object.ReferenceEquals(Me.UserField, value) <> true) Then - Me.UserField = value - Me.RaisePropertyChanged("User") - End If - End Set - End Property - - Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged - - Protected Sub RaisePropertyChanged(ByVal propertyName As String) - Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent - If (Not (propertyChanged) Is Nothing) Then - propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) - End If - End Sub - End Class - - _ - Public Enum RightsAccessRight As Integer - - _ - VIEW_ONLY = 1 - - _ - VIEW_EXPORT = 2 - - _ - FULL = 4 - End Enum - - _ - Public Interface IEDMIService - - _ - Function Heartbeat() As Boolean - - _ - Function HeartbeatAsync() As System.Threading.Tasks.Task(Of Boolean) - - _ - Function GetClientConfig() As EDMIServiceReference.GetClientConfigResponse - - _ - Function GetClientConfigAsync() As System.Threading.Tasks.Task(Of EDMIServiceReference.GetClientConfigResponse) - - _ - Function GetCachedTables() As String() - - _ - Function GetCachedTablesAsync() As System.Threading.Tasks.Task(Of String()) - - _ - Function ReturnDatatableFromCache(ByVal Name As String, ByVal FilterExpression As String, ByVal SortByColumn As String) As EDMIServiceReference.TableResult - - _ - Function ReturnDatatableFromCacheAsync(ByVal Name As String, ByVal FilterExpression As String, ByVal SortByColumn As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) - - _ - Function ReturnDatatable(ByVal pData As EDMIServiceReference.GetDatatableRequest) As EDMIServiceReference.GetDatatableResponse - - _ - Function ReturnDatatableAsync(ByVal pData As EDMIServiceReference.GetDatatableRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.GetDatatableResponse) - - _ - Function ReturnScalarValue(ByVal pData As EDMIServiceReference.GetScalarValueRequest) As EDMIServiceReference.GetScalarValueResponse - - _ - Function ReturnScalarValueAsync(ByVal pData As EDMIServiceReference.GetScalarValueRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.GetScalarValueResponse) - - _ - Function ExecuteNonQuery(ByVal pData As EDMIServiceReference.ExecuteNonQueryRequest) As EDMIServiceReference.ExecuteNonQueryResponse - - _ - Function ExecuteNonQueryAsync(ByVal pData As EDMIServiceReference.ExecuteNonQueryRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.ExecuteNonQueryResponse) - - _ - Function ReturnDatatable_Firebird(ByVal SQL As String) As EDMIServiceReference.TableResult - - _ - Function ReturnDatatable_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) - - _ - Function ReturnScalar_Firebird(ByVal SQL As String) As EDMIServiceReference.ScalarResult - - _ - Function ReturnScalar_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) - - _ - Function ExecuteNonQuery_Firebird(ByVal SQL As String) As EDMIServiceReference.NonQueryResult - - _ - Function ExecuteNonQuery_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) - - _ - Function ReturnDatatable_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.TableResult - - _ - Function ReturnDatatable_MSSQL_IDBAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) - - _ - Function ReturnScalar_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.ScalarResult - - _ - Function ReturnScalar_MSSQL_IDBAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) - - _ - Function ExecuteNonQuery_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.NonQueryResult - - _ - Function ExecuteNonQuery_MSSQL_IDBAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) - - _ - Function ReturnDatatable_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.TableResult - - _ - Function ReturnDatatable_MSSQL_ECMAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) - - _ - Function ReturnScalar_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.ScalarResult - - _ - Function ReturnScalar_MSSQL_ECMAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) - - _ - Function ExecuteNonQuery_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.NonQueryResult - - _ - Function ExecuteNonQuery_MSSQL_ECMAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) - - _ - Function NewFile(ByVal Data As EDMIServiceReference.NewFileRequest) As EDMIServiceReference.NewFileResponse - - _ - Function NewFileAsync(ByVal Data As EDMIServiceReference.NewFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.NewFileResponse) - - _ - Function UpdateFile(ByVal Data As EDMIServiceReference.UpdateFileRequest) As EDMIServiceReference.UpdateFileResponse - - _ - Function UpdateFileAsync(ByVal Data As EDMIServiceReference.UpdateFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.UpdateFileResponse) - - _ - Function SetAttributeValue(ByVal Data As EDMIServiceReference.SetAttributeValueRequest) As EDMIServiceReference.SetAttributeValueResponse - - _ - Function SetAttributeValueAsync(ByVal Data As EDMIServiceReference.SetAttributeValueRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.SetAttributeValueResponse) - - _ - Function GetAttributeValue(ByVal Data As EDMIServiceReference.GetAttributeValueRequest) As EDMIServiceReference.GetAttributeValueResponse - - _ - Function GetAttributeValueAsync(ByVal Data As EDMIServiceReference.GetAttributeValueRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.GetAttributeValueResponse) - - _ - Function GetFileObject(ByVal Data As EDMIServiceReference.GetFileObjectRequest) As EDMIServiceReference.GetFileObjectResponse - - _ - Function GetFileObjectAsync(ByVal Data As EDMIServiceReference.GetFileObjectRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.GetFileObjectResponse) - - _ - Function CheckInOutFile(ByVal Data As EDMIServiceReference.CheckInOutFileRequest) As EDMIServiceReference.CheckInOutFileResponse - - _ - Function CheckInOutFileAsync(ByVal Data As EDMIServiceReference.CheckInOutFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.CheckInOutFileResponse) - - _ - Function ImportFile(ByVal Data As EDMIServiceReference.ImportFileRequest) As EDMIServiceReference.ImportFileResponse - - _ - Function ImportFileAsync(ByVal Data As EDMIServiceReference.ImportFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.ImportFileResponse) - - _ - Function Globix_ImportFile(ByVal Data As EDMIServiceReference.Globix_ImportFileRequest) As EDMIServiceReference.Globix_ImportFileResponse - - _ - Function Globix_ImportFileAsync(ByVal Data As EDMIServiceReference.Globix_ImportFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.Globix_ImportFileResponse) - - 'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (DocumentStreamRequest) von Nachricht "DocumentStreamRequest" nicht mit dem Standardwert (GetFileByObjectId) übereinstimmt. - _ - Function GetFileByObjectId(ByVal request As EDMIServiceReference.DocumentStreamRequest) As EDMIServiceReference.DocumentStreamResponse - - _ - Function GetFileByObjectIdAsync(ByVal request As EDMIServiceReference.DocumentStreamRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse) - - _ - Function GetFileInfoByObjectId(ByVal request As EDMIServiceReference.DocumentInfoRequest) As EDMIServiceReference.DocumentInfoResponse - - 'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Vorgang mehrere Rückgabewerte aufweist. - _ - Function GetFileInfoByObjectIdAsync(ByVal request As EDMIServiceReference.DocumentInfoRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentInfoResponse) - - 'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Vorgang ListFilesForUser weder in RPC noch in einem Dokument eingeschlossen ist. - _ - Function ListFilesForUser(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As EDMIServiceReference.DocumentListResponse - - _ - Function ListFilesForUserAsync(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse) - - _ - Function TestObjectIdExists(ByVal request As EDMIServiceReference.TestObjectIdExistsRequest) As EDMIServiceReference.TestObjectIdExistsResponse - - 'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Vorgang mehrere Rückgabewerte aufweist. - _ - Function TestObjectIdExistsAsync(ByVal request As EDMIServiceReference.TestObjectIdExistsRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.TestObjectIdExistsResponse) - End Interface - - _ - Partial Public Class DocumentStreamRequest - - _ - Public ObjectId As Long - - Public Sub New() - MyBase.New - End Sub - - Public Sub New(ByVal ObjectId As Long) - MyBase.New - Me.ObjectId = ObjectId - End Sub - End Class - - _ - Partial Public Class DocumentStreamResponse - - _ - Public FileName As String - - _ - Public FileContents As System.IO.Stream - - Public Sub New() - MyBase.New - End Sub - - Public Sub New(ByVal FileName As String, ByVal FileContents As System.IO.Stream) - MyBase.New - Me.FileName = FileName - Me.FileContents = FileContents - End Sub - End Class - - _ - Partial Public Class DocumentInfoRequest - - _ - Public ObjectId As Long - - _ - Public UserId As Long - - Public Sub New() - MyBase.New - End Sub - - Public Sub New(ByVal ObjectId As Long, ByVal UserId As Long) - MyBase.New - Me.ObjectId = ObjectId - Me.UserId = UserId - End Sub - End Class - - _ - Partial Public Class DocumentInfoResponse - - _ - Public FileRight As EDMIServiceReference.RightsAccessRight - - _ - Public FullPath As String - - Public Sub New() - MyBase.New - End Sub - - Public Sub New(ByVal FileRight As EDMIServiceReference.RightsAccessRight, ByVal FullPath As String) - MyBase.New - Me.FileRight = FileRight - Me.FullPath = FullPath - End Sub - End Class - - _ - Partial Public Class ListFilesForUserRequest - - Public Sub New() - MyBase.New - End Sub - End Class - - _ - Partial Public Class DocumentListResponse - - _ - Public Datatable As System.Data.DataTable - - Public Sub New() - MyBase.New - End Sub - - Public Sub New(ByVal Datatable As System.Data.DataTable) - MyBase.New - Me.Datatable = Datatable - End Sub - End Class - - _ - Partial Public Class TestObjectIdExistsRequest - - _ - Public ObjectId As Long - - Public Sub New() - MyBase.New - End Sub - - Public Sub New(ByVal ObjectId As Long) - MyBase.New - Me.ObjectId = ObjectId - End Sub - End Class - - _ - Partial Public Class TestObjectIdExistsResponse - - _ - Public Deleted As Boolean - - _ - Public Exists As Boolean - - _ - Public Inactive As Boolean - - Public Sub New() - MyBase.New - End Sub - - Public Sub New(ByVal Deleted As Boolean, ByVal Exists As Boolean, ByVal Inactive As Boolean) - MyBase.New - Me.Deleted = Deleted - Me.Exists = Exists - Me.Inactive = Inactive - End Sub - End Class - - _ - Public Interface IEDMIServiceChannel - Inherits EDMIServiceReference.IEDMIService, System.ServiceModel.IClientChannel - End Interface - - _ - Partial Public Class EDMIServiceClient - Inherits System.ServiceModel.ClientBase(Of EDMIServiceReference.IEDMIService) - Implements EDMIServiceReference.IEDMIService - - Public Sub New() - MyBase.New - End Sub - - Public Sub New(ByVal endpointConfigurationName As String) - MyBase.New(endpointConfigurationName) - End Sub - - Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As String) - MyBase.New(endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(binding, remoteAddress) - End Sub - - Public Function Heartbeat() As Boolean Implements EDMIServiceReference.IEDMIService.Heartbeat - Return MyBase.Channel.Heartbeat - End Function - - Public Function HeartbeatAsync() As System.Threading.Tasks.Task(Of Boolean) Implements EDMIServiceReference.IEDMIService.HeartbeatAsync - Return MyBase.Channel.HeartbeatAsync - End Function - - Public Function GetClientConfig() As EDMIServiceReference.GetClientConfigResponse Implements EDMIServiceReference.IEDMIService.GetClientConfig - Return MyBase.Channel.GetClientConfig - End Function - - Public Function GetClientConfigAsync() As System.Threading.Tasks.Task(Of EDMIServiceReference.GetClientConfigResponse) Implements EDMIServiceReference.IEDMIService.GetClientConfigAsync - Return MyBase.Channel.GetClientConfigAsync - End Function - - Public Function GetCachedTables() As String() Implements EDMIServiceReference.IEDMIService.GetCachedTables - Return MyBase.Channel.GetCachedTables - End Function - - Public Function GetCachedTablesAsync() As System.Threading.Tasks.Task(Of String()) Implements EDMIServiceReference.IEDMIService.GetCachedTablesAsync - Return MyBase.Channel.GetCachedTablesAsync - End Function - - Public Function ReturnDatatableFromCache(ByVal Name As String, ByVal FilterExpression As String, ByVal SortByColumn As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatableFromCache - Return MyBase.Channel.ReturnDatatableFromCache(Name, FilterExpression, SortByColumn) - End Function - - Public Function ReturnDatatableFromCacheAsync(ByVal Name As String, ByVal FilterExpression As String, ByVal SortByColumn As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatableFromCacheAsync - Return MyBase.Channel.ReturnDatatableFromCacheAsync(Name, FilterExpression, SortByColumn) - End Function - - Public Function ReturnDatatable(ByVal pData As EDMIServiceReference.GetDatatableRequest) As EDMIServiceReference.GetDatatableResponse Implements EDMIServiceReference.IEDMIService.ReturnDatatable - Return MyBase.Channel.ReturnDatatable(pData) - End Function - - Public Function ReturnDatatableAsync(ByVal pData As EDMIServiceReference.GetDatatableRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.GetDatatableResponse) Implements EDMIServiceReference.IEDMIService.ReturnDatatableAsync - Return MyBase.Channel.ReturnDatatableAsync(pData) - End Function - - Public Function ReturnScalarValue(ByVal pData As EDMIServiceReference.GetScalarValueRequest) As EDMIServiceReference.GetScalarValueResponse Implements EDMIServiceReference.IEDMIService.ReturnScalarValue - Return MyBase.Channel.ReturnScalarValue(pData) - End Function - - Public Function ReturnScalarValueAsync(ByVal pData As EDMIServiceReference.GetScalarValueRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.GetScalarValueResponse) Implements EDMIServiceReference.IEDMIService.ReturnScalarValueAsync - Return MyBase.Channel.ReturnScalarValueAsync(pData) - End Function - - Public Function ExecuteNonQuery(ByVal pData As EDMIServiceReference.ExecuteNonQueryRequest) As EDMIServiceReference.ExecuteNonQueryResponse Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery - Return MyBase.Channel.ExecuteNonQuery(pData) - End Function - - Public Function ExecuteNonQueryAsync(ByVal pData As EDMIServiceReference.ExecuteNonQueryRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.ExecuteNonQueryResponse) Implements EDMIServiceReference.IEDMIService.ExecuteNonQueryAsync - Return MyBase.Channel.ExecuteNonQueryAsync(pData) - End Function - - Public Function ReturnDatatable_Firebird(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_Firebird - Return MyBase.Channel.ReturnDatatable_Firebird(SQL) - End Function - - Public Function ReturnDatatable_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatable_FirebirdAsync - Return MyBase.Channel.ReturnDatatable_FirebirdAsync(SQL) - End Function - - Public Function ReturnScalar_Firebird(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_Firebird - Return MyBase.Channel.ReturnScalar_Firebird(SQL) - End Function - - Public Function ReturnScalar_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) Implements EDMIServiceReference.IEDMIService.ReturnScalar_FirebirdAsync - Return MyBase.Channel.ReturnScalar_FirebirdAsync(SQL) - End Function - - Public Function ExecuteNonQuery_Firebird(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_Firebird - Return MyBase.Channel.ExecuteNonQuery_Firebird(SQL) - End Function - - Public Function ExecuteNonQuery_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_FirebirdAsync - Return MyBase.Channel.ExecuteNonQuery_FirebirdAsync(SQL) - End Function - - Public Function ReturnDatatable_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_IDB - Return MyBase.Channel.ReturnDatatable_MSSQL_IDB(SQL) - End Function - - Public Function ReturnDatatable_MSSQL_IDBAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_IDBAsync - Return MyBase.Channel.ReturnDatatable_MSSQL_IDBAsync(SQL) - End Function - - Public Function ReturnScalar_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_IDB - Return MyBase.Channel.ReturnScalar_MSSQL_IDB(SQL) - End Function - - Public Function ReturnScalar_MSSQL_IDBAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_IDBAsync - Return MyBase.Channel.ReturnScalar_MSSQL_IDBAsync(SQL) - End Function - - Public Function ExecuteNonQuery_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_IDB - Return MyBase.Channel.ExecuteNonQuery_MSSQL_IDB(SQL) - End Function - - Public Function ExecuteNonQuery_MSSQL_IDBAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_IDBAsync - Return MyBase.Channel.ExecuteNonQuery_MSSQL_IDBAsync(SQL) - End Function - - Public Function ReturnDatatable_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_ECM - Return MyBase.Channel.ReturnDatatable_MSSQL_ECM(SQL) - End Function - - Public Function ReturnDatatable_MSSQL_ECMAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_ECMAsync - Return MyBase.Channel.ReturnDatatable_MSSQL_ECMAsync(SQL) - End Function - - Public Function ReturnScalar_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_ECM - Return MyBase.Channel.ReturnScalar_MSSQL_ECM(SQL) - End Function - - Public Function ReturnScalar_MSSQL_ECMAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_ECMAsync - Return MyBase.Channel.ReturnScalar_MSSQL_ECMAsync(SQL) - End Function - - Public Function ExecuteNonQuery_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_ECM - Return MyBase.Channel.ExecuteNonQuery_MSSQL_ECM(SQL) - End Function - - Public Function ExecuteNonQuery_MSSQL_ECMAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_ECMAsync - Return MyBase.Channel.ExecuteNonQuery_MSSQL_ECMAsync(SQL) - End Function - - Public Function NewFile(ByVal Data As EDMIServiceReference.NewFileRequest) As EDMIServiceReference.NewFileResponse Implements EDMIServiceReference.IEDMIService.NewFile - Return MyBase.Channel.NewFile(Data) - End Function - - Public Function NewFileAsync(ByVal Data As EDMIServiceReference.NewFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.NewFileResponse) Implements EDMIServiceReference.IEDMIService.NewFileAsync - Return MyBase.Channel.NewFileAsync(Data) - End Function - - Public Function UpdateFile(ByVal Data As EDMIServiceReference.UpdateFileRequest) As EDMIServiceReference.UpdateFileResponse Implements EDMIServiceReference.IEDMIService.UpdateFile - Return MyBase.Channel.UpdateFile(Data) - End Function - - Public Function UpdateFileAsync(ByVal Data As EDMIServiceReference.UpdateFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.UpdateFileResponse) Implements EDMIServiceReference.IEDMIService.UpdateFileAsync - Return MyBase.Channel.UpdateFileAsync(Data) - End Function - - Public Function SetAttributeValue(ByVal Data As EDMIServiceReference.SetAttributeValueRequest) As EDMIServiceReference.SetAttributeValueResponse Implements EDMIServiceReference.IEDMIService.SetAttributeValue - Return MyBase.Channel.SetAttributeValue(Data) - End Function - - Public Function SetAttributeValueAsync(ByVal Data As EDMIServiceReference.SetAttributeValueRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.SetAttributeValueResponse) Implements EDMIServiceReference.IEDMIService.SetAttributeValueAsync - Return MyBase.Channel.SetAttributeValueAsync(Data) - End Function - - Public Function GetAttributeValue(ByVal Data As EDMIServiceReference.GetAttributeValueRequest) As EDMIServiceReference.GetAttributeValueResponse Implements EDMIServiceReference.IEDMIService.GetAttributeValue - Return MyBase.Channel.GetAttributeValue(Data) - End Function - - Public Function GetAttributeValueAsync(ByVal Data As EDMIServiceReference.GetAttributeValueRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.GetAttributeValueResponse) Implements EDMIServiceReference.IEDMIService.GetAttributeValueAsync - Return MyBase.Channel.GetAttributeValueAsync(Data) - End Function - - Public Function GetFileObject(ByVal Data As EDMIServiceReference.GetFileObjectRequest) As EDMIServiceReference.GetFileObjectResponse Implements EDMIServiceReference.IEDMIService.GetFileObject - Return MyBase.Channel.GetFileObject(Data) - End Function - - Public Function GetFileObjectAsync(ByVal Data As EDMIServiceReference.GetFileObjectRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.GetFileObjectResponse) Implements EDMIServiceReference.IEDMIService.GetFileObjectAsync - Return MyBase.Channel.GetFileObjectAsync(Data) - End Function - - Public Function CheckInOutFile(ByVal Data As EDMIServiceReference.CheckInOutFileRequest) As EDMIServiceReference.CheckInOutFileResponse Implements EDMIServiceReference.IEDMIService.CheckInOutFile - Return MyBase.Channel.CheckInOutFile(Data) - End Function - - Public Function CheckInOutFileAsync(ByVal Data As EDMIServiceReference.CheckInOutFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.CheckInOutFileResponse) Implements EDMIServiceReference.IEDMIService.CheckInOutFileAsync - Return MyBase.Channel.CheckInOutFileAsync(Data) - End Function - - Public Function ImportFile(ByVal Data As EDMIServiceReference.ImportFileRequest) As EDMIServiceReference.ImportFileResponse Implements EDMIServiceReference.IEDMIService.ImportFile - Return MyBase.Channel.ImportFile(Data) - End Function - - Public Function ImportFileAsync(ByVal Data As EDMIServiceReference.ImportFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.ImportFileResponse) Implements EDMIServiceReference.IEDMIService.ImportFileAsync - Return MyBase.Channel.ImportFileAsync(Data) - End Function - - Public Function Globix_ImportFile(ByVal Data As EDMIServiceReference.Globix_ImportFileRequest) As EDMIServiceReference.Globix_ImportFileResponse Implements EDMIServiceReference.IEDMIService.Globix_ImportFile - Return MyBase.Channel.Globix_ImportFile(Data) - End Function - - Public Function Globix_ImportFileAsync(ByVal Data As EDMIServiceReference.Globix_ImportFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.Globix_ImportFileResponse) Implements EDMIServiceReference.IEDMIService.Globix_ImportFileAsync - Return MyBase.Channel.Globix_ImportFileAsync(Data) - End Function - - _ - Function EDMIServiceReference_IEDMIService_GetFileByObjectId(ByVal request As EDMIServiceReference.DocumentStreamRequest) As EDMIServiceReference.DocumentStreamResponse Implements EDMIServiceReference.IEDMIService.GetFileByObjectId - Return MyBase.Channel.GetFileByObjectId(request) - End Function - - Public Function GetFileByObjectId(ByVal ObjectId As Long, ByRef FileContents As System.IO.Stream) As String - Dim inValue As EDMIServiceReference.DocumentStreamRequest = New EDMIServiceReference.DocumentStreamRequest() - inValue.ObjectId = ObjectId - Dim retVal As EDMIServiceReference.DocumentStreamResponse = CType(Me,EDMIServiceReference.IEDMIService).GetFileByObjectId(inValue) - FileContents = retVal.FileContents - Return retVal.FileName - End Function - - _ - Function EDMIServiceReference_IEDMIService_GetFileByObjectIdAsync(ByVal request As EDMIServiceReference.DocumentStreamRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse) Implements EDMIServiceReference.IEDMIService.GetFileByObjectIdAsync - Return MyBase.Channel.GetFileByObjectIdAsync(request) - End Function - - Public Function GetFileByObjectIdAsync(ByVal ObjectId As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse) - Dim inValue As EDMIServiceReference.DocumentStreamRequest = New EDMIServiceReference.DocumentStreamRequest() - inValue.ObjectId = ObjectId - Return CType(Me,EDMIServiceReference.IEDMIService).GetFileByObjectIdAsync(inValue) - End Function - - _ - Function EDMIServiceReference_IEDMIService_GetFileInfoByObjectId(ByVal request As EDMIServiceReference.DocumentInfoRequest) As EDMIServiceReference.DocumentInfoResponse Implements EDMIServiceReference.IEDMIService.GetFileInfoByObjectId - Return MyBase.Channel.GetFileInfoByObjectId(request) - End Function - - Public Function GetFileInfoByObjectId(ByVal ObjectId As Long, ByVal UserId As Long, ByRef FullPath As String) As EDMIServiceReference.RightsAccessRight - Dim inValue As EDMIServiceReference.DocumentInfoRequest = New EDMIServiceReference.DocumentInfoRequest() - inValue.ObjectId = ObjectId - inValue.UserId = UserId - Dim retVal As EDMIServiceReference.DocumentInfoResponse = CType(Me,EDMIServiceReference.IEDMIService).GetFileInfoByObjectId(inValue) - FullPath = retVal.FullPath - Return retVal.FileRight - End Function - - Public Function GetFileInfoByObjectIdAsync(ByVal request As EDMIServiceReference.DocumentInfoRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentInfoResponse) Implements EDMIServiceReference.IEDMIService.GetFileInfoByObjectIdAsync - Return MyBase.Channel.GetFileInfoByObjectIdAsync(request) - End Function - - _ - Function EDMIServiceReference_IEDMIService_ListFilesForUser(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As EDMIServiceReference.DocumentListResponse Implements EDMIServiceReference.IEDMIService.ListFilesForUser - Return MyBase.Channel.ListFilesForUser(request) - End Function - - Public Function ListFilesForUser() As System.Data.DataTable - Dim inValue As EDMIServiceReference.ListFilesForUserRequest = New EDMIServiceReference.ListFilesForUserRequest() - Dim retVal As EDMIServiceReference.DocumentListResponse = CType(Me,EDMIServiceReference.IEDMIService).ListFilesForUser(inValue) - Return retVal.Datatable - End Function - - _ - Function EDMIServiceReference_IEDMIService_ListFilesForUserAsync(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse) Implements EDMIServiceReference.IEDMIService.ListFilesForUserAsync - Return MyBase.Channel.ListFilesForUserAsync(request) - End Function - - Public Function ListFilesForUserAsync() As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse) - Dim inValue As EDMIServiceReference.ListFilesForUserRequest = New EDMIServiceReference.ListFilesForUserRequest() - Return CType(Me,EDMIServiceReference.IEDMIService).ListFilesForUserAsync(inValue) - End Function - - _ - Function EDMIServiceReference_IEDMIService_TestObjectIdExists(ByVal request As EDMIServiceReference.TestObjectIdExistsRequest) As EDMIServiceReference.TestObjectIdExistsResponse Implements EDMIServiceReference.IEDMIService.TestObjectIdExists - Return MyBase.Channel.TestObjectIdExists(request) - End Function - - Public Function TestObjectIdExists(ByVal ObjectId As Long, ByRef Exists As Boolean, ByRef Inactive As Boolean) As Boolean - Dim inValue As EDMIServiceReference.TestObjectIdExistsRequest = New EDMIServiceReference.TestObjectIdExistsRequest() - inValue.ObjectId = ObjectId - Dim retVal As EDMIServiceReference.TestObjectIdExistsResponse = CType(Me,EDMIServiceReference.IEDMIService).TestObjectIdExists(inValue) - Exists = retVal.Exists - Inactive = retVal.Inactive - Return retVal.Deleted - End Function - - Public Function TestObjectIdExistsAsync(ByVal request As EDMIServiceReference.TestObjectIdExistsRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.TestObjectIdExistsResponse) Implements EDMIServiceReference.IEDMIService.TestObjectIdExistsAsync - Return MyBase.Channel.TestObjectIdExistsAsync(request) - End Function - End Class -End Namespace diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/System.Data.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/System.Data.xsd deleted file mode 100644 index 8c8a3c0c..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/System.Data.xsd +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/System.IO.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/System.IO.xsd deleted file mode 100644 index 68a2b9b7..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/System.IO.xsd +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/System.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/System.xsd deleted file mode 100644 index bdecebdc..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/System.xsd +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration.svcinfo b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration.svcinfo deleted file mode 100644 index 42412f6c..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration.svcinfo +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration91.svcinfo b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration91.svcinfo deleted file mode 100644 index fe0f5a59..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration91.svcinfo +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - NetTcpBinding_IEDMIService - - - - - - - - - - - - - - - False - - - Streamed - - - OleTransactions - - - StrongWildcard - - - 0 - - - - - - 65536 - - - 0 - - - - - - False - - - System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - System.ServiceModel.Configuration.StandardBindingOptionalReliableSessionElement - - - True - - - 00:10:00 - - - False - - - System.ServiceModel.Configuration.NetTcpSecurityElement - - - Transport - - - System.ServiceModel.Configuration.TcpTransportSecurityElement - - - Windows - - - EncryptAndSign - - - System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement - - - Never - - - TransportSelected - - - (Sammlung) - - - None - - - System.ServiceModel.Configuration.MessageSecurityOverTcpElement - - - Windows - - - Default - - - - - - - - - net.tcp://localhost:9000/DigitalData/Services/Main - - - - - - netTcpBinding - - - NetTcpBinding_IEDMIService - - - EDMIServiceReference.IEDMIService - - - System.ServiceModel.Configuration.AddressHeaderCollectionElement - - - <Header /> - - - System.ServiceModel.Configuration.IdentityElement - - - System.ServiceModel.Configuration.UserPrincipalNameElement - - - Administrator@dd-san01.dd-gan.local.digitaldata.works - - - System.ServiceModel.Configuration.ServicePrincipalNameElement - - - - - - System.ServiceModel.Configuration.DnsElement - - - - - - System.ServiceModel.Configuration.RsaElement - - - - - - System.ServiceModel.Configuration.CertificateElement - - - - - - System.ServiceModel.Configuration.CertificateReferenceElement - - - My - - - LocalMachine - - - FindBySubjectDistinguishedName - - - - - - False - - - NetTcpBinding_IEDMIService - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.wsdl b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.wsdl deleted file mode 100644 index a8ce2f52..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.wsdl +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - - - - - - - EncryptAndSign - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - net.tcp://localhost:9000/DigitalData/Services/Main - - Administrator@dd-san01.dd-gan.local.digitaldata.works - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.xsd deleted file mode 100644 index b4d5ff0f..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.xsd +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Constants.vb b/Modules.EDMIAPI/Constants.vb deleted file mode 100644 index 14311119..00000000 --- a/Modules.EDMIAPI/Constants.vb +++ /dev/null @@ -1,49 +0,0 @@ -Public Class Constants - Public Const DEFAULT_SERVICE_PORT = 9000 - Public Const INVALID_OBEJCT_ID As Long = 0 - - Public Enum DatabaseType - None - ECM - IDB - End Enum - - Public Enum AttributeType - Varchar = 1 - BigInteger = 2 - Float = 3 - [Decimal] = 4 - [Date] = 5 - [DateTime] = 6 - Bit = 7 - VectorString = 8 - VectorInteger = 9 - End Enum - - Public Class AttributeTypeName - Public Const VARCHAR = "VARCHAR" - Public Const BIG_INTEGER = "BIG INTEGER" - Public Const FLOAT = "FLOAT" - Public Const [DECIMAL] = "DECIMAL" - Public Const [DATE] = "DATE" - Public Const [DATETIME] = "DATETIME" - Public Const BIT = "BIT" - Public Const VECTOR_STRING = "VECTOR STRING" - Public Const VECTOR_INTEGER = "VECTOR INTEGER" - End Class - - ''' - ''' Infos about MaxBufferSize and MaxBufferPoolSize - ''' https://social.msdn.microsoft.com/Forums/vstudio/en-US/d6e234d3-942f-4e9d-8470-32618d3f3212/maxbufferpoolsize-vs-maxbuffersize?forum=wcf - ''' - Public Class ChannelSettings - Public Const MAX_RECEIVED_MESSAGE_SIZE = 2147483647 ' 1GB - Public Const MAX_BUFFER_SIZE = 104857600 ' 100MB - Public Const MAX_BUFFER_POOL_SIZE = 1048576 ' 1MB - - Public Const MAX_CONNECTIONS = 500 - Public Const MAX_ARRAY_LENGTH = 2147483647 - Public Const MAX_STRING_CONTENT_LENGTH = 2147483647 - End Class - -End Class diff --git a/Modules.EDMIAPI/DatabaseWithFallback.vb b/Modules.EDMIAPI/DatabaseWithFallback.vb deleted file mode 100644 index 771fdee7..00000000 --- a/Modules.EDMIAPI/DatabaseWithFallback.vb +++ /dev/null @@ -1,480 +0,0 @@ -Imports DigitalData.Modules.Database -Imports DigitalData.Modules.EDMI.API -Imports DigitalData.Modules.EDMI.API.Constants -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Language.Utils - -Public Class DatabaseWithFallback - Private ReadOnly _Logger As Logger - Private ReadOnly _Client As Client - Private ReadOnly _ClientConfig As GlobalStateClientConfiguration - Private ReadOnly _DatabaseECM As MSSQLServer - Private _DatabaseIDB As MSSQLServer - - ''' - ''' Options for GetDatatable - ''' - Public Class GetDatatableOptions - Public ReadOnly FallbackSQL - Public ReadOnly FallbackType - - ''' - ''' Filter expression for the cached Datatable - ''' - Public Property FilterExpression As String = "" - ''' - ''' Columns to sort the cached Datatable by - ''' - Public Property SortByColumn As String = "" - ''' - ''' Force the fallback, skipping the service completely - ''' - Public Property ForceFallback As Boolean = False - ''' - ''' Connection Id to use, references TBDD_CONNECTION - ''' - Public Property ConnectionId As Integer = 0 - - ''' - ''' Creates a new options object for GetDatatable options - ''' - ''' SQL Command to execute as fallback - ''' Named Database to use for the fallback SQL Command - Public Sub New(pFallbackSQL As String, pFallbackType As Constants.DatabaseType) - FallbackSQL = pFallbackSQL - FallbackType = pFallbackType - End Sub - End Class - - Public Sub New(LogConfig As LogConfig, Client As Client, DatabaseECM As MSSQLServer, DatabaseIDB As MSSQLServer) - _Logger = LogConfig.GetLogger() - _Client = Client - _DatabaseECM = DatabaseECM - _DatabaseIDB = DatabaseIDB - - _Logger.Debug("Client exists: [{0}]", Not IsNothing(Client)) - _Logger.Debug("DatabaseECM exists: [{0}]", Not IsNothing(DatabaseECM)) - _Logger.Debug("DatabaseIDB exists: [{0}]", Not IsNothing(DatabaseIDB)) - - ' Load client config, will throw if client is not yet connected to service - _ClientConfig = Client?.ClientConfig - End Sub - - ''' - ''' Set the IDB Database class after initializing the class. - ''' It is now your responsibility to make sure to not use any IDB calls before calling this method. - ''' - Public Sub InitializeIDB(pDatabaseIDB As MSSQLServer) - _DatabaseIDB = pDatabaseIDB - End Sub - - Public Function GetConnectionString(pConnectionId As Integer) As String - Return _DatabaseECM.GetConnectionStringForId(pConnectionId) - End Function - -#Region "GetDatatable" - Public Function GetDatatableECM(pSQL As String) As DataTable - Return GetDatatable(New GetDatatableOptions(pSQL, Constants.DatabaseType.ECM)) - End Function - - Public Async Function GetDatatableECMAsync(pSQL As String) As Task(Of DataTable) - Return Await Task.Run(Function() GetDatatableECM(pSQL)) - End Function - - Public Function GetDatatableIDB(pSQL As String) As DataTable - Return GetDatatable(New GetDatatableOptions(pSQL, Constants.DatabaseType.IDB)) - End Function - - Public Async Function GetDatatableIDBAsync(pSQL As String) As Task(Of DataTable) - Return Await Task.Run(Function() GetDatatableIDB(pSQL)) - End Function - - Public Function GetDatatableWithConnection(pSQL As String, pConnectionId As Integer) As DataTable - Return GetDatatable(New GetDatatableOptions(pSQL, Constants.DatabaseType.None) With {.ConnectionId = pConnectionId}) - End Function - - Public Async Function GetDatatableWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of DataTable) - Return Await Task.Run(Function() GetDatatableWithConnection(pSQL, pConnectionId)) - End Function -#End Region - -#Region "GetScalarValue" - Public Function GetScalarValueECM(pSQL As String) As Object - Return GetScalarValue(pSQL, Constants.DatabaseType.ECM) - End Function - - Public Async Function GetScalarValueECMAsync(pSQL As String) As Task(Of Object) - Return Await Task.Run(Function() GetScalarValueECM(pSQL)) - End Function - - Public Function GetScalarValueIDB(pSQL As String) As Object - Return GetScalarValue(pSQL, Constants.DatabaseType.IDB) - End Function - - Public Async Function GetScalarValueIDBAsync(pSQL As String) As Task(Of Object) - Return Await Task.Run(Function() GetScalarValueIDB(pSQL)) - End Function - - Public Function GetScalarValueWithConnection(pSQL As String, pConnectionId As Integer) As Object - Return GetScalarValue(pSQL, Constants.DatabaseType.None, pConnectionId:=pConnectionId) - End Function - - Public Async Function GetScalarValueWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of Object) - Return Await Task.Run(Function() GetScalarValueWithConnection(pSQL, pConnectionId)) - End Function -#End Region - -#Region "ExecuteNonQuery" - Public Function ExecuteNonQueryECM(pSQL As String) As Boolean - Return ExecuteNonQuery(pSQL, Constants.DatabaseType.ECM) - End Function - - Public Async Function ExecuteNonQueryECMAsync(pSQL As String) As Task(Of Boolean) - Return Await Task.Run(Function() ExecuteNonQueryECM(pSQL)) - End Function - - Public Function ExecuteNonQueryIDB(pSQL As String) As Boolean - Return ExecuteNonQuery(pSQL, Constants.DatabaseType.IDB) - End Function - - Public Async Function ExecuteNonQueryIDBAsync(pSQL As String) As Task(Of Boolean) - Return Await Task.Run(Function() ExecuteNonQueryIDB(pSQL)) - End Function - - Public Function ExecuteNonQueryWithConnection(pSQL As String, pConnectionId As Integer) As Boolean - Return ExecuteNonQuery(pSQL, Constants.DatabaseType.None, pConnectionId:=pConnectionId) - End Function - - Public Async Function ExecuteNonQueryWithConnectionAsync(pSQL As String, pConnectionId As Integer) As Task(Of Boolean) - Return Await Task.Run(Function() ExecuteNonQueryWithConnection(pSQL, pConnectionId)) - End Function -#End Region - - - ''' - ''' Returns a Datatable by trying to fetch a cached version from the service, then querying the database through the service and querying the database directly as fallback. - ''' - ''' Name of the Cached Datatable - ''' Options object - Public Function GetDatatable(pDataTableName As String, pOptions As GetDatatableOptions) As DataTable - Return GetDatatable(pDataTableName, pOptions.FallbackSQL, pOptions.FallbackType, pOptions.FilterExpression, pOptions.SortByColumn, pOptions.ForceFallback, pOptions.ConnectionId) - End Function - - Public Function GetDatatable(pSQL As String, pConnectionId As Integer) As DataTable - Return GetDatatable("FORCE_FALLBACK", pSQL, Constants.DatabaseType.ECM, pSortByColumn:=Nothing, pForceFallback:=False, pConnectionId:=pConnectionId) - End Function - - ''' - ''' Returns a datatable directly from the database. - ''' - ''' Options object - Public Function GetDatatable(pOptions As GetDatatableOptions) As DataTable - Dim oForceFallback = True - Return GetDatatable("FORCE_FALLBACK", pOptions.FallbackSQL, pOptions.FallbackType, pOptions.FilterExpression, pOptions.SortByColumn, oForceFallback, pOptions.ConnectionId) - End Function - - ''' - ''' Returns a Datatable by trying to fetch a cached version from the service, then querying the database through the service and querying the database directly as fallback. - ''' - ''' Name of the Cached Datatable - ''' SQL Command to execute as fallback - ''' Named Database to use for the fallback SQL Command - ''' Filter expression for the cached Datatable - ''' Columns to sort the cached Datatable by - ''' Force the fallback, skipping the service completely - ''' Connection Id to use, references TBDD_CONNECTION - Public Function GetDatatable(pDataTableName As String, pFallbackSQL As String, pFallbackType As Constants.DatabaseType, Optional pFilterExpression As String = "", Optional pSortByColumn As String = "", Optional pForceFallback As Boolean = False, Optional pConnectionId As Integer = 0) As DataTable - Try - Dim oResult As DataTable = Nothing - Dim oTableResult As TableResult = Nothing - - ' If there is no client, we assume there is no service (configured) - If _Client Is Nothing Then - Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId) - End If - - ' If ForceFallback flag is set, we go to database immediately - If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then - Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId) - End If - - ' If the table is not cached, we try going through the service - If Not IsTableCached(pDataTableName) Then - Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId) - End If - - ' If there is a proper ConnectionId, we try going through the service - If pConnectionId > 0 Then - Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId) - End If - - Try - oTableResult = _Client.GetDatatableByName(pDataTableName, pFilterExpression, pSortByColumn) - Catch ex As Exception - _Logger.Error(ex) - oTableResult = Nothing - End Try - - If oTableResult Is Nothing OrElse oTableResult.OK = False Then - _Logger.Warn("Datatable [{0}] could not be fetched from AppServer Cache. Falling back to direct Database Access.", pDataTableName) - Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId) - Else - Return oTableResult.Table - End If - - Catch ex As Exception - _Logger.Error(ex) - Return Nothing - - End Try - End Function - - ''' - ''' Returns a Scalar Value by querying the database through the service and querying the database directly as fallback. - ''' - ''' SQL Command to execute as fallback - ''' Named Database to use for the fallback SQL Command - ''' Force the fallback, skipping the service completely - ''' Connection Id to use, references TBDD_CONNECTION - Public Function GetScalarValue(pSQL As String, pDatabaseType As Constants.DatabaseType, Optional pForceFallback As Boolean = False, Optional pConnectionId As Integer = 0) As Object - Try - ' If there is no client, we assume there is no service (configured) - If _Client Is Nothing Then - Return GetScalarValueFromDatabase(pSQL, pDatabaseType, pConnectionId) - End If - - ' If ForceFallback flag is set, we go to database immediately - If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then - Return GetScalarValueFromDatabase(pSQL, pDatabaseType, pConnectionId) - End If - - Return GetScalarValueFromService(pSQL, pDatabaseType, pConnectionId) - - Catch ex As Exception - _Logger.Error(ex) - Return Nothing - - End Try - End Function - - ''' - ''' Returns a Scalar Value by querying the database through the service and querying the database directly as fallback. - ''' - ''' SQL Command to execute as fallback - ''' Named Database to use for the fallback SQL Command - ''' Force the fallback, skipping the service completely - ''' Connection Id to use, references TBDD_CONNECTION - Public Function ExecuteNonQuery(pSQL As String, pDatabaseType As Constants.DatabaseType, Optional pForceFallback As Boolean = False, Optional pConnectionId As Integer = 0) As Boolean - Try - Dim oResult As DataTable = Nothing - Dim oTableResult As TableResult = Nothing - - ' If there is no client, we assume there is no service (configured) - If _Client Is Nothing Then - Return ExecuteNonQueryFromDatabase(pSQL, pDatabaseType, pConnectionId) - End If - - ' If ForceFallback flag is set, we go to database immediately - If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then - Return ExecuteNonQueryFromDatabase(pSQL, pDatabaseType, pConnectionId) - End If - - Return ExecuteNonQueryFromService(pSQL, pDatabaseType, pConnectionId) - - Catch ex As Exception - _Logger.Error(ex) - Return Nothing - - End Try - End Function - - Private Function IsTableCached(pName As String) As Boolean - If _Client Is Nothing Then - Return False - End If - - Return _Client.CachedTables.Contains(pName.ToUpper) - End Function - - Private Function GetDatatableFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable - Try - Dim oResult As GetDatatableResponse = Nothing - - Select Case DatabaseType - Case Constants.DatabaseType.ECM - oResult = _Client.GetDatatableFromECM(pSQLCommand) - - Case Constants.DatabaseType.IDB - oResult = _Client.GetDatatableFromIDB(pSQLCommand) - - Case Else - Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId) - - End Select - - If oResult Is Nothing Then - Throw New ApplicationException("Unexpected server error ocurred!") - End If - - If oResult.OK = False Then - Throw New ApplicationException(oResult.ErrorMessage) - End If - - Return oResult.Table - - Catch ex As Exception - _Logger.Warn("GetDatatableFromService failed. Falling back to direct database access.") - _Logger.Error(ex) - Return GetDatatableFromDatabase(pSQLCommand, DatabaseType, pConnectionId) - - End Try - End Function - - - Private Function GetDatatableFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable - Try - Dim oResult As ExecuteNonQueryResponse = Nothing - - Select Case DatabaseType - Case Constants.DatabaseType.ECM - Return _DatabaseECM.GetDatatable(pSQLCommand) - - Case Constants.DatabaseType.IDB - Return _DatabaseIDB.GetDatatable(pSQLCommand) - - Case Else - Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(pConnectionId) - If oConnectionString = String.Empty Then - Return _DatabaseECM.GetDatatable(pSQLCommand) - Else - Return _DatabaseECM.GetDatatableWithConnection(pSQLCommand, oConnectionString) - End If - - End Select - Catch ex As Exception - _Logger.Error(ex) - Return Nothing - - End Try - End Function - - Private Function GetScalarValueFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Object - Try - Dim oResult As GetScalarValueResponse = Nothing - - Select Case DatabaseType - Case Constants.DatabaseType.ECM - oResult = _Client.GetScalarValueFromECM(pSQLCommand) - - Case Constants.DatabaseType.IDB - oResult = _Client.GetScalarValueFromIDB(pSQLCommand) - - Case Else - Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId) - - End Select - - If oResult Is Nothing Then - Throw New ApplicationException("Unexpected server error ocurred!") - End If - - If oResult.OK = False Then - Throw New ApplicationException(oResult.ErrorMessage) - End If - - Return oResult.Scalar - - Catch ex As Exception - _Logger.Warn("GetScalarValueFromService failed. Falling back to direct database access.") - _Logger.Error(ex) - Return GetScalarValueFromDatabase(pSQLCommand, DatabaseType, pConnectionId) - - End Try - End Function - - - Private Function GetScalarValueFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Object - Try - Select Case DatabaseType - Case Constants.DatabaseType.ECM - Return _DatabaseECM.GetScalarValue(pSQLCommand) - - Case Constants.DatabaseType.IDB - Return _DatabaseIDB.GetScalarValue(pSQLCommand) - - Case Else - Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(pConnectionId) - If oConnectionString = String.Empty Then - Return _DatabaseECM.GetScalarValue(pSQLCommand) - Else - Return _DatabaseECM.GetScalarValueWithConnection(pSQLCommand, oConnectionString) - End If - End Select - Catch ex As Exception - _Logger.Error(ex) - Return Nothing - - End Try - End Function - - Private Function ExecuteNonQueryFromService(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Boolean - Try - Dim oResult As ExecuteNonQueryResponse = Nothing - - Select Case DatabaseType - Case Constants.DatabaseType.ECM - oResult = _Client.ExecuteNonQueryFromECM(pSQLCommand) - - Case Constants.DatabaseType.IDB - oResult = _Client.ExecuteNonQueryFromIDB(pSQLCommand) - - Case Else - Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId) - - End Select - - If oResult Is Nothing Then - Throw New ApplicationException("Unexpected server error ocurred!") - End If - - If oResult.OK = False Then - Throw New ApplicationException(oResult.ErrorMessage) - End If - - Return oResult.Result - - Catch ex As Exception - _Logger.Warn("ExecuteNonQueryFromService failed. Falling back to direct database access.") - _Logger.Error(ex) - Return ExecuteNonQueryFromDatabase(pSQLCommand, DatabaseType, pConnectionId) - - End Try - End Function - - Private Function ExecuteNonQueryFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Boolean - Try - Select Case DatabaseType - Case Constants.DatabaseType.ECM - Return _DatabaseECM.ExecuteNonQuery(pSQLCommand) - - Case Constants.DatabaseType.IDB - Return _DatabaseIDB.ExecuteNonQuery(pSQLCommand) - - Case Else - Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(pConnectionId) - If oConnectionString = String.Empty Then - Return _DatabaseECM.ExecuteNonQuery(pSQLCommand) - Else - Return _DatabaseECM.ExecuteNonQueryWithConnection(pSQLCommand, oConnectionString) - End If - - End Select - Catch ex As Exception - _Logger.Error(ex) - Return False - - End Try - End Function -End Class - diff --git a/Modules.EDMIAPI/EDMI.API.vbproj b/Modules.EDMIAPI/EDMI.API.vbproj deleted file mode 100644 index 74b1b138..00000000 --- a/Modules.EDMIAPI/EDMI.API.vbproj +++ /dev/null @@ -1,320 +0,0 @@ - - - - - Debug - AnyCPU - {25017513-0D97-49D3-98D7-BA76D9B251B0} - Library - DigitalData.Modules.EDMI.API - DigitalData.Modules.EDMI.API - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.EDMI.API.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.EDMI.API.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Reference.svcmap - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - - Designer - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - - Designer - - - Designer - - - Designer - - - - Designer - - - Designer - - - Designer - - - Designer - - - MyApplicationCodeGenerator - Application.Designer.vb - - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - - - - {6ea0c51f-c2b1-4462-8198-3de0b32b74f8} - Base - - - {eaf0ea75-5fa7-485d-89c7-b2d843b03a96} - Database - - - {991d0231-4623-496d-8bd0-9ca906029cbc} - Filesystem - - - {d3c8cfed-d6f6-43a8-9bdf-454145d0352f} - Language - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - - - - - - - - - - - WCF Proxy Generator - Reference.vb - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/EDMIAPI.vbproj b/Modules.EDMIAPI/EDMIAPI.vbproj deleted file mode 100644 index 37518408..00000000 --- a/Modules.EDMIAPI/EDMIAPI.vbproj +++ /dev/null @@ -1,186 +0,0 @@ - - - - - Debug - AnyCPU - {5B1171DC-FFFE-4813-A20D-786AAE47B320} - Library - DigitalData.Modules.EDMIAPI - DigitalData.Modules.EDMIAPI - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.EDMIAPI.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.EDMIAPI.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - ..\packages\NLog.4.6.8\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Reference.svcmap - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Reference.svcmap - - - Designer - - - - Designer - - - Designer - - - - Designer - - - Designer - - - Designer - - - Designer - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - - - - - - - - - - - WCF Proxy Generator - Reference.vb - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Helpers.vb b/Modules.EDMIAPI/Helpers.vb deleted file mode 100644 index 65ce1b6d..00000000 --- a/Modules.EDMIAPI/Helpers.vb +++ /dev/null @@ -1,48 +0,0 @@ -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.Logging - - -Public Class Helpers - Private ReadOnly LogConfig As LogConfig - Private ReadOnly Logger As Logger - Private ReadOnly FileEx As Filesystem.File - - Public Sub New(pLogConfig As LogConfig) - LogConfig = pLogConfig - Logger = pLogConfig.GetLogger() - FileEx = New Filesystem.File(pLogConfig) - End Sub - - Public Function GetFileProperties(pFilePath As String, pDateImportedAt As Date) As FileProperties - Try - Using oFileStream As New IO.FileStream(pFilePath, IO.FileMode.Open, IO.FileAccess.Read) - Using oMemoryStream As New IO.MemoryStream() - oFileStream.CopyTo(oMemoryStream) - Dim oContents = oMemoryStream.ToArray() - - Dim oFileInfo As New IO.FileInfo(pFilePath) - Dim oExtension As String = oFileInfo.Extension - - Dim oFileName As String = oFileInfo.Name - Dim oFileCreatedAt As Date = oFileInfo?.CreationTime - Dim oFileModifiedAt As Date = oFileInfo?.LastWriteTime - Dim oFileHash As String = FileEx.GetChecksum(oFileInfo.FullName) - - Return New FileProperties With { - .FileName = oFileInfo.Name, - .FileCreatedAt = oFileCreatedAt, - .FileChangedAt = oFileModifiedAt, - .FileContents = oContents, - .FileImportedAt = pDateImportedAt, - .FileChecksum = oFileHash, - .FileInfoRaw = oFileInfo - } - End Using - End Using - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - End Function -End Class - diff --git a/Modules.EDMIAPI/Modules/BaseMethod.vb b/Modules.EDMIAPI/Modules/BaseMethod.vb deleted file mode 100644 index 09893e6f..00000000 --- a/Modules.EDMIAPI/Modules/BaseMethod.vb +++ /dev/null @@ -1,21 +0,0 @@ -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.Logging - -Namespace Modules - Public Class BaseMethod - Friend ReadOnly LogConfig As LogConfig - Friend ReadOnly Logger As Logger - Friend ReadOnly Channel As IEDMIServiceChannel - Friend ReadOnly FileEx As Filesystem.File - Friend ReadOnly Helpers As Helpers - - Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel) - LogConfig = pLogConfig - Logger = pLogConfig.GetLogger() - Channel = pChannel - FileEx = New Filesystem.File(pLogConfig) - Helpers = New Helpers(pLogConfig) - End Sub - End Class - -End Namespace \ No newline at end of file diff --git a/Modules.EDMIAPI/Modules/Globix/ImportFile.vb b/Modules.EDMIAPI/Modules/Globix/ImportFile.vb deleted file mode 100644 index d5f60477..00000000 --- a/Modules.EDMIAPI/Modules/Globix/ImportFile.vb +++ /dev/null @@ -1,61 +0,0 @@ -Imports System.IO -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.Logging - -Namespace Modules.Globix - Public Class ImportFile - Inherits BaseMethod - - Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel) - MyBase.New(pLogConfig, pChannel) - End Sub - - Public Async Function RunAsync(pFilePath As String, - pProfileId As Integer, - pAttributeValues As List(Of UserAttributeValue), - pObjectStoreName As String, - pObjectKind As String, - pIDBDoctypeId As Long, - pImportOptions As Options.ImportFileOptions) As Task(Of Globix_ImportFileResponse) - Try - ' Set default options - If pImportOptions Is Nothing Then - pImportOptions = New Options.ImportFileOptions() - End If - - ' Check if file exists - If File.Exists(pFilePath) = False Then - Throw New FileNotFoundException("Path does not exist") - End If - - ' Try to load file properties - Dim oFileProperties = Helpers.GetFileProperties(pFilePath, pImportOptions.DateImported) - If oFileProperties Is Nothing Then - Throw New IOException("File could not be read!") - End If - - ' Importing the file now - Dim oFileImportResponse = Await Channel.Globix_ImportFileAsync(New Globix_ImportFileRequest With { - .IDBDoctypeId = pIDBDoctypeId, - .File = oFileProperties, - .KindType = pObjectKind, - .StoreName = pObjectStoreName, - .User = New UserState() With { - .UserName = pImportOptions.Username, - .Language = pImportOptions.Language - }, - .ProfileId = pProfileId, - .AttributeValues = pAttributeValues.ToArray - }) - - Return oFileImportResponse - - Catch ex As Exception - Logger.Error(ex) - Return Nothing - - End Try - End Function - End Class -End Namespace - diff --git a/Modules.EDMIAPI/Modules/IDB/CheckInFile.vb b/Modules.EDMIAPI/Modules/IDB/CheckInFile.vb deleted file mode 100644 index 4fe96ac2..00000000 --- a/Modules.EDMIAPI/Modules/IDB/CheckInFile.vb +++ /dev/null @@ -1,34 +0,0 @@ -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.Logging - -Namespace Modules.IDB - Public Class CheckInFile - Inherits BaseMethod - - Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel) - MyBase.New(pLogConfig, pChannel) - End Sub - - Public Async Function RunAsync(pObjectId As Long, Optional pOptions As Options.CheckOutInOptions = Nothing) As Task(Of Long) - ' Set default options - If pOptions Is Nothing Then - pOptions = New Options.CheckOutInOptions() - End If - - Dim oCheckInFileResponse = Await Channel.CheckInOutFileAsync(New CheckInOutFileRequest With { - .User = New UserState With { - .Language = pOptions.Language, - .UserName = pOptions.Username - }, - .Action = CheckInOutFileAction.CheckIn, - .ObjectId = pObjectId - }) - - If oCheckInFileResponse.OK = False Then - Throw New ApplicationException(oCheckInFileResponse.ErrorMessage) - End If - - Return oCheckInFileResponse.ObjectId - End Function - End Class -End Namespace diff --git a/Modules.EDMIAPI/Modules/IDB/CheckOutFile.vb b/Modules.EDMIAPI/Modules/IDB/CheckOutFile.vb deleted file mode 100644 index 1980cd73..00000000 --- a/Modules.EDMIAPI/Modules/IDB/CheckOutFile.vb +++ /dev/null @@ -1,37 +0,0 @@ -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.Logging - -Namespace Modules.IDB - Public Class CheckOutFile - Inherits BaseMethod - - Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel) - MyBase.New(pLogConfig, pChannel) - End Sub - - Public Async Function RunAsync(pObjectId As Long, Optional pComment As String = "", Optional pOptions As Options.CheckOutInOptions = Nothing) As Task(Of Long) - ' Set default options - If pOptions Is Nothing Then - pOptions = New Options.CheckOutInOptions() - End If - - Dim oArgs = New CheckInOutFileRequest With { - .User = New UserState With { - .Language = pOptions.Language, - .UserName = pOptions.Username - }, - .Action = CheckInOutFileAction.CheckOut, - .Comment = pComment, - .ObjectId = pObjectId - } - Dim oCheckOutFileResponse = Await Channel.CheckInOutFileAsync(oArgs) - - If oCheckOutFileResponse.OK = False Then - Throw New ApplicationException(oCheckOutFileResponse.ErrorMessage) - End If - - Return oCheckOutFileResponse.ObjectId - End Function - End Class - -End Namespace diff --git a/Modules.EDMIAPI/Modules/IDB/ImportFile.vb b/Modules.EDMIAPI/Modules/IDB/ImportFile.vb deleted file mode 100644 index b7891e59..00000000 --- a/Modules.EDMIAPI/Modules/IDB/ImportFile.vb +++ /dev/null @@ -1,60 +0,0 @@ -Imports System.IO -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.Logging - -Namespace Modules.IDB - Public Class ImportFile - Inherits BaseMethod - - Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel) - MyBase.New(pLogConfig, pChannel) - End Sub - - Public Async Function RunAsync(pFilePath As String, - pAttributeValues As List(Of UserAttributeValue), - pObjectStoreName As String, - pObjectKind As String, - pIDBDoctypeId As Long, - pImportOptions As Options.ImportFileOptions) As Task(Of ImportFileResponse) - Try - ' Set default options - If pImportOptions Is Nothing Then - pImportOptions = New Options.ImportFileOptions() - End If - - ' Check if file exists - If File.Exists(pFilePath) = False Then - Throw New FileNotFoundException("Path does not exist") - End If - - ' Try to load file properties - Dim oFileProperties = Helpers.GetFileProperties(pFilePath, pImportOptions.DateImported) - If oFileProperties Is Nothing Then - Throw New IOException("File could not be read!") - End If - - ' Importing the file now - Dim oFileImportResponse = Await Channel.ImportFileAsync(New ImportFileRequest With { - .IDBDoctypeId = pIDBDoctypeId, - .File = oFileProperties, - .KindType = pObjectKind, - .StoreName = pObjectStoreName, - .User = New UserState() With { - .UserName = pImportOptions.Username, - .Language = pImportOptions.Language - }, - .ProfileId = -1, - .AttributeValues = pAttributeValues.ToArray - }) - - Return oFileImportResponse - - Catch ex As Exception - Logger.Error(ex) - Return Nothing - - End Try - End Function - End Class -End Namespace - diff --git a/Modules.EDMIAPI/Modules/IDB/NewFile.vb b/Modules.EDMIAPI/Modules/IDB/NewFile.vb deleted file mode 100644 index 0908415e..00000000 --- a/Modules.EDMIAPI/Modules/IDB/NewFile.vb +++ /dev/null @@ -1,49 +0,0 @@ -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Filesystem - -Namespace Modules.IDB - Public Class NewFile - Inherits BaseMethod - - Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel) - MyBase.New(pLogConfig, pChannel) - End Sub - - Public Async Function RunAsync(pFilePath As String, pObjectStoreName As String, pObjectKind As String, pIDBDoctypeId As Long, Optional pOptions As Options.NewFileOptions = Nothing) As Task(Of Long) - Try - ' Set default options - If pOptions Is Nothing Then - pOptions = New Options.NewFileOptions() - End If - - ' Check if file exists - If IO.File.Exists(pFilePath) = False Then - Throw New IO.FileNotFoundException("Path does not exist") - End If - - ' Importing the file now - Dim oFileProperties = Helpers.GetFileProperties(pFilePath, pOptions.DateImported) - Dim oFileImportResponse = Await Channel.NewFileAsync(New NewFileRequest With { - .IDBDoctypeId = pIDBDoctypeId, - .File = oFileProperties, - .KindType = pObjectKind, - .StoreName = pObjectStoreName, - .User = New UserState With { - .Language = pOptions.Language, - .UserName = pOptions.Username - } - }) - - If oFileImportResponse.OK = False Then - Throw New ApplicationException("Could not Import File Contents!") - End If - - Return oFileImportResponse.ObjectId - Catch ex As Exception - Logger.Error(ex) - Return Constants.INVALID_OBEJCT_ID - End Try - End Function - End Class -End Namespace \ No newline at end of file diff --git a/Modules.EDMIAPI/Modules/IDB/SetAttributeValue.vb b/Modules.EDMIAPI/Modules/IDB/SetAttributeValue.vb deleted file mode 100644 index 2504720e..00000000 --- a/Modules.EDMIAPI/Modules/IDB/SetAttributeValue.vb +++ /dev/null @@ -1,38 +0,0 @@ -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.EDMI.API.Options -Imports DigitalData.Modules.Logging - -Namespace Modules.IDB - Public Class SetAttributeValue - Inherits BaseMethod - - Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel) - MyBase.New(pLogConfig, pChannel) - End Sub - - Public Async Function RunAsync(pObjectId As String, pAttributeName As String, pAttributeValue As Object, Optional pOptions As SetAttributeValueOptions = Nothing) As Task(Of Boolean) - Try - Dim oParams As New SetAttributeValueRequest With { - .ObjectId = pObjectId, - .Language = pOptions.Language, - .Who = pOptions.Username, - .AttributeName = pAttributeName, - .AttributeValue = pAttributeValue - } - Dim oResponse As SetAttributeValueResponse = Await Channel.SetAttributeValueAsync(oParams) - - If oResponse.OK Then - Return True - End If - - Logger.Warn("Error while setting Attribute Value: [{0}]", oResponse.ErrorMessage) - Return False - - Catch ex As Exception - Logger.Error(ex) - Return False - - End Try - End Function - End Class -End Namespace \ No newline at end of file diff --git a/Modules.EDMIAPI/Modules/IDB/SetObjectState.vb b/Modules.EDMIAPI/Modules/IDB/SetObjectState.vb deleted file mode 100644 index 63caed95..00000000 --- a/Modules.EDMIAPI/Modules/IDB/SetObjectState.vb +++ /dev/null @@ -1,34 +0,0 @@ - -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.EDMI.API.Options -Imports DigitalData.Modules.Logging - -Namespace Modules.IDB - Public Class SetObjectState - Inherits BaseMethod - - Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel) - MyBase.New(pLogConfig, pChannel) - End Sub - - Public Async Function RunAsync(pObjectId As String, pState As String, Optional pOptions As SetObjectStateOptions = Nothing) As Task(Of Boolean) - Try - - Dim oSql As String = $"EXEC PRIDB_OBJECT_SET_STATE {pObjectId}, '{pState}', '{pOptions.Username}'" - Dim oResult = Await Channel.ExecuteNonQuery_MSSQL_IDBAsync(oSql) - - If oResult.OK Then - Return True - End If - - Logger.Warn("Error while setting Object State: [{0}]", oResult.ErrorMessage) - Return False - - Catch ex As Exception - Logger.Error(ex) - Return False - - End Try - End Function - End Class -End Namespace diff --git a/Modules.EDMIAPI/Modules/IDB/UpdateFile.vb b/Modules.EDMIAPI/Modules/IDB/UpdateFile.vb deleted file mode 100644 index 182578c1..00000000 --- a/Modules.EDMIAPI/Modules/IDB/UpdateFile.vb +++ /dev/null @@ -1,53 +0,0 @@ -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.EDMI.API.Options -Imports DigitalData.Modules.Logging - -Namespace Modules.IDB - Public Class UpdateFile - Inherits BaseMethod - - Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel) - MyBase.New(pLogConfig, pChannel) - End Sub - - Public Async Function RunAsync(pFilePath As String, pObjectId As Long, Optional pOptions As UpdateFileOptions = Nothing) As Task(Of Long) - Try - ' Set default options - If pOptions Is Nothing Then - pOptions = New UpdateFileOptions() - End If - - ' Check if file exists - If IO.File.Exists(pFilePath) = False Then - Throw New IO.FileNotFoundException("Path does not exist") - End If - - ' Importing the file now - Dim oFileProperties = Helpers.GetFileProperties(pFilePath, Date.Now) - - - Dim oUpdateFileResponse = Await Channel.UpdateFileAsync(New UpdateFileRequest With { - .File = oFileProperties, - .ObjectId = pObjectId, - .CreateNewVersion = pOptions.CreateNewFileVersion, - .User = New UserState With { - .Language = pOptions.Language, - .UserName = pOptions.Username - } - }) - - If oUpdateFileResponse.OK = False Then - Throw New ApplicationException("Could not Import File Contents!") - End If - - Return oUpdateFileResponse.ObjectId - - Catch ex As Exception - Logger.Error(ex) - Return Constants.INVALID_OBEJCT_ID - - End Try - End Function - End Class - -End Namespace \ No newline at end of file diff --git a/Modules.EDMIAPI/Modules/ZooFlow/GetFileObject.vb b/Modules.EDMIAPI/Modules/ZooFlow/GetFileObject.vb deleted file mode 100644 index aa9b89cf..00000000 --- a/Modules.EDMIAPI/Modules/ZooFlow/GetFileObject.vb +++ /dev/null @@ -1,48 +0,0 @@ -Imports DigitalData.Modules.EDMI.API.EDMIServiceReference -Imports DigitalData.Modules.Logging - -Namespace Modules.Zooflow - Public Class GetFileObject - Inherits BaseMethod - - Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel) - MyBase.New(pLogConfig, pChannel) - End Sub - - Public Async Function RunAsync(pObjectId As Long, pLoadFileContents As Boolean) As Task(Of FileObject) - Try - Dim oParams = New GetFileObjectRequest With { - .ObjectId = pObjectId, - .LoadFileContents = pLoadFileContents - } - Dim oResult = Await Channel.GetFileObjectAsync(oParams) - If oResult.OK Then - Return oResult.FileObject - Else - Return Nothing - End If - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - End Function - - Public Function Run(pObjectId As Long, pLoadFileContents As Boolean) As FileObject - Try - Dim oParams = New GetFileObjectRequest With { - .ObjectId = pObjectId, - .LoadFileContents = pLoadFileContents - } - Dim oResult = Channel.GetFileObject(oParams) - If oResult.OK Then - Return oResult.FileObject - Else - Return Nothing - End If - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - End Function - End Class -End Namespace \ No newline at end of file diff --git a/Modules.EDMIAPI/My Project/Application.Designer.vb b/Modules.EDMIAPI/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.EDMIAPI/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.EDMIAPI/My Project/Application.myapp b/Modules.EDMIAPI/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.EDMIAPI/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.EDMIAPI/My Project/AssemblyInfo.vb b/Modules.EDMIAPI/My Project/AssemblyInfo.vb deleted file mode 100644 index e67efe0a..00000000 --- a/Modules.EDMIAPI/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.EDMIAPI/My Project/DataSources/System.Data.DataTable.datasource b/Modules.EDMIAPI/My Project/DataSources/System.Data.DataTable.datasource deleted file mode 100644 index a23fb0d1..00000000 --- a/Modules.EDMIAPI/My Project/DataSources/System.Data.DataTable.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - System.Data.DataTable, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - \ No newline at end of file diff --git a/Modules.EDMIAPI/My Project/Resources.Designer.vb b/Modules.EDMIAPI/My Project/Resources.Designer.vb deleted file mode 100644 index d44fe572..00000000 --- a/Modules.EDMIAPI/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.EDMIAPI.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.EDMIAPI/My Project/Resources.resx b/Modules.EDMIAPI/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.EDMIAPI/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.EDMIAPI/My Project/Settings.Designer.vb b/Modules.EDMIAPI/My Project/Settings.Designer.vb deleted file mode 100644 index 931627f3..00000000 --- a/Modules.EDMIAPI/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.EDMI.API.My.MySettings - Get - Return Global.DigitalData.Modules.EDMI.API.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.EDMIAPI/My Project/Settings.settings b/Modules.EDMIAPI/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.EDMIAPI/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.EDMIAPI/app.config b/Modules.EDMIAPI/app.config deleted file mode 100644 index b35c050d..00000000 --- a/Modules.EDMIAPI/app.config +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Modules.EDMIAPI/packages.config b/Modules.EDMIAPI/packages.config deleted file mode 100644 index 63f3075e..00000000 --- a/Modules.EDMIAPI/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Modules.Filesystem/File.vb b/Modules.Filesystem/File.vb deleted file mode 100644 index 60379f2b..00000000 --- a/Modules.Filesystem/File.vb +++ /dev/null @@ -1,461 +0,0 @@ -Imports System.IO -Imports System.Security.Cryptography -Imports System.Text -Imports System.Text.RegularExpressions -Imports DigitalData.Modules.Logging - -''' File -''' 0.0.0.1 -''' 11.10.2018 -''' -''' Module that provides variouse File operations -''' -''' -''' NLog, >= 4.5.8 -''' -''' -''' LogConfig, DigitalData.Module.Logging.LogConfig -''' A LogConfig object -''' -''' -''' -''' -''' -''' -''' -Public Class File - Private ReadOnly _Logger As Logger - Private ReadOnly _LogConfig As LogConfig - - Private ReadOnly _invalidFilenameChars As String - Private ReadOnly _invalidPathChars As String - - Private Const REGEX_CLEAN_FILENAME As String = "[\\/:""<>|\b\0\r\n\t]" - Private Const REGEX_CLEAN_PATH As String = "[""<>|\b\0\r\n\t]" - - ' The limit enforced by windows for filenpaths is 260, - ' so we use a slightly smaller number to have some Error margin. - ' - ' Source: https://docs.microsoft.com/de-de/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#maximum-path-length-limitation - Private Const MAX_FILE_PATH_LENGTH = 250 - - Private Const FILE_NAME_ACCESS_TEST = "accessTest.txt" - - Public Sub New(LogConfig As LogConfig) - _LogConfig = LogConfig - _Logger = LogConfig.GetLogger() - - _invalidFilenameChars = String.Join("", Path.GetInvalidFileNameChars()) - _invalidPathChars = String.Join("", Path.GetInvalidPathChars()) - End Sub - - Public Function GetCleanFilename(FileName As String) As String - _Logger.Debug("Filename before cleaning: [{0}]", FileName) - - Dim oCleanName As String = FileName - oCleanName = Regex.Replace(oCleanName, _invalidFilenameChars, String.Empty) - oCleanName = Regex.Replace(oCleanName, REGEX_CLEAN_FILENAME, String.Empty, RegexOptions.Singleline) - oCleanName = Regex.Replace(oCleanName, "\s{2,}", " ") - oCleanName = Regex.Replace(oCleanName, "\.{2,}", ".") - - _Logger.Debug("Filename after cleaning: [{0}]", oCleanName) - - Return oCleanName - End Function - - Public Function GetCleanPath(FilePath As String) As String - _Logger.Debug("Path before cleaning: [{0}]", FilePath) - - Dim oCleanName As String = FilePath - oCleanName = Regex.Replace(oCleanName, _invalidPathChars, String.Empty) - oCleanName = Regex.Replace(oCleanName, REGEX_CLEAN_PATH, String.Empty, RegexOptions.Singleline) - - _Logger.Debug("Path after cleaning: [{0}]", oCleanName) - - Return oCleanName - End Function - - ''' - ''' Reads the file at `FilePath` and computes a SHA256 Hash from its contents - ''' - ''' - ''' - Public Function GetChecksum(FilePath As String) As String - Try - Using oFileStream = IO.File.OpenRead(FilePath) - Using oStream As New BufferedStream(oFileStream, 1200000) - Dim oChecksum() As Byte = SHA256.Create.ComputeHash(oStream) - Return FormatHash(oChecksum) - End Using - End Using - Catch ex As Exception - _Logger.Error(ex) - Return Nothing - End Try - End Function - - Public Function GetChecksumFromString(pStringToCheck As String) As String - Dim oBytes() As Byte = Encoding.UTF8.GetBytes(pStringToCheck) - Dim oChecksum() As Byte = SHA256.Create.ComputeHash(oBytes) - Return FormatHash(oChecksum) - End Function - - Private Function FormatHash(pChecksum) - Return BitConverter. - ToString(pChecksum). - Replace("-", String.Empty) - End Function - - ''' - ''' Adds file version string to given filename `Destination` if that file already exists. - ''' - ''' - ''' - Public Function GetVersionedFilename(Destination As String) As String - Try - Dim oFileName As String = Destination - Dim oFinalFileName = oFileName - - Dim oDestinationDir = Path.GetDirectoryName(oFileName) - Dim oExtension = Path.GetExtension(oFileName) - - Dim oVersionSeparator As Char = "~"c - - - Dim oFileNameWithoutExtension = Path.GetFileNameWithoutExtension(oFileName) - Dim oSplitResult = GetVersionedString(oFileNameWithoutExtension, oVersionSeparator) - - oFileNameWithoutExtension = oSplitResult.Item1 - Dim oFileVersion = oSplitResult.Item2 - - ' Shorten the filename (only filename, without extension or version) - ' by cutting the length in half. This should work no matter how long the path and/or filename are. - ' The initial check operates on the full path to catch all scenarios. - If Destination.Length > MAX_FILE_PATH_LENGTH Then - _Logger.Info("Filename is too long. Filename will be cut to prevent further errors.") - _Logger.Info("Original Filename is: {0}", oFileNameWithoutExtension) - Dim oNewLength As Integer = Math.Round(oFileNameWithoutExtension.Length / 2) - Dim oNewFileNameWithoutExtension = oFileNameWithoutExtension.Substring(0, oNewLength) - _Logger.Info("New Filename will be: {0}", oNewFileNameWithoutExtension) - - oFileNameWithoutExtension = oNewFileNameWithoutExtension - End If - - ' while file exists, increment version - Do - oFinalFileName = Path.Combine(oDestinationDir, GetFilenameWithVersion(oFileNameWithoutExtension, oVersionSeparator, oFileVersion, oExtension)) - _Logger.Debug("Intermediate Filename is {0}", oFinalFileName) - _Logger.Debug("File version: {0}", oFileVersion) - oFileVersion += 1 - Loop While (IO.File.Exists(oFinalFileName)) - - _Logger.Debug("Final Filename is {0}", oFinalFileName) - - Return oFinalFileName - Catch ex As Exception - _Logger.Warn("Filename {0} could not be versioned. Original filename will be returned!", Destination) - _Logger.Error(ex) - Return Destination - End Try - End Function - - ''' - ''' Split String at version separator to: - ''' check if string is already versioned, - ''' get the string version of an already versioned string - ''' - ''' - ''' Examples: - ''' test1.pdf --> test1 --> ['test1'] --> no fileversion - ''' test1~2.pdf --> test1~2 --> ['test1', '2'] --> version 2 - ''' test1~12345~2.pdf --> test1~12345~2 --> ['test1', '12345', '2'] --> still version 2 - ''' somestring~3 --> somestring~3 --> ['somestring', '3'] --> version 3 - ''' - ''' The string to versioned - ''' The character to split at - ''' Tuple of string and version - Public Function GetVersionedString(pString As String, pSeparator As Char) As Tuple(Of String, Integer) - Dim oSplitString = pString.Split(pSeparator).ToList() - Dim oStringVersion As Integer - - ' if string is already versioned, extract string version - ' else just use the string and set version to 1 - If oSplitString.Count > 1 Then - Dim oVersion As Integer = 1 - Try - oVersion = Integer.Parse(oSplitString.Last()) - pString = String.Join("", oSplitString.Take(oSplitString.Count - 1)) - Catch ex As Exception - ' pString does NOT change - pString = pString - Finally - oStringVersion = oVersion - End Try - Else - oStringVersion = 1 - End If - - Return New Tuple(Of String, Integer)(pString, oStringVersion) - End Function - - Public Function GetAppDataPath(CompanyName As String, ProductName As String) - Dim oLocalAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) - Return Path.Combine(oLocalAppData, CompanyName, ProductName) - End Function - - Private Function GetFilenameWithVersion(FileNameWithoutExtension As String, VersionSeparator As Char, FileVersion As Integer, Extension As String) As String - If FileVersion <= 1 Then - Return $"{FileNameWithoutExtension}{Extension}" - Else - Return $"{FileNameWithoutExtension}{VersionSeparator}{FileVersion}{Extension}" - End If - End Function - - ''' - ''' Removes files in a directory filtered by filename, extension and last write date - ''' - ''' The directory in which files will be deleted - ''' Only delete files which are older than x days. Must be between 0 and 1000 days. - ''' A filename filter which will be checked - ''' A file extension which will be checked - ''' Should the function continue with deleting when a file could not be deleted? - ''' True if all files were deleted or if no files were deleted, otherwise false - Public Function RemoveFiles(Path As String, FileKeepTime As Integer, FileBaseName As String, Optional FileExtension As String = "log", Optional ContinueOnError As Boolean = True) As Boolean - If Not TestPathIsDirectory(Path) Then - Throw New ArgumentException($"Path {Path} is not a directory!") - End If - - If Not Directory.Exists(Path) Then - Throw New DirectoryNotFoundException($"Path {Path} does not exist!") - End If - - If FileKeepTime < 0 Or FileKeepTime > 1000 Then - Throw New ArgumentOutOfRangeException("FileKeepTime must be an integer between 0 and 1000!") - End If - - Dim oUnableToDeleteCounter = 0 - Dim oDirectory As New DirectoryInfo(Path) - Dim oDateLimit As DateTime = DateTime.Now.AddDays(FileKeepTime) - Dim oFiles As List(Of FileInfo) = oDirectory. - EnumerateFiles($"*{FileBaseName}*"). - Where(Function(oFileInfo As FileInfo) - Return oFileInfo.Extension = FileExtension And oFileInfo.LastWriteTime < oDateLimit - End Function). - ToList() - - If oFiles.Count = 0 Then - _Logger.Debug("No files found that match the criterias.") - Return True - End If - - _Logger.Debug("Deleting old files (Found {0}).", oFiles.Count) - - For Each oFile As FileInfo In oFiles - Try - oFile.Delete() - Catch ex As Exception - If ContinueOnError = False Then - _Logger.Warn("Deleting files was aborted at file {0}.", oFile.FullName) - Return False - End If - oUnableToDeleteCounter = oUnableToDeleteCounter + 1 - _Logger.Warn("File {0} could not be deleted!") - End Try - Next - - If oUnableToDeleteCounter > 0 Then - _Logger.Debug("Old files partially removed. {0} files could not be removed.", oUnableToDeleteCounter) - Else - _Logger.Debug("Old files removed.") - End If - - Return True - End Function - - - Public Sub MoveTo(FilePath As String, Directory As String) - Dim oFileInfo As New FileInfo(FilePath) - IO.File.Move(FilePath, Path.Combine(Directory, oFileInfo.Name)) - End Sub - - - Public Sub MoveTo(FilePath As String, NewFileName As String, Directory As String) - IO.File.Move(FilePath, Path.Combine(Directory, NewFileName)) - End Sub - - ''' - ''' Copied from https://docs.microsoft.com/en-us/dotnet/standard/io/how-to-copy-directories - ''' - ''' - ''' - ''' - Public Sub CopyDirectory(ByVal SourceDirName As String, ByVal DestDirName As String, ByVal CopySubDirs As Boolean) - Dim oDirectory As DirectoryInfo = New DirectoryInfo(SourceDirName) - - If Not oDirectory.Exists Then - Throw New DirectoryNotFoundException("Source directory does not exist or could not be found: " & SourceDirName) - End If - - Dim oDirectories As DirectoryInfo() = oDirectory.GetDirectories() - Directory.CreateDirectory(DestDirName) - Dim oFiles As FileInfo() = oDirectory.GetFiles() - - For Each oFile As FileInfo In oFiles - Dim tempPath As String = Path.Combine(DestDirName, oFile.Name) - oFile.CopyTo(tempPath, False) - Next - - If CopySubDirs Then - For Each oSubDirectory As DirectoryInfo In oDirectories - Dim oTempPath As String = Path.Combine(DestDirName, oSubDirectory.Name) - CopyDirectory(oSubDirectory.FullName, oTempPath, CopySubDirs) - Next - End If - End Sub - - ''' - ''' Tries to create a directory and returns its path. - ''' Returns a temp path if `DirectoryPath` can not be created or written to. - ''' - ''' The directory to create - ''' Should a write access test be performed? - ''' The used path - Public Function CreateDirectory(DirectoryPath As String, Optional TestWriteAccess As Boolean = True) As String - Dim oFinalPath As String - If Directory.Exists(DirectoryPath) Then - _Logger.Debug("Directory {0} already exists. Skipping.", DirectoryPath) - oFinalPath = DirectoryPath - Else - Try - Directory.CreateDirectory(DirectoryPath) - oFinalPath = DirectoryPath - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("Directory {0} could not be created. Temp path will be used instead.", DirectoryPath) - oFinalPath = Path.GetTempPath() - End Try - End If - - If TestWriteAccess AndAlso Not TestPathIsWritable(DirectoryPath) Then - _Logger.Warn("Directory {0} is not writable. Temp path will be used instead.", DirectoryPath) - oFinalPath = Path.GetTempPath() - Else - oFinalPath = DirectoryPath - End If - - _Logger.Debug("Using path {0}", oFinalPath) - - Return oFinalPath - End Function - - Public Function TestPathIsWritable(DirectoryPath As String) As Boolean - Try - Dim fileAccessPath = Path.Combine(DirectoryPath, FILE_NAME_ACCESS_TEST) - Using fs As FileStream = IO.File.Create(fileAccessPath) - fs.WriteByte(0) - End Using - - IO.File.Delete(fileAccessPath) - Return True - Catch ex As Exception - Return False - End Try - End Function - - ''' - ''' Checks if a file is locked, ie. in use by another process. - ''' - ''' - ''' https://docs.microsoft.com/en-us/dotnet/standard/io/handling-io-errors - ''' https://stackoverflow.com/questions/876473/is-there-a-way-to-check-if-a-file-is-in-use - ''' - Public Function TestFileIsLocked(pFilePath As String) As Boolean - Try - Using stream As FileStream = IO.File.Open(pFilePath, FileMode.Open, FileAccess.ReadWrite, FileShare.None) - stream.Close() - End Using - Catch ex As Exception When ((ex.HResult And &HFFFF) = 32) - Return True - Catch ex As Exception - Return True - End Try - - Return False - End Function - - Public Function TestPathIsDirectory(Path As String) As Boolean - If Not Directory.Exists(Path) Then - Return False - End If - - Dim oIsDirectory As Boolean = (System.IO.File.GetAttributes(Path) And FileAttributes.Directory) = FileAttributes.Directory - Return oIsDirectory - End Function - - Public Function GetDateDirectory(pBaseDirectory As String, pDate As Date) As String - Dim oDateDirectory = GetDateString(pDate) - Dim oFinalDirectory As String = IO.Path.Combine(pBaseDirectory, oDateDirectory) - Return oFinalDirectory - End Function - - Public Function GetDateDirectory(pBaseDirectory As String) As String - Return GetDateDirectory(pBaseDirectory, Now) - End Function - - Public Function CreateDateDirectory(pBaseDirectory As String, pDate As Date) As String - Dim oDateDirectory = GetDateString(pDate) - Dim oFinalDirectory As String = IO.Path.Combine(pBaseDirectory, oDateDirectory) - - If IO.Directory.Exists(oFinalDirectory) = False Then - _Logger.Debug("Path does not exist, creating: [{0}]", oFinalDirectory) - Try - Directory.CreateDirectory(oFinalDirectory) - _Logger.Debug("Created folder [{0}]", oFinalDirectory) - Catch ex As Exception - _Logger.Warn("Final path [{0}] could not be created!", oFinalDirectory) - _Logger.Error(ex) - End Try - End If - - Return oFinalDirectory - End Function - - Public Function CreateDateDirectory(pBaseDirectory As String) As String - Return CreateDateDirectory(pBaseDirectory, Now) - End Function - - Public Function GetDateString() As String - Return $"{Now:yyyy\\MM\\dd}" - End Function - - Public Function GetDateString(pDate As Date) As String - Return $"{pDate:yyyy\\MM\\dd}" - End Function - - Public Function GetDateTimeString() As String - Return $"{Now:yyyy-MM-dd_hh-mm-ffff}" - End Function - - Public Function GetDateTimeString(pDate As Date) As String - Return $"{pDate:yyyy-MM-dd_hh-mm-ffff}" - End Function - - Public Function GetFilenameWithSuffix(pFilePath As String, pSuffix As String) - Dim oFileInfo = New IO.FileInfo(pFilePath) - Return GetFilenameWithSuffix(IO.Path.GetFileNameWithoutExtension(pFilePath), pSuffix, oFileInfo.Extension.Substring(1)) - End Function - - Public Function GetFilenameWithSuffix(pBaseString As String, pSuffix As String, pExtension As String) - Return $"{pBaseString}-{pSuffix}.{pExtension}" - End Function - - Public Function GetFilenameWithPrefix(pFilePath As String, pPrefix As String) - Dim oFileInfo = New IO.FileInfo(pFilePath) - Return GetFilenameWithSuffix(IO.Path.GetFileNameWithoutExtension(pFilePath), pPrefix, oFileInfo.Extension.Substring(1)) - End Function - - Public Function GetFilenameWithPrefix(pBaseString As String, pPrefix As String, pExtension As String) - Return $"{pPrefix}-{pBaseString}.{pExtension}" - End Function - -End Class diff --git a/Modules.Filesystem/FileContainer/DocumentObject.vb b/Modules.Filesystem/FileContainer/DocumentObject.vb deleted file mode 100644 index c9da13f0..00000000 --- a/Modules.Filesystem/FileContainer/DocumentObject.vb +++ /dev/null @@ -1,18 +0,0 @@ -Imports System.Runtime.Serialization - - -Public Class DocumentObject - - - Public ReadOnly FileName As String - - Public ReadOnly ContainerId As String - - Public ReadOnly DocumentId As Int64 - - Public Sub New(ContainerId As String, DocumentId As Int64, FileName As String) - Me.ContainerId = ContainerId - Me.DocumentId = DocumentId - Me.FileName = FileName - End Sub -End Class diff --git a/Modules.Filesystem/FileContainer/FileContainer.vb b/Modules.Filesystem/FileContainer/FileContainer.vb deleted file mode 100644 index 54d6ce4a..00000000 --- a/Modules.Filesystem/FileContainer/FileContainer.vb +++ /dev/null @@ -1,193 +0,0 @@ -Imports System.IO -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Encryption -Imports ProtoBuf - -''' FileContainer -''' 0.0.0.2 -''' 21.11.2018 -''' -''' File Container for securely saving files -''' -''' -''' NLog, >= 4.5.8 -''' -''' -''' LogConfig, DigitalData.Module.Logging.LogConfig -''' A LogConfig object -''' Password, String -''' The Password to Encrypt -''' Path, String -''' The Path to save/load the container -''' -''' -''' dim oContainer = Container.Create(logConfig, "pass", "E:\some.container") -''' dim oContainer = Container.Load(logConfig, "pass", "E:\some.container") -''' -''' dim oContainer = new Container(logConfig, "pass", "E:\some.container") -''' oContainer.Save() -''' -''' dim oContainer = new Container(logConfig, "pass", "E:\some.container") -''' oContainer.Contents = oSomeData -''' oContainer.Save() -''' -''' dim oContainer = new Container(logConfig, "pass", "E:\some.container") -''' oContainer.Load() -''' dim oContents = oContainer.Contents -''' -''' dim oContainer = new Container(logConfig, "pass", "E:\some.container") -''' oContainer.Load() -''' oContainer.Contents = oSomeOtherData -''' oContainer.Save() -''' oContainer.SaveAs("E:\some2.container") -''' -Public Class FileContainer - Private _crypto As Encryption.Encryption - Private _compression As Compression - Private _inner As FileContainerInner - Private _logger As Logger - Private _logConfig As LogConfig - Private _path As String - - Public Property Contents As Byte() - Get - Return _inner.Contents - End Get - Set(value As Byte()) - _inner.Contents = value - End Set - End Property - Public ReadOnly Property ContainerId As String - Get - Return _inner.FileId - End Get - End Property - Public ReadOnly Property CreatedAt As String - Get - Return _inner.CreatedAt - End Get - End Property - Public ReadOnly Property UpdatedAt As String - Get - Return _inner.UpdatedAt - End Get - End Property - - Public Shared Function Create(LogConfig As LogConfig, Password As String) As FileContainer - Dim oContainer = New FileContainer(LogConfig, Password) - Return oContainer - End Function - - Public Shared Function Load(LogConfig As LogConfig, Password As String, Path As String) As FileContainer - Dim oContainer = New FileContainer(LogConfig, Password, Path) - oContainer.Load() - Return oContainer - End Function - - Public Sub New(LogConfig As LogConfig, Password As String) - _logger = LogConfig.GetLogger() - _crypto = New Encryption.Encryption(LogConfig, Password) - _compression = New Compression(LogConfig) - _inner = New FileContainerInner() - End Sub - - Public Sub New(LogConfig As LogConfig, Password As String, Path As String) - MyClass.New(LogConfig, Password) - _path = Path - End Sub - - Public Sub SetFile(Contents As Byte(), FileName As String) - _inner.Contents = Contents - _inner.UpdatedAt = Date.Now - _inner.FileName = FileName - End Sub - - Public Function GetFile() As FileContainerInner - Return _inner - End Function - - Public Sub Save() - If IsNothing(_path) Then - Throw New ArgumentException("Path not set") - End If - - SaveAs(_path) - End Sub - - Public Sub SaveAs(Path As String) - Try - WriteBytesToFile(TransformToBytes(_inner), Path) - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Sub - - Public Sub Load() - If IsNothing(_path) Then - Throw New ArgumentException("Path not set") - End If - - LoadFrom(_path) - End Sub - - Public Sub LoadFrom(Path As String) - Try - _inner = TransformToObject(ReadBytesFromFile(_path)) - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Sub - - Private Function TransformToBytes([Object] As FileContainerInner) As Byte() - Dim oBytes = Serialize([Object]) - Dim oCompressed = _compression.Compress(oBytes) - Dim oEncrypted = _crypto.Encrypt(oCompressed) - Return oEncrypted - End Function - - Private Function TransformToObject(Bytes As Byte()) As FileContainerInner - Dim oDecrypted = _crypto.Decrypt(Bytes) - Dim oDecompressed = _compression.Decompress(oDecrypted) - Dim oObject = Deserialize(oDecompressed) - Return oObject - End Function - - Private Function Serialize(InnerData As FileContainerInner) As Byte() - Dim oBinaryData As Byte() - - Using oStream As New MemoryStream - Serializer.Serialize(oStream, InnerData) - oBinaryData = oStream.ToArray() - End Using - - Return oBinaryData - End Function - - Private Function Deserialize(InnerData As Byte()) As FileContainerInner - Dim oObject As FileContainerInner - - Using oStream As New MemoryStream(InnerData) - oObject = Serializer.Deserialize(Of FileContainerInner)(oStream) - End Using - - Return oObject - End Function - - Private Sub WriteBytesToFile(Data As Byte(), FilePath As String) - Using oSourceStream As New FileStream(FilePath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None) - oSourceStream.Write(Data, 0, Data.Length) - oSourceStream.Flush() - End Using - End Sub - - Private Function ReadBytesFromFile(FilePath As String) As Byte() - Using oFileStream = New FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.Read, 4096) - Dim oBuffer As Byte() = New Byte(oFileStream.Length - 1) {} - oFileStream.Read(oBuffer, 0, oFileStream.Length) - oFileStream.Close() - Return oBuffer - End Using - End Function -End Class diff --git a/Modules.Filesystem/FileContainer/FileContainerInner.vb b/Modules.Filesystem/FileContainer/FileContainerInner.vb deleted file mode 100644 index fc787ce0..00000000 --- a/Modules.Filesystem/FileContainer/FileContainerInner.vb +++ /dev/null @@ -1,23 +0,0 @@ -Imports ProtoBuf - - - -Public Class FileContainerInner - - Public FileId As String - - Public Contents As Byte() - - Public CreatedAt As DateTime - - Public UpdatedAt As DateTime - - Public FileName As String - - Public Sub New() - FileId = Guid.NewGuid().ToString - CreatedAt = Date.Now - UpdatedAt = Date.Now - End Sub - -End Class \ No newline at end of file diff --git a/Modules.Filesystem/FileWatcher/FileWatcher.vb b/Modules.Filesystem/FileWatcher/FileWatcher.vb deleted file mode 100644 index 6f82047a..00000000 --- a/Modules.Filesystem/FileWatcher/FileWatcher.vb +++ /dev/null @@ -1,132 +0,0 @@ -Imports System.IO -Imports DigitalData.Modules.Filesystem -Imports DigitalData.Modules.Filesystem.FileWatcherFilters -Imports DigitalData.Modules.Logging - - -Public Class FileWatcher - ' Internals - Private ReadOnly _Logger As Logger - Private ReadOnly _Watchers As List(Of FileSystemWatcher) - Private ReadOnly _Files As Dictionary(Of String, FileWatcherProperties) - Private ReadOnly _Filters As List(Of BaseFileFilter) - - ' Options - Private _Path As String - - ' Public Events - Public Event FileSaved(ByVal FullName As String, ByVal IsSpecial As Boolean) - - Public Sub New(LogConfig As LogConfig, Path As String, Optional Filters As List(Of BaseFileFilter) = Nothing) - _Logger = LogConfig.GetLogger() - _Files = New Dictionary(Of String, FileWatcherProperties) - _Watchers = New List(Of FileSystemWatcher) - _Filters = IIf(IsNothing(Filters), GetDefaultFilters(), Filters) - _Path = Path - - For Each oFilePath In Directory.EnumerateFiles(_Path) - Try - If IO.File.Exists(oFilePath) Then - _Files.Add(oFilePath, New FileWatcherProperties With { - .CreatedAt = DateTime.Now, - .ChangedAt = Nothing - }) - End If - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("File {0} cannot be watched!") - End Try - Next - End Sub - - Public Sub Add(Filter As String) - _Watchers.Add(CreateWatcher(Filter)) - End Sub - - Public Sub Start() - For Each oWatcher In _Watchers - oWatcher.EnableRaisingEvents = True - Next - End Sub - - Public Sub [Stop]() - For Each oWatcher In _Watchers - If Not IsNothing(oWatcher) Then - oWatcher.EnableRaisingEvents = False - oWatcher.Dispose() - End If - Next - End Sub - - Private Function GetDefaultFilters() - Return New List(Of BaseFileFilter) From { - New TempFileFilter, - New OfficeFileFilter - } - End Function - - Private Function CreateWatcher(Filter As String) - Dim oWatcher = New FileSystemWatcher() With { - .Path = _Path, - .Filter = Filter, - .NotifyFilter = NotifyFilters.LastAccess _ - Or NotifyFilters.LastWrite _ - Or NotifyFilters.FileName _ - Or NotifyFilters.Size _ - Or NotifyFilters.FileName _ - Or NotifyFilters.Attributes - } - - AddHandler oWatcher.Created, AddressOf HandleFileCreated - AddHandler oWatcher.Changed, AddressOf HandleFileChanged - AddHandler oWatcher.Deleted, AddressOf HandleFileDeleted - AddHandler oWatcher.Renamed, AddressOf HandleFileRenamed - - Return oWatcher - End Function - - Private Sub HandleFileCreated(sender As Object, e As FileSystemEventArgs) - _Files.Add(e.FullPath, New FileWatcherProperties()) - _Logger.Debug("[Created] " & e.FullPath) - End Sub - - ''' - ''' This may fire twice for a single save operation, - ''' see: https://blogs.msdn.microsoft.com/oldnewthing/20140507-00/?p=1053/ - ''' - Private Sub HandleFileChanged(sender As Object, e As FileSystemEventArgs) - _Files.Item(e.FullPath).ChangedAt = DateTime.Now - _Logger.Debug("[Changed] " & e.FullPath) - - Dim oShouldRaiseSave As Boolean = Not _Filters.Any(Function(oFilter) - Return oFilter.ShouldFilter(e) - End Function) - - If oShouldRaiseSave Then - RaiseEvent FileSaved(e.FullPath, False) - End If - End Sub - Private Sub HandleFileDeleted(sender As Object, e As FileSystemEventArgs) - _Files.Remove(e.FullPath) - _Logger.Debug("[Removed] " & e.FullPath) - End Sub - - Private Sub HandleFileRenamed(sender As Object, e As RenamedEventArgs) - Dim oProperties = _Files.Item(e.OldFullPath) - _Files.Remove(e.OldFullPath) - _Files.Add(e.FullPath, oProperties) - ' Soll eine umbenannte datei als NEU gelten? - - Dim oShouldRaiseSave = _Filters.Any(Function(oFilter) - Return oFilter.ShouldRaiseSave(e) - End Function) - - If oShouldRaiseSave Then - RaiseEvent FileSaved(e.OldFullPath, True) - End If - - _Logger.Debug("[Renamed] {0} --> {1}", e.OldFullPath, e.FullPath) - End Sub - - -End Class diff --git a/Modules.Filesystem/FileWatcher/FileWatcherFilters.vb b/Modules.Filesystem/FileWatcher/FileWatcherFilters.vb deleted file mode 100644 index 84f70b62..00000000 --- a/Modules.Filesystem/FileWatcher/FileWatcherFilters.vb +++ /dev/null @@ -1,61 +0,0 @@ -Imports System.IO - -''' -''' Built-in filters for FileWatcher that are useful for correctly detecting changes on Office documents (currently Office 2016) -''' -Public Class FileWatcherFilters - ''' - ''' Base Filter that all filters must inherit from - ''' Provides two functions that may be overridden and some useful file extension lists - ''' - Public MustInherit Class BaseFileFilter - Public TempFiles As New List(Of String) From {".tmp", ""} - - Public Overridable Function ShouldFilter(e As FileSystemEventArgs) As Boolean - Return False - End Function - Public Overridable Function ShouldRaiseSave(e As RenamedEventArgs) As Boolean - Return False - End Function - End Class - - ''' - ''' Simple Filter that filters changes made on temporary files - ''' - Public Class TempFileFilter - Inherits BaseFileFilter - - Public Overrides Function ShouldFilter(e As FileSystemEventArgs) As Boolean - Dim oFileInfo As New FileInfo(e.FullPath) - Return TempFiles.Contains(oFileInfo.Extension) - End Function - End Class - - ''' - ''' Filter to detect changes on Office files - ''' - Public Class OfficeFileFilter - Inherits BaseFileFilter - - Public OfficeFiles As New List(Of String) From {".docx", ".pptx", ".xlsx"} - - Public Overrides Function ShouldFilter(e As FileSystemEventArgs) As Boolean - Dim oFileInfo As New FileInfo(e.FullPath) - Return OfficeFiles.Contains(oFileInfo.Extension) And oFileInfo.Name.StartsWith("~") - End Function - - Public Overrides Function ShouldRaiseSave(e As RenamedEventArgs) As Boolean - Dim oIsTransform = OfficeFiles.Any(Function(Extension As String) - Return e.OldName.EndsWith(Extension) - End Function) - - ' Check if it is renamed to a temp file - Dim oIsTempFile = TempFiles.Any(Function(Extension) - Return e.Name.EndsWith(Extension) - End Function) - - - Return oIsTransform And oIsTempFile - End Function - End Class -End Class diff --git a/Modules.Filesystem/FileWatcher/FileWatcherProperties.vb b/Modules.Filesystem/FileWatcher/FileWatcherProperties.vb deleted file mode 100644 index 5eadecbe..00000000 --- a/Modules.Filesystem/FileWatcher/FileWatcherProperties.vb +++ /dev/null @@ -1,10 +0,0 @@ -Public Class FileWatcherProperties - Public Property CreatedAt As DateTime - Public Property ChangedAt As DateTime - Public ReadOnly Property HasChanged As Boolean - Public Sub New() - CreatedAt = DateTime.Now - ChangedAt = Nothing - HasChanged = False - End Sub -End Class diff --git a/Modules.Filesystem/Filesystem.vbproj b/Modules.Filesystem/Filesystem.vbproj deleted file mode 100644 index d8a2a9da..00000000 --- a/Modules.Filesystem/Filesystem.vbproj +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Debug - AnyCPU - {991D0231-4623-496D-8BD0-9CA906029CBC} - Library - DigitalData.Modules.Filesystem - DigitalData.Modules.Filesystem - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Filesystem.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Filesystem.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - ..\packages\protobuf-net.2.4.0\lib\net40\protobuf-net.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {8a8f20fc-c46e-41ac-bee7-218366cfff99} - Encryption - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - \ No newline at end of file diff --git a/Modules.Filesystem/My Project/Application.Designer.vb b/Modules.Filesystem/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.Filesystem/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.Filesystem/My Project/Application.myapp b/Modules.Filesystem/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.Filesystem/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.Filesystem/My Project/AssemblyInfo.vb b/Modules.Filesystem/My Project/AssemblyInfo.vb deleted file mode 100644 index 156e2313..00000000 --- a/Modules.Filesystem/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.Filesystem/My Project/Resources.Designer.vb b/Modules.Filesystem/My Project/Resources.Designer.vb deleted file mode 100644 index 97935ddf..00000000 --- a/Modules.Filesystem/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Filesystem.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.Filesystem/My Project/Resources.resx b/Modules.Filesystem/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.Filesystem/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.Filesystem/My Project/Settings.Designer.vb b/Modules.Filesystem/My Project/Settings.Designer.vb deleted file mode 100644 index 150844cf..00000000 --- a/Modules.Filesystem/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Filesystem.My.MySettings - Get - Return Global.DigitalData.Modules.Filesystem.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Filesystem/My Project/Settings.settings b/Modules.Filesystem/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.Filesystem/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.Filesystem/packages.config b/Modules.Filesystem/packages.config deleted file mode 100644 index 4841cbb8..00000000 --- a/Modules.Filesystem/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Modules.Interfaces/ActiveDirectoryInterface.vb b/Modules.Interfaces/ActiveDirectoryInterface.vb deleted file mode 100644 index d3617f4e..00000000 --- a/Modules.Interfaces/ActiveDirectoryInterface.vb +++ /dev/null @@ -1,315 +0,0 @@ -Imports System.DirectoryServices -Imports System.DirectoryServices.AccountManagement -Imports System.Text.RegularExpressions -Imports DigitalData.Modules.Database -Imports DigitalData.Modules.Logging - -Public Class ActiveDirectoryInterface - Private _logConfig As LogConfig - Private _logger As Logger - - Private ReadOnly _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 Const DEFAULT_USER_FILTER = "(&(objectClass=user)(samAccountName=@SAMACCOUNTNAME)(!(UserAccountControl:1.2.840.113556.1.4.803:=2)))" - Public Const DEFAULT_GROUP_FILTER = "(&(objectClass=group) (samAccountName=*))" - - 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 - _logger.Info("Using RootPath {0}", _rootPath) - End Sub - - Public Function SyncUsersForGroup(GroupName As String, Firebird As Firebird, MSSQL As MSSQLServer) As List(Of ADUser) - Try - Return SyncUsersForGroup(GroupName, New List(Of AttributeMapping), Firebird, MSSQL) - Catch ex As Exception - _logger.Error(ex) - Return Nothing - End Try - End Function - - Public Function SyncUsersForGroup(GroupName As String, AttributeMappings As List(Of AttributeMapping), Firebird As Firebird, MSSQL As MSSQLServer, Optional Filter As String = DEFAULT_USER_FILTER) As List(Of ADUser) - Dim oUsers As New List(Of ADUser) - Dim oSyncedUsers As New List(Of ADUser) - Dim oGroupId As Int64 = Nothing - - Dim oFirebirdSync As New SyncUsers.SyncUsersFirebird(_logConfig, Firebird) - Dim oSQLSync As New SyncUsers.SyncUsersMSSQL(_logConfig, MSSQL) - Dim oSyncedUsersFirebird, oSyncedUsersMSSQL As List(Of ADUser) - - Try - _logger.Debug("Fetching users from ActiveDirectory") - oUsers = ListUsers(GroupName, AttributeMappings, Filter) - _logger.Debug("Found {0} users", oUsers.Count) - Catch ex As Exception - _logger.Error(ex) - Return Nothing - End Try - - ' Do the actual sync into firebird - If Firebird IsNot Nothing Then - oSyncedUsersFirebird = oFirebirdSync.SyncUsers(GroupName, oUsers, AttributeMappings) - If oSyncedUsersFirebird.Count > 0 Then - _logger.Debug("Synced {0} users to Firebird", oSyncedUsersFirebird.Count) - End If - Else - _logger.Debug("SyncUsersForGroup: _firebird is nothing. ") - End If - - ' Do the actual sync into MSSQL - If MSSQL IsNot Nothing Then - oSyncedUsersMSSQL = oSQLSync.SyncUsers(GroupName, oUsers, AttributeMappings) - If oSyncedUsersMSSQL.Count > 0 Then - _logger.Debug("Synced {0} users to MSSQLServer", oSyncedUsersMSSQL.Count) - End If - Else - _logger.Debug("SyncUsersForGroup: _mssql is nothing. ") - End If - - Return oUsers - End Function - - Public Function Authenticate() As Boolean - Try - Dim oEntry = GetRootNode() - oEntry.RefreshCache() - - _rootNode = oEntry - Return True - Catch ex As Exception - _logger.Error(ex) - _logger.Warn("Could not authenticate with Active Directory.") - Return False - End Try - End Function - Public Function Authenticate(Username As String, Password As String) As Boolean - Try - Dim oEntry = GetRootNode(Username, Password) - oEntry.RefreshCache() - - _rootNode = oEntry - Return True - Catch ex As Exception - _logger.Error(ex) - _logger.Warn("Could not authenticate with Active Directory.") - Return False - End Try - End Function - - Public Function ListGroups(Optional Query As String = DEFAULT_GROUP_FILTER) As List(Of ADGroup) - Return ListGroups(_rootNode, Query) - End Function - - Public Async Function ListGroupsAsync(Optional Query As String = DEFAULT_GROUP_FILTER) As Task(Of List(Of ADGroup)) - Return Await Task.Run(Function() ListGroups(Query)) - End Function - - Public Function ListGroups(RootNode As DirectoryEntry, Optional Query As String = DEFAULT_GROUP_FILTER) As List(Of ADGroup) - Dim oGroups As New List(Of ADGroup) - - Try - Dim oDirectorySearcher As New DirectorySearcher(RootNode) With { - .SearchScope = SearchScope.Subtree, - .SizeLimit = SEARCH_LIMIT, - .Filter = Query - } - 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 - - Public Function ListUsers(GroupName As String, Optional Filter As String = DEFAULT_USER_FILTER) As List(Of ADUser) - Return ListUsers(GroupName, New List(Of AttributeMapping), Filter) - End Function - - Public Async Function ListUsersAsync(GroupName As String, Optional Filter As String = DEFAULT_USER_FILTER) As Task(Of List(Of ADUser)) - Return Await Task.Run(Function() ListUsers(GroupName, Filter)) - End Function - - Public Function ListUsers(GroupName As String, AttributeMappings As List(Of AttributeMapping), Optional Filter As String = DEFAULT_USER_FILTER) As List(Of ADUser) - Dim oUsers As New List(Of ADUser) - - Try - Using oContext As New PrincipalContext(ContextType.Domain) - Using oGroupPrincipal As GroupPrincipal = GroupPrincipal.FindByIdentity(oContext, IdentityType.Name, GroupName) - If oGroupPrincipal Is Nothing Then - _logger.Debug("Group {0} does not exist.", GroupName) - Return oUsers - End If - - _logger.Debug("Listing members of Group {0}", GroupName) - - Using oMembers = oGroupPrincipal.GetMembers(True) - For Each oMember As Principal In oMembers - Try - If TypeOf oMember Is UserPrincipal Then - Dim oUser As UserPrincipal = DirectCast(oMember, UserPrincipal) - Dim oUserEx As UserPrincipalEx = UserPrincipalEx.FindByIdentity(oContext, IdentityType.SamAccountName, oUser.SamAccountName) - Dim oCustomAttributes As New List(Of ADUser.CustomAttribute) - - Dim oUserFound = FindUserWithFilter(oUserEx, Filter) - - If oUserFound = False Then - _logger.Debug("User [{0}] was skipped out due to user filter.", oUserEx.SamAccountName) - Continue For - End If - _logger.Debug("User [{0}] passed the filter.", oUserEx.SamAccountName) - - ' TODO: Figure out why oUserEx can be nothing for certain users - If oUserEx IsNot Nothing Then - For Each oMap As AttributeMapping In AttributeMappings - Dim oAttributeValue = oUserEx.GetAttributeValue(oMap.AttributeName) - - If oAttributeValue <> String.Empty Then - _logger.Debug("Attribute [{0}] is not empty.", oMap.AttributeName) - - oCustomAttributes.Add(New ADUser.CustomAttribute() With { - .Name = oMap.AttributeName, - .Value = oAttributeValue, - .FirebirdSyskey = oMap.FirebirdSyskey, - .MSSQLColumn = oMap.MSSQLColumn - }) - End If - Next - Else - _logger.Debug("Could not fetch CustomAttributes for user [{0}]", oUser) - End If - - _logger.Debug("Trying to add User [{0}] to user list", oUser) - - Dim oNewUser As New ADUser With { - .SId = oUser.Sid, - .samAccountName = oUser.SamAccountName, - .Middlename = oUser.MiddleName, - .GivenName = oUser.GivenName, - .Surname = oUser.Surname, - .GUID = oUser.Guid, - .Email = oUser.EmailAddress, - .CustomAttributes = oCustomAttributes - } - - oUsers.Add(oNewUser) - End If - Catch ex As Exception - _logger.Warn("User could not be processed") - _logger.Error(ex) - End Try - Next - End Using - End Using - End Using - - Return oUsers - Catch ex As Exception - _logger.Error(ex) - Return oUsers - End Try - End Function - - Public Function FindUserWithFilter(User As UserPrincipalEx, Filter As String) As Boolean - Try - Dim oRootPath = String.Join(","c, User.DistinguishedName.Split(","c).Skip(1)) - Dim oPlaceholder = "@SAMACCOUNTNAME" - Dim oProtocol = "LDAP://" - Dim oEntry As New DirectoryEntry(oProtocol & oRootPath) With { - .Username = Nothing, - .Password = Nothing, - .AuthenticationType = AuthenticationTypes.Secure - } - - If Filter = String.Empty Then - _logger.Debug("FindUserWithFilter: Filter was empty, returning True for User [{0}]", User.SamAccountName) - Return True - End If - - If Filter.Contains(oPlaceholder) Then - Filter = Filter.Replace(oPlaceholder, User.SamAccountName) - Else - _logger.Warn("FindUserWithFilter: Placeholder [{0}] was not found in filter. Results may not be correct.") - End If - - Dim oSearcher As New DirectorySearcher(oEntry, Filter) - Dim oResult As SearchResult = oSearcher.FindOne() - - If oResult IsNot Nothing AndAlso oResult.Path.Replace(oProtocol, String.Empty) = User.DistinguishedName Then - Return True - Else - Return False - End If - Catch ex As Exception - _logger.Warn("FindUserWithFilter: Unhandled exception.") - _logger.Error(ex) - Return False - End Try - End Function - - 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 - - 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.Debug("Property {0} not found", PropertyName) - Return String.Empty - End Try - End Function -End Class diff --git a/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryGroup.vb b/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryGroup.vb deleted file mode 100644 index 285a9ebe..00000000 --- a/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryGroup.vb +++ /dev/null @@ -1,13 +0,0 @@ -Public Class ADGroup - Public Property SAMAccountName As String - Public Property ObjectClass As String - Public Property CN As String - Public Property Description As String - Public Property DistinguishedName As String - Public Property Name As String - Public Property ObjectCategory As String - - Public Overrides Function ToString() As String - Return SAMAccountName - End Function -End Class diff --git a/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryUser.vb b/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryUser.vb deleted file mode 100644 index ee7504f6..00000000 --- a/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryUser.vb +++ /dev/null @@ -1,28 +0,0 @@ -Imports System.Security.Principal - -Public Class ADUser - Public Property GUID As Guid - Public Property samAccountName As String - Public Property SId As SecurityIdentifier - Public Property Surname As String - Public Property GivenName As String - Public Property Middlename As String - Public Property Email As String - - Public CustomAttributes As List(Of CustomAttribute) - - Public Overrides Function Equals(obj As Object) As Boolean - Return DirectCast(obj, ADUser).samAccountName - End Function - - Public Overrides Function ToString() As String - Return samAccountName - End Function - - Public Class CustomAttribute - Public Name As String - Public Value As Object - Public MSSQLColumn As String - Public FirebirdSyskey As String - End Class -End Class diff --git a/Modules.Interfaces/ActiveDirectoryInterface/AttributeMap.vb b/Modules.Interfaces/ActiveDirectoryInterface/AttributeMap.vb deleted file mode 100644 index 139ecb97..00000000 --- a/Modules.Interfaces/ActiveDirectoryInterface/AttributeMap.vb +++ /dev/null @@ -1,5 +0,0 @@ -Public Class AttributeMapping - Public AttributeName As String - Public FirebirdSyskey As String - Public MSSQLColumn As String -End Class diff --git a/Modules.Interfaces/ActiveDirectoryInterface/ISyncUsers.vb b/Modules.Interfaces/ActiveDirectoryInterface/ISyncUsers.vb deleted file mode 100644 index 2095b8e7..00000000 --- a/Modules.Interfaces/ActiveDirectoryInterface/ISyncUsers.vb +++ /dev/null @@ -1,8 +0,0 @@ -Public Interface ISyncUsers - Function SyncUsers(GroupName As String, Users As List(Of ADUser), PropertyMapping As List(Of AttributeMapping)) As List(Of ADUser) - Function GetGroupId(GroupName As String) As Integer - Function GetUserId(UserName As String) As Integer - Function CreateUser(User As ADUser) As Integer - Function AddUserToGroup(UserId As Integer, GroupId As Integer) As Boolean - Sub AddCustomAttributesToUser(User As ADUser, UserId As Integer) -End Interface diff --git a/Modules.Interfaces/ActiveDirectoryInterface/SyncUsers.Firebird.vb b/Modules.Interfaces/ActiveDirectoryInterface/SyncUsers.Firebird.vb deleted file mode 100644 index 182e2718..00000000 --- a/Modules.Interfaces/ActiveDirectoryInterface/SyncUsers.Firebird.vb +++ /dev/null @@ -1,145 +0,0 @@ -Imports DigitalData.Modules.Database -Imports DigitalData.Modules.Interfaces -Imports DigitalData.Modules.Logging - -Namespace SyncUsers - Public Class SyncUsersFirebird - Implements ISyncUsers - - Private ReadOnly _logConfig As LogConfig - Private ReadOnly _logger As Logger - Private ReadOnly _firebird As Database.Firebird - - Public Sub New(LogConfig As LogConfig, Firebird As Database.Firebird) - _logConfig = LogConfig - _logger = LogConfig.GetLogger() - _firebird = Firebird - End Sub - - Public Function SyncUsers(GroupName As String, Users As List(Of ADUser), PropertyMapping As List(Of AttributeMapping)) As List(Of ADUser) Implements ISyncUsers.SyncUsers - Dim oGroupId As Integer - Dim oSyncedUsers As New List(Of ADUser) - - Try - _logger.Debug("Getting group Id for group [{0}]", GroupName) - oGroupId = GetGroupId(GroupName) - - If oGroupId = 0 Then - _logger.Debug("Group [{0}] does not exist in database or is not enabled for sync.", GroupName) - Return oSyncedUsers - End If - - _logger.Debug("Using group Id [{0}]", oGroupId) - Catch ex As Exception - _logger.Error(ex) - Return oSyncedUsers - End Try - - For Each oUser In Users - Dim oUserId As Int64 - Dim oUserExists As Boolean = False - - ' Check if user already exists - Try - _logger.Debug("Checking if user [{0}] exists", oUser) - oUserId = GetUserId(oUser.samAccountName) - oUserExists = Not IsNothing(oUserId) - _logger.Debug("User [{0}] exists in database: ", oUser, oUserExists) - Catch ex As Exception - _logger.Error(ex) - _logger.Warn("Could not get UserId for user. Skipping") - Continue For - End Try - - ' I user does not exist, create a new user - Try - If Not oUserExists Then - _logger.Debug("Creating new user for [{0}]", oUser) - oUserId = CreateUser(oUser) - _logger.Debug("User created with Id [{0}]", oUserId) - End If - Catch ex As Exception - _logger.Error(ex) - _logger.Warn("Could not create user. Skipping") - Continue For - End Try - - ' Add the user to group - Try - AddUserToGroup(oUserId, oGroupId) - Catch ex As Exception - _logger.Error(ex) - _logger.Warn("Could not add user to group. Skipping") - Continue For - End Try - - oSyncedUsers.Add(oUser) - Next - - Return oSyncedUsers - End Function - - Private Function AddUserToGroup(UserId As Integer, GroupId As Integer) As Boolean Implements ISyncUsers.AddUserToGroup - Try - Dim oSQL = $"SELECT FNICM_RADM_NEW_USER2GROUP({UserId}, {GroupId}, 'AD-Sync') from RDB$DATABASE" - Dim oRecordId = _firebird.GetScalarValue(oSQL) - - If IsDBNull(oRecordId) Then - _logger.Warn("UserId {0} - GroupId {1} relation already exists.", UserId, GroupId) - Return False - End If - - Return True - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - Private Function GetGroupId(GroupName As String) As Integer Implements ISyncUsers.GetGroupId - Try - Dim oSQL As String = $"SELECT FNICM_GET_RECORD4SYSKEY('{GroupName}','002-NAME') from RDB$DATABASE" - Dim oGroupId = _firebird.GetScalarValue(oSQL) - - If IsDBNull(oGroupId) OrElse oGroupId = 0 Then - _logger.Debug("Group {0} not found in database", GroupName) - Return Nothing - End If - - Return oGroupId - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - Private Function GetUserId(UserName As String) As Integer Implements ISyncUsers.GetUserId - Try - Dim oSQL As String = $"SELECT FNICM_GET_RECORD4SYSKEY('{UserName}','001-USRNAME') from RDB$DATABASE" - Dim oResult = _firebird.GetScalarValue(oSQL) - - If IsDBNull(oResult) Then - Return Nothing - End If - - Return oResult - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - Private Function CreateUser(User As ADUser) As Integer Implements ISyncUsers.CreateUser - Try - Dim oSQL = $"SELECT FNICM_RADM_NEW_USER('{User?.GivenName}', '{User?.Surname}', '{User?.samAccountName}', 'AD-Sync') from RDB$DATABASE" - Dim oUserId As Integer = _firebird.GetScalarValue(oSQL) - - Return oUserId - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Public Sub AddCustomAttributesToUser(User As ADUser, UserId As Integer) Implements ISyncUsers.AddCustomAttributesToUser - Throw New NotImplementedException() - End Sub - End Class -End Namespace diff --git a/Modules.Interfaces/ActiveDirectoryInterface/SyncUsers.MSSQL.vb b/Modules.Interfaces/ActiveDirectoryInterface/SyncUsers.MSSQL.vb deleted file mode 100644 index 2ce5183e..00000000 --- a/Modules.Interfaces/ActiveDirectoryInterface/SyncUsers.MSSQL.vb +++ /dev/null @@ -1,284 +0,0 @@ -Imports DigitalData.Modules.Database -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Language - -Namespace SyncUsers - Public Class SyncUsersMSSQL - Implements ISyncUsers - - Private _logConfig As LogConfig - Private _logger As Logger - Private _mssql As MSSQLServer - - Private Const ADDED_WHO = "Active Directory Sync" - - Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer) - _logConfig = LogConfig - _logger = LogConfig.GetLogger() - _mssql = MSSQL - End Sub - - Public Function SyncUsers(GroupName As String, Users As List(Of ADUser), PropertyMapping As List(Of AttributeMapping)) As List(Of ADUser) Implements ISyncUsers.SyncUsers - Dim oGroupId As Integer - Dim oSyncedUsers As New List(Of ADUser) - Dim oSyncedUserIds As New List(Of Int64) - - Dim oCreatedUsers As New List(Of ADUser) - Dim oUpdatedUsers As New List(Of ADUser) - - Try - _logger.Debug("Getting group Id for group {0}", GroupName) - oGroupId = GetGroupId(GroupName) - - If oGroupId = 0 Then - _logger.Debug("Group {0} does not exist in database. Exiting.", GroupName) - Return oSyncedUsers - End If - - _logger.Debug("Using group Id {0}", oGroupId) - Catch ex As Exception - _logger.Error(ex) - Return oSyncedUsers - End Try - - For Each oUser In Users - Dim oUserId As Int64 - Dim oUserExists As Boolean - - ' Check if user already exists - Try - _logger.Debug("Checking if user [{0}] exists", oUser) - oUserId = GetUserId(oUser.samAccountName) - oUserExists = oUserId > 0 - _logger.Debug("User [{0}] exists in database: [{1}]", oUser, oUserExists) - Catch ex As Exception - _logger.Error(ex) - _logger.Warn("Could not get UserId for user. Skipping.") - Continue For - End Try - - ' Collect user ids from existing users - If oUserExists Then - oSyncedUserIds.Add(oUserId) - End If - - ' Create or update user - Try - If Not oUserExists Then - _logger.Debug("Creating new user for [{0}]", oUser) - oUserId = CreateUser(oUser) - _logger.Debug("User created with Id [{0}]", oUserId) - _logger.Info("Added new User [{0}]", oUser.samAccountName) - - oCreatedUsers.Add(oUser) - Else - _logger.Debug("Updating user [{0}]", oUser) - oUserId = UpdateUser(oUser) - If oUserId <> 0 Then - _logger.Debug("User created with Id [{0}]", oUserId) - _logger.Info("Updated User [{0}]", oUser.samAccountName) - - oUpdatedUsers.Add(oUser) - End If - End If - - Catch ex As Exception - _logger.Error(ex) - _logger.Warn("Could Not create/update user [{0}]. Skipping.", oUser.samAccountName) - Continue For - End Try - - ' Add custom attributes to user - Try - AddCustomAttributesToUser(oUser, oUserId) - Catch ex As Exception - _logger.Error(ex) - _logger.Debug("Could Not add custom attributes to user {0}. Continuing.", oUser) - End Try - - ' Add the user to group - Try - If AddUserToGroup(oUserId, oGroupId) Then - _logger.Info("User [{0}] added to group [{1}]", oUser.samAccountName, GroupName) - End If - Catch ex As Exception - _logger.Error(ex) - _logger.Warn("Could Not add user {0} to group {1}. Skipping.", oUser, GroupName) - Continue For - End Try - - oSyncedUsers.Add(oUser) - Next - - ' Delete users that are assigned to the group but no longer exist in active directory - Dim oUserIdString = String.Join(",", oSyncedUserIds) - If oSyncedUserIds.Count = 0 Then - _logger.Info("Group {0} does not contain any users.", GroupName) - oUserIdString = 0 - End If - Dim oSQL As String = $"DELETE FROM TBDD_GROUPS_USER WHERE USER_ID NOT IN ({oUserIdString}) AND GROUP_ID = {oGroupId}" - Dim oDeletedRelations = _mssql.GetScalarValue(oSQL) - If oCreatedUsers.Count > 0 Then - _logger.Info("Created [{0}] new users", oCreatedUsers.Count) - End If - _logger.Info("Updated [{0}] users", oUpdatedUsers.Count) - If oDeletedRelations > 0 Then - _logger.Info("Removed [{0}] users from Group [{1}]", oDeletedRelations, GroupName) - End If - - - Return oSyncedUsers - End Function - - Private Function AddUserToGroup(UserId As Integer, GroupId As Integer) As Boolean Implements ISyncUsers.AddUserToGroup - Try - Dim oSQL = $"SELECT COUNT(*) FROM TBDD_GROUPS_USER WHERE USER_ID = {UserId} And GROUP_ID = {GroupId}" - Dim oResult = True - If _mssql.GetScalarValue(oSQL) = 0 Then - oSQL = $"INSERT INTO TBDD_GROUPS_USER (USER_ID, GROUP_ID, ADDED_WHO) VALUES ({UserId}, {GroupId}, '{ADDED_WHO}')" - oResult = _mssql.ExecuteNonQuery(oSQL) - Else - _logger.Debug($"UserGroup-Relation [{UserId}/{GroupId}] already existing") - Return False - End If - - If oResult = False Then - Throw New Exception("Error while adding user to group!") - End If - - Return True - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Private Function GetGroupId(GroupName As String) As Integer Implements ISyncUsers.GetGroupId - Try - Dim oSQL As String = $"SELECT GUID FROM TBDD_GROUPS WHERE UPPER(NAME) = UPPER('{GroupName}') AND AD_SYNC = 1 AND ACTIVE = 1" - Dim oGroupId = _mssql.GetScalarValue(oSQL) - - If IsDBNull(oGroupId) OrElse oGroupId = 0 Then - _logger.Debug("Group {0} not found in database.", GroupName) - Return 0 - End If - - Return oGroupId - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Private Function GetUserId(UserName As String) As Integer Implements ISyncUsers.GetUserId - Try - Dim oSQL As String = $"SELECT GUID FROM TBDD_USER WHERE UPPER(USERNAME) = UPPER('{UserName}')" - Dim oUserId = _mssql.GetScalarValue(oSQL) - - If IsDBNull(oUserId) OrElse oUserId = 0 Then - Return 0 - End If - - Return oUserId - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Private Function CreateUser(User As ADUser) As Integer Implements ISyncUsers.CreateUser - Try - If User Is Nothing Then - _logger.Warn("Argument [User] is nothing. Exiting.") - Throw New ArgumentNullException("User") - End If - - Dim oUserId As Integer = GetUserId(User.samAccountName) - - If oUserId = 0 Then - Dim oSQL As String = $"INSERT INTO TBDD_USER (PRENAME, NAME, USERNAME, EMAIL, ADDED_WHO) VALUES ('{User?.GivenName}', '{User?.Surname?.Replace("'", "''")}', UPPER('{User?.samAccountName?.Replace("'", "''")}'), '{User?.Email?.Replace("'", "''")}', '{ADDED_WHO}')" - Dim oResult = _mssql.ExecuteNonQuery(oSQL) - - If oResult = True Then - oUserId = _mssql.GetScalarValue("SELECT MAX(GUID) FROM TBDD_USER") - Return oUserId - Else - Throw New Exception($"Error while inserting user {User.samAccountName}!") - End If - Else - Return oUserId - End If - - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Private Function UpdateUser(User As ADUser) As Integer - Try - If User Is Nothing Then - _logger.Warn("Error in UpdateUser - User object is nothing") - Return 0 - End If - - If User.samAccountName Is Nothing Then - _logger.Warn("Error in UpdateUser - User samAccountName is nothing") - Return 0 - End If - - Dim oUserId As Integer = GetUserId(User.samAccountName) - If Not IsNothing(oUserId) Then - If oUserId > 0 Then - Dim oGivenName As String = EscapeQuotes(User.GivenName) - Dim oSurname As String = EscapeQuotes(User.Surname) - Dim oEmail As String = EscapeQuotes(User.Email) - - Dim oSQL As String = $"UPDATE TBDD_USER SET PRENAME = '{oGivenName}', NAME = '{oSurname}', EMAIL = '{oEmail}', CHANGED_WHO = '{ADDED_WHO}' WHERE GUID = {oUserId}" - Dim oResult = _mssql.ExecuteNonQuery(oSQL) - - If oResult = True Then - Return oUserId - Else - Throw New Exception($"Error while updating user {User.samAccountName}!") - End If - Else - Return oUserId - End If - Else - _logger.Warn("Error in UpdateUser - Could not get a userid for samAccountName: " + User.samAccountName) - Return 0 - End If - - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Private Function EscapeQuotes(pString As String) - Dim oString = Utils.NotNull(pString, String.Empty) - Return oString.Replace("'", "''") - End Function - - Public Sub AddCustomAttributesToUser(User As ADUser, UserId As Integer) Implements ISyncUsers.AddCustomAttributesToUser - Dim oCustomAttributes = User.CustomAttributes - - _logger.Debug("Adding {0} Custom Attributes to User {1}", oCustomAttributes.Count, User) - - For Each oAttribute In oCustomAttributes - _logger.Debug("Adding Custom Attribute [{0}] with value [{1}] to User [{2}]", oAttribute.MSSQLColumn, oAttribute.Value, User) - Dim oSQL As String = $"UPDATE TBDD_USER SET {oAttribute.MSSQLColumn} = '{oAttribute.Value}', CHANGED_WHO = '{ADDED_WHO}' WHERE GUID = {UserId}" - Dim oResult = _mssql.ExecuteNonQuery(oSQL) - - If oResult = False Then - _logger.Debug("Custom Attribute {0} could not be added to user {1}", oAttribute.Name, User.samAccountName) - Continue For - End If - Next - End Sub - End Class - -End Namespace - - diff --git a/Modules.Interfaces/ActiveDirectoryInterface/UserEqualityComparer.vb b/Modules.Interfaces/ActiveDirectoryInterface/UserEqualityComparer.vb deleted file mode 100644 index 873e05cc..00000000 --- a/Modules.Interfaces/ActiveDirectoryInterface/UserEqualityComparer.vb +++ /dev/null @@ -1,19 +0,0 @@ -Imports DigitalData.Modules.Interfaces - -Public Class UserEqualityComparer - Implements IEqualityComparer(Of ADUser) - - Public Overloads Function Equals(x As ADUser, y As ADUser) As Boolean Implements IEqualityComparer(Of ADUser).Equals - If ReferenceEquals(x, y) Then Return True - If x Is Nothing Or y Is Nothing Then Return False - - Return x.SId = y.SId - End Function - - Public Overloads Function GetHashCode(obj As ADUser) As Integer Implements IEqualityComparer(Of ADUser).GetHashCode - If obj Is Nothing Then Return 0 - - Dim oHashCode = obj.SId.GetHashCode() - Return oHashCode - End Function -End Class diff --git a/Modules.Interfaces/ActiveDirectoryInterface/UserPrincipalEx.vb b/Modules.Interfaces/ActiveDirectoryInterface/UserPrincipalEx.vb deleted file mode 100644 index a8a4cdd1..00000000 --- a/Modules.Interfaces/ActiveDirectoryInterface/UserPrincipalEx.vb +++ /dev/null @@ -1,36 +0,0 @@ -Imports System.DirectoryServices.AccountManagement - - - -Public Class UserPrincipalEx - Inherits UserPrincipal - - Public Sub New(Context As PrincipalContext) - MyBase.New(Context) - End Sub - - Public Sub New(Context As PrincipalContext, samAccountName As String, Password As String, Enabled As Boolean) - MyBase.New(Context, samAccountName, Password, Enabled) - End Sub - - Public Overloads Shared Function FindByIdentity(ByVal Context As PrincipalContext, ByVal IdentityValue As String) As UserPrincipalEx - Return CType(FindByIdentityWithType(Context, GetType(UserPrincipalEx), IdentityValue), UserPrincipalEx) - End Function - - Public Overloads Shared Function FindByIdentity(ByVal Context As PrincipalContext, ByVal IdentityType As IdentityType, ByVal IdentityValue As String) As UserPrincipalEx - Return CType(FindByIdentityWithType(Context, GetType(UserPrincipalEx), IdentityType, IdentityValue), UserPrincipalEx) - End Function - - Public Function GetAttributeValue(AttributeName As String) As String - Return TryGetAttribute(AttributeName) - End Function - - Private Function TryGetAttribute(AttributeName As String) As String - Dim oAttribute = ExtensionGet(AttributeName) - - If oAttribute.Length <> 1 Then - Return String.Empty - End If - Return CStr(oAttribute(0)) - End Function -End Class diff --git a/Modules.Interfaces/GdPicture.NET.14.Imaging.Rendering.Skia.dll b/Modules.Interfaces/GdPicture.NET.14.Imaging.Rendering.Skia.dll deleted file mode 100644 index c469e776..00000000 Binary files a/Modules.Interfaces/GdPicture.NET.14.Imaging.Rendering.Skia.dll and /dev/null differ diff --git a/Modules.Interfaces/GdPicture.NET.14.filters.dll b/Modules.Interfaces/GdPicture.NET.14.filters.dll deleted file mode 100644 index 62cdd939..00000000 Binary files a/Modules.Interfaces/GdPicture.NET.14.filters.dll and /dev/null differ diff --git a/Modules.Interfaces/GdPicture.NET.14.image.gdimgplug.dll b/Modules.Interfaces/GdPicture.NET.14.image.gdimgplug.dll deleted file mode 100644 index b45db24a..00000000 Binary files a/Modules.Interfaces/GdPicture.NET.14.image.gdimgplug.dll and /dev/null differ diff --git a/Modules.Interfaces/GrapQLInterface/LoginData.vb b/Modules.Interfaces/GrapQLInterface/LoginData.vb deleted file mode 100644 index 32ff79d5..00000000 --- a/Modules.Interfaces/GrapQLInterface/LoginData.vb +++ /dev/null @@ -1,4 +0,0 @@ -Public Class LoginData - Public email As String - Public token As String -End Class diff --git a/Modules.Interfaces/GrapQLInterface/LogoutData.vb b/Modules.Interfaces/GrapQLInterface/LogoutData.vb deleted file mode 100644 index 5dd0e0ff..00000000 --- a/Modules.Interfaces/GrapQLInterface/LogoutData.vb +++ /dev/null @@ -1,3 +0,0 @@ -Public Class LogoutData - Public email As String -End Class diff --git a/Modules.Interfaces/GrapQLInterface/QueryData.vb b/Modules.Interfaces/GrapQLInterface/QueryData.vb deleted file mode 100644 index 4bdc356a..00000000 --- a/Modules.Interfaces/GrapQLInterface/QueryData.vb +++ /dev/null @@ -1,5 +0,0 @@ -Public Class QueryData - Public query As String - Public operationName As String - Public variables As New Object -End Class diff --git a/Modules.Interfaces/GraphQLInterface.vb b/Modules.Interfaces/GraphQLInterface.vb deleted file mode 100644 index fe19ea41..00000000 --- a/Modules.Interfaces/GraphQLInterface.vb +++ /dev/null @@ -1,181 +0,0 @@ -Imports System.IO -Imports System.Net -Imports System.Security.Cryptography.X509Certificates -Imports System.Text -Imports DigitalData.Modules.Logging -Imports Newtonsoft.Json - -Public Class GraphQLInterface - Private _logConfig As LogConfig - Private _logger As Logger - Private _baseUrl As String - Private _userEmail As String - Private _userPassword As String - Private _certificate As X509Certificate2 - Private _cookieJar As CookieContainer - Private _Encoding As New UTF8Encoding - - Private Const MAX_COOKIE_SIZE As Integer = 32768 - Private Const MAX_COOKIE_COUNT As Integer = 300 - Private Const MAX_COOKIE_COUNT_PER_DOMAIN As Integer = 20 - - Public Property Proxy As WebProxy - Public Property Credentials As NetworkCredential - - Public Sub New(LogConfig As LogConfig, BaseUrl As String, Email As String, Password As String, CertificateFingerprint As String) - Try - _logConfig = LogConfig - _logger = LogConfig.GetLogger() - _baseUrl = BaseUrl - _userEmail = Email - _userPassword = Password - - Dim oStore As New X509Store(StoreName.Root, StoreLocation.CurrentUser) - oStore.Open(OpenFlags.ReadOnly) - - - _logger.Debug("Available Certificates ({0}):", oStore.Certificates.Count) - - For Each oCert In oStore.Certificates - _logger.Debug("FriendlyName: {0}", oCert.FriendlyName) - _logger.Debug("IssuerName: {0}", oCert.IssuerName.Name) - _logger.Debug("SubjectName: {0}", oCert.SubjectName.Name) - _logger.Debug("Fingerprint: {0}", oCert.Thumbprint) - Next - - _logger.Debug("Looking for Certificate with Fingerprint [{0}]", CertificateFingerprint) - - Dim oFoundCerts = oStore.Certificates.Find(X509FindType.FindByThumbprint, CertificateFingerprint, False) - - If oFoundCerts.Count = 0 Then - _logger.Warn("Certificate could not be found! Exiting.") - Exit Sub - End If - - _certificate = oFoundCerts.Item(0) - Catch ex As Exception - _logger.Error(ex) - End Try - End Sub - - Public Sub SaveCookies(Cookie As Cookie) - GetCookies().Add(Cookie) - End Sub - - Public Function Login() As HttpWebResponse - Try - Dim oLoginData As New LoginData() With {.email = _userEmail, .token = _userPassword} - Dim oBytes As Byte() = ToBytes(JsonConvert.SerializeObject(oLoginData)) - Dim oRequest As HttpWebRequest = GetRequest("/login", oBytes) - - Using oStream = oRequest.GetRequestStream() - oStream.Write(oBytes, 0, oBytes.Length) - End Using - - Return oRequest.GetResponse() - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Public Function Logout() As HttpWebResponse - Try - Dim oLogoutData As New LogoutData() With {.email = _userEmail} - Dim oBytes As Byte() = ToBytes(JsonConvert.SerializeObject(oLogoutData)) - Dim oRequest As HttpWebRequest = GetRequest("/logout", oBytes) - - Using stream = oRequest.GetRequestStream() - stream.Write(oBytes, 0, oBytes.Length) - End Using - - Return oRequest.GetResponse() - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Public Function GetData(Query As String, OperationName As String) As HttpWebResponse - Try - Dim oQueryData As New QueryData() With { - .operationName = OperationName, - .query = Query, - .variables = New Object - } - Dim oJson = JsonConvert.SerializeObject(oQueryData) - Dim oBytes = ToBytes(oJson) - Dim oRequest = GetRequest("/graphql", oBytes) - - Using stream = oRequest.GetRequestStream() - stream.Write(oBytes, 0, oBytes.Length) - End Using - - Return oRequest.GetResponse() - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Public Function ReadJSONPathFragmented(pObject As Linq.JObject, pJsonPath As String) - Dim oSplitPath As List(Of String) = pJsonPath.Split(".").ToList() - Dim oCurrentPath As String = String.Empty - - For Each oPart In oSplitPath - If oCurrentPath = String.Empty Then - oCurrentPath = oPart - Else - oCurrentPath &= "." & oPart - End If - - _logger.Debug("Selecting Path Fragment [{0}]", oCurrentPath) - - Try - pObject.SelectToken(oCurrentPath, errorWhenNoMatch:=True) - Catch ex As Exception - _logger.Warn("Path Fragment [{0}] did not return a valid token", oCurrentPath) - Return False - End Try - Next - - Return True - End Function - - Private Function GetRequest(Url As String, PostData As Byte()) As HttpWebRequest - Try - Dim oRequest As HttpWebRequest = WebRequest.Create($"{_baseUrl}{Url}") - oRequest.Method = "POST" - oRequest.ContentType = "application/json" - oRequest.ContentLength = PostData.Length - oRequest.ClientCertificates.Add(_certificate) - oRequest.CookieContainer = GetCookies() - - oRequest.Proxy = Nothing - - If Proxy Is Nothing Then - oRequest.Proxy = Nothing - Else - oRequest.Proxy = Proxy - oRequest.Credentials = Credentials - End If - - Return oRequest - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Private Function GetCookies() As CookieContainer - If _cookieJar Is Nothing Then - _cookieJar = New CookieContainer(MAX_COOKIE_COUNT, MAX_COOKIE_COUNT_PER_DOMAIN, MAX_COOKIE_SIZE) - End If - - Return _cookieJar - End Function - - Private Function ToBytes(Str As String) As Byte() - Return _Encoding.GetBytes(Str) - End Function -End Class diff --git a/Modules.Interfaces/Interfaces.vbproj b/Modules.Interfaces/Interfaces.vbproj deleted file mode 100644 index 999be9ee..00000000 --- a/Modules.Interfaces/Interfaces.vbproj +++ /dev/null @@ -1,169 +0,0 @@ - - - - - Debug - AnyCPU - {AB6F09BF-E794-4F6A-94BB-C97C0BA84D64} - Library - DigitalData.Modules.Interfaces - DigitalData.Modules.Interfaces - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Interfaces.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Interfaces.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll - - - - ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - - - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {EAF0EA75-5FA7-485D-89C7-B2D843B03A96} - Database - - - {d3c8cfed-d6f6-43a8-9bdf-454145d0352f} - Language - - - {903B2D7D-3B80-4BE9-8713-7447B704E1B0} - Logging - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - \ No newline at end of file diff --git a/Modules.Interfaces/My Project/Application.Designer.vb b/Modules.Interfaces/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.Interfaces/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.Interfaces/My Project/Application.myapp b/Modules.Interfaces/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.Interfaces/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.Interfaces/My Project/AssemblyInfo.vb b/Modules.Interfaces/My Project/AssemblyInfo.vb deleted file mode 100644 index 0e85f009..00000000 --- a/Modules.Interfaces/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.Interfaces/My Project/Resources.Designer.vb b/Modules.Interfaces/My Project/Resources.Designer.vb deleted file mode 100644 index 46a82a82..00000000 --- a/Modules.Interfaces/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Interfaces.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.Interfaces/My Project/Resources.resx b/Modules.Interfaces/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.Interfaces/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.Interfaces/My Project/Settings.Designer.vb b/Modules.Interfaces/My Project/Settings.Designer.vb deleted file mode 100644 index 2f22163c..00000000 --- a/Modules.Interfaces/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Interfaces.My.MySettings - Get - Return Global.DigitalData.Modules.Interfaces.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Interfaces/My Project/Settings.settings b/Modules.Interfaces/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.Interfaces/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.Interfaces/ZUGFeRDInterface.vb b/Modules.Interfaces/ZUGFeRDInterface.vb deleted file mode 100644 index 1b24c0f2..00000000 --- a/Modules.Interfaces/ZUGFeRDInterface.vb +++ /dev/null @@ -1,207 +0,0 @@ -Imports System.IO -Imports System.Xml -Imports System.Xml.Serialization -Imports System.Xml.XPath -Imports System.Xml.Xsl -Imports DigitalData.Modules.Interfaces.Exceptions -Imports DigitalData.Modules.Logging -Imports GdPicture14 - -Public Class ZUGFeRDInterface - Private _logConfig As LogConfig - Private _logger As Logger - - Public Enum ErrorType - NoValidFile - NoZugferd - NoValidZugferd - MissingProperties - End Enum - - Public ReadOnly Property FileGroup As FileGroups - Public ReadOnly Property PropertyValues As PropertyValues - - Public Sub New(LogConfig As LogConfig, GDPictureKey As String) - _logConfig = LogConfig - _logger = _logConfig.GetLogger() - - FileGroup = New FileGroups(_logConfig) - PropertyValues = New PropertyValues(_logConfig) - - Try - Dim oLicenseManager As New LicenseManager - oLicenseManager.RegisterKEY(GDPictureKey) - Catch ex As Exception - _logger.Warn("GDPicture License could not be registered!") - _logger.Error(ex) - End Try - End Sub - - ''' - ''' Validates a ZUGFeRD File and extracts the XML Document from it - ''' - ''' - ''' - ''' - Public Function ExtractZUGFeRDFileWithGDPicture(Path As String) As Object - Dim oXmlDocument = ValidateZUGFeRDFileWithGDPicture(Path) - - If IsNothing(oXmlDocument) Then - Throw New ZUGFeRDExecption(ErrorType.NoZugferd, "Datei ist keine ZUGFeRD Datei.") - End If - - Return SerializeZUGFeRDDocument(oXmlDocument) - End Function - - ''' - ''' Validates a ZUGFeRD File and extracts the XML Document from it - ''' - ''' - ''' - ''' - Public Function ExtractZUGFeRDFileWithGDPicture(Stream As Stream) As Object - Dim oXmlDocument = ValidateZUGFeRDFileWithGDPicture(Stream) - - If IsNothing(oXmlDocument) Then - Throw New ZUGFeRDExecption(ErrorType.NoZugferd, "Datei ist keine ZUGFeRD Datei.") - End If - - Return SerializeZUGFeRDDocument(oXmlDocument) - End Function - - ''' - ''' Validates a ZUGFeRD File and extracts the XML Document from it - ''' - ''' - ''' - ''' - Public Function ValidateZUGFeRDFileWithGDPicture(Stream As Stream) As XPathDocument - Dim oEmbedExtractor = New PDFEmbeds(_logConfig) - Dim oAllowedExtensions = New List(Of String) From {"xml"} - - Try - Dim oFiles = oEmbedExtractor.Extract(Stream, oAllowedExtensions) - - ' Attachments are in this case the files that are embedded into a pdf file, - ' like for example the zugferd-invoice.xml file - Return HandleEmbeddedFiles(oFiles) - - Catch ex As ZUGFeRDExecption - ' Don't log ZUGFeRD Exceptions here, they should be handled by the calling code. - ' It also produces misleading error messages when checking if an attachment is a zugferd file. - Throw ex - - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Public Function ValidateZUGFeRDFileWithGDPicture(Path As String) As XPathDocument - Dim oEmbedExtractor = New PDFEmbeds(_logConfig) - Dim oAllowedExtensions = New List(Of String) From {"xml"} - - Try - Dim oFiles = oEmbedExtractor.Extract(Path, oAllowedExtensions) - - ' Attachments are in this case the files that are embedded into a pdf file, - ' like for example the zugferd-invoice.xml file - Return HandleEmbeddedFiles(oFiles) - - Catch ex As ZUGFeRDExecption - ' Don't log ZUGFeRD Exceptions here, they should be handled by the calling code. - ' It also produces misleading error messages when checking if an attachment is a zugferd file. - Throw ex - - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - - Private Function HandleEmbeddedFiles(Results As List(Of PDFEmbeds.EmbeddedFile)) As XPathDocument - Dim oXmlDocument As XPathDocument - - If Results Is Nothing Then - Throw New ZUGFeRDExecption(ErrorType.NoZugferd, "Datei ist keine ZUGFeRD Datei, weil die Attachments nicht gelesen werden konnten.") - End If - - If Results.Count = 0 Then - Throw New ZUGFeRDExecption(ErrorType.NoZugferd, "Datei ist keine ZUGFeRD Datei, weil sie keine Attachments enthält.") - End If - - Dim oValidFilenames As New List(Of String) From { - PDFEmbeds.ZUGFERD_XML_FILENAME.ToUpper, - PDFEmbeds.FACTUR_X_XML_FILENAME_DE.ToUpper, - PDFEmbeds.FACTUR_X_XML_FILENAME_FR.ToUpper - } - - ' Find the first file which filename matches the valid filenames for embedded invoice files - Dim oFoundResult As PDFEmbeds.EmbeddedFile = Results. - Where(Function(result) oValidFilenames.Contains(result.FileName.ToUpper)). - FirstOrDefault() - - If oFoundResult Is Nothing Then - Throw New ZUGFeRDExecption(ErrorType.NoZugferd, "Datei ist keine ZUGFeRD Datei, weil die zugferd-invoice.xml nicht gefunden wurde.") - End If - - Try - Using oStream As New MemoryStream(oFoundResult.FileContents) - oXmlDocument = New XPathDocument(oStream) - End Using - - Return oXmlDocument - Catch ex As ZUGFeRDExecption - ' Don't log ZUGFeRD Exceptions here, they should be handled by the calling code. - ' It also produces misleading error messages when checking if an attachment is a zugferd file. - Throw ex - - Catch ex As Exception - _logger.Error(ex) - Throw New ZUGFeRDExecption(ErrorType.NoValidZugferd, "Datei ist eine ungültige ZUGFeRD Datei.") - End Try - End Function - - Public Function SerializeZUGFeRDDocument(Document As XPathDocument) As Object - Try - Dim oNavigator As XPathNavigator = Document.CreateNavigator() - Dim oReader As XmlReader - Dim oResult = Nothing - - Dim oTypes As New List(Of Type) From { - GetType(ZUGFeRD.Version1_0.CrossIndustryDocumentType), - GetType(ZUGFeRD.Version2_0.CrossIndustryInvoiceType), - GetType(ZUGFeRD.Version2_1_1.CrossIndustryInvoiceType), - GetType(ZUGFeRD.Version2_2_FacturX.CrossIndustryInvoiceType) - } - - For Each oType In oTypes - _logger.Debug("Trying Type [{0}]", oType.FullName) - Dim oSerializer As New XmlSerializer(oType) - - Try - oReader = oNavigator.ReadSubtree() - oResult = oSerializer.Deserialize(oReader) - _logger.Debug("Serializing with type [{0}] succeeded", oType.FullName) - Exit For - Catch ex As Exception - _logger.Debug("Serializing with type [{0}] failed", oType.FullName) - _logger.Debug(ex.Message) - _logger.Error(ex.InnerException?.Message) - End Try - Next - - If oResult Is Nothing Then - Throw New ApplicationException("No Types matched the given document. Document could not be serialized.") - End If - - Return oResult - - Catch ex As Exception - _logger.Error(ex) - Throw New ZUGFeRDExecption(ErrorType.NoValidZugferd, "Datei ist eine ungültige ZUGFeRD Datei.") - End Try - End Function - - -End Class diff --git a/Modules.Interfaces/ZUGFeRDInterface/Exceptions.vb b/Modules.Interfaces/ZUGFeRDInterface/Exceptions.vb deleted file mode 100644 index db8a0a42..00000000 --- a/Modules.Interfaces/ZUGFeRDInterface/Exceptions.vb +++ /dev/null @@ -1,13 +0,0 @@ -Public Class Exceptions - Public Class ZUGFeRDExecption - Inherits ApplicationException - - Public ReadOnly Property ErrorType() As ZUGFeRDInterface.ErrorType - - Public Sub New(ErrorType As ZUGFeRDInterface.ErrorType, Message As String) - MyBase.New(Message) - - _ErrorType = ErrorType - End Sub - End Class -End Class diff --git a/Modules.Interfaces/ZUGFeRDInterface/FileGroups.vb b/Modules.Interfaces/ZUGFeRDInterface/FileGroups.vb deleted file mode 100644 index 90cac5f5..00000000 --- a/Modules.Interfaces/ZUGFeRDInterface/FileGroups.vb +++ /dev/null @@ -1,82 +0,0 @@ -Imports System.IO -Imports System.Text.RegularExpressions -Imports DigitalData.Modules.Logging - -Public Class FileGroups - Private _logger As Logger - - Public Sub New(LogConfig As LogConfig) - _logger = LogConfig.GetLogger() - End Sub - - ''' - ''' Group files by message id. Message id is extracted from filename. - ''' Filename is expected to be in the form: 1234@subdomain.company.com - ''' The list of files to process - ''' - Public Function GroupFiles(Files As List(Of FileInfo)) As Dictionary(Of String, List(Of FileInfo)) - Dim oGrouped As New Dictionary(Of String, List(Of FileInfo)) - - If Files.Count = 0 Then - Return oGrouped - End If - - For Each oFile In Files - Dim oMessageId = GetMessageIdFromFileName(oFile.Name) - - If oMessageId Is Nothing Then - _logger.Warn("File {0} did not have the required filename-format!", oMessageId) - Continue For - End If - - If oGrouped.ContainsKey(oMessageId) Then - oGrouped.Item(oMessageId).Add(oFile) - Else - oGrouped.Add(oMessageId, New List(Of FileInfo) From {oFile}) - End If - Next - - Return oGrouped - End Function - - ''' - ''' Group files by message id. Message id is created from `FakeMessageIdDomain` and a random string - ''' - ''' The list of files to process - ''' Arbitrary domain for message id generation. Example: sub.company.com - ''' - Public Function GroupFiles(Files As List(Of FileInfo), FakeMessageIdDomain As String) As Dictionary(Of String, List(Of FileInfo)) - Dim oGrouped As New Dictionary(Of String, List(Of FileInfo)) - - If Files.Count = 0 Then - Return oGrouped - End If - - For Each oFile In Files - Dim oIdentifier = Guid.NewGuid().ToString() - Dim oMessageId = $"{oIdentifier}@{FakeMessageIdDomain}" - - If oGrouped.ContainsKey(oMessageId) Then - oGrouped.Item(oMessageId).Add(oFile) - Else - oGrouped.Add(oMessageId, New List(Of FileInfo) From {oFile}) - End If - Next - - Return oGrouped - End Function - - Private Function GetMessageIdFromFileName(Filename As String) As String - ' Regex to find MessageId - ' See also: https://stackoverflow.com/questions/3968500/regex-to-validate-a-message-id-as-per-rfc2822 - Dim oRegex = "(((([a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*)|(""(([\x01-\x08\x0B\x0C\x0E-\x1F\x7F]|[\x21\x23-\x5B\x5D-\x7E])|(\\[\x01-\x09\x0B\x0C\x0E-\x7F]))*""))@(([a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*)|(\[(([\x01-\x08\x0B\x0C\x0E-\x1F\x7F]|[\x21-\x5A\x5E-\x7E])|(\\[\x01-\x09\x0B\x0C\x0E-\x7F]))*\]))))~.+" - Dim oMatch = Regex.Match(Filename, oRegex, RegexOptions.IgnoreCase) - - If oMatch.Success Then - Dim oMessageId = oMatch.Groups(1).Value - Return oMessageId - Else - Return Nothing - End If - End Function -End Class diff --git a/Modules.Interfaces/ZUGFeRDInterface/PDFEmbeds.vb b/Modules.Interfaces/ZUGFeRDInterface/PDFEmbeds.vb deleted file mode 100644 index b9143772..00000000 --- a/Modules.Interfaces/ZUGFeRDInterface/PDFEmbeds.vb +++ /dev/null @@ -1,150 +0,0 @@ -Imports System.Collections.Generic -Imports System.IO -Imports DigitalData.Modules.Logging -Imports GdPicture14 - -Public Class PDFEmbeds - Private ReadOnly Logger As Logger - - Public Const ZUGFERD_XML_FILENAME = "ZUGFeRD-invoice.xml" - Public Const FACTUR_X_XML_FILENAME_FR = "factur-x.xml" - Public Const FACTUR_X_XML_FILENAME_DE = "xrechnung.xml" - - Public Class EmbeddedFile - Public FileName As String - Public FileContents As Byte() - End Class - - Public Sub New(LogConfig As LogConfig) - Logger = LogConfig.GetLogger - End Sub - - ''' - ''' Extracts all embedded files from a PDF file. - ''' Note: This does NOT filter out `ZUGFeRD-invoice.xml` anymore to allow for a more generic use. - ''' - ''' Filepath of the pdf - ''' List of allowed extensions to be extracted - Public Function Extract(FilePath As String, AllowedExtensions As List(Of String)) As List(Of EmbeddedFile) - Dim oFile As New List(Of EmbeddedFile) - Dim oFileInfo As FileInfo - Dim oExtensions = AllowedExtensions.ConvertAll(New Converter(Of String, String)(Function(ext) ext.ToUpper)) - - Logger.Debug("Extracting embedded files from [{0}]", FilePath) - - Try - oFileInfo = New FileInfo(FilePath) - - Logger.Debug("Filename: {0}", oFileInfo.Name) - Logger.Debug("Filesize: {0} bytes", oFileInfo.Length) - Logger.Debug("Exists: {0}", oFileInfo.Exists) - Catch ex As Exception - Logger.Warn("File information for [{0}] could not be read!", FilePath) - Logger.Error(ex) - End Try - - Try - Using oGDPicturePDF As New GdPicturePDF() - If oGDPicturePDF.LoadFromFile(FilePath, False) = GdPictureStatus.OK Then - oFile = DoExtract(oGDPicturePDF, oExtensions) - Else - Dim oMessage = String.Format("The file [{0}] can't be loaded. Status: [{1}]", FilePath, oGDPicturePDF.GetStat().ToString()) - Throw New ApplicationException(oMessage) - End If - End Using - - Return oFile - Catch ex As Exception - Logger.Warn("Unexpected Error while Extracting attachments from File [{0}]", FilePath) - Logger.Error(ex) - Return Nothing - End Try - End Function - - ''' - ''' Extracts all embedded files from a PDF file. - ''' Note: This does NOT filter out `ZUGFeRD-invoice.xml` anymore to allow for a more generic use. - ''' - ''' Filestream of the pdf - ''' List of allowed extensions to be extracted - Public Function Extract(Stream As Stream, AllowedExtensions As List(Of String)) As List(Of EmbeddedFile) - Dim oResults As New List(Of EmbeddedFile) - Dim oExtensions = AllowedExtensions.ConvertAll(New Converter(Of String, String)(Function(ext) ext.ToUpper)) - - Logger.Debug("Extracting embedded files from stream") - - Try - Using oGDPicturePDF As New GdPicturePDF() - If oGDPicturePDF.LoadFromStream(Stream, False) = GdPictureStatus.OK Then - oResults = DoExtract(oGDPicturePDF, oExtensions) - Else - Dim oMessage = String.Format("The filestream can't be loaded. Status: [{0}]", oGDPicturePDF.GetStat().ToString()) - Throw New ApplicationException(oMessage) - End If - End Using - - Return oResults - Catch ex As Exception - Logger.Warn("Unexpected Error while Extracting attachments from Filestream") - Logger.Error(ex) - Return Nothing - End Try - End Function - - Private Function DoExtract(GDPicturePDF As GdPicturePDF, pExtensions As List(Of String)) As List(Of EmbeddedFile) - Dim oResults As New List(Of EmbeddedFile) - Dim oEmbeddedFileCount As Integer = GDPicturePDF.GetEmbeddedFileCount() - - If GDPicturePDF.GetStat() = GdPictureStatus.OK Then - Logger.Debug("Embedded file count is: [{0}]", oEmbeddedFileCount) - - If oEmbeddedFileCount > 0 Then - For oIndex = 0 To oEmbeddedFileCount - 1 - Dim oFileName As String = GDPicturePDF.GetEmbeddedFileName(oIndex) - - If GDPicturePDF.GetStat() = GdPictureStatus.OK Then - Logger.Debug("Extracting embedded file [{0}]", oFileName) - - Dim oExtension = New FileInfo(oFileName).Extension.ToUpper.Substring(1) - If pExtensions.Contains(oExtension) Then - Dim oFileSize As Integer = GDPicturePDF.GetEmbeddedFileSize(oIndex) - - If GDPicturePDF.GetStat() = GdPictureStatus.OK Then - Logger.Debug("Filesize of embedded file is [{0}]", oFileSize) - - Dim oFileData As Byte() = New Byte(oFileSize) {} - Dim oStatus As GdPictureStatus = GDPicturePDF.ExtractEmbeddedFile(oIndex, oFileData) - - If oStatus = GdPictureStatus.OK Then - Logger.Debug("Embedded file [{0}] extracted sucessfully!", oFileName) - - oResults.Add(New EmbeddedFile() With { - .FileContents = oFileData, - .FileName = oFileName - }) - Else - Logger.Error("The embedded file [{0}] has failed to extract. Status: {1}", oFileName, GDPicturePDF.GetStat().ToString()) - Continue For - End If - Else - Logger.Error("An error occurred getting the file size for [{0}]. Status: {1}", oFileName, GDPicturePDF.GetStat().ToString()) - Continue For - End If - Else - Logger.Debug("File [{0}] was skipped because its extension [{1}] is not allowed.", oFileName, oExtension) - Continue For - End If - Else - Logger.Error("An error occurred getting the file name for [{0}]. Status: {1}", oFileName, GDPicturePDF.GetStat().ToString()) - Continue For - End If - Next - End If - - Return oResults - Else - Dim oMessage = String.Format("An error occurred getting the number of embedded files. Status: {0}", GDPicturePDF.GetStat().ToString()) - Throw New ApplicationException(oMessage) - End If - End Function -End Class diff --git a/Modules.Interfaces/ZUGFeRDInterface/PropertyValues.vb b/Modules.Interfaces/ZUGFeRDInterface/PropertyValues.vb deleted file mode 100644 index 110baacd..00000000 --- a/Modules.Interfaces/ZUGFeRDInterface/PropertyValues.vb +++ /dev/null @@ -1,325 +0,0 @@ -Imports System.Reflection -Imports System.Text.RegularExpressions -Imports DigitalData.Modules.Logging - -Public Class PropertyValues - Private _logger As Logger - Private _logConfig As LogConfig - - Private _indexPattern = "\((\d+)\)" - Private _indexRegex As New Regex(_indexPattern) - - Public Sub New(LogConfig As LogConfig) - _logConfig = LogConfig - _logger = LogConfig.GetLogger() - End Sub - - Public Class CheckPropertyValuesResult - Public MissingProperties As New List(Of String) - Public ValidProperties As New List(Of ValidProperty) - End Class - - Public Class ValidProperty - Public MessageId As String - Public TableName As String - Public TableColumn As String - - Public ISRequired As Boolean - Public GroupCounter As Integer = -1 - - Public Description As String - Public Value As String - End Class - - Public Function CheckPropertyValues(Document As Object, PropertyMap As Dictionary(Of String, XmlItemProperty), MessageId As String) As CheckPropertyValuesResult - Dim oGlobalGroupCounter = 0 - Dim oMissingProperties As New List(Of String) - Dim oResult As New CheckPropertyValuesResult() - - ' PropertyMap items with `IsGrouped = False` are handled normally - Dim oDefaultProperties As Dictionary(Of String, XmlItemProperty) = PropertyMap. - Where(Function(Item) Item.Value.IsGrouped = False). - ToDictionary(Function(Item) Item.Key, - Function(Item) Item.Value) - - _logger.Debug("Found {0} default properties.", oDefaultProperties.Count) - - ' PropertyMap items with `IsGrouped = True` are grouped by group scope - Dim oGroupedProperties = PropertyMap. - Where(Function(Item) Item.Value.IsGrouped = True). - ToLookup(Function(Item) Item.Value.GroupScope, ' Lookup key is group scope - Function(Item) Item) - - _logger.Debug($"Found [{PropertyMap.Count - oDefaultProperties.Count}] properties grouped in [{oGroupedProperties.Count}] group(s)") - ' Iterate through groups to get group scope and group items - For Each oGroup In oGroupedProperties - Dim oGroupScope As String = oGroup.Key - - Dim oPropertyList As New Dictionary(Of XmlItemProperty, List(Of Object)) - Dim oRowCount = 0 - - _logger.Debug($"Fetching Property values for group [{oGroupScope}].") - - ' get properties as a nested object, see `oPropertyList` - For Each oProperty As KeyValuePair(Of String, XmlItemProperty) In oGroup - Dim oPropertyValues As List(Of Object) - _logger.Debug($"Fetching value for itemSpecification [{oProperty.Value.TableColumn}].") - Try - oPropertyValues = GetPropValue(Document, oProperty.Key) - Catch ex As Exception - _logger.Warn($"{MessageId} - Unknown error occurred while fetching property/TColumn [{0}] in group [{1}]:", oProperty.Value.TableColumn, oGroupScope) - _logger.Error(ex) - oPropertyValues = New List(Of Object) - End Try - - ' Flatten result value - oPropertyValues = GetFinalPropValue(oPropertyValues) - - ' Add to list - oPropertyList.Add(oProperty.Value, oPropertyValues) - - ' check the first batch of values to determine the row count - If oRowCount = 0 Then - oRowCount = oPropertyValues.Count - End If - Next - - ' Structure of oPropertyList - ' [ # Propertyname # Row 1 # Row 2 - ' PositionsMenge: [BilledQuantity1, BilledQuantity2, ...], - ' PositionsSteuersatz: [ApplicablePercent1, ApplicablePercent2, ...], - ' ... - ' ] - For oRowIndex = 0 To oRowCount - 1 - _logger.Debug("Processing row {0}", oRowIndex) - - For Each oColumn As KeyValuePair(Of XmlItemProperty, List(Of Object)) In oPropertyList - Dim oTableName As String = oColumn.Key.TableName - Dim oTableColumn As String = oColumn.Key.TableColumn - Dim oIsRequired As Boolean = oColumn.Key.IsRequired - Dim oPropertyDescription As String = oColumn.Key.Description - Dim oRowCounter = oRowIndex + oGlobalGroupCounter + 1 - If IsNothing(oRowCounter) Then - - End If - ' Returns nothing if oColumn.Value contains an empty list - Dim oPropertyValue = oColumn.Value.ElementAtOrDefault(oRowIndex) - - _logger.Debug("Processing itemSpecification *TableColumn* [{0}].", oTableColumn) - - If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then - If oColumn.Key.IsRequired Then - _logger.Warn($"{MessageId} # oPropertyValue for specification [{oTableColumn}] is empty or not found but is required. Continuing with Empty String.") - oResult.MissingProperties.Add(oPropertyDescription) - Else - _logger.Debug($"{MessageId} # oPropertyValue for specification [{oTableColumn}] is empty or not found. Continuing with Empty String.") - End If - - oPropertyValue = String.Empty - End If - - _logger.Debug("ItemSpecification [{0}] has value '{1}'", oTableColumn, oPropertyValue) - - oResult.ValidProperties.Add(New ValidProperty() With { - .MessageId = MessageId, - .Description = oPropertyDescription, - .Value = oPropertyValue, - .GroupCounter = oRowCounter, - .TableName = oTableName, - .TableColumn = oTableColumn, - .ISRequired = oIsRequired - }) - Next - Next - - oGlobalGroupCounter += oRowCount - Next - - ' Iterate through default properties - For Each oItem As KeyValuePair(Of String, XmlItemProperty) In oDefaultProperties - Dim oPropertyValueList As List(Of Object) - Dim oTableColumn As String = oItem.Value.TableColumn - Dim oPropertyValue As Object = Nothing - Dim oTableName = oItem.Value.TableName - Dim oIsRequired = oItem.Value.IsRequired - Dim oDescription = oItem.Value.Description - Try - oPropertyValueList = GetPropValue(Document, oItem.Key) - Catch ex As Exception - _logger.Warn("{2} # Unknown error occurred while fetching specification [{0}] in group [{1}]:", oTableColumn, oItem.Value.GroupScope, MessageId) - _logger.Error(ex) - oPropertyValueList = New List(Of Object) - End Try - - Try - If IsNothing(oPropertyValueList) Then - oPropertyValue = Nothing - ElseIf TypeOf oPropertyValueList Is List(Of Object) Then - Select Case oPropertyValueList.Count - Case 0 - oPropertyValue = Nothing - Case Else - Dim oList As List(Of Object) = DirectCast(oPropertyValueList, List(Of Object)) - oPropertyValue = oList.Item(0) - - ' This should hopefully show config errors - If TypeOf oPropertyValue Is List(Of Object) Then - _logger.Warn("Item with TableColumn [{0}] may be configured incorrectly", oTableColumn) - oPropertyValue = Nothing - End If - End Select - End If - Catch ex As Exception - _logger.Warn("Unknown error occurred while processing specification [{0}]:", oTableColumn) - _logger.Error(ex) - oPropertyValue = Nothing - End Try - - If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then - If oItem.Value.IsRequired Then - _logger.Warn("{0} # Specification [{1}] is empty, but marked as required! Skipping.", MessageId, oTableColumn) - oResult.MissingProperties.Add(oTableColumn) - Continue For - Else - _logger.Debug("{0} # oPropertyValue for specification [{1}] is empty or not found. Skipping.", MessageId, oTableColumn) - - Continue For - End If - End If - - oResult.ValidProperties.Add(New ValidProperty() With { - .MessageId = MessageId, - .Description = oDescription, - .Value = oPropertyValue, - .TableName = oTableName, - .TableColumn = oTableColumn, - .ISRequired = oIsRequired - }) - Next - - Return oResult - End Function - - Public Function GetPropValue(Obj As Object, PropertyName As String) As List(Of Object) - Dim oNameParts As String() = PropertyName.Split("."c) - - If IsNothing(Obj) Then - _logger.Debug("`Obj` is Nothing. Exiting.") - Return New List(Of Object) - End If - - If oNameParts.Length = 1 Then - Dim oPropInfo As PropertyInfo = Obj.GetType().GetProperty(PropertyName) - - If IsNothing(oPropInfo) Then - _logger.Debug("Property [{0}] does not exist(1).", PropertyName) - Return New List(Of Object) - Else - Dim oPropValue = oPropInfo.GetValue(Obj, Nothing) - Return New List(Of Object) From {oPropValue} - End If - End If - - For Each oPart As String In oNameParts - Dim oType As Type = Obj.GetType() - Dim oPartName = oPart - Dim oIndex As Integer = Nothing - Dim oHasIndex As Boolean = HasIndex(oPartName) - - If oHasIndex Then - oPartName = StripIndex(oPart) - oIndex = GetIndex(oPart) - End If - - Dim oInfo As PropertyInfo = oType.GetProperty(oPartName) - - If IsNothing(oInfo) OrElse IsNothing(oInfo.GetValue(Obj, Nothing)) Then - _logger.Debug("Property [{0}] does not exist(2).", oPartName) - Return New List(Of Object) - End If - - Obj = oInfo.GetValue(Obj, Nothing) - - If oHasIndex Then - Obj = Obj(0) - End If - - If IsArray(Obj) And Not oHasIndex Then - Dim oCurrentPart As String = oPart - Dim oSplitString As String() = New String() {oCurrentPart & "."} - Dim oPathFragments = PropertyName.Split(oSplitString, StringSplitOptions.None) - Dim oResults As New List(Of Object) - - ' if path has no more subitems, return an empty list - If oPathFragments.Length = 1 Then - Return oResults - End If - - For Each oArrayItem In Obj - Dim oResult As List(Of Object) = GetPropValue(oArrayItem, oPathFragments(1)) - - If Not IsNothing(oResult) Then - oResults.Add(oResult) - End If - Next - - Return oResults - End If - Next - - Return New List(Of Object) From {Obj} - End Function - - Public Function GetFinalPropValue(List As List(Of Object)) As List(Of Object) - Dim oResult As New List(Of Object) - - For Each Item In List - Dim oItemValue = DoGetFinalPropValue(Item) - - If Not IsNothing(oItemValue) Then - oResult.Add(oItemValue) - End If - Next - - Return oResult - End Function - - Private Function DoGetFinalPropValue(Value As Object) As String - If TypeOf Value Is List(Of Object) Then - Dim oList = DirectCast(Value, List(Of Object)) - Dim oCount = oList.Count - - Select Case oCount - Case 0 - Return Nothing - Case Else - Return DoGetFinalPropValue(oList.First()) - End Select - - Return DoGetFinalPropValue(Value) - Else - Return Value.ToString - End If - End Function - - Private Function GetIndex(Prop As String) As Integer - If Regex.IsMatch(Prop, _indexPattern) Then - Dim oMatch = _indexRegex.Match(Prop) - Dim oGroup = oMatch.Groups.Item(1) - Dim oValue = oGroup.Value - - Return Integer.Parse(oValue) - End If - - Return Nothing - End Function - - Private Function StripIndex(Prop As String) As String - Return Regex.Replace(Prop, _indexPattern, "") - End Function - - Private Function HasIndex(Prop As String) As Boolean - Return Regex.IsMatch(Prop, _indexPattern) - End Function - -End Class diff --git a/Modules.Interfaces/ZUGFeRDInterface/Version1.0/CrossIndustryDocumentType.vb b/Modules.Interfaces/ZUGFeRDInterface/Version1.0/CrossIndustryDocumentType.vb deleted file mode 100644 index d447f317..00000000 --- a/Modules.Interfaces/ZUGFeRDInterface/Version1.0/CrossIndustryDocumentType.vb +++ /dev/null @@ -1,3178 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict Off -Option Explicit On - -Imports System.Xml.Serialization - -' -'This source code was auto-generated by xsd, Version=4.6.1055.0. -' - -Namespace ZUGFeRD.Version1_0 - ''' - - Partial Public Class CrossIndustryDocumentType - - Private specifiedExchangedDocumentContextField As ExchangedDocumentContextType - - Private headerExchangedDocumentField As ExchangedDocumentType - - Private specifiedSupplyChainTradeTransactionField As SupplyChainTradeTransactionType - - ''' - Public Property SpecifiedExchangedDocumentContext() As ExchangedDocumentContextType - Get - Return Me.specifiedExchangedDocumentContextField - End Get - Set - Me.specifiedExchangedDocumentContextField = Value - End Set - End Property - - ''' - Public Property HeaderExchangedDocument() As ExchangedDocumentType - Get - Return Me.headerExchangedDocumentField - End Get - Set - Me.headerExchangedDocumentField = Value - End Set - End Property - - ''' - Public Property SpecifiedSupplyChainTradeTransaction() As SupplyChainTradeTransactionType - Get - Return Me.specifiedSupplyChainTradeTransactionField - End Get - Set - Me.specifiedSupplyChainTradeTransactionField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class ExchangedDocumentContextType - - Private testIndicatorField As IndicatorType - - Private businessProcessSpecifiedDocumentContextParameterField() As DocumentContextParameterType - - Private guidelineSpecifiedDocumentContextParameterField() As DocumentContextParameterType - - ''' - Public Property TestIndicator() As IndicatorType - Get - Return Me.testIndicatorField - End Get - Set - Me.testIndicatorField = Value - End Set - End Property - - ''' - - Public Property BusinessProcessSpecifiedDocumentContextParameter() As DocumentContextParameterType() - Get - Return Me.businessProcessSpecifiedDocumentContextParameterField - End Get - Set - Me.businessProcessSpecifiedDocumentContextParameterField = Value - End Set - End Property - - ''' - - Public Property GuidelineSpecifiedDocumentContextParameter() As DocumentContextParameterType() - Get - Return Me.guidelineSpecifiedDocumentContextParameterField - End Get - Set - Me.guidelineSpecifiedDocumentContextParameterField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class IndicatorType - - Private itemField As Boolean - - ''' - - Public Property Item() As Boolean - Get - Return Me.itemField - End Get - Set - Me.itemField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class ReferencedProductType - - Private globalIDField() As IDType - - Private sellerAssignedIDField As IDType - - Private buyerAssignedIDField As IDType - - Private nameField() As TextType - - Private descriptionField() As TextType - - Private unitQuantityField() As QuantityType - - ''' - - Public Property GlobalID() As IDType() - Get - Return Me.globalIDField - End Get - Set - Me.globalIDField = Value - End Set - End Property - - ''' - Public Property SellerAssignedID() As IDType - Get - Return Me.sellerAssignedIDField - End Get - Set - Me.sellerAssignedIDField = Value - End Set - End Property - - ''' - Public Property BuyerAssignedID() As IDType - Get - Return Me.buyerAssignedIDField - End Get - Set - Me.buyerAssignedIDField = Value - End Set - End Property - - ''' - - Public Property Name() As TextType() - Get - Return Me.nameField - End Get - Set - Me.nameField = Value - End Set - End Property - - ''' - - Public Property Description() As TextType() - Get - Return Me.descriptionField - End Get - Set - Me.descriptionField = Value - End Set - End Property - - ''' - - Public Property UnitQuantity() As QuantityType() - Get - Return Me.unitQuantityField - End Get - Set - Me.unitQuantityField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class IDType - - Private schemeIDField As String - - Private schemeAgencyIDField As String - - Private valueField As String - - ''' - - Public Property schemeID() As String - Get - Return Me.schemeIDField - End Get - Set - Me.schemeIDField = Value - End Set - End Property - - ''' - - Public Property schemeAgencyID() As String - Get - Return Me.schemeAgencyIDField - End Get - Set - Me.schemeAgencyIDField = Value - End Set - End Property - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TextType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class QuantityType - - Private unitCodeField As String - - Private valueField As Decimal - - ''' - - Public Property unitCode() As String - Get - Return Me.unitCodeField - End Get - Set - Me.unitCodeField = Value - End Set - End Property - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class ProductClassificationType - - Private classCodeField As CodeType - - Private classNameField() As TextType - - ''' - Public Property ClassCode() As CodeType - Get - Return Me.classCodeField - End Get - Set - Me.classCodeField = Value - End Set - End Property - - ''' - - Public Property ClassName() As TextType() - Get - Return Me.classNameField - End Get - Set - Me.classNameField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CodeType - - Private listIDField As String - - Private listVersionIDField As String - - Private valueField As String - - ''' - - Public Property listID() As String - Get - Return Me.listIDField - End Get - Set - Me.listIDField = Value - End Set - End Property - - ''' - - Public Property listVersionID() As String - Get - Return Me.listVersionIDField - End Get - Set - Me.listVersionIDField = Value - End Set - End Property - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class ProductCharacteristicType - - Private typeCodeField() As CodeType - - Private descriptionField() As TextType - - Private valueMeasureField() As MeasureType - - Private valueField() As TextType - - ''' - - Public Property TypeCode() As CodeType() - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - - Public Property Description() As TextType() - Get - Return Me.descriptionField - End Get - Set - Me.descriptionField = Value - End Set - End Property - - ''' - - Public Property ValueMeasure() As MeasureType() - Get - Return Me.valueMeasureField - End Get - Set - Me.valueMeasureField = Value - End Set - End Property - - ''' - - Public Property Value() As TextType() - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class MeasureType - - Private unitCodeField As String - - Private valueField As Decimal - - ''' - - Public Property unitCode() As String - Get - Return Me.unitCodeField - End Get - Set - Me.unitCodeField = Value - End Set - End Property - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeProductType - - Private globalIDField() As IDType - - Private sellerAssignedIDField As IDType - - Private buyerAssignedIDField As IDType - - Private nameField() As TextType - - Private descriptionField() As TextType - - Private applicableProductCharacteristicField() As ProductCharacteristicType - - Private designatedProductClassificationField() As ProductClassificationType - - Private originTradeCountryField() As CountryIDType - - Private includedReferencedProductField() As ReferencedProductType - - ''' - - Public Property GlobalID() As IDType() - Get - Return Me.globalIDField - End Get - Set - Me.globalIDField = Value - End Set - End Property - - ''' - Public Property SellerAssignedID() As IDType - Get - Return Me.sellerAssignedIDField - End Get - Set - Me.sellerAssignedIDField = Value - End Set - End Property - - ''' - Public Property BuyerAssignedID() As IDType - Get - Return Me.buyerAssignedIDField - End Get - Set - Me.buyerAssignedIDField = Value - End Set - End Property - - ''' - - Public Property Name() As TextType() - Get - Return Me.nameField - End Get - Set - Me.nameField = Value - End Set - End Property - - ''' - - Public Property Description() As TextType() - Get - Return Me.descriptionField - End Get - Set - Me.descriptionField = Value - End Set - End Property - - ''' - - Public Property ApplicableProductCharacteristic() As ProductCharacteristicType() - Get - Return Me.applicableProductCharacteristicField - End Get - Set - Me.applicableProductCharacteristicField = Value - End Set - End Property - - ''' - - Public Property DesignatedProductClassification() As ProductClassificationType() - Get - Return Me.designatedProductClassificationField - End Get - Set - Me.designatedProductClassificationField = Value - End Set - End Property - - ''' - - Public Property OriginTradeCountry As CountryIDType() - Get - Return Me.originTradeCountryField - End Get - Set - Me.originTradeCountryField = Value - End Set - End Property - - ''' - - Public Property IncludedReferencedProduct() As ReferencedProductType() - Get - Return Me.includedReferencedProductField - End Get - Set - Me.includedReferencedProductField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CountryIDType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DocumentLineDocumentType - - Private lineIDField As IDType - - Private includedNoteField() As NoteType - - ''' - Public Property LineID() As IDType - Get - Return Me.lineIDField - End Get - Set - Me.lineIDField = Value - End Set - End Property - - ''' - - Public Property IncludedNote() As NoteType() - Get - Return Me.includedNoteField - End Get - Set - Me.includedNoteField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class NoteType - - Private contentCodeField() As CodeType - - Private contentField() As TextType - - Private subjectCodeField As CodeType - - ''' - - Public Property ContentCode() As CodeType() - Get - Return Me.contentCodeField - End Get - Set - Me.contentCodeField = Value - End Set - End Property - - ''' - - Public Property Content() As TextType() - Get - Return Me.contentField - End Get - Set - Me.contentField = Value - End Set - End Property - - ''' - Public Property SubjectCode() As CodeType - Get - Return Me.subjectCodeField - End Get - Set - Me.subjectCodeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainTradeLineItemType - - Private associatedDocumentLineDocumentField As DocumentLineDocumentType - - Private specifiedSupplyChainTradeAgreementField As SupplyChainTradeAgreementType - - Private specifiedSupplyChainTradeDeliveryField As SupplyChainTradeDeliveryType - - Private specifiedSupplyChainTradeSettlementField As SupplyChainTradeSettlementType - - Private specifiedTradeProductField As TradeProductType - - ''' - Public Property AssociatedDocumentLineDocument() As DocumentLineDocumentType - Get - Return Me.associatedDocumentLineDocumentField - End Get - Set - Me.associatedDocumentLineDocumentField = Value - End Set - End Property - - ''' - Public Property SpecifiedSupplyChainTradeAgreement() As SupplyChainTradeAgreementType - Get - Return Me.specifiedSupplyChainTradeAgreementField - End Get - Set - Me.specifiedSupplyChainTradeAgreementField = Value - End Set - End Property - - ''' - Public Property SpecifiedSupplyChainTradeDelivery() As SupplyChainTradeDeliveryType - Get - Return Me.specifiedSupplyChainTradeDeliveryField - End Get - Set - Me.specifiedSupplyChainTradeDeliveryField = Value - End Set - End Property - - ''' - Public Property SpecifiedSupplyChainTradeSettlement() As SupplyChainTradeSettlementType - Get - Return Me.specifiedSupplyChainTradeSettlementField - End Get - Set - Me.specifiedSupplyChainTradeSettlementField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradeProduct() As TradeProductType - Get - Return Me.specifiedTradeProductField - End Get - Set - Me.specifiedTradeProductField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainTradeAgreementType - - Private buyerReferenceField() As TextType - - Private sellerTradePartyField As TradePartyType - - Private buyerTradePartyField As TradePartyType - - Private productEndUserTradePartyField As TradePartyType - - Private applicableTradeDeliveryTermsField As TradeDeliveryTermsType - - Private buyerOrderReferencedDocumentField() As ReferencedDocumentType - - Private contractReferencedDocumentField() As ReferencedDocumentType - - Private additionalReferencedDocumentField() As ReferencedDocumentType - - Private grossPriceProductTradePriceField() As TradePriceType - - Private netPriceProductTradePriceField() As TradePriceType - - Private customerOrderReferencedDocumentField() As ReferencedDocumentType - - ''' - - Public Property BuyerReference() As TextType() - Get - Return Me.buyerReferenceField - End Get - Set - Me.buyerReferenceField = Value - End Set - End Property - - ''' - Public Property SellerTradeParty() As TradePartyType - Get - Return Me.sellerTradePartyField - End Get - Set - Me.sellerTradePartyField = Value - End Set - End Property - - ''' - Public Property BuyerTradeParty() As TradePartyType - Get - Return Me.buyerTradePartyField - End Get - Set - Me.buyerTradePartyField = Value - End Set - End Property - - ''' - Public Property ProductEndUserTradeParty() As TradePartyType - Get - Return Me.productEndUserTradePartyField - End Get - Set - Me.productEndUserTradePartyField = Value - End Set - End Property - - ''' - Public Property ApplicableTradeDeliveryTerms() As TradeDeliveryTermsType - Get - Return Me.applicableTradeDeliveryTermsField - End Get - Set - Me.applicableTradeDeliveryTermsField = Value - End Set - End Property - - ''' - - Public Property BuyerOrderReferencedDocument() As ReferencedDocumentType() - Get - Return Me.buyerOrderReferencedDocumentField - End Get - Set - Me.buyerOrderReferencedDocumentField = Value - End Set - End Property - - ''' - - Public Property ContractReferencedDocument() As ReferencedDocumentType() - Get - Return Me.contractReferencedDocumentField - End Get - Set - Me.contractReferencedDocumentField = Value - End Set - End Property - - ''' - - Public Property AdditionalReferencedDocument() As ReferencedDocumentType() - Get - Return Me.additionalReferencedDocumentField - End Get - Set - Me.additionalReferencedDocumentField = Value - End Set - End Property - - ''' - - Public Property GrossPriceProductTradePrice() As TradePriceType() - Get - Return Me.grossPriceProductTradePriceField - End Get - Set - Me.grossPriceProductTradePriceField = Value - End Set - End Property - - ''' - - Public Property NetPriceProductTradePrice() As TradePriceType() - Get - Return Me.netPriceProductTradePriceField - End Get - Set - Me.netPriceProductTradePriceField = Value - End Set - End Property - - ''' - - Public Property CustomerOrderReferencedDocument() As ReferencedDocumentType() - Get - Return Me.customerOrderReferencedDocumentField - End Get - Set - Me.customerOrderReferencedDocumentField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePartyType - - Private idField() As IDType - - Private globalIDField() As IDType - - Private nameField As TextType - - Private definedTradeContactField() As TradeContactType - - Private postalTradeAddressField As TradeAddressType - - Private specifiedTaxRegistrationField() As TaxRegistrationType - - ''' - - Public Property ID() As IDType() - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - - Public Property GlobalID() As IDType() - Get - Return Me.globalIDField - End Get - Set - Me.globalIDField = Value - End Set - End Property - - ''' - Public Property Name() As TextType - Get - Return Me.nameField - End Get - Set - Me.nameField = Value - End Set - End Property - - ''' - - Public Property DefinedTradeContact() As TradeContactType() - Get - Return Me.definedTradeContactField - End Get - Set - Me.definedTradeContactField = Value - End Set - End Property - - ''' - Public Property PostalTradeAddress() As TradeAddressType - Get - Return Me.postalTradeAddressField - End Get - Set - Me.postalTradeAddressField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTaxRegistration() As TaxRegistrationType() - Get - Return Me.specifiedTaxRegistrationField - End Get - Set - Me.specifiedTaxRegistrationField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeContactType - - Private personNameField As TextType - - Private departmentNameField As TextType - - Private telephoneUniversalCommunicationField() As UniversalCommunicationType - - Private faxUniversalCommunicationField() As UniversalCommunicationType - - Private emailURIUniversalCommunicationField As UniversalCommunicationType - - ''' - Public Property PersonName() As TextType - Get - Return Me.personNameField - End Get - Set - Me.personNameField = Value - End Set - End Property - - ''' - Public Property DepartmentName() As TextType - Get - Return Me.departmentNameField - End Get - Set - Me.departmentNameField = Value - End Set - End Property - - ''' - - Public Property TelephoneUniversalCommunication() As UniversalCommunicationType() - Get - Return Me.telephoneUniversalCommunicationField - End Get - Set - Me.telephoneUniversalCommunicationField = Value - End Set - End Property - - ''' - - Public Property FaxUniversalCommunication() As UniversalCommunicationType() - Get - Return Me.faxUniversalCommunicationField - End Get - Set - Me.faxUniversalCommunicationField = Value - End Set - End Property - - ''' - Public Property EmailURIUniversalCommunication() As UniversalCommunicationType - Get - Return Me.emailURIUniversalCommunicationField - End Get - Set - Me.emailURIUniversalCommunicationField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class UniversalCommunicationType - - Private uRIIDField As IDType - - Private completeNumberField As TextType - - ''' - Public Property URIID() As IDType - Get - Return Me.uRIIDField - End Get - Set - Me.uRIIDField = Value - End Set - End Property - - ''' - Public Property CompleteNumber() As TextType - Get - Return Me.completeNumberField - End Get - Set - Me.completeNumberField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeAddressType - - Private postcodeCodeField() As CodeType - - Private lineOneField As TextType - - Private lineTwoField As TextType - - Private cityNameField As TextType - - Private countryIDField As CountryIDType - - ''' - - Public Property PostcodeCode() As CodeType() - Get - Return Me.postcodeCodeField - End Get - Set - Me.postcodeCodeField = Value - End Set - End Property - - ''' - Public Property LineOne() As TextType - Get - Return Me.lineOneField - End Get - Set - Me.lineOneField = Value - End Set - End Property - - ''' - Public Property LineTwo() As TextType - Get - Return Me.lineTwoField - End Get - Set - Me.lineTwoField = Value - End Set - End Property - - ''' - Public Property CityName() As TextType - Get - Return Me.cityNameField - End Get - Set - Me.cityNameField = Value - End Set - End Property - - ''' - Public Property CountryID() As CountryIDType - Get - Return Me.countryIDField - End Get - Set - Me.countryIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TaxRegistrationType - - Private idField As IDType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeDeliveryTermsType - - Private deliveryTypeCodeField As DeliveryTermsCodeType - - ''' - Public Property DeliveryTypeCode() As DeliveryTermsCodeType - Get - Return Me.deliveryTypeCodeField - End Get - Set - Me.deliveryTypeCodeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DeliveryTermsCodeType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class ReferencedDocumentType - - Private issueDateTimeField As String - - Private lineIDField As IDType - - Private typeCodeField As DocumentCodeType - - Private idField() As IDType - - Private referenceTypeCodeField As ReferenceCodeType - - ''' - Public Property IssueDateTime() As String - Get - Return Me.issueDateTimeField - End Get - Set - Me.issueDateTimeField = Value - End Set - End Property - - ''' - Public Property LineID() As IDType - Get - Return Me.lineIDField - End Get - Set - Me.lineIDField = Value - End Set - End Property - - ''' - Public Property TypeCode() As DocumentCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - - Public Property ID() As IDType() - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - Public Property ReferenceTypeCode() As ReferenceCodeType - Get - Return Me.referenceTypeCodeField - End Get - Set - Me.referenceTypeCodeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DocumentCodeType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class ReferenceCodeType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePriceType - - Private chargeAmountField() As AmountType - - Private basisQuantityField As QuantityType - - Private appliedTradeAllowanceChargeField() As TradeAllowanceChargeType - - ''' - - Public Property ChargeAmount() As AmountType() - Get - Return Me.chargeAmountField - End Get - Set - Me.chargeAmountField = Value - End Set - End Property - - ''' - Public Property BasisQuantity() As QuantityType - Get - Return Me.basisQuantityField - End Get - Set - Me.basisQuantityField = Value - End Set - End Property - - ''' - - Public Property AppliedTradeAllowanceCharge() As TradeAllowanceChargeType() - Get - Return Me.appliedTradeAllowanceChargeField - End Get - Set - Me.appliedTradeAllowanceChargeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class AmountType - - Private currencyIDField As String - - Private valueField As Decimal - - ''' - - Public Property currencyID() As String - Get - Return Me.currencyIDField - End Get - Set - Me.currencyIDField = Value - End Set - End Property - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeAllowanceChargeType - - Private chargeIndicatorField As IndicatorType - - Private sequenceNumericField As NumericType - - Private calculationPercentField As PercentType - - Private basisAmountField As AmountType - - Private basisQuantityField As QuantityType - - Private actualAmountField() As AmountType - - Private reasonCodeField As AllowanceChargeReasonCodeType - - Private reasonField As TextType - - Private categoryTradeTaxField() As TradeTaxType - - ''' - Public Property ChargeIndicator() As IndicatorType - Get - Return Me.chargeIndicatorField - End Get - Set - Me.chargeIndicatorField = Value - End Set - End Property - - ''' - Public Property SequenceNumeric() As NumericType - Get - Return Me.sequenceNumericField - End Get - Set - Me.sequenceNumericField = Value - End Set - End Property - - ''' - Public Property CalculationPercent() As PercentType - Get - Return Me.calculationPercentField - End Get - Set - Me.calculationPercentField = Value - End Set - End Property - - ''' - Public Property BasisAmount() As AmountType - Get - Return Me.basisAmountField - End Get - Set - Me.basisAmountField = Value - End Set - End Property - - ''' - Public Property BasisQuantity() As QuantityType - Get - Return Me.basisQuantityField - End Get - Set - Me.basisQuantityField = Value - End Set - End Property - - ''' - - Public Property ActualAmount() As AmountType() - Get - Return Me.actualAmountField - End Get - Set - Me.actualAmountField = Value - End Set - End Property - - ''' - Public Property ReasonCode() As AllowanceChargeReasonCodeType - Get - Return Me.reasonCodeField - End Get - Set - Me.reasonCodeField = Value - End Set - End Property - - ''' - Public Property Reason() As TextType - Get - Return Me.reasonField - End Get - Set - Me.reasonField = Value - End Set - End Property - - ''' - - Public Property CategoryTradeTax() As TradeTaxType() - Get - Return Me.categoryTradeTaxField - End Get - Set - Me.categoryTradeTaxField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class NumericType - - Private valueField As Decimal - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class PercentType - - Private valueField As Decimal - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class AllowanceChargeReasonCodeType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeTaxType - - Private calculatedAmountField() As AmountType - - Private typeCodeField As TaxTypeCodeType - - Private exemptionReasonField As TextType - - Private basisAmountField() As AmountType - - Private lineTotalBasisAmountField() As AmountType - - Private allowanceChargeBasisAmountField() As AmountType - - Private categoryCodeField As TaxCategoryCodeType - - Private applicablePercentField As PercentType - - ''' - - Public Property CalculatedAmount() As AmountType() - Get - Return Me.calculatedAmountField - End Get - Set - Me.calculatedAmountField = Value - End Set - End Property - - ''' - Public Property TypeCode() As TaxTypeCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - Public Property ExemptionReason() As TextType - Get - Return Me.exemptionReasonField - End Get - Set - Me.exemptionReasonField = Value - End Set - End Property - - ''' - - Public Property BasisAmount() As AmountType() - Get - Return Me.basisAmountField - End Get - Set - Me.basisAmountField = Value - End Set - End Property - - ''' - - Public Property LineTotalBasisAmount() As AmountType() - Get - Return Me.lineTotalBasisAmountField - End Get - Set - Me.lineTotalBasisAmountField = Value - End Set - End Property - - ''' - - Public Property AllowanceChargeBasisAmount() As AmountType() - Get - Return Me.allowanceChargeBasisAmountField - End Get - Set - Me.allowanceChargeBasisAmountField = Value - End Set - End Property - - ''' - Public Property CategoryCode() As TaxCategoryCodeType - Get - Return Me.categoryCodeField - End Get - Set - Me.categoryCodeField = Value - End Set - End Property - - ''' - Public Property ApplicablePercent() As PercentType - Get - Return Me.applicablePercentField - End Get - Set - Me.applicablePercentField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TaxTypeCodeType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TaxCategoryCodeType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainTradeDeliveryType - - Private billedQuantityField As QuantityType - - Private chargeFreeQuantityField As QuantityType - - Private packageQuantityField As QuantityType - - Private relatedSupplyChainConsignmentField() As LogisticsTransportMovementType - - Private shipToTradePartyField As TradePartyType - - Private ultimateShipToTradePartyField As TradePartyType - - Private shipFromTradePartyField As TradePartyType - - Private actualDeliverySupplyChainEventField() As DateTimeType - - Private despatchAdviceReferencedDocumentField As ReferencedDocumentType - - Private receivingAdviceReferencedDocumentField() As ReferencedDocumentType - - Private deliveryNoteReferencedDocumentField As ReferencedDocumentType - - ''' - Public Property BilledQuantity() As QuantityType - Get - Return Me.billedQuantityField - End Get - Set - Me.billedQuantityField = Value - End Set - End Property - - ''' - Public Property ChargeFreeQuantity() As QuantityType - Get - Return Me.chargeFreeQuantityField - End Get - Set - Me.chargeFreeQuantityField = Value - End Set - End Property - - ''' - Public Property PackageQuantity() As QuantityType - Get - Return Me.packageQuantityField - End Get - Set - Me.packageQuantityField = Value - End Set - End Property - - ''' - - Public Property RelatedSupplyChainConsignment() As LogisticsTransportMovementType() - Get - Return Me.relatedSupplyChainConsignmentField - End Get - Set - Me.relatedSupplyChainConsignmentField = Value - End Set - End Property - - ''' - Public Property ShipToTradeParty() As TradePartyType - Get - Return Me.shipToTradePartyField - End Get - Set - Me.shipToTradePartyField = Value - End Set - End Property - - ''' - Public Property UltimateShipToTradeParty() As TradePartyType - Get - Return Me.ultimateShipToTradePartyField - End Get - Set - Me.ultimateShipToTradePartyField = Value - End Set - End Property - - ''' - Public Property ShipFromTradeParty() As TradePartyType - Get - Return Me.shipFromTradePartyField - End Get - Set - Me.shipFromTradePartyField = Value - End Set - End Property - - ''' - - Public Property ActualDeliverySupplyChainEvent() As DateTimeType() - Get - Return Me.actualDeliverySupplyChainEventField - End Get - Set - Me.actualDeliverySupplyChainEventField = Value - End Set - End Property - - ''' - Public Property DespatchAdviceReferencedDocument() As ReferencedDocumentType - Get - Return Me.despatchAdviceReferencedDocumentField - End Get - Set - Me.despatchAdviceReferencedDocumentField = Value - End Set - End Property - - ''' - - Public Property ReceivingAdviceReferencedDocument() As ReferencedDocumentType() - Get - Return Me.receivingAdviceReferencedDocumentField - End Get - Set - Me.receivingAdviceReferencedDocumentField = Value - End Set - End Property - - ''' - Public Property DeliveryNoteReferencedDocument() As ReferencedDocumentType - Get - Return Me.deliveryNoteReferencedDocumentField - End Get - Set - Me.deliveryNoteReferencedDocumentField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class LogisticsTransportMovementType - - Private modeCodeField As CodeType - - Private idField As IDType - - ''' - Public Property ModeCode() As CodeType - Get - Return Me.modeCodeField - End Get - Set - Me.modeCodeField = Value - End Set - End Property - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DateTimeType - - Private itemField As DateTimeTypeDateTimeString - - ''' - - Public Property Item() As DateTimeTypeDateTimeString - Get - Return Me.itemField - End Get - Set - Me.itemField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DateTimeTypeDateTimeString - - Private formatField As String - - Private valueField As String - - ''' - - Public Property format() As String - Get - Return Me.formatField - End Get - Set - Me.formatField = Value - End Set - End Property - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainTradeSettlementType - - Private paymentReferenceField() As TextType - - Private invoiceCurrencyCodeField As CodeType - - Private invoiceeTradePartyField As TradePartyType - - Private payeeTradePartyField() As TradePartyType - - Private specifiedTradeSettlementPaymentMeansField() As TradeSettlementPaymentMeansType - - Private applicableTradeTaxField() As TradeTaxType - - Private billingSpecifiedPeriodField() As SpecifiedPeriodType - - Private specifiedTradeAllowanceChargeField() As TradeAllowanceChargeType - - Private specifiedLogisticsServiceChargeField() As LogisticsServiceChargeType - - Private specifiedTradePaymentTermsField() As TradePaymentTermsType - - Private specifiedTradeAccountingAccountField() As TradeAccountingAccountType - - Private specifiedTradeSettlementMonetarySummationField As TradeSettlementMonetarySummationType - - Private receivableSpecifiedTradeAccountingAccountField() As TradeAccountingAccountType - - ''' - - Public Property PaymentReference() As TextType() - Get - Return Me.paymentReferenceField - End Get - Set - Me.paymentReferenceField = Value - End Set - End Property - - ''' - Public Property InvoiceCurrencyCode() As CodeType - Get - Return Me.invoiceCurrencyCodeField - End Get - Set - Me.invoiceCurrencyCodeField = Value - End Set - End Property - - ''' - Public Property InvoiceeTradeParty() As TradePartyType - Get - Return Me.invoiceeTradePartyField - End Get - Set - Me.invoiceeTradePartyField = Value - End Set - End Property - - ''' - - Public Property PayeeTradeParty() As TradePartyType() - Get - Return Me.payeeTradePartyField - End Get - Set - Me.payeeTradePartyField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTradeSettlementPaymentMeans() As TradeSettlementPaymentMeansType() - Get - Return Me.specifiedTradeSettlementPaymentMeansField - End Get - Set - Me.specifiedTradeSettlementPaymentMeansField = Value - End Set - End Property - - ''' - - Public Property ApplicableTradeTax() As TradeTaxType() - Get - Return Me.applicableTradeTaxField - End Get - Set - Me.applicableTradeTaxField = Value - End Set - End Property - - ''' - - Public Property BillingSpecifiedPeriod() As SpecifiedPeriodType() - Get - Return Me.billingSpecifiedPeriodField - End Get - Set - Me.billingSpecifiedPeriodField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTradeAllowanceCharge() As TradeAllowanceChargeType() - Get - Return Me.specifiedTradeAllowanceChargeField - End Get - Set - Me.specifiedTradeAllowanceChargeField = Value - End Set - End Property - - ''' - - Public Property SpecifiedLogisticsServiceCharge() As LogisticsServiceChargeType() - Get - Return Me.specifiedLogisticsServiceChargeField - End Get - Set - Me.specifiedLogisticsServiceChargeField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTradePaymentTerms() As TradePaymentTermsType() - Get - Return Me.specifiedTradePaymentTermsField - End Get - Set - Me.specifiedTradePaymentTermsField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTradeAccountingAccount() As TradeAccountingAccountType() - Get - Return Me.specifiedTradeAccountingAccountField - End Get - Set - Me.specifiedTradeAccountingAccountField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradeSettlementMonetarySummation() As TradeSettlementMonetarySummationType - Get - Return Me.specifiedTradeSettlementMonetarySummationField - End Get - Set - Me.specifiedTradeSettlementMonetarySummationField = Value - End Set - End Property - - ''' - - Public Property ReceivableSpecifiedTradeAccountingAccount() As TradeAccountingAccountType() - Get - Return Me.receivableSpecifiedTradeAccountingAccountField - End Get - Set - Me.receivableSpecifiedTradeAccountingAccountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeSettlementPaymentMeansType - - Private typeCodeField As PaymentMeansCodeType - - Private informationField() As TextType - - Private idField() As IDType - - Private payerPartyDebtorFinancialAccountField As DebtorFinancialAccountType - - Private payeePartyCreditorFinancialAccountField As CreditorFinancialAccountType - - Private payerSpecifiedDebtorFinancialInstitutionField As DebtorFinancialInstitutionType - - Private payeeSpecifiedCreditorFinancialInstitutionField As CreditorFinancialInstitutionType - - ''' - Public Property TypeCode() As PaymentMeansCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - - Public Property Information() As TextType() - Get - Return Me.informationField - End Get - Set - Me.informationField = Value - End Set - End Property - - ''' - - Public Property ID() As IDType() - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - Public Property PayerPartyDebtorFinancialAccount() As DebtorFinancialAccountType - Get - Return Me.payerPartyDebtorFinancialAccountField - End Get - Set - Me.payerPartyDebtorFinancialAccountField = Value - End Set - End Property - - ''' - Public Property PayeePartyCreditorFinancialAccount() As CreditorFinancialAccountType - Get - Return Me.payeePartyCreditorFinancialAccountField - End Get - Set - Me.payeePartyCreditorFinancialAccountField = Value - End Set - End Property - - ''' - Public Property PayerSpecifiedDebtorFinancialInstitution() As DebtorFinancialInstitutionType - Get - Return Me.payerSpecifiedDebtorFinancialInstitutionField - End Get - Set - Me.payerSpecifiedDebtorFinancialInstitutionField = Value - End Set - End Property - - ''' - Public Property PayeeSpecifiedCreditorFinancialInstitution() As CreditorFinancialInstitutionType - Get - Return Me.payeeSpecifiedCreditorFinancialInstitutionField - End Get - Set - Me.payeeSpecifiedCreditorFinancialInstitutionField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class PaymentMeansCodeType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DebtorFinancialAccountType - - Private iBANIDField As IDType - - Private proprietaryIDField As IDType - - ''' - Public Property IBANID() As IDType - Get - Return Me.iBANIDField - End Get - Set - Me.iBANIDField = Value - End Set - End Property - - ''' - Public Property ProprietaryID() As IDType - Get - Return Me.proprietaryIDField - End Get - Set - Me.proprietaryIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CreditorFinancialAccountType - - Private iBANIDField As IDType - - Private accountNameField As TextType - - Private proprietaryIDField As IDType - - ''' - Public Property IBANID() As IDType - Get - Return Me.iBANIDField - End Get - Set - Me.iBANIDField = Value - End Set - End Property - - ''' - Public Property AccountName() As TextType - Get - Return Me.accountNameField - End Get - Set - Me.accountNameField = Value - End Set - End Property - - ''' - Public Property ProprietaryID() As IDType - Get - Return Me.proprietaryIDField - End Get - Set - Me.proprietaryIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DebtorFinancialInstitutionType - - Private bICIDField As IDType - - Private germanBankleitzahlIDField As IDType - - Private nameField As TextType - - ''' - Public Property BICID() As IDType - Get - Return Me.bICIDField - End Get - Set - Me.bICIDField = Value - End Set - End Property - - ''' - Public Property GermanBankleitzahlID() As IDType - Get - Return Me.germanBankleitzahlIDField - End Get - Set - Me.germanBankleitzahlIDField = Value - End Set - End Property - - ''' - Public Property Name() As TextType - Get - Return Me.nameField - End Get - Set - Me.nameField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CreditorFinancialInstitutionType - - Private bICIDField As IDType - - Private germanBankleitzahlIDField As IDType - - Private nameField As TextType - - ''' - Public Property BICID() As IDType - Get - Return Me.bICIDField - End Get - Set - Me.bICIDField = Value - End Set - End Property - - ''' - Public Property GermanBankleitzahlID() As IDType - Get - Return Me.germanBankleitzahlIDField - End Get - Set - Me.germanBankleitzahlIDField = Value - End Set - End Property - - ''' - Public Property Name() As TextType - Get - Return Me.nameField - End Get - Set - Me.nameField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SpecifiedPeriodType - - Private startDateTimeField As DateTimeType - - Private endDateTimeField As DateTimeType - - Private completeDateTimeField As DateTimeType - - ''' - Public Property StartDateTime() As DateTimeType - Get - Return Me.startDateTimeField - End Get - Set - Me.startDateTimeField = Value - End Set - End Property - - ''' - Public Property EndDateTime() As DateTimeType - Get - Return Me.endDateTimeField - End Get - Set - Me.endDateTimeField = Value - End Set - End Property - - ''' - Public Property CompleteDateTime() As DateTimeType - Get - Return Me.completeDateTimeField - End Get - Set - Me.completeDateTimeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class LogisticsServiceChargeType - - Private descriptionField() As TextType - - Private appliedAmountField() As AmountType - - Private appliedTradeTaxField() As TradeTaxType - - ''' - - Public Property Description() As TextType() - Get - Return Me.descriptionField - End Get - Set - Me.descriptionField = Value - End Set - End Property - - ''' - - Public Property AppliedAmount() As AmountType() - Get - Return Me.appliedAmountField - End Get - Set - Me.appliedAmountField = Value - End Set - End Property - - ''' - - Public Property AppliedTradeTax() As TradeTaxType() - Get - Return Me.appliedTradeTaxField - End Get - Set - Me.appliedTradeTaxField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePaymentTermsType - - Private descriptionField() As TextType - - Private dueDateDateTimeField As DateTimeType - - Private partialPaymentAmountField() As AmountType - - Private applicableTradePaymentPenaltyTermsField() As TradePaymentPenaltyTermsType - - Private applicableTradePaymentDiscountTermsField() As TradePaymentDiscountTermsType - - ''' - - Public Property Description() As TextType() - Get - Return Me.descriptionField - End Get - Set - Me.descriptionField = Value - End Set - End Property - - ''' - Public Property DueDateDateTime() As DateTimeType - Get - Return Me.dueDateDateTimeField - End Get - Set - Me.dueDateDateTimeField = Value - End Set - End Property - - ''' - - Public Property PartialPaymentAmount() As AmountType() - Get - Return Me.partialPaymentAmountField - End Get - Set - Me.partialPaymentAmountField = Value - End Set - End Property - - ''' - - Public Property ApplicableTradePaymentPenaltyTerms() As TradePaymentPenaltyTermsType() - Get - Return Me.applicableTradePaymentPenaltyTermsField - End Get - Set - Me.applicableTradePaymentPenaltyTermsField = Value - End Set - End Property - - ''' - - Public Property ApplicableTradePaymentDiscountTerms() As TradePaymentDiscountTermsType() - Get - Return Me.applicableTradePaymentDiscountTermsField - End Get - Set - Me.applicableTradePaymentDiscountTermsField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePaymentPenaltyTermsType - - Private basisDateTimeField As DateTimeType - - Private basisPeriodMeasureField As MeasureType - - Private basisAmountField() As AmountType - - Private calculationPercentField As PercentType - - Private actualPenaltyAmountField() As AmountType - - ''' - Public Property BasisDateTime() As DateTimeType - Get - Return Me.basisDateTimeField - End Get - Set - Me.basisDateTimeField = Value - End Set - End Property - - ''' - Public Property BasisPeriodMeasure() As MeasureType - Get - Return Me.basisPeriodMeasureField - End Get - Set - Me.basisPeriodMeasureField = Value - End Set - End Property - - ''' - - Public Property BasisAmount() As AmountType() - Get - Return Me.basisAmountField - End Get - Set - Me.basisAmountField = Value - End Set - End Property - - ''' - Public Property CalculationPercent() As PercentType - Get - Return Me.calculationPercentField - End Get - Set - Me.calculationPercentField = Value - End Set - End Property - - ''' - - Public Property ActualPenaltyAmount() As AmountType() - Get - Return Me.actualPenaltyAmountField - End Get - Set - Me.actualPenaltyAmountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePaymentDiscountTermsType - - Private basisDateTimeField As DateTimeType - - Private basisPeriodMeasureField As MeasureType - - Private basisAmountField() As AmountType - - Private calculationPercentField As PercentType - - Private actualDiscountAmountField() As AmountType - - ''' - Public Property BasisDateTime() As DateTimeType - Get - Return Me.basisDateTimeField - End Get - Set - Me.basisDateTimeField = Value - End Set - End Property - - ''' - Public Property BasisPeriodMeasure() As MeasureType - Get - Return Me.basisPeriodMeasureField - End Get - Set - Me.basisPeriodMeasureField = Value - End Set - End Property - - ''' - - Public Property BasisAmount() As AmountType() - Get - Return Me.basisAmountField - End Get - Set - Me.basisAmountField = Value - End Set - End Property - - ''' - Public Property CalculationPercent() As PercentType - Get - Return Me.calculationPercentField - End Get - Set - Me.calculationPercentField = Value - End Set - End Property - - ''' - - Public Property ActualDiscountAmount() As AmountType() - Get - Return Me.actualDiscountAmountField - End Get - Set - Me.actualDiscountAmountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeAccountingAccountType - - Private idField As IDType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeSettlementMonetarySummationType - - Private lineTotalAmountField() As AmountType - - Private chargeTotalAmountField() As AmountType - - Private allowanceTotalAmountField() As AmountType - - Private taxBasisTotalAmountField() As AmountType - - Private taxTotalAmountField() As AmountType - - Private grandTotalAmountField() As AmountType - - Private totalPrepaidAmountField() As AmountType - - Private totalAllowanceChargeAmountField() As AmountType - - Private duePayableAmountField() As AmountType - - ''' - - Public Property LineTotalAmount() As AmountType() - Get - Return Me.lineTotalAmountField - End Get - Set - Me.lineTotalAmountField = Value - End Set - End Property - - ''' - - Public Property ChargeTotalAmount() As AmountType() - Get - Return Me.chargeTotalAmountField - End Get - Set - Me.chargeTotalAmountField = Value - End Set - End Property - - ''' - - Public Property AllowanceTotalAmount() As AmountType() - Get - Return Me.allowanceTotalAmountField - End Get - Set - Me.allowanceTotalAmountField = Value - End Set - End Property - - ''' - - Public Property TaxBasisTotalAmount() As AmountType() - Get - Return Me.taxBasisTotalAmountField - End Get - Set - Me.taxBasisTotalAmountField = Value - End Set - End Property - - ''' - - Public Property TaxTotalAmount() As AmountType() - Get - Return Me.taxTotalAmountField - End Get - Set - Me.taxTotalAmountField = Value - End Set - End Property - - ''' - - Public Property GrandTotalAmount() As AmountType() - Get - Return Me.grandTotalAmountField - End Get - Set - Me.grandTotalAmountField = Value - End Set - End Property - - ''' - - Public Property TotalPrepaidAmount() As AmountType() - Get - Return Me.totalPrepaidAmountField - End Get - Set - Me.totalPrepaidAmountField = Value - End Set - End Property - - ''' - - Public Property TotalAllowanceChargeAmount() As AmountType() - Get - Return Me.totalAllowanceChargeAmountField - End Get - Set - Me.totalAllowanceChargeAmountField = Value - End Set - End Property - - ''' - - Public Property DuePayableAmount() As AmountType() - Get - Return Me.duePayableAmountField - End Get - Set - Me.duePayableAmountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainTradeTransactionType - - Private applicableSupplyChainTradeAgreementField() As SupplyChainTradeAgreementType - - Private applicableSupplyChainTradeDeliveryField As SupplyChainTradeDeliveryType - - Private applicableSupplyChainTradeSettlementField As SupplyChainTradeSettlementType - - Private includedSupplyChainTradeLineItemField() As SupplyChainTradeLineItemType - - ''' - - Public Property ApplicableSupplyChainTradeAgreement() As SupplyChainTradeAgreementType() - Get - Return Me.applicableSupplyChainTradeAgreementField - End Get - Set - Me.applicableSupplyChainTradeAgreementField = Value - End Set - End Property - - ''' - Public Property ApplicableSupplyChainTradeDelivery() As SupplyChainTradeDeliveryType - Get - Return Me.applicableSupplyChainTradeDeliveryField - End Get - Set - Me.applicableSupplyChainTradeDeliveryField = Value - End Set - End Property - - ''' - Public Property ApplicableSupplyChainTradeSettlement() As SupplyChainTradeSettlementType - Get - Return Me.applicableSupplyChainTradeSettlementField - End Get - Set - Me.applicableSupplyChainTradeSettlementField = Value - End Set - End Property - - ''' - - Public Property IncludedSupplyChainTradeLineItem() As SupplyChainTradeLineItemType() - Get - Return Me.includedSupplyChainTradeLineItemField - End Get - Set - Me.includedSupplyChainTradeLineItemField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class ExchangedDocumentType - - Private idField As IDType - - Private nameField() As TextType - - Private typeCodeField As DocumentCodeType - - Private issueDateTimeField As DateTimeType - - Private copyIndicatorField As IndicatorType - - Private languageIDField() As IDType - - Private includedNoteField() As NoteType - - Private effectiveSpecifiedPeriodField As SpecifiedPeriodType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - - Public Property Name() As TextType() - Get - Return Me.nameField - End Get - Set - Me.nameField = Value - End Set - End Property - - ''' - Public Property TypeCode() As DocumentCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - Public Property IssueDateTime() As DateTimeType - Get - Return Me.issueDateTimeField - End Get - Set - Me.issueDateTimeField = Value - End Set - End Property - - ''' - Public Property CopyIndicator() As IndicatorType - Get - Return Me.copyIndicatorField - End Get - Set - Me.copyIndicatorField = Value - End Set - End Property - - ''' - - Public Property LanguageID() As IDType() - Get - Return Me.languageIDField - End Get - Set - Me.languageIDField = Value - End Set - End Property - - ''' - - Public Property IncludedNote() As NoteType() - Get - Return Me.includedNoteField - End Get - Set - Me.includedNoteField = Value - End Set - End Property - - ''' - Public Property EffectiveSpecifiedPeriod() As SpecifiedPeriodType - Get - Return Me.effectiveSpecifiedPeriodField - End Get - Set - Me.effectiveSpecifiedPeriodField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DocumentContextParameterType - - Private idField As IDType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class -End Namespace diff --git a/Modules.Interfaces/ZUGFeRDInterface/Version2.0/CrossIndustryInvoiceType.vb b/Modules.Interfaces/ZUGFeRDInterface/Version2.0/CrossIndustryInvoiceType.vb deleted file mode 100644 index 1649a980..00000000 --- a/Modules.Interfaces/ZUGFeRDInterface/Version2.0/CrossIndustryInvoiceType.vb +++ /dev/null @@ -1,3749 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict Off -Option Explicit On - -Imports System.Xml.Serialization - - -Namespace ZUGFeRD.Version2_0 - ' - 'This source code was auto-generated by xsd, Version=4.6.1055.0. - ' - - ''' - - Partial Public Class CrossIndustryInvoiceType - - Private exchangedDocumentContextField As ExchangedDocumentContextType - - Private exchangedDocumentField As ExchangedDocumentType - - Private supplyChainTradeTransactionField As SupplyChainTradeTransactionType - - ''' - Public Property ExchangedDocumentContext() As ExchangedDocumentContextType - Get - Return Me.exchangedDocumentContextField - End Get - Set - Me.exchangedDocumentContextField = Value - End Set - End Property - - ''' - Public Property ExchangedDocument() As ExchangedDocumentType - Get - Return Me.exchangedDocumentField - End Get - Set - Me.exchangedDocumentField = Value - End Set - End Property - - ''' - Public Property SupplyChainTradeTransaction() As SupplyChainTradeTransactionType - Get - Return Me.supplyChainTradeTransactionField - End Get - Set - Me.supplyChainTradeTransactionField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class ExchangedDocumentContextType - - Private businessProcessSpecifiedDocumentContextParameterField As DocumentContextParameterType - - Private guidelineSpecifiedDocumentContextParameterField As DocumentContextParameterType - - ''' - Public Property BusinessProcessSpecifiedDocumentContextParameter() As DocumentContextParameterType - Get - Return Me.businessProcessSpecifiedDocumentContextParameterField - End Get - Set - Me.businessProcessSpecifiedDocumentContextParameterField = Value - End Set - End Property - - ''' - Public Property GuidelineSpecifiedDocumentContextParameter() As DocumentContextParameterType - Get - Return Me.guidelineSpecifiedDocumentContextParameterField - End Get - Set - Me.guidelineSpecifiedDocumentContextParameterField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DocumentContextParameterType - - Private idField As IDType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class IDType - - Private schemeIDField As String - - Private valueField As String - - ''' - - Public Property schemeID() As String - Get - Return Me.schemeIDField - End Get - Set - Me.schemeIDField = Value - End Set - End Property - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeAccountingAccountType - - Private idField As IDType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeSettlementHeaderMonetarySummationType - - Private lineTotalAmountField As AmountType - - Private chargeTotalAmountField As AmountType - - Private allowanceTotalAmountField As AmountType - - Private taxBasisTotalAmountField As AmountType - - Private taxTotalAmountField As AmountType - - Private grandTotalAmountField As AmountType - - Private totalPrepaidAmountField As AmountType - - Private duePayableAmountField As AmountType - - ''' - Public Property LineTotalAmount() As AmountType - Get - Return Me.lineTotalAmountField - End Get - Set - Me.lineTotalAmountField = Value - End Set - End Property - - ''' - Public Property ChargeTotalAmount() As AmountType - Get - Return Me.chargeTotalAmountField - End Get - Set - Me.chargeTotalAmountField = Value - End Set - End Property - - ''' - Public Property AllowanceTotalAmount() As AmountType - Get - Return Me.allowanceTotalAmountField - End Get - Set - Me.allowanceTotalAmountField = Value - End Set - End Property - - ''' - Public Property TaxBasisTotalAmount() As AmountType - Get - Return Me.taxBasisTotalAmountField - End Get - Set - Me.taxBasisTotalAmountField = Value - End Set - End Property - - ''' - Public Property TaxTotalAmount() As AmountType - Get - Return Me.taxTotalAmountField - End Get - Set - Me.taxTotalAmountField = Value - End Set - End Property - - ''' - Public Property GrandTotalAmount() As AmountType - Get - Return Me.grandTotalAmountField - End Get - Set - Me.grandTotalAmountField = Value - End Set - End Property - - ''' - Public Property TotalPrepaidAmount() As AmountType - Get - Return Me.totalPrepaidAmountField - End Get - Set - Me.totalPrepaidAmountField = Value - End Set - End Property - - ''' - Public Property DuePayableAmount() As AmountType - Get - Return Me.duePayableAmountField - End Get - Set - Me.duePayableAmountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class AmountType - - Private currencyIDField As String - - Private valueField As Decimal - - ''' - - Public Property currencyID() As String - Get - Return Me.currencyIDField - End Get - Set - Me.currencyIDField = Value - End Set - End Property - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePaymentTermsType - - Private dueDateDateTimeField As DateTimeType - - Private directDebitMandateIDField As IDType - - ''' - Public Property DueDateDateTime() As DateTimeType - Get - Return Me.dueDateDateTimeField - End Get - Set - Me.dueDateDateTimeField = Value - End Set - End Property - - ''' - Public Property DirectDebitMandateID() As IDType - Get - Return Me.directDebitMandateIDField - End Get - Set - Me.directDebitMandateIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DateTimeType - - Private itemField As DateTimeTypeDateTimeString - - ''' - - Public Property Item() As DateTimeTypeDateTimeString - Get - Return Me.itemField - End Get - Set - Me.itemField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DateTimeTypeDateTimeString - - Private formatField As String - - Private valueField As String - - ''' - - Public Property format() As String - Get - Return Me.formatField - End Get - Set - Me.formatField = Value - End Set - End Property - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class AllowanceChargeReasonCodeType - - Private valueField As AllowanceChargeReasonCodeContentType - - ''' - - Public Property Value() As AllowanceChargeReasonCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum AllowanceChargeReasonCodeContentType - - ''' - AA - - ''' - AAA - - ''' - AAC - - ''' - AAD - - ''' - AAE - - ''' - AAF - - ''' - AAH - - ''' - AAI - - ''' - AAS - - ''' - AAT - - ''' - AAV - - ''' - AAY - - ''' - AAZ - - ''' - ABA - - ''' - ABB - - ''' - ABC - - ''' - ABD - - ''' - ABF - - ''' - ABK - - ''' - ABL - - ''' - ABN - - ''' - ABR - - ''' - ABS - - ''' - ABT - - ''' - ABU - - ''' - ACF - - ''' - ACG - - ''' - ACH - - ''' - ACI - - ''' - ACJ - - ''' - ACK - - ''' - ACL - - ''' - ACM - - ''' - ACS - - ''' - ADC - - ''' - ADE - - ''' - ADJ - - ''' - ADK - - ''' - ADL - - ''' - ADM - - ''' - ADN - - ''' - ADO - - ''' - ADP - - ''' - ADQ - - ''' - ADR - - ''' - ADT - - ''' - ADW - - ''' - ADY - - ''' - ADZ - - ''' - AEA - - ''' - AEB - - ''' - AEC - - ''' - AED - - ''' - AEF - - ''' - AEH - - ''' - AEI - - ''' - AEJ - - ''' - AEK - - ''' - AEL - - ''' - AEM - - ''' - AEN - - ''' - AEO - - ''' - AEP - - ''' - AES - - ''' - AET - - ''' - AEU - - ''' - AEV - - ''' - AEW - - ''' - AEX - - ''' - AEY - - ''' - AEZ - - ''' - AJ - - ''' - AU - - ''' - CA - - ''' - CAB - - ''' - CAD - - ''' - CAE - - ''' - CAF - - ''' - CAI - - ''' - CAJ - - ''' - CAK - - ''' - CAL - - ''' - CAM - - ''' - CAN - - ''' - CAO - - ''' - CAP - - ''' - CAQ - - ''' - CAR - - ''' - CAS - - ''' - CAT - - ''' - CAU - - ''' - CAV - - ''' - CAW - - ''' - CD - - ''' - CG - - ''' - CS - - ''' - CT - - ''' - DAB - - ''' - DAD - - ''' - DL - - ''' - EG - - ''' - EP - - ''' - ER - - ''' - FAA - - ''' - FAB - - ''' - FAC - - ''' - FC - - ''' - FH - - ''' - FI - - ''' - GAA - - ''' - HAA - - ''' - HD - - ''' - HH - - ''' - IAA - - ''' - IAB - - ''' - ID - - ''' - [IF] - - ''' - IR - - ''' - [IS] - - ''' - KO - - ''' - L1 - - ''' - LA - - ''' - LAA - - ''' - LAB - - ''' - LF - - ''' - MAE - - ''' - MI - - ''' - ML - - ''' - NAA - - ''' - OA - - ''' - PA - - ''' - PAA - - ''' - PC - - ''' - PL - - ''' - RAB - - ''' - RAC - - ''' - RAD - - ''' - RAF - - ''' - RE - - ''' - RF - - ''' - RH - - ''' - RV - - ''' - SA - - ''' - SAA - - ''' - SAD - - ''' - SAE - - ''' - SAI - - ''' - SG - - ''' - SH - - ''' - SM - - ''' - SU - - ''' - TAB - - ''' - TAC - - ''' - TT - - ''' - TV - - ''' - V1 - - ''' - V2 - - ''' - WH - - ''' - XAA - - ''' - YY - - ''' - ZZZ - - ''' - - Item41 - - ''' - - Item42 - - ''' - - Item60 - - ''' - - Item62 - - ''' - - Item63 - - ''' - - Item64 - - ''' - - Item65 - - ''' - - Item66 - - ''' - - Item67 - - ''' - - Item68 - - ''' - - Item70 - - ''' - - Item71 - - ''' - - Item88 - - ''' - - Item95 - - ''' - - Item100 - - ''' - - Item102 - - ''' - - Item103 - - ''' - - Item104 - - ''' - - Item105 - End Enum - - ''' - - Partial Public Class IndicatorType - - Private itemField As Boolean - - ''' - - Public Property Item() As Boolean - Get - Return Me.itemField - End Get - Set - Me.itemField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeAllowanceChargeType - - Private chargeIndicatorField As IndicatorType - - Private calculationPercentField As PercentType - - Private basisAmountField As AmountType - - Private actualAmountField As AmountType - - Private reasonCodeField As AllowanceChargeReasonCodeType - - Private reasonField As TextType - - Private categoryTradeTaxField As TradeTaxType - - ''' - Public Property ChargeIndicator() As IndicatorType - Get - Return Me.chargeIndicatorField - End Get - Set - Me.chargeIndicatorField = Value - End Set - End Property - - ''' - Public Property CalculationPercent() As PercentType - Get - Return Me.calculationPercentField - End Get - Set - Me.calculationPercentField = Value - End Set - End Property - - ''' - Public Property BasisAmount() As AmountType - Get - Return Me.basisAmountField - End Get - Set - Me.basisAmountField = Value - End Set - End Property - - ''' - Public Property ActualAmount() As AmountType - Get - Return Me.actualAmountField - End Get - Set - Me.actualAmountField = Value - End Set - End Property - - ''' - Public Property ReasonCode() As AllowanceChargeReasonCodeType - Get - Return Me.reasonCodeField - End Get - Set - Me.reasonCodeField = Value - End Set - End Property - - ''' - Public Property Reason() As TextType - Get - Return Me.reasonField - End Get - Set - Me.reasonField = Value - End Set - End Property - - ''' - Public Property CategoryTradeTax() As TradeTaxType - Get - Return Me.categoryTradeTaxField - End Get - Set - Me.categoryTradeTaxField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class PercentType - - Private valueField As Decimal - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TextType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeTaxType - - Private calculatedAmountField As AmountType - - Private typeCodeField As TaxTypeCodeType - - Private exemptionReasonField As TextType - - Private basisAmountField As AmountType - - Private categoryCodeField As TaxCategoryCodeType - - Private exemptionReasonCodeField As CodeType - - Private dueDateTypeCodeField As TimeReferenceCodeType - - Private rateApplicablePercentField As PercentType - - ''' - Public Property CalculatedAmount() As AmountType - Get - Return Me.calculatedAmountField - End Get - Set - Me.calculatedAmountField = Value - End Set - End Property - - ''' - Public Property TypeCode() As TaxTypeCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - Public Property ExemptionReason() As TextType - Get - Return Me.exemptionReasonField - End Get - Set - Me.exemptionReasonField = Value - End Set - End Property - - ''' - Public Property BasisAmount() As AmountType - Get - Return Me.basisAmountField - End Get - Set - Me.basisAmountField = Value - End Set - End Property - - ''' - Public Property CategoryCode() As TaxCategoryCodeType - Get - Return Me.categoryCodeField - End Get - Set - Me.categoryCodeField = Value - End Set - End Property - - ''' - Public Property ExemptionReasonCode() As CodeType - Get - Return Me.exemptionReasonCodeField - End Get - Set - Me.exemptionReasonCodeField = Value - End Set - End Property - - ''' - Public Property DueDateTypeCode() As TimeReferenceCodeType - Get - Return Me.dueDateTypeCodeField - End Get - Set - Me.dueDateTypeCodeField = Value - End Set - End Property - - ''' - Public Property RateApplicablePercent() As PercentType - Get - Return Me.rateApplicablePercentField - End Get - Set - Me.rateApplicablePercentField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TaxTypeCodeType - - Private valueField As TaxTypeCodeContentType - - ''' - - Public Property Value() As TaxTypeCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum TaxTypeCodeContentType - - ''' - VAT - End Enum - - ''' - - Partial Public Class TaxCategoryCodeType - - Private valueField As TaxCategoryCodeContentType - - ''' - - Public Property Value() As TaxCategoryCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum TaxCategoryCodeContentType - - ''' - AE - - ''' - E - - ''' - G - - ''' - K - - ''' - L - - ''' - M - - ''' - O - - ''' - S - - ''' - Z - End Enum - - ''' - - Partial Public Class CodeType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TimeReferenceCodeType - - Private valueField As TimeReferenceCodeContentType - - ''' - - Public Property Value() As TimeReferenceCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum TimeReferenceCodeContentType - - ''' - - Item5 - - ''' - - Item29 - - ''' - - Item72 - End Enum - - ''' - - Partial Public Class CreditorFinancialAccountType - - Private iBANIDField As IDType - - Private proprietaryIDField As IDType - - ''' - Public Property IBANID() As IDType - Get - Return Me.iBANIDField - End Get - Set - Me.iBANIDField = Value - End Set - End Property - - ''' - Public Property ProprietaryID() As IDType - Get - Return Me.proprietaryIDField - End Get - Set - Me.proprietaryIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DebtorFinancialAccountType - - Private iBANIDField As IDType - - ''' - Public Property IBANID() As IDType - Get - Return Me.iBANIDField - End Get - Set - Me.iBANIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class PaymentMeansCodeType - - Private valueField As PaymentMeansCodeContentType - - ''' - - Public Property Value() As PaymentMeansCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum PaymentMeansCodeContentType - - ''' - - Item10 - - ''' - - Item20 - - ''' - - Item30 - - ''' - - Item48 - - ''' - - Item49 - - ''' - - Item57 - - ''' - - Item58 - - ''' - - Item59 - - ''' - ZZZ - End Enum - - ''' - - Partial Public Class TradeSettlementPaymentMeansType - - Private typeCodeField As PaymentMeansCodeType - - Private payerPartyDebtorFinancialAccountField As DebtorFinancialAccountType - - Private payeePartyCreditorFinancialAccountField As CreditorFinancialAccountType - - ''' - Public Property TypeCode() As PaymentMeansCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - Public Property PayerPartyDebtorFinancialAccount() As DebtorFinancialAccountType - Get - Return Me.payerPartyDebtorFinancialAccountField - End Get - Set - Me.payerPartyDebtorFinancialAccountField = Value - End Set - End Property - - ''' - Public Property PayeePartyCreditorFinancialAccount() As CreditorFinancialAccountType - Get - Return Me.payeePartyCreditorFinancialAccountField - End Get - Set - Me.payeePartyCreditorFinancialAccountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CurrencyCodeType - - Private valueField As CurrencyCodeContentType - - ''' - - Public Property Value() As CurrencyCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum CurrencyCodeContentType - - ''' - AED - - ''' - AFN - - ''' - ALL - - ''' - AMD - - ''' - ANG - - ''' - AOA - - ''' - ARS - - ''' - AUD - - ''' - AWG - - ''' - AZN - - ''' - BAM - - ''' - BBD - - ''' - BDT - - ''' - BGN - - ''' - BHD - - ''' - BIF - - ''' - BMD - - ''' - BND - - ''' - BOB - - ''' - BOV - - ''' - BRL - - ''' - BSD - - ''' - BTN - - ''' - BWP - - ''' - BYN - - ''' - BZD - - ''' - CAD - - ''' - CDF - - ''' - CHE - - ''' - CHF - - ''' - CHW - - ''' - CLF - - ''' - CLP - - ''' - CNY - - ''' - COP - - ''' - COU - - ''' - CRC - - ''' - CUC - - ''' - CUP - - ''' - CVE - - ''' - CZK - - ''' - DJF - - ''' - DKK - - ''' - DOP - - ''' - DZD - - ''' - EGP - - ''' - ERN - - ''' - ETB - - ''' - EUR - - ''' - FJD - - ''' - FKP - - ''' - GBP - - ''' - GEL - - ''' - GHS - - ''' - GIP - - ''' - GMD - - ''' - GNF - - ''' - GTQ - - ''' - GYD - - ''' - HKD - - ''' - HNL - - ''' - HRK - - ''' - HTG - - ''' - HUF - - ''' - IDR - - ''' - ILS - - ''' - INR - - ''' - IQD - - ''' - IRR - - ''' - ISK - - ''' - JMD - - ''' - JOD - - ''' - JPY - - ''' - KES - - ''' - KGS - - ''' - KHR - - ''' - KMF - - ''' - KPW - - ''' - KRW - - ''' - KWD - - ''' - KYD - - ''' - KZT - - ''' - LAK - - ''' - LBP - - ''' - LKR - - ''' - LRD - - ''' - LSL - - ''' - LYD - - ''' - MAD - - ''' - MDL - - ''' - MGA - - ''' - MKD - - ''' - MMK - - ''' - MNT - - ''' - MOP - - ''' - MRO - - ''' - MUR - - ''' - MVR - - ''' - MWK - - ''' - MXN - - ''' - MXV - - ''' - MYR - - ''' - MZN - - ''' - NAD - - ''' - NGN - - ''' - NIO - - ''' - NOK - - ''' - NPR - - ''' - NZD - - ''' - OMR - - ''' - PAB - - ''' - PEN - - ''' - PGK - - ''' - PHP - - ''' - PKR - - ''' - PLN - - ''' - PYG - - ''' - QAR - - ''' - RON - - ''' - RSD - - ''' - RUB - - ''' - RWF - - ''' - SAR - - ''' - SBD - - ''' - SCR - - ''' - SDG - - ''' - SEK - - ''' - SGD - - ''' - SHP - - ''' - SLL - - ''' - SOS - - ''' - SRD - - ''' - SSP - - ''' - STD - - ''' - SVC - - ''' - SYP - - ''' - SZL - - ''' - THB - - ''' - TJS - - ''' - TMT - - ''' - TND - - ''' - TOP - - ''' - [TRY] - - ''' - TTD - - ''' - TWD - - ''' - TZS - - ''' - UAH - - ''' - UGX - - ''' - USD - - ''' - USN - - ''' - UYI - - ''' - UYU - - ''' - UZS - - ''' - VEF - - ''' - VND - - ''' - VUV - - ''' - WST - - ''' - XAF - - ''' - XAG - - ''' - XAU - - ''' - XBA - - ''' - XBB - - ''' - XBC - - ''' - XBD - - ''' - XCD - - ''' - XDR - - ''' - XOF - - ''' - XPD - - ''' - XPF - - ''' - XPT - - ''' - XSU - - ''' - XTS - - ''' - XUA - - ''' - XXX - - ''' - YER - - ''' - ZAR - - ''' - ZMW - - ''' - ZWL - End Enum - - ''' - - Partial Public Class HeaderTradeSettlementType - - Private creditorReferenceIDField As IDType - - Private paymentReferenceField As TextType - - Private invoiceCurrencyCodeField As CurrencyCodeType - - Private payeeTradePartyField As TradePartyType - - Private specifiedTradeSettlementPaymentMeansField() As TradeSettlementPaymentMeansType - - Private applicableTradeTaxField() As TradeTaxType - - Private specifiedTradeAllowanceChargeField() As TradeAllowanceChargeType - - Private specifiedTradePaymentTermsField As TradePaymentTermsType - - Private specifiedTradeSettlementHeaderMonetarySummationField As TradeSettlementHeaderMonetarySummationType - - Private invoiceReferencedDocumentField As ReferencedDocumentType - - Private receivableSpecifiedTradeAccountingAccountField() As TradeAccountingAccountType - - ''' - Public Property CreditorReferenceID() As IDType - Get - Return Me.creditorReferenceIDField - End Get - Set - Me.creditorReferenceIDField = Value - End Set - End Property - - ''' - Public Property PaymentReference() As TextType - Get - Return Me.paymentReferenceField - End Get - Set - Me.paymentReferenceField = Value - End Set - End Property - - ''' - Public Property InvoiceCurrencyCode() As CurrencyCodeType - Get - Return Me.invoiceCurrencyCodeField - End Get - Set - Me.invoiceCurrencyCodeField = Value - End Set - End Property - - ''' - Public Property PayeeTradeParty() As TradePartyType - Get - Return Me.payeeTradePartyField - End Get - Set - Me.payeeTradePartyField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTradeSettlementPaymentMeans() As TradeSettlementPaymentMeansType() - Get - Return Me.specifiedTradeSettlementPaymentMeansField - End Get - Set - Me.specifiedTradeSettlementPaymentMeansField = Value - End Set - End Property - - ''' - - Public Property ApplicableTradeTax() As TradeTaxType() - Get - Return Me.applicableTradeTaxField - End Get - Set - Me.applicableTradeTaxField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTradeAllowanceCharge() As TradeAllowanceChargeType() - Get - Return Me.specifiedTradeAllowanceChargeField - End Get - Set - Me.specifiedTradeAllowanceChargeField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradePaymentTerms() As TradePaymentTermsType - Get - Return Me.specifiedTradePaymentTermsField - End Get - Set - Me.specifiedTradePaymentTermsField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradeSettlementHeaderMonetarySummation() As TradeSettlementHeaderMonetarySummationType - Get - Return Me.specifiedTradeSettlementHeaderMonetarySummationField - End Get - Set - Me.specifiedTradeSettlementHeaderMonetarySummationField = Value - End Set - End Property - - ''' - Public Property InvoiceReferencedDocument() As ReferencedDocumentType - Get - Return Me.invoiceReferencedDocumentField - End Get - Set - Me.invoiceReferencedDocumentField = Value - End Set - End Property - - ''' - - Public Property ReceivableSpecifiedTradeAccountingAccount() As TradeAccountingAccountType() - Get - Return Me.receivableSpecifiedTradeAccountingAccountField - End Get - Set - Me.receivableSpecifiedTradeAccountingAccountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePartyType - - Private idField As IDType - - Private globalIDField() As IDType - - Private nameField As TextType - - Private specifiedLegalOrganizationField As LegalOrganizationType - - Private postalTradeAddressField As TradeAddressType - - Private uRIUniversalCommunicationField As UniversalCommunicationType - - Private specifiedTaxRegistrationField() As TaxRegistrationType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - - Public Property GlobalID() As IDType() - Get - Return Me.globalIDField - End Get - Set - Me.globalIDField = Value - End Set - End Property - - ''' - Public Property Name() As TextType - Get - Return Me.nameField - End Get - Set - Me.nameField = Value - End Set - End Property - - ''' - Public Property SpecifiedLegalOrganization() As LegalOrganizationType - Get - Return Me.specifiedLegalOrganizationField - End Get - Set - Me.specifiedLegalOrganizationField = Value - End Set - End Property - - ''' - Public Property PostalTradeAddress() As TradeAddressType - Get - Return Me.postalTradeAddressField - End Get - Set - Me.postalTradeAddressField = Value - End Set - End Property - - ''' - Public Property URIUniversalCommunication() As UniversalCommunicationType - Get - Return Me.uRIUniversalCommunicationField - End Get - Set - Me.uRIUniversalCommunicationField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTaxRegistration() As TaxRegistrationType() - Get - Return Me.specifiedTaxRegistrationField - End Get - Set - Me.specifiedTaxRegistrationField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class LegalOrganizationType - - Private idField As IDType - - Private tradingBusinessNameField As TextType - - Private postalTradeAddressField As TradeAddressType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - Public Property TradingBusinessName() As TextType - Get - Return Me.tradingBusinessNameField - End Get - Set - Me.tradingBusinessNameField = Value - End Set - End Property - - ''' - Public Property PostalTradeAddress() As TradeAddressType - Get - Return Me.postalTradeAddressField - End Get - Set - Me.postalTradeAddressField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeAddressType - - Private postcodeCodeField As CodeType - - Private lineOneField As TextType - - Private lineTwoField As TextType - - Private lineThreeField As TextType - - Private cityNameField As TextType - - Private countryIDField As CountryIDType - - Private countrySubDivisionNameField As TextType - - ''' - Public Property PostcodeCode() As CodeType - Get - Return Me.postcodeCodeField - End Get - Set - Me.postcodeCodeField = Value - End Set - End Property - - ''' - Public Property LineOne() As TextType - Get - Return Me.lineOneField - End Get - Set - Me.lineOneField = Value - End Set - End Property - - ''' - Public Property LineTwo() As TextType - Get - Return Me.lineTwoField - End Get - Set - Me.lineTwoField = Value - End Set - End Property - - ''' - Public Property LineThree() As TextType - Get - Return Me.lineThreeField - End Get - Set - Me.lineThreeField = Value - End Set - End Property - - ''' - Public Property CityName() As TextType - Get - Return Me.cityNameField - End Get - Set - Me.cityNameField = Value - End Set - End Property - - ''' - Public Property CountryID() As CountryIDType - Get - Return Me.countryIDField - End Get - Set - Me.countryIDField = Value - End Set - End Property - - ''' - Public Property CountrySubDivisionName() As TextType - Get - Return Me.countrySubDivisionNameField - End Get - Set - Me.countrySubDivisionNameField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CountryIDType - - Private valueField As CountryIDContentType - - ''' - - Public Property Value() As CountryIDContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum CountryIDContentType - - ''' - AD - - ''' - AE - - ''' - AF - - ''' - AG - - ''' - AI - - ''' - AL - - ''' - AM - - ''' - AO - - ''' - AQ - - ''' - AR - - ''' - [AS] - - ''' - AT - - ''' - AU - - ''' - AW - - ''' - AX - - ''' - AZ - - ''' - BA - - ''' - BB - - ''' - BD - - ''' - BE - - ''' - BF - - ''' - BG - - ''' - BH - - ''' - BI - - ''' - BJ - - ''' - BL - - ''' - BM - - ''' - BN - - ''' - BO - - ''' - BQ - - ''' - BR - - ''' - BS - - ''' - BT - - ''' - BV - - ''' - BW - - ''' - BY - - ''' - BZ - - ''' - CA - - ''' - CC - - ''' - CD - - ''' - CF - - ''' - CG - - ''' - CH - - ''' - CI - - ''' - CK - - ''' - CL - - ''' - CM - - ''' - CN - - ''' - CO - - ''' - CR - - ''' - CU - - ''' - CV - - ''' - CW - - ''' - CX - - ''' - CY - - ''' - CZ - - ''' - DE - - ''' - DJ - - ''' - DK - - ''' - DM - - ''' - [DO] - - ''' - DZ - - ''' - EC - - ''' - EE - - ''' - EG - - ''' - EH - - ''' - ER - - ''' - ES - - ''' - ET - - ''' - FI - - ''' - FJ - - ''' - FK - - ''' - FM - - ''' - FO - - ''' - FR - - ''' - GA - - ''' - GB - - ''' - GD - - ''' - GE - - ''' - GF - - ''' - GG - - ''' - GH - - ''' - GI - - ''' - GL - - ''' - GM - - ''' - GN - - ''' - GP - - ''' - GQ - - ''' - GR - - ''' - GS - - ''' - GT - - ''' - GU - - ''' - GW - - ''' - GY - - ''' - HK - - ''' - HM - - ''' - HN - - ''' - HR - - ''' - HT - - ''' - HU - - ''' - ID - - ''' - IE - - ''' - IL - - ''' - IM - - ''' - [IN] - - ''' - IO - - ''' - IQ - - ''' - IR - - ''' - [IS] - - ''' - IT - - ''' - JE - - ''' - JM - - ''' - JO - - ''' - JP - - ''' - KE - - ''' - KG - - ''' - KH - - ''' - KI - - ''' - KM - - ''' - KN - - ''' - KP - - ''' - KR - - ''' - KW - - ''' - KY - - ''' - KZ - - ''' - LA - - ''' - LB - - ''' - LC - - ''' - LI - - ''' - LK - - ''' - LR - - ''' - LS - - ''' - LT - - ''' - LU - - ''' - LV - - ''' - LY - - ''' - MA - - ''' - MC - - ''' - MD - - ''' - [ME] - - ''' - MF - - ''' - MG - - ''' - MH - - ''' - MK - - ''' - ML - - ''' - MM - - ''' - MN - - ''' - MO - - ''' - MP - - ''' - MQ - - ''' - MR - - ''' - MS - - ''' - MT - - ''' - MU - - ''' - MV - - ''' - MW - - ''' - MX - - ''' - MY - - ''' - MZ - - ''' - NA - - ''' - NC - - ''' - NE - - ''' - NF - - ''' - NG - - ''' - NI - - ''' - NL - - ''' - NO - - ''' - NP - - ''' - NR - - ''' - NU - - ''' - NZ - - ''' - OM - - ''' - PA - - ''' - PE - - ''' - PF - - ''' - PG - - ''' - PH - - ''' - PK - - ''' - PL - - ''' - PM - - ''' - PN - - ''' - PR - - ''' - PS - - ''' - PT - - ''' - PW - - ''' - PY - - ''' - QA - - ''' - RE - - ''' - RO - - ''' - RS - - ''' - RU - - ''' - RW - - ''' - SA - - ''' - SB - - ''' - SC - - ''' - SD - - ''' - SE - - ''' - SG - - ''' - SH - - ''' - SI - - ''' - SJ - - ''' - SK - - ''' - SL - - ''' - SM - - ''' - SN - - ''' - SO - - ''' - SR - - ''' - SS - - ''' - ST - - ''' - SV - - ''' - SX - - ''' - SY - - ''' - SZ - - ''' - TC - - ''' - TD - - ''' - TF - - ''' - TG - - ''' - TH - - ''' - TJ - - ''' - TK - - ''' - TL - - ''' - TM - - ''' - TN - - ''' - [TO] - - ''' - TR - - ''' - TT - - ''' - TV - - ''' - TW - - ''' - TZ - - ''' - UA - - ''' - UG - - ''' - UM - - ''' - US - - ''' - UY - - ''' - UZ - - ''' - VA - - ''' - VC - - ''' - VE - - ''' - VG - - ''' - VI - - ''' - VN - - ''' - VU - - ''' - WF - - ''' - WS - - ''' - YE - - ''' - YT - - ''' - ZA - - ''' - ZM - - ''' - ZW - End Enum - - ''' - - Partial Public Class UniversalCommunicationType - - Private uRIIDField As IDType - - ''' - Public Property URIID() As IDType - Get - Return Me.uRIIDField - End Get - Set - Me.uRIIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TaxRegistrationType - - Private idField As IDType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class ReferencedDocumentType - - Private issuerAssignedIDField As IDType - - Private formattedIssueDateTimeField As FormattedDateTimeType - - ''' - Public Property IssuerAssignedID() As IDType - Get - Return Me.issuerAssignedIDField - End Get - Set - Me.issuerAssignedIDField = Value - End Set - End Property - - ''' - Public Property FormattedIssueDateTime() As FormattedDateTimeType - Get - Return Me.formattedIssueDateTimeField - End Get - Set - Me.formattedIssueDateTimeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class FormattedDateTimeType - - Private dateTimeStringField As FormattedDateTimeTypeDateTimeString - - ''' - Public Property DateTimeString() As FormattedDateTimeTypeDateTimeString - Get - Return Me.dateTimeStringField - End Get - Set - Me.dateTimeStringField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class FormattedDateTimeTypeDateTimeString - - Private formatField As String - - Private valueField As String - - ''' - - Public Property format() As String - Get - Return Me.formatField - End Get - Set - Me.formatField = Value - End Set - End Property - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainEventType - - Private occurrenceDateTimeField As DateTimeType - - ''' - Public Property OccurrenceDateTime() As DateTimeType - Get - Return Me.occurrenceDateTimeField - End Get - Set - Me.occurrenceDateTimeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class HeaderTradeDeliveryType - - Private actualDeliverySupplyChainEventField As SupplyChainEventType - - Private despatchAdviceReferencedDocumentField As ReferencedDocumentType - - ''' - Public Property ActualDeliverySupplyChainEvent() As SupplyChainEventType - Get - Return Me.actualDeliverySupplyChainEventField - End Get - Set - Me.actualDeliverySupplyChainEventField = Value - End Set - End Property - - ''' - Public Property DespatchAdviceReferencedDocument() As ReferencedDocumentType - Get - Return Me.despatchAdviceReferencedDocumentField - End Get - Set - Me.despatchAdviceReferencedDocumentField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class HeaderTradeAgreementType - - Private buyerReferenceField As TextType - - Private sellerTradePartyField As TradePartyType - - Private buyerTradePartyField As TradePartyType - - Private sellerTaxRepresentativeTradePartyField As TradePartyType - - Private buyerOrderReferencedDocumentField As ReferencedDocumentType - - Private contractReferencedDocumentField As ReferencedDocumentType - - ''' - Public Property BuyerReference() As TextType - Get - Return Me.buyerReferenceField - End Get - Set - Me.buyerReferenceField = Value - End Set - End Property - - ''' - Public Property SellerTradeParty() As TradePartyType - Get - Return Me.sellerTradePartyField - End Get - Set - Me.sellerTradePartyField = Value - End Set - End Property - - ''' - Public Property BuyerTradeParty() As TradePartyType - Get - Return Me.buyerTradePartyField - End Get - Set - Me.buyerTradePartyField = Value - End Set - End Property - - ''' - Public Property SellerTaxRepresentativeTradeParty() As TradePartyType - Get - Return Me.sellerTaxRepresentativeTradePartyField - End Get - Set - Me.sellerTaxRepresentativeTradePartyField = Value - End Set - End Property - - ''' - Public Property BuyerOrderReferencedDocument() As ReferencedDocumentType - Get - Return Me.buyerOrderReferencedDocumentField - End Get - Set - Me.buyerOrderReferencedDocumentField = Value - End Set - End Property - - ''' - Public Property ContractReferencedDocument() As ReferencedDocumentType - Get - Return Me.contractReferencedDocumentField - End Get - Set - Me.contractReferencedDocumentField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainTradeTransactionType - - Private applicableHeaderTradeAgreementField As HeaderTradeAgreementType - - Private applicableHeaderTradeDeliveryField As HeaderTradeDeliveryType - - Private applicableHeaderTradeSettlementField As HeaderTradeSettlementType - - ''' - Public Property ApplicableHeaderTradeAgreement() As HeaderTradeAgreementType - Get - Return Me.applicableHeaderTradeAgreementField - End Get - Set - Me.applicableHeaderTradeAgreementField = Value - End Set - End Property - - ''' - Public Property ApplicableHeaderTradeDelivery() As HeaderTradeDeliveryType - Get - Return Me.applicableHeaderTradeDeliveryField - End Get - Set - Me.applicableHeaderTradeDeliveryField = Value - End Set - End Property - - ''' - Public Property ApplicableHeaderTradeSettlement() As HeaderTradeSettlementType - Get - Return Me.applicableHeaderTradeSettlementField - End Get - Set - Me.applicableHeaderTradeSettlementField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class NoteType - - Private contentField As TextType - - Private subjectCodeField As CodeType - - ''' - Public Property Content() As TextType - Get - Return Me.contentField - End Get - Set - Me.contentField = Value - End Set - End Property - - ''' - Public Property SubjectCode() As CodeType - Get - Return Me.subjectCodeField - End Get - Set - Me.subjectCodeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DocumentCodeType - - Private valueField As DocumentCodeContentType - - ''' - - Public Property Value() As DocumentCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum DocumentCodeContentType - - ''' - - Item751 - End Enum - - ''' - - Partial Public Class ExchangedDocumentType - - Private idField As IDType - - Private typeCodeField As DocumentCodeType - - Private issueDateTimeField As DateTimeType - - Private includedNoteField() As NoteType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - Public Property TypeCode() As DocumentCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - Public Property IssueDateTime() As DateTimeType - Get - Return Me.issueDateTimeField - End Get - Set - Me.issueDateTimeField = Value - End Set - End Property - - ''' - - Public Property IncludedNote() As NoteType() - Get - Return Me.includedNoteField - End Get - Set - Me.includedNoteField = Value - End Set - End Property - End Class - -End Namespace diff --git a/Modules.Interfaces/ZUGFeRDInterface/Version2.1.1/CrossIndustryInvoiceType.vb b/Modules.Interfaces/ZUGFeRDInterface/Version2.1.1/CrossIndustryInvoiceType.vb deleted file mode 100644 index 93d1b8bb..00000000 --- a/Modules.Interfaces/ZUGFeRDInterface/Version2.1.1/CrossIndustryInvoiceType.vb +++ /dev/null @@ -1,4329 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict Off -Option Explicit On - -Namespace ZUGFeRD.Version2_1_1 - - ' - 'This source code was auto-generated by xsd, Version=4.6.1055.0. - ' - - ''' - - Partial Public Class CrossIndustryInvoiceType - - Private exchangedDocumentContextField As ExchangedDocumentContextType - - Private exchangedDocumentField As ExchangedDocumentType - - Private supplyChainTradeTransactionField As SupplyChainTradeTransactionType - - ''' - Public Property ExchangedDocumentContext() As ExchangedDocumentContextType - Get - Return Me.exchangedDocumentContextField - End Get - Set - Me.exchangedDocumentContextField = Value - End Set - End Property - - ''' - Public Property ExchangedDocument() As ExchangedDocumentType - Get - Return Me.exchangedDocumentField - End Get - Set - Me.exchangedDocumentField = Value - End Set - End Property - - ''' - Public Property SupplyChainTradeTransaction() As SupplyChainTradeTransactionType - Get - Return Me.supplyChainTradeTransactionField - End Get - Set - Me.supplyChainTradeTransactionField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class ExchangedDocumentContextType - - Private businessProcessSpecifiedDocumentContextParameterField As DocumentContextParameterType - - Private guidelineSpecifiedDocumentContextParameterField As DocumentContextParameterType - - ''' - Public Property BusinessProcessSpecifiedDocumentContextParameter() As DocumentContextParameterType - Get - Return Me.businessProcessSpecifiedDocumentContextParameterField - End Get - Set - Me.businessProcessSpecifiedDocumentContextParameterField = Value - End Set - End Property - - ''' - Public Property GuidelineSpecifiedDocumentContextParameter() As DocumentContextParameterType - Get - Return Me.guidelineSpecifiedDocumentContextParameterField - End Get - Set - Me.guidelineSpecifiedDocumentContextParameterField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DocumentContextParameterType - - Private idField As IDType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class IDType - - Private schemeIDField As String - - Private valueField As String - - ''' - - Public Property schemeID() As String - Get - Return Me.schemeIDField - End Get - Set - Me.schemeIDField = Value - End Set - End Property - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeAccountingAccountType - - Private idField As IDType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeSettlementHeaderMonetarySummationType - - Private lineTotalAmountField As AmountType - - Private chargeTotalAmountField As AmountType - - Private allowanceTotalAmountField As AmountType - - Private taxBasisTotalAmountField As AmountType - - Private taxTotalAmountField As AmountType - - Private grandTotalAmountField As AmountType - - Private totalPrepaidAmountField As AmountType - - Private duePayableAmountField As AmountType - - ''' - Public Property LineTotalAmount() As AmountType - Get - Return Me.lineTotalAmountField - End Get - Set - Me.lineTotalAmountField = Value - End Set - End Property - - ''' - Public Property ChargeTotalAmount() As AmountType - Get - Return Me.chargeTotalAmountField - End Get - Set - Me.chargeTotalAmountField = Value - End Set - End Property - - ''' - Public Property AllowanceTotalAmount() As AmountType - Get - Return Me.allowanceTotalAmountField - End Get - Set - Me.allowanceTotalAmountField = Value - End Set - End Property - - ''' - Public Property TaxBasisTotalAmount() As AmountType - Get - Return Me.taxBasisTotalAmountField - End Get - Set - Me.taxBasisTotalAmountField = Value - End Set - End Property - - ''' - Public Property TaxTotalAmount() As AmountType - Get - Return Me.taxTotalAmountField - End Get - Set - Me.taxTotalAmountField = Value - End Set - End Property - - ''' - Public Property GrandTotalAmount() As AmountType - Get - Return Me.grandTotalAmountField - End Get - Set - Me.grandTotalAmountField = Value - End Set - End Property - - ''' - Public Property TotalPrepaidAmount() As AmountType - Get - Return Me.totalPrepaidAmountField - End Get - Set - Me.totalPrepaidAmountField = Value - End Set - End Property - - ''' - Public Property DuePayableAmount() As AmountType - Get - Return Me.duePayableAmountField - End Get - Set - Me.duePayableAmountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class AmountType - - Private currencyIDField As String - - Private valueField As Decimal - - ''' - - Public Property currencyID() As String - Get - Return Me.currencyIDField - End Get - Set - Me.currencyIDField = Value - End Set - End Property - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePaymentTermsType - - Private dueDateDateTimeField As DateTimeType - - Private directDebitMandateIDField As IDType - - ''' - Public Property DueDateDateTime() As DateTimeType - Get - Return Me.dueDateDateTimeField - End Get - Set - Me.dueDateDateTimeField = Value - End Set - End Property - - ''' - Public Property DirectDebitMandateID() As IDType - Get - Return Me.directDebitMandateIDField - End Get - Set - Me.directDebitMandateIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DateTimeType - - Private itemField As DateTimeTypeDateTimeString - - ''' - - Public Property Item() As DateTimeTypeDateTimeString - Get - Return Me.itemField - End Get - Set - Me.itemField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DateTimeTypeDateTimeString - - Private formatField As String - - Private valueField As String - - ''' - - Public Property format() As String - Get - Return Me.formatField - End Get - Set - Me.formatField = Value - End Set - End Property - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SpecifiedPeriodType - - Private startDateTimeField As DateTimeType - - Private endDateTimeField As DateTimeType - - ''' - Public Property StartDateTime() As DateTimeType - Get - Return Me.startDateTimeField - End Get - Set - Me.startDateTimeField = Value - End Set - End Property - - ''' - Public Property EndDateTime() As DateTimeType - Get - Return Me.endDateTimeField - End Get - Set - Me.endDateTimeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CreditorFinancialAccountType - - Private iBANIDField As IDType - - Private proprietaryIDField As IDType - - ''' - Public Property IBANID() As IDType - Get - Return Me.iBANIDField - End Get - Set - Me.iBANIDField = Value - End Set - End Property - - ''' - Public Property ProprietaryID() As IDType - Get - Return Me.proprietaryIDField - End Get - Set - Me.proprietaryIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DebtorFinancialAccountType - - Private iBANIDField As IDType - - ''' - Public Property IBANID() As IDType - Get - Return Me.iBANIDField - End Get - Set - Me.iBANIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class PaymentMeansCodeType - - Private valueField As PaymentMeansCodeContentType - - ''' - - Public Property Value() As PaymentMeansCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum PaymentMeansCodeContentType - - ''' - - Item10 - - ''' - - Item20 - - ''' - - Item30 - - ''' - - Item42 - - ''' - - Item48 - - ''' - - Item49 - - ''' - - Item57 - - ''' - - Item58 - - ''' - - Item59 - - ''' - - Item97 - - ''' - ZZZ - End Enum - - ''' - - Partial Public Class TradeSettlementPaymentMeansType - - Private typeCodeField As PaymentMeansCodeType - - Private payerPartyDebtorFinancialAccountField As DebtorFinancialAccountType - - Private payeePartyCreditorFinancialAccountField As CreditorFinancialAccountType - - ''' - Public Property TypeCode() As PaymentMeansCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - Public Property PayerPartyDebtorFinancialAccount() As DebtorFinancialAccountType - Get - Return Me.payerPartyDebtorFinancialAccountField - End Get - Set - Me.payerPartyDebtorFinancialAccountField = Value - End Set - End Property - - ''' - Public Property PayeePartyCreditorFinancialAccount() As CreditorFinancialAccountType - Get - Return Me.payeePartyCreditorFinancialAccountField - End Get - Set - Me.payeePartyCreditorFinancialAccountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CurrencyCodeType - - Private valueField As CurrencyCodeContentType - - ''' - - Public Property Value() As CurrencyCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum CurrencyCodeContentType - - ''' - AED - - ''' - AFN - - ''' - ALL - - ''' - AMD - - ''' - ANG - - ''' - AOA - - ''' - ARS - - ''' - AUD - - ''' - AWG - - ''' - AZN - - ''' - BAM - - ''' - BBD - - ''' - BDT - - ''' - BGN - - ''' - BHD - - ''' - BIF - - ''' - BMD - - ''' - BND - - ''' - BOB - - ''' - BOV - - ''' - BRL - - ''' - BSD - - ''' - BTN - - ''' - BWP - - ''' - BYN - - ''' - BZD - - ''' - CAD - - ''' - CDF - - ''' - CHE - - ''' - CHF - - ''' - CHW - - ''' - CLF - - ''' - CLP - - ''' - CNY - - ''' - COP - - ''' - COU - - ''' - CRC - - ''' - CUC - - ''' - CUP - - ''' - CVE - - ''' - CZK - - ''' - DJF - - ''' - DKK - - ''' - DOP - - ''' - DZD - - ''' - EGP - - ''' - ERN - - ''' - ETB - - ''' - EUR - - ''' - FJD - - ''' - FKP - - ''' - GBP - - ''' - GEL - - ''' - GHS - - ''' - GIP - - ''' - GMD - - ''' - GNF - - ''' - GTQ - - ''' - GYD - - ''' - HKD - - ''' - HNL - - ''' - HRK - - ''' - HTG - - ''' - HUF - - ''' - IDR - - ''' - ILS - - ''' - INR - - ''' - IQD - - ''' - IRR - - ''' - ISK - - ''' - JMD - - ''' - JOD - - ''' - JPY - - ''' - KES - - ''' - KGS - - ''' - KHR - - ''' - KMF - - ''' - KPW - - ''' - KRW - - ''' - KWD - - ''' - KYD - - ''' - KZT - - ''' - LAK - - ''' - LBP - - ''' - LKR - - ''' - LRD - - ''' - LSL - - ''' - LYD - - ''' - MAD - - ''' - MDL - - ''' - MGA - - ''' - MKD - - ''' - MMK - - ''' - MNT - - ''' - MOP - - ''' - MRU - - ''' - MUR - - ''' - MVR - - ''' - MWK - - ''' - MXN - - ''' - MXV - - ''' - MYR - - ''' - MZN - - ''' - NAD - - ''' - NGN - - ''' - NIO - - ''' - NOK - - ''' - NPR - - ''' - NZD - - ''' - OMR - - ''' - PAB - - ''' - PEN - - ''' - PGK - - ''' - PHP - - ''' - PKR - - ''' - PLN - - ''' - PYG - - ''' - QAR - - ''' - RON - - ''' - RSD - - ''' - RUB - - ''' - RWF - - ''' - SAR - - ''' - SBD - - ''' - SCR - - ''' - SDG - - ''' - SEK - - ''' - SGD - - ''' - SHP - - ''' - SLL - - ''' - SOS - - ''' - SRD - - ''' - SSP - - ''' - STN - - ''' - SVC - - ''' - SYP - - ''' - SZL - - ''' - THB - - ''' - TJS - - ''' - TMT - - ''' - TND - - ''' - TOP - - ''' - [TRY] - - ''' - TTD - - ''' - TWD - - ''' - TZS - - ''' - UAH - - ''' - UGX - - ''' - USD - - ''' - USN - - ''' - UYI - - ''' - UYU - - ''' - UYW - - ''' - UZS - - ''' - VES - - ''' - VND - - ''' - VUV - - ''' - WST - - ''' - XAF - - ''' - XAG - - ''' - XAU - - ''' - XBA - - ''' - XBB - - ''' - XBC - - ''' - XBD - - ''' - XCD - - ''' - XDR - - ''' - XOF - - ''' - XPD - - ''' - XPF - - ''' - XPT - - ''' - XSU - - ''' - XTS - - ''' - XUA - - ''' - XXX - - ''' - YER - - ''' - ZAR - - ''' - ZMW - - ''' - ZWL - End Enum - - ''' - - Partial Public Class HeaderTradeSettlementType - - Private creditorReferenceIDField As IDType - - Private paymentReferenceField As TextType - - Private invoiceCurrencyCodeField As CurrencyCodeType - - Private payeeTradePartyField As TradePartyType - - Private specifiedTradeSettlementPaymentMeansField() As TradeSettlementPaymentMeansType - - Private applicableTradeTaxField() As TradeTaxType - - Private billingSpecifiedPeriodField As SpecifiedPeriodType - - Private specifiedTradeAllowanceChargeField() As TradeAllowanceChargeType - - Private specifiedTradePaymentTermsField As TradePaymentTermsType - - Private specifiedTradeSettlementHeaderMonetarySummationField As TradeSettlementHeaderMonetarySummationType - - Private invoiceReferencedDocumentField As ReferencedDocumentType - - Private receivableSpecifiedTradeAccountingAccountField As TradeAccountingAccountType - - ''' - Public Property CreditorReferenceID() As IDType - Get - Return Me.creditorReferenceIDField - End Get - Set - Me.creditorReferenceIDField = Value - End Set - End Property - - ''' - Public Property PaymentReference() As TextType - Get - Return Me.paymentReferenceField - End Get - Set - Me.paymentReferenceField = Value - End Set - End Property - - ''' - Public Property InvoiceCurrencyCode() As CurrencyCodeType - Get - Return Me.invoiceCurrencyCodeField - End Get - Set - Me.invoiceCurrencyCodeField = Value - End Set - End Property - - ''' - Public Property PayeeTradeParty() As TradePartyType - Get - Return Me.payeeTradePartyField - End Get - Set - Me.payeeTradePartyField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTradeSettlementPaymentMeans() As TradeSettlementPaymentMeansType() - Get - Return Me.specifiedTradeSettlementPaymentMeansField - End Get - Set - Me.specifiedTradeSettlementPaymentMeansField = Value - End Set - End Property - - ''' - - Public Property ApplicableTradeTax() As TradeTaxType() - Get - Return Me.applicableTradeTaxField - End Get - Set - Me.applicableTradeTaxField = Value - End Set - End Property - - ''' - Public Property BillingSpecifiedPeriod() As SpecifiedPeriodType - Get - Return Me.billingSpecifiedPeriodField - End Get - Set - Me.billingSpecifiedPeriodField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTradeAllowanceCharge() As TradeAllowanceChargeType() - Get - Return Me.specifiedTradeAllowanceChargeField - End Get - Set - Me.specifiedTradeAllowanceChargeField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradePaymentTerms() As TradePaymentTermsType - Get - Return Me.specifiedTradePaymentTermsField - End Get - Set - Me.specifiedTradePaymentTermsField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradeSettlementHeaderMonetarySummation() As TradeSettlementHeaderMonetarySummationType - Get - Return Me.specifiedTradeSettlementHeaderMonetarySummationField - End Get - Set - Me.specifiedTradeSettlementHeaderMonetarySummationField = Value - End Set - End Property - - ''' - Public Property InvoiceReferencedDocument() As ReferencedDocumentType - Get - Return Me.invoiceReferencedDocumentField - End Get - Set - Me.invoiceReferencedDocumentField = Value - End Set - End Property - - ''' - Public Property ReceivableSpecifiedTradeAccountingAccount() As TradeAccountingAccountType - Get - Return Me.receivableSpecifiedTradeAccountingAccountField - End Get - Set - Me.receivableSpecifiedTradeAccountingAccountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TextType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePartyType - - Private idField() As IDType - - Private globalIDField() As IDType - - Private nameField As TextType - - Private specifiedLegalOrganizationField As LegalOrganizationType - - Private postalTradeAddressField As TradeAddressType - - Private uRIUniversalCommunicationField As UniversalCommunicationType - - Private specifiedTaxRegistrationField() As TaxRegistrationType - - ''' - - Public Property ID() As IDType() - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - - Public Property GlobalID() As IDType() - Get - Return Me.globalIDField - End Get - Set - Me.globalIDField = Value - End Set - End Property - - ''' - Public Property Name() As TextType - Get - Return Me.nameField - End Get - Set - Me.nameField = Value - End Set - End Property - - ''' - Public Property SpecifiedLegalOrganization() As LegalOrganizationType - Get - Return Me.specifiedLegalOrganizationField - End Get - Set - Me.specifiedLegalOrganizationField = Value - End Set - End Property - - ''' - Public Property PostalTradeAddress() As TradeAddressType - Get - Return Me.postalTradeAddressField - End Get - Set - Me.postalTradeAddressField = Value - End Set - End Property - - ''' - Public Property URIUniversalCommunication() As UniversalCommunicationType - Get - Return Me.uRIUniversalCommunicationField - End Get - Set - Me.uRIUniversalCommunicationField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTaxRegistration() As TaxRegistrationType() - Get - Return Me.specifiedTaxRegistrationField - End Get - Set - Me.specifiedTaxRegistrationField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class LegalOrganizationType - - Private idField As IDType - - Private tradingBusinessNameField As TextType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - Public Property TradingBusinessName() As TextType - Get - Return Me.tradingBusinessNameField - End Get - Set - Me.tradingBusinessNameField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeAddressType - - Private postcodeCodeField As CodeType - - Private lineOneField As TextType - - Private lineTwoField As TextType - - Private lineThreeField As TextType - - Private cityNameField As TextType - - Private countryIDField As CountryIDType - - ''' - Public Property PostcodeCode() As CodeType - Get - Return Me.postcodeCodeField - End Get - Set - Me.postcodeCodeField = Value - End Set - End Property - - ''' - Public Property LineOne() As TextType - Get - Return Me.lineOneField - End Get - Set - Me.lineOneField = Value - End Set - End Property - - ''' - Public Property LineTwo() As TextType - Get - Return Me.lineTwoField - End Get - Set - Me.lineTwoField = Value - End Set - End Property - - ''' - Public Property LineThree() As TextType - Get - Return Me.lineThreeField - End Get - Set - Me.lineThreeField = Value - End Set - End Property - - ''' - Public Property CityName() As TextType - Get - Return Me.cityNameField - End Get - Set - Me.cityNameField = Value - End Set - End Property - - ''' - Public Property CountryID() As CountryIDType - Get - Return Me.countryIDField - End Get - Set - Me.countryIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CodeType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CountryIDType - - Private valueField As CountryIDContentType - - ''' - - Public Property Value() As CountryIDContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum CountryIDContentType - - ''' - - Item1A - - ''' - AD - - ''' - AE - - ''' - AF - - ''' - AG - - ''' - AI - - ''' - AL - - ''' - AM - - ''' - AO - - ''' - AQ - - ''' - AR - - ''' - [AS] - - ''' - AT - - ''' - AU - - ''' - AW - - ''' - AX - - ''' - AZ - - ''' - BA - - ''' - BB - - ''' - BD - - ''' - BE - - ''' - BF - - ''' - BG - - ''' - BH - - ''' - BI - - ''' - BJ - - ''' - BL - - ''' - BM - - ''' - BN - - ''' - BO - - ''' - BQ - - ''' - BR - - ''' - BS - - ''' - BT - - ''' - BV - - ''' - BW - - ''' - BY - - ''' - BZ - - ''' - CA - - ''' - CC - - ''' - CD - - ''' - CF - - ''' - CG - - ''' - CH - - ''' - CI - - ''' - CK - - ''' - CL - - ''' - CM - - ''' - CN - - ''' - CO - - ''' - CR - - ''' - CU - - ''' - CV - - ''' - CW - - ''' - CX - - ''' - CY - - ''' - CZ - - ''' - DE - - ''' - DJ - - ''' - DK - - ''' - DM - - ''' - [DO] - - ''' - DZ - - ''' - EC - - ''' - EE - - ''' - EG - - ''' - EH - - ''' - ER - - ''' - ES - - ''' - ET - - ''' - FI - - ''' - FJ - - ''' - FK - - ''' - FM - - ''' - FO - - ''' - FR - - ''' - GA - - ''' - GB - - ''' - GD - - ''' - GE - - ''' - GF - - ''' - GG - - ''' - GH - - ''' - GI - - ''' - GL - - ''' - GM - - ''' - GN - - ''' - GP - - ''' - GQ - - ''' - GR - - ''' - GS - - ''' - GT - - ''' - GU - - ''' - GW - - ''' - GY - - ''' - HK - - ''' - HM - - ''' - HN - - ''' - HR - - ''' - HT - - ''' - HU - - ''' - ID - - ''' - IE - - ''' - IL - - ''' - IM - - ''' - [IN] - - ''' - IO - - ''' - IQ - - ''' - IR - - ''' - [IS] - - ''' - IT - - ''' - JE - - ''' - JM - - ''' - JO - - ''' - JP - - ''' - KE - - ''' - KG - - ''' - KH - - ''' - KI - - ''' - KM - - ''' - KN - - ''' - KP - - ''' - KR - - ''' - KW - - ''' - KY - - ''' - KZ - - ''' - LA - - ''' - LB - - ''' - LC - - ''' - LI - - ''' - LK - - ''' - LR - - ''' - LS - - ''' - LT - - ''' - LU - - ''' - LV - - ''' - LY - - ''' - MA - - ''' - MC - - ''' - MD - - ''' - [ME] - - ''' - MF - - ''' - MG - - ''' - MH - - ''' - MK - - ''' - ML - - ''' - MM - - ''' - MN - - ''' - MO - - ''' - MP - - ''' - MQ - - ''' - MR - - ''' - MS - - ''' - MT - - ''' - MU - - ''' - MV - - ''' - MW - - ''' - MX - - ''' - MY - - ''' - MZ - - ''' - NA - - ''' - NC - - ''' - NE - - ''' - NF - - ''' - NG - - ''' - NI - - ''' - NL - - ''' - NO - - ''' - NP - - ''' - NR - - ''' - NU - - ''' - NZ - - ''' - OM - - ''' - PA - - ''' - PE - - ''' - PF - - ''' - PG - - ''' - PH - - ''' - PK - - ''' - PL - - ''' - PM - - ''' - PN - - ''' - PR - - ''' - PS - - ''' - PT - - ''' - PW - - ''' - PY - - ''' - QA - - ''' - RE - - ''' - RO - - ''' - RS - - ''' - RU - - ''' - RW - - ''' - SA - - ''' - SB - - ''' - SC - - ''' - SD - - ''' - SE - - ''' - SG - - ''' - SH - - ''' - SI - - ''' - SJ - - ''' - SK - - ''' - SL - - ''' - SM - - ''' - SN - - ''' - SO - - ''' - SR - - ''' - SS - - ''' - ST - - ''' - SV - - ''' - SX - - ''' - SY - - ''' - SZ - - ''' - TC - - ''' - TD - - ''' - TF - - ''' - TG - - ''' - TH - - ''' - TJ - - ''' - TK - - ''' - TL - - ''' - TM - - ''' - TN - - ''' - [TO] - - ''' - TR - - ''' - TT - - ''' - TV - - ''' - TW - - ''' - TZ - - ''' - UA - - ''' - UG - - ''' - UM - - ''' - US - - ''' - UY - - ''' - UZ - - ''' - VA - - ''' - VC - - ''' - VE - - ''' - VG - - ''' - VI - - ''' - VN - - ''' - VU - - ''' - WF - - ''' - WS - - ''' - YE - - ''' - YT - - ''' - ZA - - ''' - ZM - - ''' - ZW - End Enum - - ''' - - Partial Public Class UniversalCommunicationType - - Private uRIIDField As IDType - - ''' - Public Property URIID() As IDType - Get - Return Me.uRIIDField - End Get - Set - Me.uRIIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TaxRegistrationType - - Private idField As IDType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeTaxType - - Private calculatedAmountField As AmountType - - Private typeCodeField As TaxTypeCodeType - - Private exemptionReasonField As TextType - - Private basisAmountField As AmountType - - Private categoryCodeField As TaxCategoryCodeType - - Private exemptionReasonCodeField As CodeType - - Private dueDateTypeCodeField As TimeReferenceCodeType - - Private rateApplicablePercentField As PercentType - - ''' - Public Property CalculatedAmount() As AmountType - Get - Return Me.calculatedAmountField - End Get - Set - Me.calculatedAmountField = Value - End Set - End Property - - ''' - Public Property TypeCode() As TaxTypeCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - Public Property ExemptionReason() As TextType - Get - Return Me.exemptionReasonField - End Get - Set - Me.exemptionReasonField = Value - End Set - End Property - - ''' - Public Property BasisAmount() As AmountType - Get - Return Me.basisAmountField - End Get - Set - Me.basisAmountField = Value - End Set - End Property - - ''' - Public Property CategoryCode() As TaxCategoryCodeType - Get - Return Me.categoryCodeField - End Get - Set - Me.categoryCodeField = Value - End Set - End Property - - ''' - Public Property ExemptionReasonCode() As CodeType - Get - Return Me.exemptionReasonCodeField - End Get - Set - Me.exemptionReasonCodeField = Value - End Set - End Property - - ''' - Public Property DueDateTypeCode() As TimeReferenceCodeType - Get - Return Me.dueDateTypeCodeField - End Get - Set - Me.dueDateTypeCodeField = Value - End Set - End Property - - ''' - Public Property RateApplicablePercent() As PercentType - Get - Return Me.rateApplicablePercentField - End Get - Set - Me.rateApplicablePercentField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TaxTypeCodeType - - Private valueField As TaxTypeCodeContentType - - ''' - - Public Property Value() As TaxTypeCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum TaxTypeCodeContentType - - ''' - VAT - End Enum - - ''' - - Partial Public Class TaxCategoryCodeType - - Private valueField As TaxCategoryCodeContentType - - ''' - - Public Property Value() As TaxCategoryCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum TaxCategoryCodeContentType - - ''' - AE - - ''' - E - - ''' - G - - ''' - K - - ''' - L - - ''' - M - - ''' - O - - ''' - S - - ''' - Z - End Enum - - ''' - - Partial Public Class TimeReferenceCodeType - - Private valueField As TimeReferenceCodeContentType - - ''' - - Public Property Value() As TimeReferenceCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum TimeReferenceCodeContentType - - ''' - - Item5 - - ''' - - Item29 - - ''' - - Item72 - End Enum - - ''' - - Partial Public Class PercentType - - Private valueField As Decimal - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeAllowanceChargeType - - Private chargeIndicatorField As IndicatorType - - Private calculationPercentField As PercentType - - Private basisAmountField As AmountType - - Private actualAmountField As AmountType - - Private reasonCodeField As AllowanceChargeReasonCodeType - - Private reasonField As TextType - - Private categoryTradeTaxField As TradeTaxType - - ''' - Public Property ChargeIndicator() As IndicatorType - Get - Return Me.chargeIndicatorField - End Get - Set - Me.chargeIndicatorField = Value - End Set - End Property - - ''' - Public Property CalculationPercent() As PercentType - Get - Return Me.calculationPercentField - End Get - Set - Me.calculationPercentField = Value - End Set - End Property - - ''' - Public Property BasisAmount() As AmountType - Get - Return Me.basisAmountField - End Get - Set - Me.basisAmountField = Value - End Set - End Property - - ''' - Public Property ActualAmount() As AmountType - Get - Return Me.actualAmountField - End Get - Set - Me.actualAmountField = Value - End Set - End Property - - ''' - Public Property ReasonCode() As AllowanceChargeReasonCodeType - Get - Return Me.reasonCodeField - End Get - Set - Me.reasonCodeField = Value - End Set - End Property - - ''' - Public Property Reason() As TextType - Get - Return Me.reasonField - End Get - Set - Me.reasonField = Value - End Set - End Property - - ''' - Public Property CategoryTradeTax() As TradeTaxType - Get - Return Me.categoryTradeTaxField - End Get - Set - Me.categoryTradeTaxField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class IndicatorType - - Private itemField As Boolean - - ''' - - Public Property Item() As Boolean - Get - Return Me.itemField - End Get - Set - Me.itemField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class AllowanceChargeReasonCodeType - - Private valueField As AllowanceChargeReasonCodeContentType - - ''' - - Public Property Value() As AllowanceChargeReasonCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum AllowanceChargeReasonCodeContentType - - ''' - AA - - ''' - AAA - - ''' - AAC - - ''' - AAD - - ''' - AAE - - ''' - AAF - - ''' - AAH - - ''' - AAI - - ''' - AAS - - ''' - AAT - - ''' - AAV - - ''' - AAY - - ''' - AAZ - - ''' - ABA - - ''' - ABB - - ''' - ABC - - ''' - ABD - - ''' - ABF - - ''' - ABK - - ''' - ABL - - ''' - ABN - - ''' - ABR - - ''' - ABS - - ''' - ABT - - ''' - ABU - - ''' - ACF - - ''' - ACG - - ''' - ACH - - ''' - ACI - - ''' - ACJ - - ''' - ACK - - ''' - ACL - - ''' - ACM - - ''' - ACS - - ''' - ADC - - ''' - ADE - - ''' - ADJ - - ''' - ADK - - ''' - ADL - - ''' - ADM - - ''' - ADN - - ''' - ADO - - ''' - ADP - - ''' - ADQ - - ''' - ADR - - ''' - ADT - - ''' - ADW - - ''' - ADY - - ''' - ADZ - - ''' - AEA - - ''' - AEB - - ''' - AEC - - ''' - AED - - ''' - AEF - - ''' - AEH - - ''' - AEI - - ''' - AEJ - - ''' - AEK - - ''' - AEL - - ''' - AEM - - ''' - AEN - - ''' - AEO - - ''' - AEP - - ''' - AES - - ''' - AET - - ''' - AEU - - ''' - AEV - - ''' - AEW - - ''' - AEX - - ''' - AEY - - ''' - AEZ - - ''' - AJ - - ''' - AU - - ''' - CA - - ''' - CAB - - ''' - CAD - - ''' - CAE - - ''' - CAF - - ''' - CAI - - ''' - CAJ - - ''' - CAK - - ''' - CAL - - ''' - CAM - - ''' - CAN - - ''' - CAO - - ''' - CAP - - ''' - CAQ - - ''' - CAR - - ''' - CAS - - ''' - CAT - - ''' - CAU - - ''' - CAV - - ''' - CAW - - ''' - CAX - - ''' - CAY - - ''' - CAZ - - ''' - CD - - ''' - CG - - ''' - CS - - ''' - CT - - ''' - DAB - - ''' - DAC - - ''' - DAD - - ''' - DAF - - ''' - DAG - - ''' - DAH - - ''' - DAI - - ''' - DAJ - - ''' - DAK - - ''' - DAL - - ''' - DAM - - ''' - DAN - - ''' - DAO - - ''' - DAP - - ''' - DAQ - - ''' - DL - - ''' - EG - - ''' - EP - - ''' - ER - - ''' - FAA - - ''' - FAB - - ''' - FAC - - ''' - FC - - ''' - FH - - ''' - FI - - ''' - GAA - - ''' - HAA - - ''' - HD - - ''' - HH - - ''' - IAA - - ''' - IAB - - ''' - ID - - ''' - [IF] - - ''' - IR - - ''' - [IS] - - ''' - KO - - ''' - L1 - - ''' - LA - - ''' - LAA - - ''' - LAB - - ''' - LF - - ''' - MAE - - ''' - MI - - ''' - ML - - ''' - NAA - - ''' - OA - - ''' - PA - - ''' - PAA - - ''' - PC - - ''' - PL - - ''' - RAB - - ''' - RAC - - ''' - RAD - - ''' - RAF - - ''' - RE - - ''' - RF - - ''' - RH - - ''' - RV - - ''' - SA - - ''' - SAA - - ''' - SAD - - ''' - SAE - - ''' - SAI - - ''' - SG - - ''' - SH - - ''' - SM - - ''' - SU - - ''' - TAB - - ''' - TAC - - ''' - TT - - ''' - TV - - ''' - V1 - - ''' - V2 - - ''' - WH - - ''' - XAA - - ''' - YY - - ''' - ZZZ - - ''' - - Item41 - - ''' - - Item42 - - ''' - - Item60 - - ''' - - Item62 - - ''' - - Item63 - - ''' - - Item64 - - ''' - - Item65 - - ''' - - Item66 - - ''' - - Item67 - - ''' - - Item68 - - ''' - - Item70 - - ''' - - Item71 - - ''' - - Item88 - - ''' - - Item95 - - ''' - - Item100 - - ''' - - Item102 - - ''' - - Item103 - - ''' - - Item104 - - ''' - - Item105 - End Enum - - ''' - - Partial Public Class ReferencedDocumentType - - Private issuerAssignedIDField As IDType - - Private formattedIssueDateTimeField As FormattedDateTimeType - - ''' - Public Property IssuerAssignedID() As IDType - Get - Return Me.issuerAssignedIDField - End Get - Set - Me.issuerAssignedIDField = Value - End Set - End Property - - ''' - Public Property FormattedIssueDateTime() As FormattedDateTimeType - Get - Return Me.formattedIssueDateTimeField - End Get - Set - Me.formattedIssueDateTimeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class FormattedDateTimeType - - Private dateTimeStringField As FormattedDateTimeTypeDateTimeString - - ''' - Public Property DateTimeString() As FormattedDateTimeTypeDateTimeString - Get - Return Me.dateTimeStringField - End Get - Set - Me.dateTimeStringField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class FormattedDateTimeTypeDateTimeString - - Private formatField As String - - Private valueField As String - - ''' - - Public Property format() As String - Get - Return Me.formatField - End Get - Set - Me.formatField = Value - End Set - End Property - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainEventType - - Private occurrenceDateTimeField As DateTimeType - - ''' - Public Property OccurrenceDateTime() As DateTimeType - Get - Return Me.occurrenceDateTimeField - End Get - Set - Me.occurrenceDateTimeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class HeaderTradeDeliveryType - - Private shipToTradePartyField As TradePartyType - - Private actualDeliverySupplyChainEventField As SupplyChainEventType - - Private despatchAdviceReferencedDocumentField As ReferencedDocumentType - - ''' - Public Property ShipToTradeParty() As TradePartyType - Get - Return Me.shipToTradePartyField - End Get - Set - Me.shipToTradePartyField = Value - End Set - End Property - - ''' - Public Property ActualDeliverySupplyChainEvent() As SupplyChainEventType - Get - Return Me.actualDeliverySupplyChainEventField - End Get - Set - Me.actualDeliverySupplyChainEventField = Value - End Set - End Property - - ''' - Public Property DespatchAdviceReferencedDocument() As ReferencedDocumentType - Get - Return Me.despatchAdviceReferencedDocumentField - End Get - Set - Me.despatchAdviceReferencedDocumentField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class HeaderTradeAgreementType - - Private buyerReferenceField As TextType - - Private sellerTradePartyField As TradePartyType - - Private buyerTradePartyField As TradePartyType - - Private sellerTaxRepresentativeTradePartyField As TradePartyType - - Private buyerOrderReferencedDocumentField As ReferencedDocumentType - - Private contractReferencedDocumentField As ReferencedDocumentType - - ''' - Public Property BuyerReference() As TextType - Get - Return Me.buyerReferenceField - End Get - Set - Me.buyerReferenceField = Value - End Set - End Property - - ''' - Public Property SellerTradeParty() As TradePartyType - Get - Return Me.sellerTradePartyField - End Get - Set - Me.sellerTradePartyField = Value - End Set - End Property - - ''' - Public Property BuyerTradeParty() As TradePartyType - Get - Return Me.buyerTradePartyField - End Get - Set - Me.buyerTradePartyField = Value - End Set - End Property - - ''' - Public Property SellerTaxRepresentativeTradeParty() As TradePartyType - Get - Return Me.sellerTaxRepresentativeTradePartyField - End Get - Set - Me.sellerTaxRepresentativeTradePartyField = Value - End Set - End Property - - ''' - Public Property BuyerOrderReferencedDocument() As ReferencedDocumentType - Get - Return Me.buyerOrderReferencedDocumentField - End Get - Set - Me.buyerOrderReferencedDocumentField = Value - End Set - End Property - - ''' - Public Property ContractReferencedDocument() As ReferencedDocumentType - Get - Return Me.contractReferencedDocumentField - End Get - Set - Me.contractReferencedDocumentField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeSettlementLineMonetarySummationType - - Private lineTotalAmountField As AmountType - - ''' - Public Property LineTotalAmount() As AmountType - Get - Return Me.lineTotalAmountField - End Get - Set - Me.lineTotalAmountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class LineTradeSettlementType - - Private applicableTradeTaxField As TradeTaxType - - Private specifiedTradeAllowanceChargeField() As TradeAllowanceChargeType - - Private specifiedTradeSettlementLineMonetarySummationField As TradeSettlementLineMonetarySummationType - - ''' - Public Property ApplicableTradeTax() As TradeTaxType - Get - Return Me.applicableTradeTaxField - End Get - Set - Me.applicableTradeTaxField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTradeAllowanceCharge() As TradeAllowanceChargeType() - Get - Return Me.specifiedTradeAllowanceChargeField - End Get - Set - Me.specifiedTradeAllowanceChargeField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradeSettlementLineMonetarySummation() As TradeSettlementLineMonetarySummationType - Get - Return Me.specifiedTradeSettlementLineMonetarySummationField - End Get - Set - Me.specifiedTradeSettlementLineMonetarySummationField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class LineTradeDeliveryType - - Private billedQuantityField As QuantityType - - ''' - Public Property BilledQuantity() As QuantityType - Get - Return Me.billedQuantityField - End Get - Set - Me.billedQuantityField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class QuantityType - - Private unitCodeField As String - - Private valueField As Decimal - - ''' - - Public Property unitCode() As String - Get - Return Me.unitCodeField - End Get - Set - Me.unitCodeField = Value - End Set - End Property - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePriceType - - Private chargeAmountField As AmountType - - Private basisQuantityField As QuantityType - - ''' - Public Property ChargeAmount() As AmountType - Get - Return Me.chargeAmountField - End Get - Set - Me.chargeAmountField = Value - End Set - End Property - - ''' - Public Property BasisQuantity() As QuantityType - Get - Return Me.basisQuantityField - End Get - Set - Me.basisQuantityField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class LineTradeAgreementType - - Private netPriceProductTradePriceField As TradePriceType - - ''' - Public Property NetPriceProductTradePrice() As TradePriceType - Get - Return Me.netPriceProductTradePriceField - End Get - Set - Me.netPriceProductTradePriceField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeProductType - - Private globalIDField As IDType - - Private nameField As TextType - - ''' - Public Property GlobalID() As IDType - Get - Return Me.globalIDField - End Get - Set - Me.globalIDField = Value - End Set - End Property - - ''' - Public Property Name() As TextType - Get - Return Me.nameField - End Get - Set - Me.nameField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DocumentLineDocumentType - - Private lineIDField As IDType - - ''' - Public Property LineID() As IDType - Get - Return Me.lineIDField - End Get - Set - Me.lineIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainTradeLineItemType - - Private associatedDocumentLineDocumentField As DocumentLineDocumentType - - Private specifiedTradeProductField As TradeProductType - - Private specifiedLineTradeAgreementField As LineTradeAgreementType - - Private specifiedLineTradeDeliveryField As LineTradeDeliveryType - - Private specifiedLineTradeSettlementField As LineTradeSettlementType - - ''' - Public Property AssociatedDocumentLineDocument() As DocumentLineDocumentType - Get - Return Me.associatedDocumentLineDocumentField - End Get - Set - Me.associatedDocumentLineDocumentField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradeProduct() As TradeProductType - Get - Return Me.specifiedTradeProductField - End Get - Set - Me.specifiedTradeProductField = Value - End Set - End Property - - ''' - Public Property SpecifiedLineTradeAgreement() As LineTradeAgreementType - Get - Return Me.specifiedLineTradeAgreementField - End Get - Set - Me.specifiedLineTradeAgreementField = Value - End Set - End Property - - ''' - Public Property SpecifiedLineTradeDelivery() As LineTradeDeliveryType - Get - Return Me.specifiedLineTradeDeliveryField - End Get - Set - Me.specifiedLineTradeDeliveryField = Value - End Set - End Property - - ''' - Public Property SpecifiedLineTradeSettlement() As LineTradeSettlementType - Get - Return Me.specifiedLineTradeSettlementField - End Get - Set - Me.specifiedLineTradeSettlementField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainTradeTransactionType - - Private includedSupplyChainTradeLineItemField() As SupplyChainTradeLineItemType - - Private applicableHeaderTradeAgreementField As HeaderTradeAgreementType - - Private applicableHeaderTradeDeliveryField As HeaderTradeDeliveryType - - Private applicableHeaderTradeSettlementField As HeaderTradeSettlementType - - ''' - - Public Property IncludedSupplyChainTradeLineItem() As SupplyChainTradeLineItemType() - Get - Return Me.includedSupplyChainTradeLineItemField - End Get - Set - Me.includedSupplyChainTradeLineItemField = Value - End Set - End Property - - ''' - Public Property ApplicableHeaderTradeAgreement() As HeaderTradeAgreementType - Get - Return Me.applicableHeaderTradeAgreementField - End Get - Set - Me.applicableHeaderTradeAgreementField = Value - End Set - End Property - - ''' - Public Property ApplicableHeaderTradeDelivery() As HeaderTradeDeliveryType - Get - Return Me.applicableHeaderTradeDeliveryField - End Get - Set - Me.applicableHeaderTradeDeliveryField = Value - End Set - End Property - - ''' - Public Property ApplicableHeaderTradeSettlement() As HeaderTradeSettlementType - Get - Return Me.applicableHeaderTradeSettlementField - End Get - Set - Me.applicableHeaderTradeSettlementField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class NoteType - - Private contentField As TextType - - Private subjectCodeField As CodeType - - ''' - Public Property Content() As TextType - Get - Return Me.contentField - End Get - Set - Me.contentField = Value - End Set - End Property - - ''' - Public Property SubjectCode() As CodeType - Get - Return Me.subjectCodeField - End Get - Set - Me.subjectCodeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DocumentCodeType - - Private valueField As DocumentCodeContentType - - ''' - - Public Property Value() As DocumentCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum DocumentCodeContentType - - ''' - - Item80 - - ''' - - Item81 - - ''' - - Item82 - - ''' - - Item83 - - ''' - - Item84 - - ''' - - Item130 - - ''' - - Item202 - - ''' - - Item203 - - ''' - - Item204 - - ''' - - Item211 - - ''' - - Item261 - - ''' - - Item262 - - ''' - - Item295 - - ''' - - Item296 - - ''' - - Item308 - - ''' - - Item325 - - ''' - - Item326 - - ''' - - Item380 - - ''' - - Item381 - - ''' - - Item383 - - ''' - - Item384 - - ''' - - Item385 - - ''' - - Item386 - - ''' - - Item387 - - ''' - - Item388 - - ''' - - Item389 - - ''' - - Item390 - - ''' - - Item393 - - ''' - - Item394 - - ''' - - Item395 - - ''' - - Item396 - - ''' - - Item420 - - ''' - - Item456 - - ''' - - Item457 - - ''' - - Item458 - - ''' - - Item527 - - ''' - - Item575 - - ''' - - Item623 - - ''' - - Item633 - - ''' - - Item751 - - ''' - - Item780 - - ''' - - Item935 - End Enum - - ''' - - Partial Public Class ExchangedDocumentType - - Private idField As IDType - - Private typeCodeField As DocumentCodeType - - Private issueDateTimeField As DateTimeType - - Private includedNoteField() As NoteType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - Public Property TypeCode() As DocumentCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - Public Property IssueDateTime() As DateTimeType - Get - Return Me.issueDateTimeField - End Get - Set - Me.issueDateTimeField = Value - End Set - End Property - - ''' - - Public Property IncludedNote() As NoteType() - Get - Return Me.includedNoteField - End Get - Set - Me.includedNoteField = Value - End Set - End Property - End Class - -End Namespace \ No newline at end of file diff --git a/Modules.Interfaces/ZUGFeRDInterface/Version2.2_FacturX/CrossIndustryInvoiceType.vb b/Modules.Interfaces/ZUGFeRDInterface/Version2.2_FacturX/CrossIndustryInvoiceType.vb deleted file mode 100644 index 61d654b2..00000000 --- a/Modules.Interfaces/ZUGFeRDInterface/Version2.2_FacturX/CrossIndustryInvoiceType.vb +++ /dev/null @@ -1,4427 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict Off -Option Explicit On - -' -'This source code was auto-generated by xsd, Version=4.6.1055.0. -'Source: Factur-X_1.0.06_BASIC_XSD - -Namespace ZUGFeRD.Version2_2_FacturX - ''' - - Partial Public Class CrossIndustryInvoiceType - - Private exchangedDocumentContextField As ExchangedDocumentContextType - - Private exchangedDocumentField As ExchangedDocumentType - - Private supplyChainTradeTransactionField As SupplyChainTradeTransactionType - - ''' - Public Property ExchangedDocumentContext() As ExchangedDocumentContextType - Get - Return Me.exchangedDocumentContextField - End Get - Set - Me.exchangedDocumentContextField = Value - End Set - End Property - - ''' - Public Property ExchangedDocument() As ExchangedDocumentType - Get - Return Me.exchangedDocumentField - End Get - Set - Me.exchangedDocumentField = Value - End Set - End Property - - ''' - Public Property SupplyChainTradeTransaction() As SupplyChainTradeTransactionType - Get - Return Me.supplyChainTradeTransactionField - End Get - Set - Me.supplyChainTradeTransactionField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class ExchangedDocumentContextType - - Private businessProcessSpecifiedDocumentContextParameterField As DocumentContextParameterType - - Private guidelineSpecifiedDocumentContextParameterField As DocumentContextParameterType - - ''' - Public Property BusinessProcessSpecifiedDocumentContextParameter() As DocumentContextParameterType - Get - Return Me.businessProcessSpecifiedDocumentContextParameterField - End Get - Set - Me.businessProcessSpecifiedDocumentContextParameterField = Value - End Set - End Property - - ''' - Public Property GuidelineSpecifiedDocumentContextParameter() As DocumentContextParameterType - Get - Return Me.guidelineSpecifiedDocumentContextParameterField - End Get - Set - Me.guidelineSpecifiedDocumentContextParameterField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DocumentContextParameterType - - Private idField As IDType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class IDType - - Private schemeIDField As String - - Private valueField As String - - ''' - - Public Property schemeID() As String - Get - Return Me.schemeIDField - End Get - Set - Me.schemeIDField = Value - End Set - End Property - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeAccountingAccountType - - Private idField As IDType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeSettlementHeaderMonetarySummationType - - Private lineTotalAmountField As AmountType - - Private chargeTotalAmountField As AmountType - - Private allowanceTotalAmountField As AmountType - - Private taxBasisTotalAmountField As AmountType - - Private taxTotalAmountField() As AmountType - - Private grandTotalAmountField As AmountType - - Private totalPrepaidAmountField As AmountType - - Private duePayableAmountField As AmountType - - ''' - Public Property LineTotalAmount() As AmountType - Get - Return Me.lineTotalAmountField - End Get - Set - Me.lineTotalAmountField = Value - End Set - End Property - - ''' - Public Property ChargeTotalAmount() As AmountType - Get - Return Me.chargeTotalAmountField - End Get - Set - Me.chargeTotalAmountField = Value - End Set - End Property - - ''' - Public Property AllowanceTotalAmount() As AmountType - Get - Return Me.allowanceTotalAmountField - End Get - Set - Me.allowanceTotalAmountField = Value - End Set - End Property - - ''' - Public Property TaxBasisTotalAmount() As AmountType - Get - Return Me.taxBasisTotalAmountField - End Get - Set - Me.taxBasisTotalAmountField = Value - End Set - End Property - - ''' - - Public Property TaxTotalAmount() As AmountType() - Get - Return Me.taxTotalAmountField - End Get - Set - Me.taxTotalAmountField = Value - End Set - End Property - - ''' - Public Property GrandTotalAmount() As AmountType - Get - Return Me.grandTotalAmountField - End Get - Set - Me.grandTotalAmountField = Value - End Set - End Property - - ''' - Public Property TotalPrepaidAmount() As AmountType - Get - Return Me.totalPrepaidAmountField - End Get - Set - Me.totalPrepaidAmountField = Value - End Set - End Property - - ''' - Public Property DuePayableAmount() As AmountType - Get - Return Me.duePayableAmountField - End Get - Set - Me.duePayableAmountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class AmountType - - Private currencyIDField As String - - Private valueField As Decimal - - ''' - - Public Property currencyID() As String - Get - Return Me.currencyIDField - End Get - Set - Me.currencyIDField = Value - End Set - End Property - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePaymentTermsType - - Private descriptionField As TextType - - Private dueDateDateTimeField As DateTimeType - - Private directDebitMandateIDField As IDType - - ''' - Public Property Description() As TextType - Get - Return Me.descriptionField - End Get - Set - Me.descriptionField = Value - End Set - End Property - - ''' - Public Property DueDateDateTime() As DateTimeType - Get - Return Me.dueDateDateTimeField - End Get - Set - Me.dueDateDateTimeField = Value - End Set - End Property - - ''' - Public Property DirectDebitMandateID() As IDType - Get - Return Me.directDebitMandateIDField - End Get - Set - Me.directDebitMandateIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TextType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DateTimeType - - Private itemField As DateTimeTypeDateTimeString - - ''' - - Public Property Item() As DateTimeTypeDateTimeString - Get - Return Me.itemField - End Get - Set - Me.itemField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DateTimeTypeDateTimeString - - Private formatField As String - - Private valueField As String - - ''' - - Public Property format() As String - Get - Return Me.formatField - End Get - Set - Me.formatField = Value - End Set - End Property - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CreditorFinancialAccountType - - Private iBANIDField As IDType - - Private proprietaryIDField As IDType - - ''' - Public Property IBANID() As IDType - Get - Return Me.iBANIDField - End Get - Set - Me.iBANIDField = Value - End Set - End Property - - ''' - Public Property ProprietaryID() As IDType - Get - Return Me.proprietaryIDField - End Get - Set - Me.proprietaryIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DebtorFinancialAccountType - - Private iBANIDField As IDType - - ''' - Public Property IBANID() As IDType - Get - Return Me.iBANIDField - End Get - Set - Me.iBANIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class PaymentMeansCodeType - - Private valueField As PaymentMeansCodeContentType - - ''' - - Public Property Value() As PaymentMeansCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum PaymentMeansCodeContentType - - ''' - - Item10 - - ''' - - Item20 - - ''' - - Item30 - - ''' - - Item42 - - ''' - - Item48 - - ''' - - Item49 - - ''' - - Item57 - - ''' - - Item58 - - ''' - - Item59 - - ''' - - Item97 - - ''' - ZZZ - End Enum - - ''' - - Partial Public Class TradeSettlementPaymentMeansType - - Private typeCodeField As PaymentMeansCodeType - - Private payerPartyDebtorFinancialAccountField As DebtorFinancialAccountType - - Private payeePartyCreditorFinancialAccountField As CreditorFinancialAccountType - - ''' - Public Property TypeCode() As PaymentMeansCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - Public Property PayerPartyDebtorFinancialAccount() As DebtorFinancialAccountType - Get - Return Me.payerPartyDebtorFinancialAccountField - End Get - Set - Me.payerPartyDebtorFinancialAccountField = Value - End Set - End Property - - ''' - Public Property PayeePartyCreditorFinancialAccount() As CreditorFinancialAccountType - Get - Return Me.payeePartyCreditorFinancialAccountField - End Get - Set - Me.payeePartyCreditorFinancialAccountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CurrencyCodeType - - Private valueField As CurrencyCodeContentType - - ''' - - Public Property Value() As CurrencyCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum CurrencyCodeContentType - - ''' - AED - - ''' - AFN - - ''' - ALL - - ''' - AMD - - ''' - ANG - - ''' - AOA - - ''' - ARS - - ''' - AUD - - ''' - AWG - - ''' - AZN - - ''' - BAM - - ''' - BBD - - ''' - BDT - - ''' - BGN - - ''' - BHD - - ''' - BIF - - ''' - BMD - - ''' - BND - - ''' - BOB - - ''' - BOV - - ''' - BRL - - ''' - BSD - - ''' - BTN - - ''' - BWP - - ''' - BYN - - ''' - BZD - - ''' - CAD - - ''' - CDF - - ''' - CHE - - ''' - CHF - - ''' - CHW - - ''' - CLF - - ''' - CLP - - ''' - CNY - - ''' - COP - - ''' - COU - - ''' - CRC - - ''' - CUC - - ''' - CUP - - ''' - CVE - - ''' - CZK - - ''' - DJF - - ''' - DKK - - ''' - DOP - - ''' - DZD - - ''' - EGP - - ''' - ERN - - ''' - ETB - - ''' - EUR - - ''' - FJD - - ''' - FKP - - ''' - GBP - - ''' - GEL - - ''' - GHS - - ''' - GIP - - ''' - GMD - - ''' - GNF - - ''' - GTQ - - ''' - GYD - - ''' - HKD - - ''' - HNL - - ''' - HRK - - ''' - HTG - - ''' - HUF - - ''' - IDR - - ''' - ILS - - ''' - INR - - ''' - IQD - - ''' - IRR - - ''' - ISK - - ''' - JMD - - ''' - JOD - - ''' - JPY - - ''' - KES - - ''' - KGS - - ''' - KHR - - ''' - KMF - - ''' - KPW - - ''' - KRW - - ''' - KWD - - ''' - KYD - - ''' - KZT - - ''' - LAK - - ''' - LBP - - ''' - LKR - - ''' - LRD - - ''' - LSL - - ''' - LYD - - ''' - MAD - - ''' - MDL - - ''' - MGA - - ''' - MKD - - ''' - MMK - - ''' - MNT - - ''' - MOP - - ''' - MRU - - ''' - MUR - - ''' - MVR - - ''' - MWK - - ''' - MXN - - ''' - MXV - - ''' - MYR - - ''' - MZN - - ''' - NAD - - ''' - NGN - - ''' - NIO - - ''' - NOK - - ''' - NPR - - ''' - NZD - - ''' - OMR - - ''' - PAB - - ''' - PEN - - ''' - PGK - - ''' - PHP - - ''' - PKR - - ''' - PLN - - ''' - PYG - - ''' - QAR - - ''' - RON - - ''' - RSD - - ''' - RUB - - ''' - RWF - - ''' - SAR - - ''' - SBD - - ''' - SCR - - ''' - SDG - - ''' - SEK - - ''' - SGD - - ''' - SHP - - ''' - SLL - - ''' - SOS - - ''' - SRD - - ''' - SSP - - ''' - STN - - ''' - SVC - - ''' - SYP - - ''' - SZL - - ''' - THB - - ''' - TJS - - ''' - TMT - - ''' - TND - - ''' - TOP - - ''' - [TRY] - - ''' - TTD - - ''' - TWD - - ''' - TZS - - ''' - UAH - - ''' - UGX - - ''' - USD - - ''' - USN - - ''' - UYI - - ''' - UYU - - ''' - UYW - - ''' - UZS - - ''' - VES - - ''' - VND - - ''' - VUV - - ''' - WST - - ''' - XAF - - ''' - XAG - - ''' - XAU - - ''' - XBA - - ''' - XBB - - ''' - XBC - - ''' - XBD - - ''' - XCD - - ''' - XDR - - ''' - XOF - - ''' - XPD - - ''' - XPF - - ''' - XPT - - ''' - XSU - - ''' - XTS - - ''' - XUA - - ''' - XXX - - ''' - YER - - ''' - ZAR - - ''' - ZMW - - ''' - ZWL - End Enum - - ''' - - Partial Public Class HeaderTradeSettlementType - - Private creditorReferenceIDField As IDType - - Private paymentReferenceField As TextType - - Private taxCurrencyCodeField As CurrencyCodeType - - Private invoiceCurrencyCodeField As CurrencyCodeType - - Private payeeTradePartyField As TradePartyType - - Private specifiedTradeSettlementPaymentMeansField As TradeSettlementPaymentMeansType - - Private applicableTradeTaxField() As TradeTaxType - - Private billingSpecifiedPeriodField As SpecifiedPeriodType - - Private specifiedTradeAllowanceChargeField() As TradeAllowanceChargeType - - Private specifiedTradePaymentTermsField As TradePaymentTermsType - - Private specifiedTradeSettlementHeaderMonetarySummationField As TradeSettlementHeaderMonetarySummationType - - Private invoiceReferencedDocumentField As ReferencedDocumentType - - Private receivableSpecifiedTradeAccountingAccountField As TradeAccountingAccountType - - ''' - Public Property CreditorReferenceID() As IDType - Get - Return Me.creditorReferenceIDField - End Get - Set - Me.creditorReferenceIDField = Value - End Set - End Property - - ''' - Public Property PaymentReference() As TextType - Get - Return Me.paymentReferenceField - End Get - Set - Me.paymentReferenceField = Value - End Set - End Property - - ''' - Public Property TaxCurrencyCode() As CurrencyCodeType - Get - Return Me.taxCurrencyCodeField - End Get - Set - Me.taxCurrencyCodeField = Value - End Set - End Property - - ''' - Public Property InvoiceCurrencyCode() As CurrencyCodeType - Get - Return Me.invoiceCurrencyCodeField - End Get - Set - Me.invoiceCurrencyCodeField = Value - End Set - End Property - - ''' - Public Property PayeeTradeParty() As TradePartyType - Get - Return Me.payeeTradePartyField - End Get - Set - Me.payeeTradePartyField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradeSettlementPaymentMeans() As TradeSettlementPaymentMeansType - Get - Return Me.specifiedTradeSettlementPaymentMeansField - End Get - Set - Me.specifiedTradeSettlementPaymentMeansField = Value - End Set - End Property - - ''' - - Public Property ApplicableTradeTax() As TradeTaxType() - Get - Return Me.applicableTradeTaxField - End Get - Set - Me.applicableTradeTaxField = Value - End Set - End Property - - ''' - Public Property BillingSpecifiedPeriod() As SpecifiedPeriodType - Get - Return Me.billingSpecifiedPeriodField - End Get - Set - Me.billingSpecifiedPeriodField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTradeAllowanceCharge() As TradeAllowanceChargeType() - Get - Return Me.specifiedTradeAllowanceChargeField - End Get - Set - Me.specifiedTradeAllowanceChargeField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradePaymentTerms() As TradePaymentTermsType - Get - Return Me.specifiedTradePaymentTermsField - End Get - Set - Me.specifiedTradePaymentTermsField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradeSettlementHeaderMonetarySummation() As TradeSettlementHeaderMonetarySummationType - Get - Return Me.specifiedTradeSettlementHeaderMonetarySummationField - End Get - Set - Me.specifiedTradeSettlementHeaderMonetarySummationField = Value - End Set - End Property - - ''' - Public Property InvoiceReferencedDocument() As ReferencedDocumentType - Get - Return Me.invoiceReferencedDocumentField - End Get - Set - Me.invoiceReferencedDocumentField = Value - End Set - End Property - - ''' - Public Property ReceivableSpecifiedTradeAccountingAccount() As TradeAccountingAccountType - Get - Return Me.receivableSpecifiedTradeAccountingAccountField - End Get - Set - Me.receivableSpecifiedTradeAccountingAccountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePartyType - - Private idField() As IDType - - Private globalIDField() As IDType - - Private nameField As TextType - - Private specifiedLegalOrganizationField As LegalOrganizationType - - Private postalTradeAddressField As TradeAddressType - - Private uRIUniversalCommunicationField As UniversalCommunicationType - - Private specifiedTaxRegistrationField() As TaxRegistrationType - - ''' - - Public Property ID() As IDType() - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - - Public Property GlobalID() As IDType() - Get - Return Me.globalIDField - End Get - Set - Me.globalIDField = Value - End Set - End Property - - ''' - Public Property Name() As TextType - Get - Return Me.nameField - End Get - Set - Me.nameField = Value - End Set - End Property - - ''' - Public Property SpecifiedLegalOrganization() As LegalOrganizationType - Get - Return Me.specifiedLegalOrganizationField - End Get - Set - Me.specifiedLegalOrganizationField = Value - End Set - End Property - - ''' - Public Property PostalTradeAddress() As TradeAddressType - Get - Return Me.postalTradeAddressField - End Get - Set - Me.postalTradeAddressField = Value - End Set - End Property - - ''' - Public Property URIUniversalCommunication() As UniversalCommunicationType - Get - Return Me.uRIUniversalCommunicationField - End Get - Set - Me.uRIUniversalCommunicationField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTaxRegistration() As TaxRegistrationType() - Get - Return Me.specifiedTaxRegistrationField - End Get - Set - Me.specifiedTaxRegistrationField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class LegalOrganizationType - - Private idField As IDType - - Private tradingBusinessNameField As TextType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - Public Property TradingBusinessName() As TextType - Get - Return Me.tradingBusinessNameField - End Get - Set - Me.tradingBusinessNameField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeAddressType - - Private postcodeCodeField As CodeType - - Private lineOneField As TextType - - Private lineTwoField As TextType - - Private lineThreeField As TextType - - Private cityNameField As TextType - - Private countryIDField As CountryIDType - - Private countrySubDivisionNameField As TextType - - ''' - Public Property PostcodeCode() As CodeType - Get - Return Me.postcodeCodeField - End Get - Set - Me.postcodeCodeField = Value - End Set - End Property - - ''' - Public Property LineOne() As TextType - Get - Return Me.lineOneField - End Get - Set - Me.lineOneField = Value - End Set - End Property - - ''' - Public Property LineTwo() As TextType - Get - Return Me.lineTwoField - End Get - Set - Me.lineTwoField = Value - End Set - End Property - - ''' - Public Property LineThree() As TextType - Get - Return Me.lineThreeField - End Get - Set - Me.lineThreeField = Value - End Set - End Property - - ''' - Public Property CityName() As TextType - Get - Return Me.cityNameField - End Get - Set - Me.cityNameField = Value - End Set - End Property - - ''' - Public Property CountryID() As CountryIDType - Get - Return Me.countryIDField - End Get - Set - Me.countryIDField = Value - End Set - End Property - - ''' - Public Property CountrySubDivisionName() As TextType - Get - Return Me.countrySubDivisionNameField - End Get - Set - Me.countrySubDivisionNameField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CodeType - - Private valueField As String - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class CountryIDType - - Private valueField As CountryIDContentType - - ''' - - Public Property Value() As CountryIDContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum CountryIDContentType - - ''' - - Item1A - - ''' - AD - - ''' - AE - - ''' - AF - - ''' - AG - - ''' - AI - - ''' - AL - - ''' - AM - - ''' - AO - - ''' - AQ - - ''' - AR - - ''' - [AS] - - ''' - AT - - ''' - AU - - ''' - AW - - ''' - AX - - ''' - AZ - - ''' - BA - - ''' - BB - - ''' - BD - - ''' - BE - - ''' - BF - - ''' - BG - - ''' - BH - - ''' - BI - - ''' - BJ - - ''' - BL - - ''' - BM - - ''' - BN - - ''' - BO - - ''' - BQ - - ''' - BR - - ''' - BS - - ''' - BT - - ''' - BV - - ''' - BW - - ''' - BY - - ''' - BZ - - ''' - CA - - ''' - CC - - ''' - CD - - ''' - CF - - ''' - CG - - ''' - CH - - ''' - CI - - ''' - CK - - ''' - CL - - ''' - CM - - ''' - CN - - ''' - CO - - ''' - CR - - ''' - CU - - ''' - CV - - ''' - CW - - ''' - CX - - ''' - CY - - ''' - CZ - - ''' - DE - - ''' - DJ - - ''' - DK - - ''' - DM - - ''' - [DO] - - ''' - DZ - - ''' - EC - - ''' - EE - - ''' - EG - - ''' - EH - - ''' - ER - - ''' - ES - - ''' - ET - - ''' - FI - - ''' - FJ - - ''' - FK - - ''' - FM - - ''' - FO - - ''' - FR - - ''' - GA - - ''' - GB - - ''' - GD - - ''' - GE - - ''' - GF - - ''' - GG - - ''' - GH - - ''' - GI - - ''' - GL - - ''' - GM - - ''' - GN - - ''' - GP - - ''' - GQ - - ''' - GR - - ''' - GS - - ''' - GT - - ''' - GU - - ''' - GW - - ''' - GY - - ''' - HK - - ''' - HM - - ''' - HN - - ''' - HR - - ''' - HT - - ''' - HU - - ''' - ID - - ''' - IE - - ''' - IL - - ''' - IM - - ''' - [IN] - - ''' - IO - - ''' - IQ - - ''' - IR - - ''' - [IS] - - ''' - IT - - ''' - JE - - ''' - JM - - ''' - JO - - ''' - JP - - ''' - KE - - ''' - KG - - ''' - KH - - ''' - KI - - ''' - KM - - ''' - KN - - ''' - KP - - ''' - KR - - ''' - KW - - ''' - KY - - ''' - KZ - - ''' - LA - - ''' - LB - - ''' - LC - - ''' - LI - - ''' - LK - - ''' - LR - - ''' - LS - - ''' - LT - - ''' - LU - - ''' - LV - - ''' - LY - - ''' - MA - - ''' - MC - - ''' - MD - - ''' - [ME] - - ''' - MF - - ''' - MG - - ''' - MH - - ''' - MK - - ''' - ML - - ''' - MM - - ''' - MN - - ''' - MO - - ''' - MP - - ''' - MQ - - ''' - MR - - ''' - MS - - ''' - MT - - ''' - MU - - ''' - MV - - ''' - MW - - ''' - MX - - ''' - MY - - ''' - MZ - - ''' - NA - - ''' - NC - - ''' - NE - - ''' - NF - - ''' - NG - - ''' - NI - - ''' - NL - - ''' - NO - - ''' - NP - - ''' - NR - - ''' - NU - - ''' - NZ - - ''' - OM - - ''' - PA - - ''' - PE - - ''' - PF - - ''' - PG - - ''' - PH - - ''' - PK - - ''' - PL - - ''' - PM - - ''' - PN - - ''' - PR - - ''' - PS - - ''' - PT - - ''' - PW - - ''' - PY - - ''' - QA - - ''' - RE - - ''' - RO - - ''' - RS - - ''' - RU - - ''' - RW - - ''' - SA - - ''' - SB - - ''' - SC - - ''' - SD - - ''' - SE - - ''' - SG - - ''' - SH - - ''' - SI - - ''' - SJ - - ''' - SK - - ''' - SL - - ''' - SM - - ''' - SN - - ''' - SO - - ''' - SR - - ''' - SS - - ''' - ST - - ''' - SV - - ''' - SX - - ''' - SY - - ''' - SZ - - ''' - TC - - ''' - TD - - ''' - TF - - ''' - TG - - ''' - TH - - ''' - TJ - - ''' - TK - - ''' - TL - - ''' - TM - - ''' - TN - - ''' - [TO] - - ''' - TR - - ''' - TT - - ''' - TV - - ''' - TW - - ''' - TZ - - ''' - UA - - ''' - UG - - ''' - UM - - ''' - US - - ''' - UY - - ''' - UZ - - ''' - VA - - ''' - VC - - ''' - VE - - ''' - VG - - ''' - VI - - ''' - VN - - ''' - VU - - ''' - WF - - ''' - WS - - ''' - XI - - ''' - YE - - ''' - YT - - ''' - ZA - - ''' - ZM - - ''' - ZW - End Enum - - ''' - - Partial Public Class UniversalCommunicationType - - Private uRIIDField As IDType - - ''' - Public Property URIID() As IDType - Get - Return Me.uRIIDField - End Get - Set - Me.uRIIDField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TaxRegistrationType - - Private idField As IDType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeTaxType - - Private calculatedAmountField As AmountType - - Private typeCodeField As TaxTypeCodeType - - Private exemptionReasonField As TextType - - Private basisAmountField As AmountType - - Private categoryCodeField As TaxCategoryCodeType - - Private exemptionReasonCodeField As CodeType - - Private dueDateTypeCodeField As TimeReferenceCodeType - - Private rateApplicablePercentField As PercentType - - ''' - Public Property CalculatedAmount() As AmountType - Get - Return Me.calculatedAmountField - End Get - Set - Me.calculatedAmountField = Value - End Set - End Property - - ''' - Public Property TypeCode() As TaxTypeCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - Public Property ExemptionReason() As TextType - Get - Return Me.exemptionReasonField - End Get - Set - Me.exemptionReasonField = Value - End Set - End Property - - ''' - Public Property BasisAmount() As AmountType - Get - Return Me.basisAmountField - End Get - Set - Me.basisAmountField = Value - End Set - End Property - - ''' - Public Property CategoryCode() As TaxCategoryCodeType - Get - Return Me.categoryCodeField - End Get - Set - Me.categoryCodeField = Value - End Set - End Property - - ''' - Public Property ExemptionReasonCode() As CodeType - Get - Return Me.exemptionReasonCodeField - End Get - Set - Me.exemptionReasonCodeField = Value - End Set - End Property - - ''' - Public Property DueDateTypeCode() As TimeReferenceCodeType - Get - Return Me.dueDateTypeCodeField - End Get - Set - Me.dueDateTypeCodeField = Value - End Set - End Property - - ''' - Public Property RateApplicablePercent() As PercentType - Get - Return Me.rateApplicablePercentField - End Get - Set - Me.rateApplicablePercentField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TaxTypeCodeType - - Private valueField As TaxTypeCodeContentType - - ''' - - Public Property Value() As TaxTypeCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum TaxTypeCodeContentType - - ''' - VAT - End Enum - - ''' - - Partial Public Class TaxCategoryCodeType - - Private valueField As TaxCategoryCodeContentType - - ''' - - Public Property Value() As TaxCategoryCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum TaxCategoryCodeContentType - - ''' - AE - - ''' - E - - ''' - G - - ''' - K - - ''' - L - - ''' - M - - ''' - O - - ''' - S - - ''' - Z - End Enum - - ''' - - Partial Public Class TimeReferenceCodeType - - Private valueField As TimeReferenceCodeContentType - - ''' - - Public Property Value() As TimeReferenceCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum TimeReferenceCodeContentType - - ''' - - Item5 - - ''' - - Item29 - - ''' - - Item72 - End Enum - - ''' - - Partial Public Class PercentType - - Private valueField As Decimal - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SpecifiedPeriodType - - Private startDateTimeField As DateTimeType - - Private endDateTimeField As DateTimeType - - ''' - Public Property StartDateTime() As DateTimeType - Get - Return Me.startDateTimeField - End Get - Set - Me.startDateTimeField = Value - End Set - End Property - - ''' - Public Property EndDateTime() As DateTimeType - Get - Return Me.endDateTimeField - End Get - Set - Me.endDateTimeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeAllowanceChargeType - - Private chargeIndicatorField As IndicatorType - - Private calculationPercentField As PercentType - - Private basisAmountField As AmountType - - Private actualAmountField As AmountType - - Private reasonCodeField As AllowanceChargeReasonCodeType - - Private reasonField As TextType - - Private categoryTradeTaxField As TradeTaxType - - ''' - Public Property ChargeIndicator() As IndicatorType - Get - Return Me.chargeIndicatorField - End Get - Set - Me.chargeIndicatorField = Value - End Set - End Property - - ''' - Public Property CalculationPercent() As PercentType - Get - Return Me.calculationPercentField - End Get - Set - Me.calculationPercentField = Value - End Set - End Property - - ''' - Public Property BasisAmount() As AmountType - Get - Return Me.basisAmountField - End Get - Set - Me.basisAmountField = Value - End Set - End Property - - ''' - Public Property ActualAmount() As AmountType - Get - Return Me.actualAmountField - End Get - Set - Me.actualAmountField = Value - End Set - End Property - - ''' - Public Property ReasonCode() As AllowanceChargeReasonCodeType - Get - Return Me.reasonCodeField - End Get - Set - Me.reasonCodeField = Value - End Set - End Property - - ''' - Public Property Reason() As TextType - Get - Return Me.reasonField - End Get - Set - Me.reasonField = Value - End Set - End Property - - ''' - Public Property CategoryTradeTax() As TradeTaxType - Get - Return Me.categoryTradeTaxField - End Get - Set - Me.categoryTradeTaxField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class IndicatorType - - Private itemField As Boolean - - ''' - - Public Property Item() As Boolean - Get - Return Me.itemField - End Get - Set - Me.itemField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class AllowanceChargeReasonCodeType - - Private valueField As AllowanceChargeReasonCodeContentType - - ''' - - Public Property Value() As AllowanceChargeReasonCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum AllowanceChargeReasonCodeContentType - - ''' - AA - - ''' - AAA - - ''' - AAC - - ''' - AAD - - ''' - AAE - - ''' - AAF - - ''' - AAH - - ''' - AAI - - ''' - AAS - - ''' - AAT - - ''' - AAV - - ''' - AAY - - ''' - AAZ - - ''' - ABA - - ''' - ABB - - ''' - ABC - - ''' - ABD - - ''' - ABF - - ''' - ABK - - ''' - ABL - - ''' - ABN - - ''' - ABR - - ''' - ABS - - ''' - ABT - - ''' - ABU - - ''' - ACF - - ''' - ACG - - ''' - ACH - - ''' - ACI - - ''' - ACJ - - ''' - ACK - - ''' - ACL - - ''' - ACM - - ''' - ACS - - ''' - ADC - - ''' - ADE - - ''' - ADJ - - ''' - ADK - - ''' - ADL - - ''' - ADM - - ''' - ADN - - ''' - ADO - - ''' - ADP - - ''' - ADQ - - ''' - ADR - - ''' - ADT - - ''' - ADW - - ''' - ADY - - ''' - ADZ - - ''' - AEA - - ''' - AEB - - ''' - AEC - - ''' - AED - - ''' - AEF - - ''' - AEH - - ''' - AEI - - ''' - AEJ - - ''' - AEK - - ''' - AEL - - ''' - AEM - - ''' - AEN - - ''' - AEO - - ''' - AEP - - ''' - AES - - ''' - AET - - ''' - AEU - - ''' - AEV - - ''' - AEW - - ''' - AEX - - ''' - AEY - - ''' - AEZ - - ''' - AJ - - ''' - AU - - ''' - CA - - ''' - CAB - - ''' - CAD - - ''' - CAE - - ''' - CAF - - ''' - CAI - - ''' - CAJ - - ''' - CAK - - ''' - CAL - - ''' - CAM - - ''' - CAN - - ''' - CAO - - ''' - CAP - - ''' - CAQ - - ''' - CAR - - ''' - CAS - - ''' - CAT - - ''' - CAU - - ''' - CAV - - ''' - CAW - - ''' - CAX - - ''' - CAY - - ''' - CAZ - - ''' - CD - - ''' - CG - - ''' - CS - - ''' - CT - - ''' - DAB - - ''' - DAC - - ''' - DAD - - ''' - DAF - - ''' - DAG - - ''' - DAH - - ''' - DAI - - ''' - DAJ - - ''' - DAK - - ''' - DAL - - ''' - DAM - - ''' - DAN - - ''' - DAO - - ''' - DAP - - ''' - DAQ - - ''' - DL - - ''' - EG - - ''' - EP - - ''' - ER - - ''' - FAA - - ''' - FAB - - ''' - FAC - - ''' - FC - - ''' - FH - - ''' - FI - - ''' - GAA - - ''' - HAA - - ''' - HD - - ''' - HH - - ''' - IAA - - ''' - IAB - - ''' - ID - - ''' - [IF] - - ''' - IR - - ''' - [IS] - - ''' - KO - - ''' - L1 - - ''' - LA - - ''' - LAA - - ''' - LAB - - ''' - LF - - ''' - MAE - - ''' - MI - - ''' - ML - - ''' - NAA - - ''' - OA - - ''' - PA - - ''' - PAA - - ''' - PC - - ''' - PL - - ''' - RAB - - ''' - RAC - - ''' - RAD - - ''' - RAF - - ''' - RE - - ''' - RF - - ''' - RH - - ''' - RV - - ''' - SA - - ''' - SAA - - ''' - SAD - - ''' - SAE - - ''' - SAI - - ''' - SG - - ''' - SH - - ''' - SM - - ''' - SU - - ''' - TAB - - ''' - TAC - - ''' - TT - - ''' - TV - - ''' - V1 - - ''' - V2 - - ''' - WH - - ''' - XAA - - ''' - YY - - ''' - ZZZ - - ''' - - Item41 - - ''' - - Item42 - - ''' - - Item60 - - ''' - - Item62 - - ''' - - Item63 - - ''' - - Item64 - - ''' - - Item65 - - ''' - - Item66 - - ''' - - Item67 - - ''' - - Item68 - - ''' - - Item70 - - ''' - - Item71 - - ''' - - Item88 - - ''' - - Item95 - - ''' - - Item100 - - ''' - - Item102 - - ''' - - Item103 - - ''' - - Item104 - - ''' - - Item105 - End Enum - - ''' - - Partial Public Class ReferencedDocumentType - - Private issuerAssignedIDField As IDType - - Private formattedIssueDateTimeField As FormattedDateTimeType - - ''' - Public Property IssuerAssignedID() As IDType - Get - Return Me.issuerAssignedIDField - End Get - Set - Me.issuerAssignedIDField = Value - End Set - End Property - - ''' - Public Property FormattedIssueDateTime() As FormattedDateTimeType - Get - Return Me.formattedIssueDateTimeField - End Get - Set - Me.formattedIssueDateTimeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class FormattedDateTimeType - - Private dateTimeStringField As FormattedDateTimeTypeDateTimeString - - ''' - Public Property DateTimeString() As FormattedDateTimeTypeDateTimeString - Get - Return Me.dateTimeStringField - End Get - Set - Me.dateTimeStringField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class FormattedDateTimeTypeDateTimeString - - Private formatField As String - - Private valueField As String - - ''' - - Public Property format() As String - Get - Return Me.formatField - End Get - Set - Me.formatField = Value - End Set - End Property - - ''' - - Public Property Value() As String - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainEventType - - Private occurrenceDateTimeField As DateTimeType - - ''' - Public Property OccurrenceDateTime() As DateTimeType - Get - Return Me.occurrenceDateTimeField - End Get - Set - Me.occurrenceDateTimeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class HeaderTradeDeliveryType - - Private shipToTradePartyField As TradePartyType - - Private actualDeliverySupplyChainEventField As SupplyChainEventType - - Private despatchAdviceReferencedDocumentField As ReferencedDocumentType - - ''' - Public Property ShipToTradeParty() As TradePartyType - Get - Return Me.shipToTradePartyField - End Get - Set - Me.shipToTradePartyField = Value - End Set - End Property - - ''' - Public Property ActualDeliverySupplyChainEvent() As SupplyChainEventType - Get - Return Me.actualDeliverySupplyChainEventField - End Get - Set - Me.actualDeliverySupplyChainEventField = Value - End Set - End Property - - ''' - Public Property DespatchAdviceReferencedDocument() As ReferencedDocumentType - Get - Return Me.despatchAdviceReferencedDocumentField - End Get - Set - Me.despatchAdviceReferencedDocumentField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class HeaderTradeAgreementType - - Private buyerReferenceField As TextType - - Private sellerTradePartyField As TradePartyType - - Private buyerTradePartyField As TradePartyType - - Private sellerTaxRepresentativeTradePartyField As TradePartyType - - Private buyerOrderReferencedDocumentField As ReferencedDocumentType - - Private contractReferencedDocumentField As ReferencedDocumentType - - ''' - Public Property BuyerReference() As TextType - Get - Return Me.buyerReferenceField - End Get - Set - Me.buyerReferenceField = Value - End Set - End Property - - ''' - Public Property SellerTradeParty() As TradePartyType - Get - Return Me.sellerTradePartyField - End Get - Set - Me.sellerTradePartyField = Value - End Set - End Property - - ''' - Public Property BuyerTradeParty() As TradePartyType - Get - Return Me.buyerTradePartyField - End Get - Set - Me.buyerTradePartyField = Value - End Set - End Property - - ''' - Public Property SellerTaxRepresentativeTradeParty() As TradePartyType - Get - Return Me.sellerTaxRepresentativeTradePartyField - End Get - Set - Me.sellerTaxRepresentativeTradePartyField = Value - End Set - End Property - - ''' - Public Property BuyerOrderReferencedDocument() As ReferencedDocumentType - Get - Return Me.buyerOrderReferencedDocumentField - End Get - Set - Me.buyerOrderReferencedDocumentField = Value - End Set - End Property - - ''' - Public Property ContractReferencedDocument() As ReferencedDocumentType - Get - Return Me.contractReferencedDocumentField - End Get - Set - Me.contractReferencedDocumentField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeSettlementLineMonetarySummationType - - Private lineTotalAmountField As AmountType - - ''' - Public Property LineTotalAmount() As AmountType - Get - Return Me.lineTotalAmountField - End Get - Set - Me.lineTotalAmountField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class LineTradeSettlementType - - Private applicableTradeTaxField As TradeTaxType - - Private billingSpecifiedPeriodField As SpecifiedPeriodType - - Private specifiedTradeAllowanceChargeField() As TradeAllowanceChargeType - - Private specifiedTradeSettlementLineMonetarySummationField As TradeSettlementLineMonetarySummationType - - ''' - Public Property ApplicableTradeTax() As TradeTaxType - Get - Return Me.applicableTradeTaxField - End Get - Set - Me.applicableTradeTaxField = Value - End Set - End Property - - ''' - Public Property BillingSpecifiedPeriod() As SpecifiedPeriodType - Get - Return Me.billingSpecifiedPeriodField - End Get - Set - Me.billingSpecifiedPeriodField = Value - End Set - End Property - - ''' - - Public Property SpecifiedTradeAllowanceCharge() As TradeAllowanceChargeType() - Get - Return Me.specifiedTradeAllowanceChargeField - End Get - Set - Me.specifiedTradeAllowanceChargeField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradeSettlementLineMonetarySummation() As TradeSettlementLineMonetarySummationType - Get - Return Me.specifiedTradeSettlementLineMonetarySummationField - End Get - Set - Me.specifiedTradeSettlementLineMonetarySummationField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class LineTradeDeliveryType - - Private billedQuantityField As QuantityType - - ''' - Public Property BilledQuantity() As QuantityType - Get - Return Me.billedQuantityField - End Get - Set - Me.billedQuantityField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class QuantityType - - Private unitCodeField As String - - Private valueField As Decimal - - ''' - - Public Property unitCode() As String - Get - Return Me.unitCodeField - End Get - Set - Me.unitCodeField = Value - End Set - End Property - - ''' - - Public Property Value() As Decimal - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradePriceType - - Private chargeAmountField As AmountType - - Private basisQuantityField As QuantityType - - Private appliedTradeAllowanceChargeField As TradeAllowanceChargeType - - ''' - Public Property ChargeAmount() As AmountType - Get - Return Me.chargeAmountField - End Get - Set - Me.chargeAmountField = Value - End Set - End Property - - ''' - Public Property BasisQuantity() As QuantityType - Get - Return Me.basisQuantityField - End Get - Set - Me.basisQuantityField = Value - End Set - End Property - - ''' - Public Property AppliedTradeAllowanceCharge() As TradeAllowanceChargeType - Get - Return Me.appliedTradeAllowanceChargeField - End Get - Set - Me.appliedTradeAllowanceChargeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class LineTradeAgreementType - - Private grossPriceProductTradePriceField As TradePriceType - - Private netPriceProductTradePriceField As TradePriceType - - ''' - Public Property GrossPriceProductTradePrice() As TradePriceType - Get - Return Me.grossPriceProductTradePriceField - End Get - Set - Me.grossPriceProductTradePriceField = Value - End Set - End Property - - ''' - Public Property NetPriceProductTradePrice() As TradePriceType - Get - Return Me.netPriceProductTradePriceField - End Get - Set - Me.netPriceProductTradePriceField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class TradeProductType - - Private globalIDField As IDType - - Private nameField As TextType - - ''' - Public Property GlobalID() As IDType - Get - Return Me.globalIDField - End Get - Set - Me.globalIDField = Value - End Set - End Property - - ''' - Public Property Name() As TextType - Get - Return Me.nameField - End Get - Set - Me.nameField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DocumentLineDocumentType - - Private lineIDField As IDType - - Private includedNoteField As NoteType - - ''' - Public Property LineID() As IDType - Get - Return Me.lineIDField - End Get - Set - Me.lineIDField = Value - End Set - End Property - - ''' - Public Property IncludedNote() As NoteType - Get - Return Me.includedNoteField - End Get - Set - Me.includedNoteField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class NoteType - - Private contentField As TextType - - Private subjectCodeField As CodeType - - ''' - Public Property Content() As TextType - Get - Return Me.contentField - End Get - Set - Me.contentField = Value - End Set - End Property - - ''' - Public Property SubjectCode() As CodeType - Get - Return Me.subjectCodeField - End Get - Set - Me.subjectCodeField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainTradeLineItemType - - Private associatedDocumentLineDocumentField As DocumentLineDocumentType - - Private specifiedTradeProductField As TradeProductType - - Private specifiedLineTradeAgreementField As LineTradeAgreementType - - Private specifiedLineTradeDeliveryField As LineTradeDeliveryType - - Private specifiedLineTradeSettlementField As LineTradeSettlementType - - ''' - Public Property AssociatedDocumentLineDocument() As DocumentLineDocumentType - Get - Return Me.associatedDocumentLineDocumentField - End Get - Set - Me.associatedDocumentLineDocumentField = Value - End Set - End Property - - ''' - Public Property SpecifiedTradeProduct() As TradeProductType - Get - Return Me.specifiedTradeProductField - End Get - Set - Me.specifiedTradeProductField = Value - End Set - End Property - - ''' - Public Property SpecifiedLineTradeAgreement() As LineTradeAgreementType - Get - Return Me.specifiedLineTradeAgreementField - End Get - Set - Me.specifiedLineTradeAgreementField = Value - End Set - End Property - - ''' - Public Property SpecifiedLineTradeDelivery() As LineTradeDeliveryType - Get - Return Me.specifiedLineTradeDeliveryField - End Get - Set - Me.specifiedLineTradeDeliveryField = Value - End Set - End Property - - ''' - Public Property SpecifiedLineTradeSettlement() As LineTradeSettlementType - Get - Return Me.specifiedLineTradeSettlementField - End Get - Set - Me.specifiedLineTradeSettlementField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class SupplyChainTradeTransactionType - - Private includedSupplyChainTradeLineItemField() As SupplyChainTradeLineItemType - - Private applicableHeaderTradeAgreementField As HeaderTradeAgreementType - - Private applicableHeaderTradeDeliveryField As HeaderTradeDeliveryType - - Private applicableHeaderTradeSettlementField As HeaderTradeSettlementType - - ''' - - Public Property IncludedSupplyChainTradeLineItem() As SupplyChainTradeLineItemType() - Get - Return Me.includedSupplyChainTradeLineItemField - End Get - Set - Me.includedSupplyChainTradeLineItemField = Value - End Set - End Property - - ''' - Public Property ApplicableHeaderTradeAgreement() As HeaderTradeAgreementType - Get - Return Me.applicableHeaderTradeAgreementField - End Get - Set - Me.applicableHeaderTradeAgreementField = Value - End Set - End Property - - ''' - Public Property ApplicableHeaderTradeDelivery() As HeaderTradeDeliveryType - Get - Return Me.applicableHeaderTradeDeliveryField - End Get - Set - Me.applicableHeaderTradeDeliveryField = Value - End Set - End Property - - ''' - Public Property ApplicableHeaderTradeSettlement() As HeaderTradeSettlementType - Get - Return Me.applicableHeaderTradeSettlementField - End Get - Set - Me.applicableHeaderTradeSettlementField = Value - End Set - End Property - End Class - - ''' - - Partial Public Class DocumentCodeType - - Private valueField As DocumentCodeContentType - - ''' - - Public Property Value() As DocumentCodeContentType - Get - Return Me.valueField - End Get - Set - Me.valueField = Value - End Set - End Property - End Class - - ''' - - Public Enum DocumentCodeContentType - - ''' - - Item80 - - ''' - - Item81 - - ''' - - Item82 - - ''' - - Item83 - - ''' - - Item84 - - ''' - - Item130 - - ''' - - Item202 - - ''' - - Item203 - - ''' - - Item204 - - ''' - - Item211 - - ''' - - Item261 - - ''' - - Item262 - - ''' - - Item295 - - ''' - - Item296 - - ''' - - Item308 - - ''' - - Item325 - - ''' - - Item326 - - ''' - - Item380 - - ''' - - Item381 - - ''' - - Item383 - - ''' - - Item384 - - ''' - - Item385 - - ''' - - Item386 - - ''' - - Item387 - - ''' - - Item388 - - ''' - - Item389 - - ''' - - Item390 - - ''' - - Item393 - - ''' - - Item394 - - ''' - - Item395 - - ''' - - Item396 - - ''' - - Item420 - - ''' - - Item456 - - ''' - - Item457 - - ''' - - Item458 - - ''' - - Item527 - - ''' - - Item575 - - ''' - - Item623 - - ''' - - Item633 - - ''' - - Item751 - - ''' - - Item780 - - ''' - - Item875 - - ''' - - Item876 - - ''' - - Item877 - - ''' - - Item935 - End Enum - - ''' - - Partial Public Class ExchangedDocumentType - - Private idField As IDType - - Private typeCodeField As DocumentCodeType - - Private issueDateTimeField As DateTimeType - - Private includedNoteField() As NoteType - - ''' - Public Property ID() As IDType - Get - Return Me.idField - End Get - Set - Me.idField = Value - End Set - End Property - - ''' - Public Property TypeCode() As DocumentCodeType - Get - Return Me.typeCodeField - End Get - Set - Me.typeCodeField = Value - End Set - End Property - - ''' - Public Property IssueDateTime() As DateTimeType - Get - Return Me.issueDateTimeField - End Get - Set - Me.issueDateTimeField = Value - End Set - End Property - - ''' - - Public Property IncludedNote() As NoteType() - Get - Return Me.includedNoteField - End Get - Set - Me.includedNoteField = Value - End Set - End Property - End Class - -End Namespace \ No newline at end of file diff --git a/Modules.Interfaces/ZUGFeRDInterface/XmlItemProperty.vb b/Modules.Interfaces/ZUGFeRDInterface/XmlItemProperty.vb deleted file mode 100644 index a14c456e..00000000 --- a/Modules.Interfaces/ZUGFeRDInterface/XmlItemProperty.vb +++ /dev/null @@ -1,8 +0,0 @@ -Public Class XmlItemProperty - Public TableName As String - Public TableColumn As String - Public Description As String - Public IsRequired As Boolean - Public IsGrouped As Boolean - Public GroupScope As String -End Class \ No newline at end of file diff --git a/Modules.Interfaces/app.config b/Modules.Interfaces/app.config deleted file mode 100644 index d5fed9f7..00000000 --- a/Modules.Interfaces/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.Interfaces/packages.config b/Modules.Interfaces/packages.config deleted file mode 100644 index ef03c2c1..00000000 --- a/Modules.Interfaces/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Modules.Jobs/App.config b/Modules.Jobs/App.config deleted file mode 100644 index 6117847c..00000000 --- a/Modules.Jobs/App.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.Jobs/EDMI/ADSync/ADSyncArgs.vb b/Modules.Jobs/EDMI/ADSync/ADSyncArgs.vb deleted file mode 100644 index d98716de..00000000 --- a/Modules.Jobs/EDMI/ADSync/ADSyncArgs.vb +++ /dev/null @@ -1,14 +0,0 @@ -Public Class ADSyncArgs - Inherits JobArgs - - ''' - ''' LDAP URI that acts as the root node of searches, ex: LDAP://DIGITALDATA - ''' - Public RootPath As String - - Public UserFilter As String - Public GroupFilter As String - - Public DisableFirebird As String - Public DisableMSSQL As String -End Class diff --git a/Modules.Jobs/EDMI/ADSync/ADSyncJob.vb b/Modules.Jobs/EDMI/ADSync/ADSyncJob.vb deleted file mode 100644 index 5598f275..00000000 --- a/Modules.Jobs/EDMI/ADSync/ADSyncJob.vb +++ /dev/null @@ -1,85 +0,0 @@ -Imports System.Collections.Generic -Imports System.Data -Imports DigitalData.Modules.Database -Imports DigitalData.Modules.Interfaces -Imports DigitalData.Modules.Logging - -Public Class ADSyncJob - Inherits JobBase - Implements IJob(Of ADSyncArgs) - - Public Sub New(LogConfig As LogConfig, Firebird As Firebird, MSSQL As MSSQLServer) - MyBase.New(LogConfig, Firebird, MSSQL) - End Sub - - Public Sub Start(Arguments As ADSyncArgs) Implements IJob(Of ADSyncArgs).Start - Dim oJobName As String = [GetType]().Name - - Try - Dim oSync = New ActiveDirectoryInterface(_LogConfig, Arguments.RootPath) - - _Logger.Info("Running job {0}", oJobName) - - If oSync.Authenticate() = False Then - _Logger.Warn("Job {0} could not be completed! Authentication failed!", oJobName) - Exit Sub - End If - - Dim oGroups = GetGroups() - Dim oAttributeMappings = GetAttributeMappings() - _Logger.Debug("Found {0} Groups", oGroups.Count) - - For Each oGroup In oGroups - _Logger.Debug("Syncing Group [{0}]", oGroup) - Dim oSyncedUsers = oSync.SyncUsersForGroup(oGroup, oAttributeMappings, _Firebird, _MSSQL, Arguments.UserFilter) - - If oSyncedUsers Is Nothing Then - _Logger.Warn("Group [{0}] could not be synced!", oGroup) - ElseIf oSyncedUsers.Count > 0 Then - _Logger.Info("Processed [{0}] users for group [{1}]", oSyncedUsers.Count, oGroup) - End If - Next - - _Logger.Info("Job {0} completed!", oJobName) - Catch ex As Exception - _Logger.Warn("Job {0} failed!", oJobName) - _Logger.Error(ex) - End Try - End Sub - - Private Function GetGroups() As List(Of String) - Try - Dim oGroups As New List(Of String) - Dim oDatatable = _MSSQL.GetDatatable("SELECT NAME FROM TBDD_GROUPS WHERE AD_SYNC = 1 AND ACTIVE = 1") - - For Each oRow As DataRow In oDatatable.Rows - oGroups.Add(oRow.Item("NAME")) - Next - - Return oGroups - Catch ex As Exception - _Logger.Error(ex) - Return New List(Of String) - End Try - End Function - - Private Function GetAttributeMappings() As List(Of AttributeMapping) - Dim oDatatable = _MSSQL.GetDatatable("SELECT * FROM TBDD_EXTATTRIBUTES_MATCHING") - - Dim oAttributeMappings = New List(Of AttributeMapping) - - For Each oRow As DataRow In oDatatable.Rows - oAttributeMappings.Add(New AttributeMapping() With { - .AttributeName = oRow.Item("EXT_ATTRIBUTE"), - .FirebirdSyskey = oRow.Item("FB_SYS_KEY"), - .MSSQLColumn = oRow.Item("TBDD_USER_COLUMN") - }) - Next - - Return oAttributeMappings - End Function - - Public Function ShouldStart(Arguments As ADSyncArgs) As Boolean Implements IJob(Of ADSyncArgs).ShouldStart - Return Arguments.Enabled - End Function -End Class diff --git a/Modules.Jobs/EDMI/GraphQL/GraphQLArgs.vb b/Modules.Jobs/EDMI/GraphQL/GraphQLArgs.vb deleted file mode 100644 index 392d86cc..00000000 --- a/Modules.Jobs/EDMI/GraphQL/GraphQLArgs.vb +++ /dev/null @@ -1,5 +0,0 @@ -Public Class GraphQLArgs - Inherits JobArgs - - Public QueryConfigPath As String -End Class diff --git a/Modules.Jobs/EDMI/GraphQL/GraphQLConfig.vb b/Modules.Jobs/EDMI/GraphQL/GraphQLConfig.vb deleted file mode 100644 index e9ca33aa..00000000 --- a/Modules.Jobs/EDMI/GraphQL/GraphQLConfig.vb +++ /dev/null @@ -1,6 +0,0 @@ -Public Class GraphQLConfig - Public Property BaseUrl As String = "" - Public Property Email As String = "" - Public Property Password As String = "" - Public Property CertificateFingerprint As String = "" -End Class diff --git a/Modules.Jobs/EDMI/GraphQL/GraphQLJob.vb b/Modules.Jobs/EDMI/GraphQL/GraphQLJob.vb deleted file mode 100644 index 1151b1c3..00000000 --- a/Modules.Jobs/EDMI/GraphQL/GraphQLJob.vb +++ /dev/null @@ -1,223 +0,0 @@ -Option Explicit On - -Imports System.IO -Imports DigitalData.Modules.Interfaces -Imports DigitalData.Modules.Jobs -Imports DigitalData.Modules.Config -Imports DigitalData.Modules.Logging -Imports Newtonsoft.Json.Linq -Imports System.Collections.Generic -Imports System.Linq -Imports System.Text.RegularExpressions -Imports DigitalData.Modules.Database -Imports System.Data - -Public Class GraphQLJob - Inherits JobBase - Implements IJob(Of GraphQLArgs) - - Private _GraphQL As GraphQLInterface = Nothing - - Private Const PLACEHOLDER_STATIC = "STATIC:" - - Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer) - MyBase.New(LogConfig, Nothing, MSSQL) - End Sub - - Public Sub Start(Args As GraphQLArgs) Implements IJob(Of GraphQLArgs).Start - Try - Dim oConfigPath As String = Args.QueryConfigPath - Dim oConfigManager As New ConfigManager(Of GraphQLConfig)(_LogConfig, oConfigPath) - - With oConfigManager.Config - _GraphQL = New GraphQLInterface(_LogConfig, .BaseUrl, .Email, .Password, .CertificateFingerprint) - End With - - ' Login to get cookie - _Logger.Debug("Logging in") - Dim oLoginResponse = _GraphQL.Login() - - ' save cookie for future requests - _GraphQL.SaveCookies(oLoginResponse.Cookies.Item(0)) - - _Logger.Debug("Loading Queries") - - ' Load query data from TBCUST_JOBRUNNER_QUERY - Dim oQueryTable As DataTable = _MSSQL.GetDatatable("SELECT * FROM TBCUST_JOBRUNNER_QUERY ORDER BY OPERATION_NAME, CLEAR_BEFORE_FILL ASC") - Dim oQueryList As New List(Of GraphQL.Query) - - ' Save query data to business objects - For Each oRow As DataRow In oQueryTable.Rows - Dim oQuery As New GraphQL.Query With { - .Id = oRow.Item("GUID"), - .Name = oRow.Item("TITLE"), - .ClearBeforeFill = oRow.Item("CLEAR_BEFORE_FILL"), - .ConnectionId = oRow.Item("CON_ID"), ' TODO: Connection String? - .DestinationTable = oRow.Item("DESTINATION_TABLE"), - .OperationName = oRow.Item("OPERATION_NAME"), - .MappingBasePath = oRow.Item("MAPPING_BASE_PATH"), - .QueryString = oRow.Item("QUERY_STRING"), - .QueryConstraint = oRow.Item("QUERY_CONSTRAINT") - } - oQueryList.Add(oQuery) - Next - - _Logger.Debug("Getting the data from GraphQL") - - For Each oQuery As GraphQL.Query In oQueryList - Try - _Logger.NewBlock($"Query [{oQuery.Name}]") - - Dim oConnectionId As Integer = oQuery.ConnectionId - Dim oConnectionString = _MSSQL.Get_ConnectionStringforID(oConnectionId) - - Dim oDatabase As New MSSQLServer(_LogConfig, oConnectionString) - - ' Reset all records to status = 0 - _Logger.Info("Resetting data with constraint [{1}]", oQuery.Name, oQuery.QueryConstraint) - - Dim oResetSQL = $"UPDATE {oQuery.DestinationTable} SET STATUS = 0" - If oQuery.QueryConstraint <> String.Empty Then - oResetSQL &= $" WHERE {oQuery.QueryConstraint}" - End If - _MSSQL.ExecuteNonQuery(oResetSQL) - - _Logger.Info("Getting data..", oQuery.Name) - - ' get the data from GraphQL - Dim oDataResponse = _GraphQL.GetData(oQuery.QueryString, oQuery.OperationName) - Dim oResult As String - - ' write data to string - Using oStream = oDataResponse.GetResponseStream() - Using oReader As New StreamReader(oStream) - oResult = oReader.ReadToEnd() - End Using - End Using - - ' Fill the query object with field mapping data from TBCUST_JOBRUNNER_QUERY_MAPPING - Dim oSQL As String = "SELECT t2.* FROM TBCUST_JOBRUNNER_QUERY_MAPPING t - JOIN TBCUST_JOBRUNNER_MAPPING t2 ON t.MAPPING_ID = t2.GUID - WHERE t.QUERY_ID = {0}" - Dim oMappingTable As DataTable = _MSSQL.GetDatatable(String.Format(oSQL, oQuery.Id)) - - For Each oMapping As DataRow In oMappingTable.Rows - oQuery.MappingFields.Add(New GraphQL.FieldMapping With { - .DestinationColumn = oMapping.Item("DestinationColumn"), - .SourcePath = oMapping.Item("SourcePath") - }) - Next - - ' Handle the response from GraphQL and insert Data - Dim oQueryHandleResult = HandleResponse(oResult, oQuery, oDatabase) - - If IsNothing(oQueryHandleResult) Then - Continue For - End If - - ' Finally delete all old records - Dim oDeleteSQL = $"DELETE FROM {oQuery.DestinationTable} WHERE STATUS = 0" - If oQuery.QueryConstraint <> String.Empty Then - oDeleteSQL &= $" AND {oQuery.QueryConstraint}" - End If - - _Logger.Info("Success, deleting old records..", oQuery.Name) - _MSSQL.ExecuteNonQuery(oDeleteSQL) - - Catch ex As Exception - _Logger.Warn("Error while getting Data for Name/OperationName [{0}]/[{1}]", oQuery.Name, oQuery.OperationName) - _Logger.Error(ex) - - _Logger.Info("Failure, deleting new records..", oQuery.Name) - - ' If a crash happens, delete all records which were inserted in this run, - ' thus going back to the previous state - Dim oDeleteSQL = $"DELETE FROM {oQuery.DestinationTable} WHERE STATUS = 1" - If oQuery.QueryConstraint <> String.Empty Then - oDeleteSQL &= $" AND {oQuery.QueryConstraint}" - End If - _MSSQL.ExecuteNonQuery(oDeleteSQL) - Finally - _Logger.EndBlock() - End Try - Next - - ' logout - _Logger.Debug("Logging out") - Dim oLogoutResponse = _GraphQL.Logout() - Catch ex As Exception - _Logger.Error(ex) - Throw ex - End Try - End Sub - - Private Function HandleResponse(JsonString As String, QueryData As GraphQL.Query, DB As Database.MSSQLServer) As GraphQL.Query - Dim oObj As JObject = JObject.Parse(JsonString) - Dim oResultList As JToken - - If _GraphQL.ReadJSONPathFragmented(oObj, QueryData.MappingBasePath) = False Then - _Logger.Warn("There is an error in the MappingBasePath [{1}] configuration of query [{0}]", QueryData.Name, QueryData.MappingBasePath) - End If - - Try - oResultList = oObj.SelectToken(QueryData.MappingBasePath, errorWhenNoMatch:=True) - Catch ex As Exception - _Logger.Warn("HandleResponse: Could not find BasePath: [{0}] for query [{1}]", QueryData.MappingBasePath, QueryData.Name) - _Logger.Error(ex) - Return Nothing - End Try - - If oResultList Is Nothing Then - _Logger.Warn("HandleResponse: Could not find BasePath: [{0}] for query [{1}]", QueryData.MappingBasePath, QueryData.Name) - Return Nothing - End If - - _Logger.Info("HandleResponse: Processing Queue [{0}] with [{1}] Items", QueryData.Name, oResultList.Count) - - For Each oResultItem As JToken In oResultList - Try - Dim oValues As New List(Of String) - Dim oKeys As New List(Of String) - - For Each oMapping In QueryData.MappingFields - Dim oValue As String = String.Empty - - If oMapping.SourcePath.StartsWith(PLACEHOLDER_STATIC) Then - oValue = oMapping.SourcePath.Replace(PLACEHOLDER_STATIC, String.Empty) - Else - Dim oToken = oResultItem.SelectToken(oMapping.SourcePath) - - If oToken Is Nothing Then - _Logger.Warn("HandleResponse: Could not find value at SourcePath: {0}", oMapping.SourcePath) - oValue = String.Empty - Else - oValue = oToken.ToString - End If - End If - - oValues.Add(oValue) - oKeys.Add(oMapping.DestinationColumn) - Next - - Dim oColumnValues = oValues. - Select(Function(Value) Regex.Replace(Value, "'", "''")). - Select(Function(Value) $"'{Value}'"). - ToList() - Dim oValueString = String.Join(",", oColumnValues) - - Dim oColumns = String.Join(",", oKeys.ToArray) - Dim oSQL As String = $"INSERT INTO {QueryData.DestinationTable} ({oColumns}) VALUES ({oValueString})" - - DB.ExecuteNonQuery(oSQL) - Catch ex As Exception - _Logger.Error(ex) - End Try - Next - - Return QueryData - End Function - - Public Function ShouldStart(Arguments As GraphQLArgs) As Boolean Implements IJob(Of GraphQLArgs).ShouldStart - Return Arguments.Enabled - End Function -End Class diff --git a/Modules.Jobs/EDMI/GraphQL/GraphQLQuery.vb b/Modules.Jobs/EDMI/GraphQL/GraphQLQuery.vb deleted file mode 100644 index 408bd5f9..00000000 --- a/Modules.Jobs/EDMI/GraphQL/GraphQLQuery.vb +++ /dev/null @@ -1,24 +0,0 @@ -Imports System.Collections.Generic - -Namespace GraphQL - Public Class Query - Public Property Id As Integer - Public Property Name As String - Public Property ConnectionId As String = "" - Public Property ClearBeforeFill As Boolean = False - Public Property ClearCommand As String = "" - Public Property QueryString As String = "" - Public Property QueryConstraint As String = "" - Public Property OperationName As String = "" - Public Property DestinationTable As String = "" - - Public Property MappingBasePath As String = "" - Public Property MappingFields As New List(Of FieldMapping) - End Class - - Public Class FieldMapping - Public SourcePath As String = "" - Public DestinationColumn As String = "" - Public Value As String = "" - End Class -End Namespace diff --git a/Modules.Jobs/EDMI/ZUGFeRD/EmailData.vb b/Modules.Jobs/EDMI/ZUGFeRD/EmailData.vb deleted file mode 100644 index 65d2ad7c..00000000 --- a/Modules.Jobs/EDMI/ZUGFeRD/EmailData.vb +++ /dev/null @@ -1,5 +0,0 @@ -Public Class EmailData - Public Attachment As String = "" - Public Subject As String - Public From As String -End Class \ No newline at end of file diff --git a/Modules.Jobs/EDMI/ZUGFeRD/EmailFunctions.vb b/Modules.Jobs/EDMI/ZUGFeRD/EmailFunctions.vb deleted file mode 100644 index cb697665..00000000 --- a/Modules.Jobs/EDMI/ZUGFeRD/EmailFunctions.vb +++ /dev/null @@ -1,203 +0,0 @@ -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Database -Imports System.Data -Imports System.IO -Imports System.Data.SqlClient - -Public Class EmailFunctions - Private ReadOnly _logConfig As LogConfig - Private ReadOnly _logger As Logger - Private ReadOnly _mssql As MSSQLServer - Private ReadOnly _firebird As Firebird - - Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer, Firebird As Firebird) - _logConfig = LogConfig - _logger = _logConfig.GetLogger() - _mssql = MSSQL - _firebird = Firebird - End Sub - - Public Sub AddToEmailQueueFB(MessageId As String, BodyText As String, EmailData As EmailData, NamePortal As String) - If EmailData Is Nothing Then - _logger.Warn("EmailData is empty. Email will not be sent!") - Exit Sub - End If - - Try - Dim oJobId = RandomValue(1, 10000) - Dim oReference = MessageId - Dim oEmailTo = "" - Dim oSubject = EmailStrings.EMAIL_SUBJECT_REJECTED.Replace(EmailStrings.constNAME_ZUGFERD_PORTAL, NamePortal) - Dim oAccountId = 1 - Dim oCreatedWho = "ZUGFeRD Service" - Dim oFinalBodyText = String.Format(EmailStrings.EMAIL_WRAPPING_TEXT.Replace(EmailStrings.constNAME_ZUGFERD_PORTAL, NamePortal), BodyText) - - Dim oEmailAddress = EmailData.From - Dim oAttachment = EmailData.Attachment - - If IsNothing(oEmailAddress) OrElse String.IsNullOrWhiteSpace(oEmailAddress) Then - _logger.Warn("Could not find email-address for MessageId {0}", MessageId) - oEmailTo = String.Empty - Else - oEmailTo = oEmailAddress - End If - - _logger.Debug("Generated Email:") - _logger.Debug("To: {0}", oEmailTo) - _logger.Debug("Subject: {0}", oSubject) - _logger.Debug("Body {0}", oFinalBodyText) - Dim osql = $"select * from TBEDM_EMAIL_QUEUE where REFERENCE1 = '{oReference} and EMAIL_TO = ''{oEmailTo}' and EMAIL_SUBJ = '{oSubject}'" - - Dim oDTResult As DataTable = _firebird.GetDatatable(osql) - - If oDTResult.Rows.Count = 0 Then - Dim oSQLInsert = $"INSERT INTO TBEDM_EMAIL_QUEUE " - oSQLInsert &= "(JOB_ID, REFERENCE1, EMAIL_ACCOUNT_ID, EMAIL_TO, EMAIL_SUBJ, EMAIL_BODY, CREATEDWHO, EMAIL_ATTMT1) VALUES " - oSQLInsert &= $"({oJobId}, '{oReference}', {oAccountId}, '{oEmailTo}', '{oSubject}', '{oFinalBodyText.Replace("'", "''")}', '{oCreatedWho}', '{oAttachment}')" - _firebird.ExecuteNonQuery(oSQLInsert) - _logger.Debug("Email Queue updated for MessageId {0}.", MessageId, oEmailTo) - Else - _logger.Debug("Email has already been sent!!") - End If - Catch ex As Exception - _logger.Error(ex) - End Try - End Sub - Public Sub AddToEmailQueueMSSQL(MessageId As String, BodyText As String, pEmailData As EmailData, SourceProcedure As String, pEmailAccountId As Integer, NamePortal As String) - If pEmailData Is Nothing Then - _logger.Warn("EmailData is empty. Email will not be sent!") - Exit Sub - End If - - Try - Dim oJobId = RandomValue(1, 10000) - Dim oReference = MessageId - Dim oEmailTo = "" - Dim oSubject = EmailStrings.EMAIL_SUBJECT_REJECTED.Replace(EmailStrings.constNAME_ZUGFERD_PORTAL, NamePortal) - Dim oCreatedWho = "ZUGFeRD Service" - - Dim oMaskedBodyText = BodyText.Replace("'", "''") - Dim oSubjectBodyText = String.Format(EmailStrings.EMAIL_SUBJECT_TEXT.Replace(EmailStrings.constNAME_ZUGFERD_PORTAL, NamePortal), pEmailData.Subject).Replace("'", "''") - Dim oCompleteBodyText = oMaskedBodyText & oSubjectBodyText - - Dim oFinalBodyText = String.Format(EmailStrings.EMAIL_WRAPPING_TEXT.Replace(EmailStrings.constNAME_ZUGFERD_PORTAL, NamePortal), oCompleteBodyText) - - Dim oEmailAddress = pEmailData.From - Dim oAttachment = pEmailData.Attachment - If oAttachment <> String.Empty Then - _logger.Debug($"Attachment_String [{oAttachment}]!") - If IO.File.Exists(oAttachment) = False Then - _logger.Info($"Attachment.File [{oAttachment}] is not existing!!!") - End If - End If - - If IsNothing(oEmailAddress) OrElse String.IsNullOrWhiteSpace(oEmailAddress) Then - _logger.Warn("Could not find email-address for MessageId {0}", MessageId) - oEmailTo = String.Empty - Else - oEmailTo = oEmailAddress - End If - - _logger.Debug("Generated Email:") - _logger.Debug("To: {0}", oEmailTo) - _logger.Debug("Subject: {0}", oSubject) - _logger.Debug("Body {0}", oFinalBodyText) - Dim osql = $"Select MAX(GUID) FROM TBEMLP_HISTORY WHERE EMAIL_MSGID = '{MessageId}'" - Dim oHistoryID = _mssql.GetScalarValue(osql) - - 'osql = $"select * from TBEMLP_EMAIL_OUT where REFERENCE_ID = {oHistoryID} and EMAIL_ADRESS = '{oEmailTo}' and EMAIL_SUBJ = '{oSubject}'" - - 'Dim oDTResult As DataTable = _mssql.GetDatatable(osql) - - If IsNumeric(oHistoryID) Then - Dim oInsert = $"INSERT INTO [dbo].[TBEMLP_EMAIL_OUT] ( - [REMINDER_TYPE_ID] - ,[SENDING_PROFILE] - ,[REFERENCE_ID] - ,[REFERENCE_STRING] - ,[WF_ID] - ,[EMAIL_ADRESS] - ,[EMAIL_SUBJ] - ,[EMAIL_BODY] - ,[COMMENT] - ,[ADDED_WHO] - ,EMAIL_ATTMT1) - VALUES - (77 - ,{pEmailAccountId} - ,{oHistoryID} - ,'{MessageId}' - ,77 - ,'{oEmailTo}' - ,'{oSubject}' - ,'{oFinalBodyText}' - ,'{SourceProcedure}' - ,'{oCreatedWho}' - ,'{oAttachment}')" - _mssql.ExecuteNonQuery(oInsert) - Else - 'If oDTResult.Rows.Count = 0 Then - ' _logger.Debug("Email has already been sent!!") - 'Else - _logger.Warn("Could not get oHistoryID in AddToEmailQueueMSSQL!!") - ' End If - End If - Catch ex As Exception - _logger.Error(ex) - End Try - End Sub - - Public Function GetEmailDataForMessageId(MessageId As String) As EmailData - Dim oSQL = $"SELECT EMAIL_FROM, EMAIL_SUBJECT, EMAIL_ATTMT1 FROM TBEDM_EMAIL_PROFILER_HISTORY WHERE EMAIL_MSGID = '{MessageId}'" - Try - Dim oDatatable = _firebird.GetDatatable(oSQL) - Dim oRow As DataRow - - If oDatatable.Rows.Count = 0 Then - _logger.Warn("Got no results for MessageId {0}", MessageId) - Return Nothing - ElseIf oDatatable.Rows.Count > 1 Then - _logger.Warn("Got too many results for MessageId {0}. Using last row.", MessageId) - End If - - _logger.Debug("Got Email Data for FileId {0}", MessageId) - oRow = oDatatable.Rows.Item(oDatatable.Rows.Count - 1) - - Return New EmailData() With { - .From = oRow.Item("EMAIL_FROM"), - .Attachment = oRow.Item("EMAIL_ATTMT1"), - .Subject = oRow.Item("EMAIL_SUBJECT") - } - Catch ex As Exception - _logger.Warn("Could not fetch Email Data for FileId {0}", MessageId) - Return Nothing - End Try - End Function - - Public Function GetOriginalEmailPath(OriginalEmailDirectory As String, MessageId As String) As String - Dim oAttachmentDirectory = OriginalEmailDirectory - Dim oAttachmentFile = MessageId & ".eml" - Dim oAttachmentPath = Path.Combine(oAttachmentDirectory, oAttachmentFile) - - If File.Exists(oAttachmentPath) Then - Return oAttachmentPath - Else - _logger.Warn("Email File {0} does not exist. Empty String will be returned.", oAttachmentPath) - Return String.Empty - End If - End Function - - Public Function GetEmailPathWithSubjectAsName(RejectedEmailDirectory As String, UncleanedSubject As String) As String - Dim oCleanSubject = String.Join("", UncleanedSubject.Split(Path.GetInvalidPathChars())) - Dim oAttachmentDirectory = RejectedEmailDirectory - Dim oAttachmentFile = oCleanSubject & ".eml" - Dim oAttachmentPath = Path.Combine(oAttachmentDirectory, oAttachmentFile) - - Return oAttachmentPath - End Function - - Private Function RandomValue(lowerBound As Integer, upperBound As Integer) As Integer - Dim oRandomValue = CInt(Math.Floor((upperBound - lowerBound + 1) * Rnd())) + lowerBound - Return oRandomValue - End Function -End Class diff --git a/Modules.Jobs/EDMI/ZUGFeRD/EmailStrings.vb b/Modules.Jobs/EDMI/ZUGFeRD/EmailStrings.vb deleted file mode 100644 index 3def7e00..00000000 --- a/Modules.Jobs/EDMI/ZUGFeRD/EmailStrings.vb +++ /dev/null @@ -1,40 +0,0 @@ -Public Class EmailStrings - Public Const constNAME_ZUGFERD_PORTAL = "@NAME_ZUGFERD_PORTAL" - Public Const EMAIL_WRAPPING_TEXT = "Sehr geehrte Damen und Herren,

- das @NAME_ZUGFERD_PORTAL zur Verarbeitung der Eingangsrechnungen im ZUGFeRD-Format konnte die von Ihnen gesandte Rechnung - leider nicht verarbeiten!

Grund: {0}

Bitte prüfen Sie die Datei und nehmen Sie bei Bedarf mit uns Kontakt auf.

- Vielen Dank für Ihr Verständnis.
Mit freundlichen Grüßen
Ihre IT-Abteilung" - Public Const EMAIL_SUBJECT_TEXT = "

Der Betreff der Original-Email war: {0}

" - - Public Const EMAIL_SUBJECT_REJECTED = "@NAME_ZUGFERD_PORTAL: Beleg abgelehnt" - Public Const EMAIL_SUBJECT_EXCEPTION = "@NAME_ZUGFERD_PORTAL: Unbehandelte Ausnahme" - - Public Const EMAIL_UNHANDLED_EXCEPTION = """ -

Beim Verarbeiten der Datei mit der Message ID '{0}' ist ein schwerer Fehler aufgetreten.

-

Fehlerbeschreibung: {1}

-
{2}
- """ - - Public Const EMAIL_MISSINGPROPERTIES_1 = "

Die angehängte Datei entspricht nicht dem WISAG ZUGFeRD-Format: {0}

" - Public Const EMAIL_MISSINGPROPERTIES_2 = "

Die folgenden Eigenschaften wurden als ERFORDERLICH eingestuft, wurden aber nicht gefunden:

" - - Public Const EMAIL_MD5_ERROR = "

Die von Ihnen gesendete Rechnung wurde bereits von unserem System verarbeitet.

" - - Public Const EMAIL_TOO_MUCH_FERDS = "

Ihre Email enthielt mehr als ein ZUGFeRD-Dokument.

" - - Public Const EMAIL_NO_FERDS = "

Ihre Email enthielt keine ZUGFeRD-Dokumente.

" - - Public Const EMAIL_FILE_SIZE_REACHED = " -

Die von Ihnen gesendete Rechnung oder einer der Rechnungs-Anhänge überschreitet die erlaubte Größe von {0} MB.

-

Die folgende Datei hat die erlaubte Größe überschritten:

    -
  • {1}
  • -

- " - - Public Const EMAIL_INVALID_DOCUMENT = " -

Ihre Email enthielt ein ZUGFeRD Dokument, welches aber inkorrekt formatiert wurde.

-

Mögliche Gründe für ein inkorrektes Format:

    -
  • Betrags-Werte weisen ungültiges Format auf (25,01 anstatt 25.01)
  • -

- " -End Class diff --git a/Modules.Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb b/Modules.Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb deleted file mode 100644 index 11914534..00000000 --- a/Modules.Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb +++ /dev/null @@ -1,825 +0,0 @@ -Imports System.Collections.Generic -Imports System.Data -Imports System.IO -Imports System.Linq -Imports System.Security.Cryptography -Imports DigitalData.Modules.Database -Imports DigitalData.Modules.Interfaces -Imports DigitalData.Modules.Interfaces.Exceptions -Imports DigitalData.Modules.Jobs.Exceptions -Imports DigitalData.Modules.Logging -Imports FirebirdSql.Data.FirebirdClient -Imports System.Data.SqlClient - -Public Class ImportZUGFeRDFiles - Implements IJob - - Public Const ZUGFERD_IN = "ZUGFeRD in" - Public Const ZUGFERD_ERROR = "ZUGFeRD Error" - Public Const ZUGFERD_SUCCESS = "ZUGFeRD Success" - Public Const ZUGFERD_EML = "ZUGFeRD Eml" - Public Const ZUGFERD_REJECTED_EML = "ZUGFeRD Eml Rejected" - Public Const ZUGFERD_ATTACHMENTS = "ZUGFeRD Attachments" - Public Const ZUGFERD_NO_ZUGFERD = "Non-ZUGFeRD Files" - - Public HISTORY_ID As Integer - - Private Const DIRECTORY_DONT_MOVE = "DIRECTORY_DONT_MOVE" - - - ' List of allowed extensions for PDF/A Attachments - ' This list should not contain xml so the zugferd xml file will be filtered out - Private ReadOnly AllowedExtensions As List(Of String) = New List(Of String) From {"docx", "doc", "pdf", "xls", "xlsx", "ppt", "pptx", "txt"} - - Private ReadOnly _logger As Logger - Private ReadOnly _logConfig As LogConfig - Private ReadOnly _zugferd As ZUGFeRDInterface - Private ReadOnly _firebird As Firebird - Private ReadOnly _filesystem As Filesystem.File - Private ReadOnly _EmailOutAccountId As Integer - Private ReadOnly _mssql As MSSQLServer - Private ReadOnly _email As EmailFunctions - - - Public Sub New(LogConfig As LogConfig, Firebird As Firebird, pEmailOutAccount As Integer, pPortalName As String, Optional MSSQL As MSSQLServer = Nothing) - _logConfig = LogConfig - _logger = LogConfig.GetLogger() - _firebird = Firebird - _filesystem = New Filesystem.File(_logConfig) - _mssql = MSSQL - _EmailOutAccountId = pEmailOutAccount - _email = New EmailFunctions(LogConfig, _mssql, _firebird) - - _logger.Debug("Registering GDPicture License") - If _mssql IsNot Nothing Then - Dim oSQL = "SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE'" - Dim oLicenseKey As String = _mssql.GetScalarValue(oSQL) - _zugferd = New ZUGFeRDInterface(_logConfig, oLicenseKey) - Else - _logger.Warn("GDPicture License could not be registered! MSSQL is not enabled!") - Throw New ArgumentNullException("MSSQL") - End If - End Sub - - Private Function MoveAndRenameEmailToRejected(Args As WorkerArgs, MessageId As String) As EmailData - Dim oEmailData = _email.GetEmailDataForMessageId(MessageId) - Dim oSource = _email.GetOriginalEmailPath(Args.OriginalEmailDirectory, MessageId) - Dim oDateSubDirectoryName As String = Now.ToString("yyyy-MM-dd") - Dim oDestination As String - - Dim oRejectedDirectory As String = Path.Combine(Args.RejectedEmailDirectory, oDateSubDirectoryName) - - ' Create the destination directory if it does not exist - If Not Directory.Exists(oRejectedDirectory) Then - Try - Directory.CreateDirectory(oRejectedDirectory) - Catch ex As Exception - _logger.Error(ex) - End Try - End If - - ' If oEmailData is Nothing, TBEDM_EMAIL_PROFILER_HISTORY for MessageId was not found. - ' This only should happen when testing and db-tables are deleted frequently - If oEmailData Is Nothing Then - oDestination = _email.GetEmailPathWithSubjectAsName(oRejectedDirectory, MessageId) - Else - oDestination = _email.GetEmailPathWithSubjectAsName(oRejectedDirectory, oEmailData.Subject) - End If - - _logger.Debug("Destination for eml file is {0}", oDestination) - - Dim oFinalFileName = _filesystem.GetVersionedFilename(oDestination) - - _logger.Debug("Versioned filename for eml file is {0}", oFinalFileName) - - If oEmailData Is Nothing Then - _logger.Warn("Could not get Email Data from firebird-database. File {0} will not be moved!", oSource) - Return Nothing - End If - - Try - _logger.Info("Moving email from {0} to {1}", oSource, oFinalFileName) - IO.File.Move(oSource, oFinalFileName) - oEmailData.Attachment = oFinalFileName - Catch ex As Exception - _logger.Warn("File {0} could not be moved! Original Filename will be used!", oSource) - _logger.Error(ex) - oEmailData.Attachment = oSource - End Try - - Return oEmailData - End Function - - Private Sub AddRejectedState(oMessageID As String, oTitle As String, oTitle1 As String, oComment As String, Transaction As SqlTransaction) - Try - 'PRCUST_ADD_HISTORY_STATE: @MessageID VARCHAR(250), @TITLE1 VARCHAR(250), @TITLE2 VARCHAR(250) - Dim oSQL = $"EXEC PRCUST_ADD_HISTORY_STATE '{oMessageID}','{oTitle}','{oTitle1}','{oComment.Replace("'", "''")}'" - _mssql.ExecuteNonQuery(oSQL, Transaction) - Catch ex As Exception - _logger.Error(ex) - End Try - End Sub - - Public Sub Start(Arguments As Object) Implements IJob.Start - Dim oArgs As WorkerArgs = Arguments - Dim oPropertyExtractor = New PropertyValues(_logConfig) - Dim oAttachmentExtractor = New PDFEmbeds(_logConfig) - - _logger.Debug("Starting Job {0}", [GetType].Name) - - Try - For Each oPath As String In oArgs.WatchDirectories - Dim oDirInfo As New DirectoryInfo(oPath) - - _logger.Debug($"Start processing directory {oDirInfo.FullName}") - - If oDirInfo.Exists Then - ' Filter out *.lock files - Dim oFiles As List(Of FileInfo) = oDirInfo. - GetFiles(). - Where(Function(f) Not f.Name.EndsWith(".lock")). - ToList() - Dim oFileCount = oFiles.Count - Dim oCurrentFileCount = 0 - - If oFileCount = 0 Then - _logger.Debug("No files to process.") - Continue For - Else - _logger.Info("Found {0} files", oFileCount) - End If - - ' Group files by messageId - Dim oGrouped As Dictionary(Of String, List(Of FileInfo)) = _zugferd.FileGroup.GroupFiles(oFiles) - - _logger.Info("Found {0} file groups", oGrouped.Count) - - ' Process each file group together - For Each oFileGroup In oGrouped - ' Start a new transaction for each file group. - ' This way we can rollback database changes for the whole filegroup in case something goes wrong. - Dim oFBConnection As FbConnection = _firebird.GetConnection() - Dim oFBTransaction As FbTransaction = oFBConnection.BeginTransaction() - - Dim oSQLConnection As SqlConnection = _mssql.GetConnection() - Dim oSQLTransaction As SqlTransaction = oSQLConnection?.BeginTransaction() - - If oSQLConnection Is Nothing Then - _logger.Warn("SQL Connection was not set. No INSERTs for MSSQL Server will be performed!") - oArgs.InsertIntoSQLServer = False - End If - - ' Count the amount of ZUGFeRD files - Dim oZUGFeRDCount As Integer = 0 - - ' Set the default Move Directory - Dim oMoveDirectory As String = oArgs.ErrorDirectory - - ' Flag to save if the whole process was a success. - ' Will be set only at the end of the function if no error occurred. - Dim oIsSuccess As Boolean = False - - ' Flag to save if the occurred error (if any) was expected - ' Used to determine if transactions should be committed or not - Dim oExpectedError As Boolean = True - - ' Create file lists - Dim oFileGroupFiles As List(Of FileInfo) = oFileGroup.Value - Dim oEmailAttachmentFiles As New List(Of FileInfo) - Dim oEmbeddedAttachmentFiles As New List(Of PDFEmbeds.EmbeddedFile) - - Dim oMessageId As String = oFileGroup.Key - Dim oMissingProperties As New List(Of String) - Dim oMD5CheckSum As String = String.Empty - - _logger.NewBlock($"Message Id {oMessageId}") - _logger.Info("Start processing file group {0}", oMessageId) - - Try - For Each oFile In oFileGroupFiles - ' 09.12.2021: oDocument is now an Object, because have different classes corresponding to the - ' different versions of ZUGFeRD and the type is unknown at compile-time. - Dim oDocument As Object - - ' Start a global group counter for each file - Dim oGlobalGroupCounter = 0 - ' Clear missing properties for the new file - oMissingProperties = New List(Of String) - oCurrentFileCount += 1 - - ' Only pdf files are allowed from here on - If Not oFile.Name.ToUpper.EndsWith(".PDF") Then - _logger.Debug("Skipping non-pdf file {0}", oFile.Name) - oEmailAttachmentFiles.Add(oFile) - - ' Checking filesize for attachment files - If Check_FileSize(oFile, oArgs.MaxAttachmentSizeInMegaBytes) = False Then - _logger.Warn("Filesize for File [{0}] exceeded limit of {1} MB", oFile.Name, oArgs.MaxAttachmentSizeInMegaBytes) - Throw New FileSizeLimitReachedException(oFile.Name, oArgs.MaxAttachmentSizeInMegaBytes) - End If - - Continue For - End If - - _logger.Info("Start processing file {0}", oFile.Name) - - ' Checking filesize for pdf files - If Check_FileSize(oFile, oArgs.MaxAttachmentSizeInMegaBytes) = False Then - _logger.Warn("Filesize for File [{0}] exceeded limit of {1} MB", oFile.Name, oArgs.MaxAttachmentSizeInMegaBytes) - Throw New FileSizeLimitReachedException(oFile.Name, oArgs.MaxAttachmentSizeInMegaBytes) - End If - - Try - oDocument = _zugferd.ExtractZUGFeRDFileWithGDPicture(oFile.FullName) - Catch ex As ZUGFeRDExecption - Select Case ex.ErrorType - Case ZUGFeRDInterface.ErrorType.NoZugferd - _logger.Info("File [{0}] is not a valid ZUGFeRD document. Skipping.", oFile.Name) - oEmailAttachmentFiles.Add(oFile) - Continue For - - Case ZUGFeRDInterface.ErrorType.NoValidZugferd - _logger.Warn("File [{0}] is an Incorrectly formatted ZUGFeRD document!", oFile.Name) - Throw New InvalidFerdException() - - Case Else - _logger.Warn("Unexpected Error occurred while extracting ZUGFeRD Information from file {0}", oFile.Name) - Throw ex - End Select - End Try - - ' Extract all attachments with the extensions specified in `AllowedExtensions`. - ' If you need to extract and use embedded xml files, you need to filter out the zugferd-invoice.xml yourself. - ' Right now the zugferd-invoice.xml is filtered out because `AllowedExtensions` does not contain `xml`. - Dim oAttachments = oAttachmentExtractor.Extract(oFile.FullName, AllowedExtensions) - If oAttachments Is Nothing Then - _logger.Warn("Attachments for file [{0}] could not be extracted", oFile.FullName) - Else - oEmbeddedAttachmentFiles.AddRange(oAttachments) - End If - - ' Check the Checksum and rejection status - oMD5CheckSum = GenerateAndCheck_MD5Sum(oFile.FullName, oArgs.IgnoreRejectionStatus) - - ' Check if there are more than one ZUGFeRD files - If oZUGFeRDCount = 1 Then - Throw New TooMuchFerdsException() - End If - - ' Since extraction went well, increase the amount of ZUGFeRD files - oZUGFeRDCount += 1 - - ' Check the document against the configured property map and return: - ' - a List of valid properties - ' - a List of missing properties - Dim oCheckResult = _zugferd.PropertyValues.CheckPropertyValues(oDocument, oArgs.PropertyMap, oMessageId) - - _logger.Info("Properties checked: [{0}] missing properties / [{1}] valid properties found.", oCheckResult.MissingProperties.Count, oCheckResult.ValidProperties.Count) - - If oCheckResult.MissingProperties.Count > 0 Then - _logger.Warn("[{0}] missing properties found. Exiting.", oCheckResult.MissingProperties.Count) - oMissingProperties = oCheckResult.MissingProperties - Throw New MissingValueException(oFile) - End If - - _logger.Debug("No missing properties found. Continuing.") - - Dim oDelSQL = $"DELETE FROM TBEDMI_ITEM_VALUE where REFERENCE_GUID = '{oMessageId}'" - Dim oStep As String - - oStep = "Firebird TBEDMI_ITEM_VALUE Delete messageID Items" - Try - _firebird.ExecuteNonQueryWithConnection(oDelSQL, oFBConnection, Firebird.TransactionMode.ExternalTransaction, oFBTransaction) - Catch ex As Exception - _logger.Error(ex) - _logger.Warn("Step [{0}] with SQL [{1}] was not successful.", oStep, oDelSQL) - End Try - - If oArgs.InsertIntoSQLServer = True Then - oStep = "MSSQL TBEDMI_ITEM_VALUE Delete messageID Items" - Try - _mssql.ExecuteNonQueryWithConnectionObject(oDelSQL, oSQLConnection, MSSQLServer.TransactionMode.ExternalTransaction, oSQLTransaction) - Catch ex As Exception - _logger.Warn("Step [{0}] with SQL [{1}] was not successful.", oStep, oDelSQL) - End Try - End If - - For Each oProperty In oCheckResult.ValidProperties - Dim oGroupCounterValue = oProperty.GroupCounter - - ' If GroupCounter is -1, it means this is a default property that can only occur once. - ' Set the actual inserted value to 0 - If oGroupCounterValue = -1 Then - oGroupCounterValue = 0 - End If - - Dim oCommand = $"INSERT INTO {oProperty.TableName} (REFERENCE_GUID, ITEM_DESCRIPTION, ITEM_VALUE, GROUP_COUNTER,SPEC_NAME,IS_REQUIRED) VALUES - ('{oMessageId}', '{oProperty.Description}', '{oProperty.Value.Replace("'", "''")}', {oGroupCounterValue},'{oProperty.TableColumn}','{oProperty.ISRequired}')" - _logger.Debug("Mapping Property [{0}] with value [{1}], Will be inserted into table [{2}]", oProperty.TableColumn, oProperty.Value.Replace("'", "''"), oProperty.TableName) - ' Insert into SQL Server - If oArgs.InsertIntoSQLServer = True Then - Dim oResult = _mssql.ExecuteNonQueryWithConnectionObject(oCommand, oSQLConnection, MSSQLServer.TransactionMode.ExternalTransaction, oSQLTransaction) - If oResult = False Then - _logger.Warn($"SQL Command [{oCommand}] was not successful. Check the log.") - End If - End If - ' Insert into Firebird - _firebird.ExecuteNonQueryWithConnection(oCommand, oFBConnection, Firebird.TransactionMode.ExternalTransaction, oFBTransaction) - Next - Next - - 'Check if there are no ZUGFeRD files - If oZUGFeRDCount = 0 Then - ' If NonZugferdDirectory is not set, a NoFerdsException will be thrown and a rejection will be generated - ' This is the default/initial behaviour. - If oArgs.NonZugferdDirectory Is Nothing OrElse oArgs.NonZugferdDirectory = String.Empty Then - Throw New NoFerdsException() - End If - - ' Also, if the directory is set but does not exist, still a rejection will be generated. - If Not IO.Directory.Exists(oArgs.NonZugferdDirectory) Then - Throw New NoFerdsException() - End If - - ' Only if the directory is set and does exist, it will be used and any file groups which - ' do NOT CONTAIN ANY ZUGFERD DOCUMENTS, are moved to that directory. - Throw New NoFerdsAlternateException() - - End If - - 'If no errors occurred... - 'Log the History - If oMD5CheckSum <> String.Empty Then - Create_HistoryEntry(oMessageId, oMD5CheckSum, "SUCCESS", oFBTransaction) - - 'Dim oInsertCommand = $"INSERT INTO TBEDM_ZUGFERD_HISTORY_IN (MESSAGE_ID, MD5HASH) VALUES ('{oMessageId}', '{oMD5CheckSum}')" - '_firebird.ExecuteNonQueryWithConnection(oInsertCommand, oFBConnection, Firebird.TransactionMode.ExternalTransaction, oFBTransaction) - '' History ID is only need in case of an error - 'oFBTransaction.Commit() - 'Try - ' Dim oSQL = $"SELECT MAX(GUID) FROM TBEDM_ZUGFERD_HISTORY_IN WHERE MESSAGE_ID = '{oMessageId}'" - ' HISTORY_ID = _firebird.GetScalarValue(oSQL) - 'Catch ex As Exception - ' HISTORY_ID = 0 - 'End Try - Else - Create_HistoryEntry(oMessageId, String.Empty, "SUCCESS (with empty MD5Hash)", oFBTransaction) - End If - - oIsSuccess = True - oMoveDirectory = oArgs.SuccessDirectory - - Catch ex As MD5HashException - _logger.Error(ex) - - Dim oMessage = "REJECTED - Already processed (MD5Hash)" - Update_HistoryEntry(oMessageId, oMD5CheckSum, oMessage, oFBTransaction) - - Dim oBody = EmailStrings.EMAIL_MD5_ERROR - Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oMessageId) - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "MD5HashException", _EmailOutAccountId, oArgs.NamePortal) - AddRejectedState(oMessageId, "MD5HashException", "Die gesendete Rechnung wurde bereits verarbeitet!", "", oSQLTransaction) - - Catch ex As InvalidFerdException - _logger.Error(ex) - - ' When InvalidFerdException is thrown, we don't have a MD5Hash yet. - ' That 's why we set it to String.Empty here. - Create_HistoryEntry(oMessageId, String.Empty, "REJECTED - ZUGFeRD yes but incorrect format", oFBTransaction) - - Dim oBody = EmailStrings.EMAIL_INVALID_DOCUMENT - Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oMessageId) - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "InvalidFerdException", _EmailOutAccountId, oArgs.NamePortal) - AddRejectedState(oMessageId, "InvalidFerdException", "Inkorrekte Formate", "", oSQLTransaction) - - Catch ex As TooMuchFerdsException - _logger.Error(ex) - - Create_HistoryEntry(oMessageId, oMD5CheckSum, "REJECTED - More than one ZUGFeRD-document in email", oFBTransaction) - - Dim oBody = EmailStrings.EMAIL_TOO_MUCH_FERDS - Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oMessageId) - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "TooMuchFerdsException", _EmailOutAccountId, oArgs.NamePortal) - AddRejectedState(oMessageId, "TooMuchFerdsException", "Email enthielt mehr als ein ZUGFeRD-Dokument", "", oSQLTransaction) - - Catch ex As NoFerdsException - _logger.Error(ex) - - Create_HistoryEntry(oMessageId, oMD5CheckSum, "REJECTED - no ZUGFeRD-Document in email", oFBTransaction) - - Dim oBody = EmailStrings.EMAIL_NO_FERDS - Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oMessageId) - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "NoFerdsException", _EmailOutAccountId, oArgs.NamePortal) - AddRejectedState(oMessageId, "NoFerdsException", " Email enthielt keine ZUGFeRD-Dokumente", "", oSQLTransaction) - - Catch ex As NoFerdsAlternateException - ' TODO: Maybe dont even log this 'error', since it's not really an error and it might happen *A LOT* - _logger.Error(ex) - oMoveDirectory = oArgs.NonZugferdDirectory - - Catch ex As MissingValueException - _logger.Error(ex) - - Dim oMessage As String = "" - For Each prop In oMissingProperties - oMessage &= $"- {prop}" - Next - - Create_HistoryEntry(oMessageId, oMD5CheckSum, $"REJECTED - Missing Required Properties: [{oMessage}]", oFBTransaction) - - Dim oBody = CreateBodyForMissingProperties(ex.File.Name, oMissingProperties) - Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oMessageId) - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "MissingValueException", _EmailOutAccountId, oArgs.NamePortal) - AddRejectedState(oMessageId, "MissingValueException", "Es fehlten ZugferdSpezifikationen", oMessage, oSQLTransaction) - - Catch ex As FileSizeLimitReachedException - _logger.Error(ex) - - Create_HistoryEntry(oMessageId, oMD5CheckSum, "REJECTED - File size limit reached", oFBTransaction) - - Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oMessageId) - - Dim oKey = FileSizeLimitReachedException.KEY_FILENAME - Dim oFileExceedingThreshold As String = IIf(ex.Data.Contains(oKey), ex.Data.Item(oKey), "") - Dim oFileWithoutMessageId = oFileExceedingThreshold. - Replace(oMessageId, ""). - Replace("~", "") - - Dim oBody = String.Format(EmailStrings.EMAIL_FILE_SIZE_REACHED, oArgs.MaxAttachmentSizeInMegaBytes, oFileWithoutMessageId) - - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "FileSizeLimitReachedException", _EmailOutAccountId, oArgs.NamePortal) - AddRejectedState(oMessageId, "FileSizeLimitReachedException", "Erlaubte Dateigröße überschritten", "", oSQLTransaction) - - Catch ex As OutOfMemoryException - _logger.Warn("OutOfMemory Error occurred: {0}", ex.Message) - _logger.Error(ex) - - ' Send Email to Digital Data - Dim oBody = CreateBodyForUnhandledException(oMessageId, ex) - Dim oEmailData As New EmailData With { - .From = oArgs.ExceptionEmailAddress, - .Subject = $"OutOfMemoryException im ZUGFeRD-Parser @ {oMessageId}" - } - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "OutOfMemoryException", _EmailOutAccountId, oArgs.NamePortal) - - ' Rollback Firebird - oFBTransaction.Rollback() - - ' Rollback MSSQL - oSQLTransaction.Rollback() - - oMoveDirectory = DIRECTORY_DONT_MOVE - - oExpectedError = False - - Catch ex As Exception - _logger.Warn("Unknown Error occurred: {0}", ex.Message) - _logger.Error(ex) - - ' Send Email to Digital Data - Dim oBody = CreateBodyForUnhandledException(oMessageId, ex) - Dim oEmailData As New EmailData With { - .From = oArgs.ExceptionEmailAddress, - .Subject = $"UnhandledException im ZUGFeRD-Parser @ {oMessageId}" - } - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "UnhandledException", _EmailOutAccountId, oArgs.NamePortal) - - ' Rollback Firebird - oFBTransaction.Rollback() - - ' Rollback MSSQL - oSQLTransaction.Rollback() - - oMoveDirectory = DIRECTORY_DONT_MOVE - - oExpectedError = False - - Finally - Try - ' If an application error occurred, dont move files so they will be processed again later - If oMoveDirectory = DIRECTORY_DONT_MOVE Then - _logger.Info("Application Error occurred. Files for message Id {0} will not be moved.", oMessageId) - Else - ' Move all files of the current group - MoveFiles(oArgs, oMessageId, oFileGroupFiles, oEmailAttachmentFiles, oEmbeddedAttachmentFiles, oMoveDirectory, oIsSuccess) - End If - _logger.Info("Finished processing file group {0}", oMessageId) - Catch ex As Exception - ' Send Email to Digital Data - Dim oBody = CreateBodyForUnhandledException(oMessageId, ex) - Dim oEmailData As New EmailData With { - .From = oArgs.ExceptionEmailAddress, - .Subject = $"FileMoveException im ZUGFeRD-Parser @ {oMessageId}" - } - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "FileMoveException", _EmailOutAccountId, oArgs.NamePortal) - - _logger.Warn("Could not move files!") - _logger.Error(ex) - Throw ex - Finally - _logger.EndBlock() - End Try - - Try - ' If everything went OK or an expected error occurred, - ' finally commit all changes To the Database - ' ================================================================== - If oIsSuccess Or oExpectedError Then - ' Commit SQL Transaction - oSQLTransaction.Commit() - - ' Commit Firebird Transaction - oFBTransaction.Commit() - End If - Catch ex As Exception - _logger.Error(ex) - _logger.Warn("Database Transactions were not committed successfully.") - End Try - - Try - oFBConnection.Close() - oSQLConnection.Close() - Catch ex As Exception - _logger.Error(ex) - _logger.Warn("Database Connections were not closed successfully.") - End Try - End Try - Next - End If - Next - - _logger.Debug("Finishing Job {0}", Me.GetType.Name) - Catch ex As Exception - _logger.Error(ex) - _logger.Info("Job Failed! See error log for details") - End Try - End Sub - - Private Sub MoveFiles( - Args As WorkerArgs, - MessageId As String, - Files As List(Of FileInfo), - AttachmentFiles As List(Of FileInfo), - EmbeddedAttachments As List(Of PDFEmbeds.EmbeddedFile), - MoveDirectory As String, - IsSuccess As Boolean) - - Dim oFinalMoveDirectory As String = MoveDirectory - Dim oDateSubDirectoryName As String = Now.ToString("yyyy\\MM\\dd") - Dim oAttachmentDirectory As String = Path.Combine(oFinalMoveDirectory, Args.AttachmentsSubDirectory, oDateSubDirectoryName) - - ' Files will be moved to a subfolder for the current day if they are rejected - If Not IsSuccess Then - oFinalMoveDirectory = Path.Combine(oFinalMoveDirectory, oDateSubDirectoryName) - End If - - ' Create directories if they don't exist - If Not Directory.Exists(oFinalMoveDirectory) Then - Try - Directory.CreateDirectory(oFinalMoveDirectory) - Catch ex As Exception - _logger.Error(ex) - End Try - End If - - If Not Directory.Exists(oAttachmentDirectory) And AttachmentFiles.Count > 0 Then - Try - Directory.CreateDirectory(oAttachmentDirectory) - Catch ex As Exception - _logger.Error(ex) - End Try - End If - - ' Filter out Attachments from `Files` - Dim oInvoiceFiles As List(Of FileInfo) = Files.Except(AttachmentFiles).ToList() - - ' Move PDF/A Files - For Each oFile In oInvoiceFiles - Try - Dim oFilePath = _filesystem.GetVersionedFilename(Path.Combine(oFinalMoveDirectory, oFile.Name)) - - _filesystem.MoveTo(oFile.FullName, oFilePath, oFinalMoveDirectory) - - _logger.Info("File moved to {0}", oFilePath) - Catch ex As Exception - _logger.Warn("Could not move file {0}", oFile.FullName) - _logger.Error(ex) - End Try - Next - - ' Move non-PDF/A Email Attachments/Files - For Each oFile In AttachmentFiles - Try - Dim oFilePath = _filesystem.GetVersionedFilename(Path.Combine(oAttachmentDirectory, oFile.Name)) - - _filesystem.MoveTo(oFile.FullName, oFilePath, oAttachmentDirectory) - _logger.Info("Attachment moved to {0}", oFilePath) - Catch ex As Exception - _logger.Warn("Could not move attachment {0}", oFile.FullName) - _logger.Error(ex) - End Try - Next - - ' Write Embedded Files to disk - For Each oResult In EmbeddedAttachments - Try - Dim oFileName As String = $"{MessageId}~{oResult.FileName}" - Dim oFilePath As String = Path.Combine(oAttachmentDirectory, oFileName) - - If Not File.Exists(oAttachmentDirectory) Then - Directory.CreateDirectory(oAttachmentDirectory) - End If - - Using oWriter As New FileStream(oFilePath, FileMode.Create) - oWriter.Write(oResult.FileContents, 0, oResult.FileContents.Length) - _logger.Info("Embedded Attachment moved to {0}", oFilePath) - End Using - Catch ex As Exception - _logger.Warn("Could not save embedded attachment {0}", oResult.FileName) - _logger.Error(ex) - End Try - Next - - _logger.Info("Finished moving files") - End Sub - - - Private Function CreateBodyForMissingProperties(OriginalFilename As String, MissingProperties As List(Of String)) As String - Dim oBody = String.Format(EmailStrings.EMAIL_MISSINGPROPERTIES_1, OriginalFilename) - - If MissingProperties.Count > 0 Then - oBody &= $"{vbNewLine}{vbNewLine}" - oBody &= EmailStrings.EMAIL_MISSINGPROPERTIES_2 - oBody &= $"{vbNewLine}{vbNewLine}" - - For Each prop In MissingProperties - oBody &= $"- {prop}" - Next - End If - - Return oBody - End Function - - Private Function CreateBodyForUnhandledException(MessageId As String, Exception As Exception) As String - Dim oBody = String.Format(EmailStrings.EMAIL_UNHANDLED_EXCEPTION, MessageId, Exception.Message, Exception.StackTrace) - - Return oBody - End Function - - Private Function CreateMD5(ByVal Filename As String) As String - Try - Dim oMD5 As New MD5CryptoServiceProvider - Dim oHash As Byte() - Dim oHashString As String - Dim oResult As String = "" - - Using oFileStream As New FileStream(Filename, FileMode.Open, FileAccess.Read, FileShare.Read, 8192) - oHash = oMD5.ComputeHash(oFileStream) - oHashString = BitConverter.ToString(oHash) - End Using - - oResult = oHashString.Replace("-", "") - Return oResult - Catch ex As Exception - _logger.Error(ex) - Return "" - End Try - End Function - - Private Function Create_HistoryEntry(MessageId As String, MD5Checksum As String, Message As String, Transaction As FbTransaction) As Boolean - Try - Dim oConnection = _firebird.GetConnection() - Dim oSQL = $"INSERT INTO TBEDM_ZUGFERD_HISTORY_IN (COMMENT, MD5HASH, MESSAGE_ID) VALUES ('{Message}', '{MD5Checksum}', '{MessageId}')" - - ' 09.07.2021: This can't be in the transaction since the history - ' Entry needs to be accessed by MoveAndRenameEmailToRejected shortly after - _firebird.ExecuteNonQueryWithConnection(oSQL, oConnection, Firebird.TransactionMode.WithTransaction) - - ' Close the connection - oConnection.Close() - If Message.Contains("REJECTED") Then - oSQL = $"UPDATE TBEMLP_HISTORY SET STATUS = 'REJECTED', COMMENT = '{Message}', CUST_REJECTED = 1,CUST_REJECTED_WHEN = GETDATE() WHERE EMAIL_MSGID = '{MessageId}'" - _mssql.ExecuteNonQuery(oSQL) - End If - - Return True - Catch ex As Exception - _logger.Warn("History Entry count not be created for message id [{0}] and md5 [{1}]", MessageId, MD5Checksum) - _logger.Error(ex) - - Return False - End Try - End Function - - Private Function Update_HistoryEntry(MessageId As String, MD5Checksum As String, Message As String, Transaction As FbTransaction) As Boolean - Try - Dim oConnection = _firebird.GetConnection() - Dim oSQL = $"UPDATE TBEDM_ZUGFERD_HISTORY_IN SET COMMENT = '{Message}' WHERE MD5HASH = '{MD5Checksum}' AND MESSAGE_ID = '{MessageId}'" - - _firebird.ExecuteNonQueryWithConnection(oSQL, oConnection, Firebird.TransactionMode.WithTransaction) - - ' Close the connection - oConnection.Close() - - Return True - Catch ex As Exception - _logger.Warn("History Entry count not be updated for message id [{0}] and md5 [{1}]", MessageId, MD5Checksum) - _logger.Error(ex) - - Return False - End Try - End Function - - ''' - ''' Generates the MD5 Checksum of a file and checks it against the histroy table TBEDM_ZUGFERD_HISTORY_IN - ''' - ''' The path of the file to be checked - ''' Should the check take into account the rejection status of the file? - ''' The MD5 Checksum of the file, or an empty string, if the Checksum could not be created - ''' Throws, when the file should be rejected, ie. if it already exists in the table - Private Function GenerateAndCheck_MD5Sum(pFilePath As String, pIgnoreRejectionStatus As Boolean) As String - Dim oMD5CheckSum = CreateMD5(pFilePath) - - ' Exit if MD5 could not be created - If oMD5CheckSum = String.Empty Then - _logger.Warn("MD5 Checksum is nothing for file [{0}]!", pFilePath) - Return oMD5CheckSum - End If - - ' Check if Checksum exists in History Table - Dim oCheckCommand = $"SELECT * FROM TBEDM_ZUGFERD_HISTORY_IN WHERE GUID = (SELECT MAX(GUID) FROM TBEDM_ZUGFERD_HISTORY_IN WHERE UPPER(MD5HASH) = UPPER('{oMD5CheckSum}'))" - Dim oTable As DataTable = _firebird.GetDatatable(oCheckCommand, Firebird.TransactionMode.NoTransaction) - - ' If History entries could not be fetched, just return the MD5 Checksum - If IsNothing(oTable) Then - _logger.Warn("Be careful: oExistsDT is nothing for file [{0}]!", pFilePath) - Return oMD5CheckSum - End If - - ' If Checksum does not exist in History entries, just return the MD5 Checksum - If oTable.Rows.Count = 0 Then - _logger.Debug("File [{0}] was not found in History!", pFilePath) - Return oMD5CheckSum - End If - - ' ==================================================== - ' Checksum exists in History entries, reject! - ' ==================================================== - - Dim oRejected As Boolean - Dim oHistoryId As Integer - - ' Try to read Rejected Status and History Id - Try - Dim oRow As DataRow = oTable.Rows.Item(0) - oRejected = DirectCast(oRow.Item("REJECTED"), Boolean) - oHistoryId = oRow.Item("GUID") - - Catch ex As Exception - _logger.Warn("Error while converting REJECTED: " & ex.Message) - oRejected = False - - End Try - _logger.Info("File has already been processed...") - ' If the file was already rejected, it is allowed to be processed again, - ' even if the Checksum exists in the history entries (default case) - ' Which means, if it was not rejected before, it will be rejected in any case! - ' - ' This logic can be overwritten by the IgnoreRejectionStatus parameter. - ' If it is set to true, the file will be rejected if the file exists in the history entries, - ' regardless of the rejected parameter. - If oRejected = True And pIgnoreRejectionStatus = True Then - _logger.Info("ZuGFeRDFile already has been processed, but formerly obviously was rejected!") - Else - Throw New MD5HashException($"There is already an identical invoice! - HistoryID [{oHistoryId}]") - End If - - Return oMD5CheckSum - End Function - - ''' - ''' Checks the size of the supplied file. - ''' - ''' - ''' - ''' - Private Function Check_FileSize(pFileInfo As FileInfo, pMaxFileSizeInMegaBytes As Integer) As Boolean - _logger.Info("Checking Filesize of {0}", pFileInfo.Name) - _logger.Debug("Filesize threshold is {0} MB.", pMaxFileSizeInMegaBytes) - - If pMaxFileSizeInMegaBytes <= 0 Then - _logger.Debug("Filesize is not configured. Skipping check.") - Return True - End If - - Dim oMaxSize = pMaxFileSizeInMegaBytes * 1024 * 1024 - - If oMaxSize > 0 And pFileInfo.Length > oMaxSize Then - _logger.Debug("Filesize is bigger than threshold. Rejecting.") - Return False - Else - _logger.Debug("Filesize is smaller than threshold. All fine.") - Return True - End If - End Function -End Class diff --git a/Modules.Jobs/EDMI/ZUGFeRD/WorkerArgs.vb b/Modules.Jobs/EDMI/ZUGFeRD/WorkerArgs.vb deleted file mode 100644 index 662f107f..00000000 --- a/Modules.Jobs/EDMI/ZUGFeRD/WorkerArgs.vb +++ /dev/null @@ -1,23 +0,0 @@ -Imports System.Collections.Generic -Imports DigitalData.Modules.Interfaces - -Public Class WorkerArgs - ' Directory Parameters - Public WatchDirectories As New List(Of String) - Public SuccessDirectory As String = Nothing - Public ErrorDirectory As String = Nothing - Public OriginalEmailDirectory As String = Nothing - Public RejectedEmailDirectory As String = Nothing - Public AttachmentsSubDirectory As String = Nothing - Public NonZugferdDirectory As String = Nothing - - ' Property Parameter - Public PropertyMap As New Dictionary(Of String, XmlItemProperty) - - ' Misc Flag Parameters - Public InsertIntoSQLServer As Boolean = False - Public ExceptionEmailAddress As String = Nothing - Public IgnoreRejectionStatus As Boolean = False - Public MaxAttachmentSizeInMegaBytes As Integer = -1 - Public NamePortal As String = "NO PORTAL_NAME IN CONFIG" -End Class \ No newline at end of file diff --git a/Modules.Jobs/Exceptions.vb b/Modules.Jobs/Exceptions.vb deleted file mode 100644 index 17d69987..00000000 --- a/Modules.Jobs/Exceptions.vb +++ /dev/null @@ -1,67 +0,0 @@ -Imports System.IO - -Public Class Exceptions - Public Class MissingValueException - Inherits ApplicationException - - Public ReadOnly File As FileInfo - - Public Sub New(File As FileInfo) - MyBase.New() - - Me.File = File - End Sub - End Class - - Public Class TooMuchFerdsException - Inherits ApplicationException - - Public Sub New() - MyBase.New("More than one ZUGFeRD document found") - End Sub - End Class - - Public Class FileSizeLimitReachedException - Inherits ApplicationException - - Public Const KEY_FILENAME = "FILENAME" - - Public Sub New(pFilePath As String, pFileSizeLimitInMegaBytes As Integer) - MyBase.New($"At least one file exceeded the filesize limit of {pFileSizeLimitInMegaBytes}MB: {pFilePath}") - Data.Add(KEY_FILENAME, pFilePath) - End Sub - End Class - - Public Class InvalidFerdException - Inherits ApplicationException - - Public Sub New() - MyBase.New("ZUGFeRD document found but was not formatted correctly") - End Sub - End Class - - Public Class NoFerdsException - Inherits ApplicationException - - Public Sub New() - MyBase.New("No ZUGFeRD documents found") - End Sub - End Class - - Public Class NoFerdsAlternateException - Inherits ApplicationException - - Public Sub New() - MyBase.New("No ZUGFeRD documents found, no rejection will be generated") - End Sub - End Class - - - Public Class MD5HashException - Inherits ApplicationException - - Public Sub New(pInfo As String) - MyBase.New(pInfo) - End Sub - End Class -End Class diff --git a/Modules.Jobs/JobArgs.vb b/Modules.Jobs/JobArgs.vb deleted file mode 100644 index 43156ec6..00000000 --- a/Modules.Jobs/JobArgs.vb +++ /dev/null @@ -1,4 +0,0 @@ -Public Class JobArgs - Public Enabled As Boolean - Public Interval As Long -End Class diff --git a/Modules.Jobs/JobBase.vb b/Modules.Jobs/JobBase.vb deleted file mode 100644 index 0f02b631..00000000 --- a/Modules.Jobs/JobBase.vb +++ /dev/null @@ -1,16 +0,0 @@ -Imports DigitalData.Modules.Database -Imports DigitalData.Modules.Logging - -Public Class JobBase - Protected _LogConfig As LogConfig - Protected _Logger As Logger - Protected _Firebird As Firebird - Protected _MSSQL As MSSQLServer - - Public Sub New(LogConfig As LogConfig, Firebird As Firebird, MSSQL As MSSQLServer) - _LogConfig = LogConfig - _Logger = LogConfig.GetLogger() - _Firebird = Firebird - _MSSQL = MSSQL - End Sub -End Class diff --git a/Modules.Jobs/JobConfig.vb b/Modules.Jobs/JobConfig.vb deleted file mode 100644 index 4c09a2cd..00000000 --- a/Modules.Jobs/JobConfig.vb +++ /dev/null @@ -1,8 +0,0 @@ -Imports System.Collections.Generic - -Public Class JobConfig - Public Enabled As Boolean - Public StartImmediately As Boolean - Public CronExpression As String - Public Arguments As Dictionary(Of String, String) -End Class \ No newline at end of file diff --git a/Modules.Jobs/JobConfigParser.vb b/Modules.Jobs/JobConfigParser.vb deleted file mode 100644 index fff93541..00000000 --- a/Modules.Jobs/JobConfigParser.vb +++ /dev/null @@ -1,78 +0,0 @@ -Imports System.Collections.Generic -Imports System.Text.RegularExpressions - -Public Class JobConfigParser - Private Shared JobOptionsRegex As New Regex("(?True|False|Debug)\|(?[\w\d\s,\?*-/]*)(?:\|(?(?:\w*::[^,\n]+,?)*))?") - Private Shared JobArgumentsRegex As New Regex("(?:(?:\w+::[^,\n]+,?)?)+") - Private Const ARGS_ITEM_DELIMITER As String = "," - Private Const ARGS_KEYVALUE_DELIMITER As String = "::" - Private Const ARGS_LIST_DELIMITER As String = "|" - - ''' - ''' Parse a job config string. ex: True|0 0/3 * * * ?|Arg1::Foo,Arg2::Bar - ''' - ''' - ''' A populated JobConfig object - Public Shared Function ParseConfig(ConfigString As String) As JobConfig - If JobOptionsRegex.IsMatch(ConfigString) Then - Dim oMatches = JobOptionsRegex.Matches(ConfigString) - Dim oOptions As New JobConfig - - Dim oSplitOptions As String() = ConfigString.Split(ARGS_LIST_DELIMITER) - - If oSplitOptions.Length = 3 Then - oOptions = ParseEnabled(oSplitOptions(0), oOptions) - oOptions.CronExpression = oSplitOptions(1) - oOptions.Arguments = ParseOptionalArguments(oSplitOptions(2)) - ElseIf oSplitOptions.Length = 2 Then - oOptions = ParseEnabled(oSplitOptions(0), oOptions) - oOptions.CronExpression = oSplitOptions(1) - oOptions.Arguments = New Dictionary(Of String, String) - Else - Throw New ArgumentException("Config Malformed") - End If - - Return oOptions - Else - Throw New ArgumentException("Config Malformed") - End If - End Function - - Public Shared Function ParseEnabled(EnabledValue As String, Options As JobConfig) As JobConfig - Select Case EnabledValue - Case "True" - Options.Enabled = True - Options.StartImmediately = False - Case "Debug" - Options.Enabled = True - Options.StartImmediately = True - Case Else - Options.Enabled = False - Options.StartImmediately = False - End Select - - Return Options - End Function - - Private Shared Function ParseOptionalArguments(ArgsString As String) As Dictionary(Of String, String) - Dim oArgsDictionary As New Dictionary(Of String, String) - - If JobArgumentsRegex.IsMatch(ArgsString) Then - Dim oArgs As String() = ArgsString.Split(ARGS_ITEM_DELIMITER) - - For Each oArg In oArgs - Dim oDelimiter As String() = New String() {ARGS_KEYVALUE_DELIMITER} - Dim oArgSplit = oArg.Split(oDelimiter, StringSplitOptions.RemoveEmptyEntries) - Regex.Split(oArg, "::") - - If oArgSplit.Length = 2 Then - oArgsDictionary.Add(oArgSplit(0), oArgSplit(1)) - Else - Throw New ArgumentException("Config Malformed") - End If - Next - End If - - Return oArgsDictionary - End Function -End Class diff --git a/Modules.Jobs/JobInterface.vb b/Modules.Jobs/JobInterface.vb deleted file mode 100644 index edd8a83a..00000000 --- a/Modules.Jobs/JobInterface.vb +++ /dev/null @@ -1,9 +0,0 @@ -Public Interface IJob - Sub Start(Arguments As Object) -End Interface - -Public Interface IJob(Of T) - Sub Start(Arguments As T) - - Function ShouldStart(Arguments As T) As Boolean -End Interface diff --git a/Modules.Jobs/Jobs.vbproj b/Modules.Jobs/Jobs.vbproj deleted file mode 100644 index 5f82fb33..00000000 --- a/Modules.Jobs/Jobs.vbproj +++ /dev/null @@ -1,139 +0,0 @@ - - - - - Debug - AnyCPU - {39EC839A-3C30-4922-A41E-6B09D1DDE5C3} - Library - DigitalData.Modules.Jobs - DigitalData.Modules.Jobs - 512 - Empty - v4.6.1 - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - true - - - AnyCPU - true - full - true - true - bin\Debug\ - - - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - AnyCPU - pdbonly - false - true - true - bin\Release\ - - - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - - - - - - - - SettingsSingleFileGenerator - Settings.Designer.vb - - - - - - {6ea0c51f-c2b1-4462-8198-3de0b32b74f8} - Base - - - {44982f9b-6116-44e2-85d0-f39650b1ef99} - Config - - - {991d0231-4623-496d-8bd0-9ca906029cbc} - Filesystem - - - {EAF0EA75-5FA7-485D-89C7-B2D843B03A96} - Database - - - {AB6F09BF-E794-4F6A-94BB-C97C0BA84D64} - Interfaces - - - {903B2D7D-3B80-4BE9-8713-7447B704E1B0} - Logging - - - - - - - - - - - - - - - - - - - - - - - True - True - Settings.settings - - - - - ..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll - - - - ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.Jobs/My Project/AssemblyInfo.vb b/Modules.Jobs/My Project/AssemblyInfo.vb deleted file mode 100644 index a6872d43..00000000 --- a/Modules.Jobs/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,34 +0,0 @@ -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 die standardmäßigen Build- und Revisionsnummern -' übernehmen, indem Sie "*" eingeben: - - - diff --git a/Modules.Jobs/My Project/Settings.Designer.vb b/Modules.Jobs/My Project/Settings.Designer.vb deleted file mode 100644 index b89e781b..00000000 --- a/Modules.Jobs/My Project/Settings.Designer.vb +++ /dev/null @@ -1,71 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - - - _ -Partial Friend NotInheritable Class Settings - Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As Settings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()),Settings) - -#Region "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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 Settings - 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 - -Namespace My - - _ - Friend Module MySettingsProperty - - _ - Friend ReadOnly Property Settings() As Global.DigitalData.Modules.Jobs.Settings - Get - Return Global.DigitalData.Modules.Jobs.Settings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Jobs/My Project/Settings.settings b/Modules.Jobs/My Project/Settings.settings deleted file mode 100644 index e69de29b..00000000 diff --git a/Modules.Jobs/packages.config b/Modules.Jobs/packages.config deleted file mode 100644 index dcdadb44..00000000 --- a/Modules.Jobs/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Modules.Language/DataTableEx.vb b/Modules.Language/DataTableEx.vb deleted file mode 100644 index 936d29c0..00000000 --- a/Modules.Language/DataTableEx.vb +++ /dev/null @@ -1,33 +0,0 @@ -Imports System.Runtime.CompilerServices - -Public Module DataTableEx - - Public Function ItemEx(Of T)(pRow As DataRow, pFieldName As String, Optional pDefaultValue As T = Nothing) As T - Try - Return Utils.NotNull(pRow.Item(pFieldName), pDefaultValue) - Catch ex As Exception - Return Nothing - End Try - End Function - - - Public Function ItemEx(Of T)(pRow As DataRow, pFieldIndex As Integer, Optional pDefaultValue As T = Nothing) As T - Try - Return Utils.NotNull(pRow.Item(pFieldIndex), pDefaultValue) - Catch ex As Exception - Return Nothing - End Try - End Function - - - Public Function First(pTable As DataTable) As DataRow - Try - If pTable Is Nothing OrElse pTable.Rows.Count = 0 Then - Return Nothing - End If - Return pTable.Rows.Item(0) - Catch ex As Exception - Return Nothing - End Try - End Function -End Module diff --git a/Modules.Language/DateTimeEx.vb b/Modules.Language/DateTimeEx.vb deleted file mode 100644 index 4cc4d86e..00000000 --- a/Modules.Language/DateTimeEx.vb +++ /dev/null @@ -1,12 +0,0 @@ -Imports System.Runtime.CompilerServices - -Public Module DateTimeEx - Const UnixEraStartTicks As Long = 621355968000000000 - Public Function UnixTimestamp(value As Date) As Long - Dim UnixEraTicks = value.Ticks - UnixEraStartTicks - Return UnixEraTicks \ 10000 - End Function - Public Function DateFromUnix(timestamp As Long) As Date - Return New Date(UnixEraStartTicks + timestamp * 10000) - End Function -End Module diff --git a/Modules.Language/InvalidChars.vb b/Modules.Language/InvalidChars.vb deleted file mode 100644 index c6af2682..00000000 --- a/Modules.Language/InvalidChars.vb +++ /dev/null @@ -1,8 +0,0 @@ -Imports System.Text.RegularExpressions - -Friend Class InvalidChars - Public Shared Filenames As String = Regex.Escape(New String(IO.Path.GetInvalidFileNameChars())) - Public Shared Paths As String = Regex.Escape(New String(IO.Path.GetInvalidPathChars())) - Public Shared UnicodeSurrogates = "\p{Cs}" - Public Shared Emojis = "\uD83D(?:\uDC68(?:\uD83C(?:[\uDFFB-\uDFFF]\u200D(?:\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83E(?:\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFF]|[\uDDAF-\uDDB3\uDDBC\uDDBD])|[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|[\uDFFB-\uDFFF])|\u200D(?:\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83D(?:(?:[\uDC68\uDC69]\u200D\uD83D)?(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|\uDC69(?:\uD83C(?:[\uDFFB-\uDFFF]\u200D(?:\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D[\uDC68\uDC69]|[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83E(?:\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFF]|[\uDDAF-\uDDB3\uDDBC\uDDBD])|[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|[\uDFFB-\uDFFF])|\u200D(?:\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D[\uDC68\uDC69]|[\uDC68\uDC69])|\uD83D(?:(?:\uDC69\u200D\uD83D)?(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|\uDC6F)(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF](?:\u200D[\u2640\u2642]\uFE0F?)?|\u200D[\u2640\u2642]\uFE0F?)?|\uDC41(?:\uFE0F(?:\u200D\uD83D\uDDE8\uFE0F?)?|\u200D\uD83D\uDDE8\uFE0F?)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD74\uDD90]\uD83C[\uDFFB-\uDFFF]|\uDC08(?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD74\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB])|\uD83E(?:\uDDD1(?:\uD83C(?:[\uDFFB-\uDFFF]\u200D(?:\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uD83E(?:\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|[\uDDAF-\uDDB3\uDDBC\uDDBD])|[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|[\uDFFB-\uDFFF])|\u200D(?:\uD83E(?:\uDD1D\u200D\uD83E\uDDD1|[\uDDAF-\uDDB3\uDDBC\uDDBD])|[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF](?:\u200D[\u2640\u2642]\uFE0F?)?|\u200D[\u2640\u2642]\uFE0F?)?|[\uDD3C\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|\uD83C(?:\uDFF4(?:\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\u200D\u2620\uFE0F?)?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF](?:\u200D[\u2640\u2642]\uFE0F?)?|\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDFF3(?:\uFE0F(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|(?:[\uDFCB\uDFCC]\u200D[\u2640\u2642]|[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7])\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCB\uDFCC\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF])|\u26F9(?:(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)(?:\u200D[\u2640\u2642]\uFE0F?)?|\u200D[\u2640\u2642]\uFE0F?)?|\u2764(?:\uFE0F(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|[\#\*0-9]\uFE0F?\u20E3|[\u261D\u270C\u270D]\uD83C[\uDFFB-\uDFFF]|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u00A9\u00AE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]\uFE0F?|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]" -End Class diff --git a/Modules.Language/Language.vbproj b/Modules.Language/Language.vbproj deleted file mode 100644 index f72ac163..00000000 --- a/Modules.Language/Language.vbproj +++ /dev/null @@ -1,126 +0,0 @@ - - - - - Debug - AnyCPU - {D3C8CFED-D6F6-43A8-9BDF-454145D0352F} - Library - DigitalData.Modules.Language - DigitalData.Modules.Language - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Language.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Language.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {903B2D7D-3B80-4BE9-8713-7447B704E1B0} - Logging - - - - \ No newline at end of file diff --git a/Modules.Language/My Project/Application.Designer.vb b/Modules.Language/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.Language/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.Language/My Project/Application.myapp b/Modules.Language/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.Language/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.Language/My Project/AssemblyInfo.vb b/Modules.Language/My Project/AssemblyInfo.vb deleted file mode 100644 index 14982058..00000000 --- a/Modules.Language/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.Language/My Project/Resources.Designer.vb b/Modules.Language/My Project/Resources.Designer.vb deleted file mode 100644 index 92ca1652..00000000 --- a/Modules.Language/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Language.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.Language/My Project/Resources.resx b/Modules.Language/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.Language/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.Language/My Project/Settings.Designer.vb b/Modules.Language/My Project/Settings.Designer.vb deleted file mode 100644 index 503a0ca8..00000000 --- a/Modules.Language/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Language.My.MySettings - Get - Return Global.DigitalData.Modules.Language.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Language/My Project/Settings.settings b/Modules.Language/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.Language/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.Language/StringEx.vb b/Modules.Language/StringEx.vb deleted file mode 100644 index a4cb6f4d..00000000 --- a/Modules.Language/StringEx.vb +++ /dev/null @@ -1,15 +0,0 @@ -Imports System.Runtime.CompilerServices - -Public Module StringEx - ''' - ''' Truncates a string to the specified length if it exceeds that length. - ''' - ''' The string - ''' The maximum string length - ''' The truncated string - - Public Function Truncate(pString As String, pLength As Integer) As String - If String.IsNullOrEmpty(pString) Then Return pString - Return pString.Substring(0, Math.Min(pLength, pString.Length)) - End Function -End Module diff --git a/Modules.Language/Utils.vb b/Modules.Language/Utils.vb deleted file mode 100644 index 04c6b1b6..00000000 --- a/Modules.Language/Utils.vb +++ /dev/null @@ -1,209 +0,0 @@ -Imports System.Drawing -Imports System.Runtime.CompilerServices -Imports System.Text -Imports System.Text.RegularExpressions -Imports System.Windows.Forms -''' -''' Provides common utility functions that do not require a specific context. -''' -Public Class Utils - ''' - ''' Generates a random short (8 characters) guid - ''' - ''' The generated guid as a String - Public Shared Function ShortGUID() As String - Return Guid.NewGuid().ToString().GetHashCode().ToString("x") - End Function - - ''' - ''' Converts a String value to the given Enum - ''' - ''' The Enum Type - ''' The string value to convert - Public Shared Function ToEnum(Of T)(value As String) As T - Return [Enum].Parse(GetType(T), value) - End Function - - ''' - ''' Converts an Integer value to the given Enum - ''' - ''' The Enum Type - ''' The integer value to convert - Public Shared Function ToEnum(Of T)(value As Integer) As T - Return [Enum].ToObject(GetType(T), value) - End Function - - ''' - ''' Converts a Long value to the given Enum - ''' - ''' The Enum Type - ''' The long value to convert - Public Shared Function ToEnum(Of T)(value As Long) As T - Return [Enum].ToObject(GetType(T), value) - End Function - - Public Shared Function ToBoolean(input As String) As Boolean - If String.IsNullOrEmpty(input) Then Return False - Return (input.Trim().ToLower() = "true") OrElse (input.Trim() = "1") - End Function - - ''' - ''' Checks a value for three different `null` values, - ''' Nothing, Empty String, DBNull - ''' - ''' Returns the original value if the value is not null, or `defaultValue` - ''' - ''' The type of the value - ''' The value - ''' The default Value - ''' The original value or the default value - Public Shared Function NotNull(Of T)(ByVal value As T, ByVal defaultValue As T) As T - If IsNothing(value) OrElse String.IsNullOrEmpty(value.ToString) OrElse IsDBNull(value) Then - Return defaultValue - Else - Return value - End If - End Function - - ''' - ''' Checks a Row value for three different `null` values, - ''' Nothing, Empty String, DBNull - ''' - ''' Returns the original value if the value is not null, or `defaultValue` - ''' - ''' The type of the value - ''' The DataRow that contains the value - ''' The column name - ''' The default value - ''' The original value or the default value - Public Shared Function NotNull(Of T)(ByVal Row As DataRow, Column As String, DefaultValue As T) As T - Return NotNull(Row.Item(Column), DefaultValue) - End Function - - ''' - ''' Creates a "slug" from text that can be used as part of a valid URL. - ''' Invalid characters are converted to hyphens. Punctuation that Is - ''' perfect valid in a URL Is also converted to hyphens to keep the - ''' result mostly text. Steps are taken to prevent leading, trailing, - ''' And consecutive hyphens. - ''' - ''' The string to convert - Public Shared Function ConvertTextToSlug(ByVal s As String) As String - Dim oBuilder As StringBuilder = New StringBuilder() - Dim oWasHyphen As Boolean = True - - For Each oChar As Char In s - - If Char.IsLetterOrDigit(oChar) Then - oBuilder.Append(Char.ToLower(oChar)) - oWasHyphen = False - ElseIf Char.IsWhiteSpace(oChar) AndAlso Not oWasHyphen Then - oBuilder.Append("-"c) - oWasHyphen = True - End If - Next - - If oWasHyphen AndAlso oBuilder.Length > 0 Then oBuilder.Length -= 1 - Return oBuilder.ToString() - End Function - - ''' - ''' Removes Invalid characters from a string, suitable for file and path names - ''' - ''' Removed characters are: - ''' - ''' * Illegal File-characters - ''' * Illegal Path-characters - ''' * Unicode characters that classify as Emoji - ''' * All characters above codepoint U+10000 - ''' - ''' See: - ''' https://stackoverflow.com/questions/46905176/detecting-all-emojis - ''' https://stackoverflow.com/questions/28023682/how-do-i-remove-emoji-characters-from-a-string - ''' - ''' - Public Shared Function RemoveInvalidCharacters(pString As String) As String - Dim oResult = pString - - Try - ' Remove all Unicode above Codepoint U+10000 - oResult = Regex.Replace(oResult, InvalidChars.UnicodeSurrogates, String.Empty) - - ' Remove all Emojis (Version 13) - oResult = Regex.Replace(oResult, InvalidChars.Emojis, String.Empty) - - ' Remove Invalid filename characters - oResult = Regex.Replace(oResult, InvalidChars.Filenames, String.Empty) - - ' Remove Invalid filename characters - oResult = Regex.Replace(oResult, InvalidChars.Paths, String.Empty) - - ' Remove Uneccessary characters - oResult = Regex.Replace(oResult, "\s{2,}", " ") - oResult = Regex.Replace(oResult, "\.{2,}", ".") - - ' Remove excess space chars - oResult = oResult.Trim() - - Return oResult - Catch ex As Exception - Return oResult - End Try - End Function - - Public Shared Function TestContainsInvalidCharacters(pString As String) As Boolean - Return Not pString.Equals(RemoveInvalidCharacters(pString)) - End Function - - ''' - ''' Checks if a point is Visible on any screen - ''' - Public Shared Function IsVisibleOnAnyScreen(Location As Point) As Boolean - Try - Dim oRect As New Rectangle(Location, New Size(0, 0)) - - For Each oScreen In Screen.AllScreens - If oScreen.WorkingArea.IntersectsWith(oRect) Then - Return True - End If - Next - - Return False - Catch ex As Exception - Return False - End Try - End Function - - ''' - ''' Checks if Size is not negative - ''' - Public Shared Function SizeIsVisible(Size As Size) As Boolean - If Size.Width >= 0 And Size.Height >= 0 Then - Return True - End If - - Return False - End Function - - ''' - ''' Checks if Location is not negative - ''' - Public Shared Function LocationIsVisible(Location As Point) As Boolean - If Location.X >= 0 And Location.Y >= 0 Then - Return True - End If - - Return False - End Function - - Public Shared Function BytesToString(ByteCount As Long) As String - Dim oSuffixes As New List(Of String) From {"B", "KB", "MB", "GB", "TB", "PB", "EB"} - If ByteCount = 0 Then - Return "0" & oSuffixes.First() - End If - Dim oBytes = Math.Abs(ByteCount) - Dim oIndex = Convert.ToInt32(Math.Floor(Math.Log(oBytes, 1024))) - Dim oNum = Math.Round(oBytes / Math.Pow(1024, oIndex), 1) - Return (Math.Sign(ByteCount) * oNum).ToString() & oSuffixes.Item(oIndex) - End Function -End Class diff --git a/Modules.Language/Watch.vb b/Modules.Language/Watch.vb deleted file mode 100644 index 6a567627..00000000 --- a/Modules.Language/Watch.vb +++ /dev/null @@ -1,23 +0,0 @@ -Public Class Watch - - Private ReadOnly _StopWatch As Stopwatch - Private ReadOnly _Name As String - - Public Sub New(pName As String) - _StopWatch = New Stopwatch() - _StopWatch.Start() - - _Name = pName - Debug.WriteLine($"Starting [{pName}].") - End Sub - - Public Sub Restart() - _StopWatch.Restart() - Debug.WriteLine($"Starting [{_Name}].") - End Sub - - Public Sub [Stop]() - _StopWatch.Stop() - Debug.WriteLine($"Stopped [{_Name}] after {_StopWatch.Elapsed.TotalSeconds} seconds.") - End Sub -End Class diff --git a/Modules.Language/packages.config b/Modules.Language/packages.config deleted file mode 100644 index 63f3075e..00000000 --- a/Modules.Language/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Modules.License/License.vbproj b/Modules.License/License.vbproj deleted file mode 100644 index 2eb05c1d..00000000 --- a/Modules.License/License.vbproj +++ /dev/null @@ -1,129 +0,0 @@ - - - - - Debug - AnyCPU - {5EBACBFA-F11A-4BBF-8D02-91461F2293ED} - Library - DigitalData.Modules.License - DigitalData.Modules.License - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.License.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.License.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LicenseSchema.xsd - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - Designer - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - \ No newline at end of file diff --git a/Modules.License/LicenseCreator.vb b/Modules.License/LicenseCreator.vb deleted file mode 100644 index eb62ec4a..00000000 --- a/Modules.License/LicenseCreator.vb +++ /dev/null @@ -1,34 +0,0 @@ -Public Class LicenseCreator - Public Shared Function NewUser(Type As UserType, Count As Integer, Optional ValidUntil As Date = Nothing) As LicenseModuleUser - Dim oValidUntilSpecified = Not IsNothing(ValidUntil) - Dim oTest = IsNothing(ValidUntil) - - Return New LicenseModuleUser() With { - .Count = Count, - .Type = Type, - .Test = oTest, - .ValidUntil = ValidUntil, - .ValidUntilSpecified = oValidUntilSpecified - } - End Function - - Public Shared Function NewModule(Name As String, Users As List(Of LicenseModuleUser), Optional ValidUntil As Date = Nothing) As LicenseModule - Dim oUsers = Users.ToArray() - Dim oValidUntilSpecified = Not IsNothing(ValidUntil) - - Return New LicenseModule() With { - .Name = Name, - .Users = oUsers, - .ValidUntil = ValidUntil, - .ValidUntilSpecified = oValidUntilSpecified - } - End Function - - Public Shared Function NewLicense(Modules As List(Of LicenseModule)) As LicenseSchema - Dim oModules = Modules.ToArray() - - Return New LicenseSchema With { - .Modules = oModules - } - End Function -End Class diff --git a/Modules.License/LicenseFile.vb b/Modules.License/LicenseFile.vb deleted file mode 100644 index 0e842d37..00000000 --- a/Modules.License/LicenseFile.vb +++ /dev/null @@ -1,81 +0,0 @@ -Imports System.IO -Imports System.Xml -Imports System.Xml.Serialization -Imports DigitalData.Modules.Logging - -Public Class LicenseFile - Public Const LICENSE_FILENAME = "License.xml" - - Public ReadOnly Path As String - Private _Logger As Logger - - Public Sub New(LogConfig As LogConfig, Path As String) - Me.Path = Path - _Logger = LogConfig.GetLogger() - End Sub - - Private Function GetSerializer() As XmlSerializer - Dim oSerializer As New XmlSerializer(GetType(LicenseSchema)) - Return oSerializer - End Function - - Public Function TestFileValid(Optional FileName As String = LICENSE_FILENAME) As Boolean - Try - Dim oSerializer = GetSerializer() - Dim oFilePath As String = IO.Path.Combine(Path, FileName) - - Using oReader As New StreamReader(oFilePath), - oXmlReader = XmlReader.Create(oReader) - Return oSerializer.CanDeserialize(oXmlReader) - End Using - Catch ex As Exception - _Logger.Error(ex) - Throw ex - End Try - End Function - - Public Function LoadFile(Optional FileName As String = LICENSE_FILENAME) As LicenseSchema - Try - Dim oSerializer = GetSerializer() - Dim oFilePath As String = IO.Path.Combine(Path, FileName) - Dim oLicense As LicenseSchema - - Using oReader As New StreamReader(oFilePath) - oLicense = oSerializer.Deserialize(oReader) - End Using - - Return oLicense - Catch ex As Exception - _Logger.Error(ex) - Throw ex - End Try - End Function - - Public Function Serialize(License As LicenseSchema) As Byte() - Try - Dim oSerializer = GetSerializer() - - Using oStream = New MemoryStream() - oSerializer.Serialize(oStream, License) - Return oStream.ToArray() - End Using - Catch ex As Exception - _Logger.Error(ex) - Throw ex - End Try - End Function - - Public Sub SaveFile(License As LicenseSchema, Optional FileName As String = LICENSE_FILENAME) - Try - Dim oBytes = Serialize(License) - Dim oFilePath As String = IO.Path.Combine(Path, FileName) - - Using oFileStream = New FileStream(oFilePath, FileMode.Create, FileAccess.Write) - oFileStream.Write(oBytes, 0, oBytes.Length) - End Using - Catch ex As Exception - _Logger.Error(ex) - Throw ex - End Try - End Sub -End Class diff --git a/Modules.License/LicenseLegacy.vb b/Modules.License/LicenseLegacy.vb deleted file mode 100644 index 17563198..00000000 --- a/Modules.License/LicenseLegacy.vb +++ /dev/null @@ -1,44 +0,0 @@ -Public Class LicenseLegacy - ' ++++++++++++++++++++++++++++++++++++++++++++++ Methoden ++++++++++++++++++++++++++++++++++++++++++++++ - - ''' - ''' Konstruktor der Lizenz - ''' - Sub New(ByVal _ModuleName As String, ByVal _Expires As Date, ByVal _Type As String, ByVal _AnzProfile As String) - Modulename = _ModuleName - Expires = _Expires - Type = _Type - Anz_Profile = _AnzProfile - End Sub - - ' ++++++++++++++++++++++++++++++++++++++++++++++ Properties ++++++++++++++++++++++++++++++++++++++++++++++ - - ''' - ''' Liefert oder setzt den Namen des Moduls für diese Lizenz - ''' - Public Property Modulename() As String - ''' - ''' Liefert oder setzt das Gültigkeitsdatum der Lizenz für das Modul - ''' - Public Property Expires() As Date - ''' - ''' Liefert den Typen der Lizenz - ''' - Public Property Type() As String - ''' - ''' Liefert die Anzahl der Profile - ''' - Public Property Anz_Profile() As String - ''' - ''' Liefert ob die Lizenz schon abgelaufen ist - ''' - Public ReadOnly Property IsExpired() - Get - If Date.Today > Expires Then - Return True - Else - Return False - End If - End Get - End Property -End Class diff --git a/Modules.License/LicenseManagerLegacy.vb b/Modules.License/LicenseManagerLegacy.vb deleted file mode 100644 index 4033665e..00000000 --- a/Modules.License/LicenseManagerLegacy.vb +++ /dev/null @@ -1,228 +0,0 @@ -Imports System.Security.Cryptography -Imports System.Text -Imports DigitalData.Modules.Logging - -Public Class LicenseManagerLegacy - Public Shared _licenses As LicensesLegacy - Private _Logger As Logger - Private _LogConfig As LogConfig - - Public LicenseString As String - Public LicenseStringArray(,) As String - - ' ++++++++++++++++++++++++++++++++++++++++++++++ Methoden ++++++++++++++++++++++++++++++++++++++++++++++ - - ''' - ''' Konstruktor für den Lizenz-Manager - ''' - ''' Passwort zum Entschlüsseln des Lizenzkeys - ''' verschlüsselter Lizenzkey - ''' - Sub New(LogConfig As LogConfig, ByVal _Password As String, ByVal _Key As String) - _LogConfig = LogConfig - _Logger = LogConfig.GetLogger - - Password = _Password - Key = _Key - - LicenseString = DecodeLicenseKey(Key) - LicenseStringArray = SplitLicenseString(LicenseString) - - LoadLicenses() - End Sub - ''' - ''' Konstruktor für den Lizenz-Manager ohne License load - ''' - ''' Passwort zum Entschlüsseln des Lizenzkeys - Sub New(ByVal password As String) - Me.Password = password - End Sub - ''' - ''' Lädt alle Lizenzen aus dem Lizenz-Array - ''' - ''' - Public Sub LoadLicenses() - _licenses = New LicensesLegacy(_LogConfig, LicenseStringArray) - End Sub - - - ''' - ''' Codiert eine Zeichenkette - ''' - ''' zu verschlüsselnde Zeichenkette - ''' das zur Verschlüsselung verwendete Passwort - ''' liefert eine verschlüsselte Zeichenkette - ''' - Public Function EncodeLicenseKey(ByVal str As String, ByVal password As String) - Dim oRijndael As New RijndaelManaged - - Dim oMD5 As New MD5CryptoServiceProvider - Dim oKey() As Byte = oMD5.ComputeHash(Encoding.UTF8.GetBytes(password)) - - oMD5.Clear() - oRijndael.Key = oKey - oRijndael.GenerateIV() - - Dim oInitialVector() As Byte = oRijndael.IV - Dim oStream As New IO.MemoryStream - - oStream.Write(oInitialVector, 0, oInitialVector.Length) - - Dim oCryptoStream As New CryptoStream(oStream, oRijndael.CreateEncryptor, CryptoStreamMode.Write) - Dim oData() As Byte = Encoding.UTF8.GetBytes(str) - - oCryptoStream.Write(oData, 0, oData.Length) - oCryptoStream.FlushFinalBlock() - - Dim oEncodedData() As Byte = oStream.ToArray() - Dim oResult As String = Convert.ToBase64String(oEncodedData) - oCryptoStream.Close() - oRijndael.Clear() - - Return oResult - End Function - - - ''' - ''' Decodiert den verschlüsselten Lizenzkey - ''' - ''' verschlüsselter Lizenzkey - ''' - ''' - Public Function DecodeLicenseKey(ByVal licenseCodeStr As String) - Try - Dim oRijndael As New RijndaelManaged - Dim oIVLength As Integer = 16 - Dim oMD5 As New MD5CryptoServiceProvider - Dim oKey() As Byte = oMD5.ComputeHash(Encoding.UTF8.GetBytes(Me.Password)) - - oMD5.Clear() - - Dim oEncodedData() As Byte - Dim oStream - Dim oInitialVector(15) As Byte - Dim oCryptoStream As CryptoStream - Dim oData() As Byte - - Try - oEncodedData = Convert.FromBase64String(licenseCodeStr) - oStream = New IO.MemoryStream(oEncodedData) - - oStream.Read(oInitialVector, 0, oIVLength) - oRijndael.IV = oInitialVector - oRijndael.Key = oKey - - oCryptoStream = New CryptoStream(oStream, oRijndael.CreateDecryptor, CryptoStreamMode.Read) - - ReDim oData(oStream.Length - oIVLength) - Catch ex As Exception - Return Nothing - End Try - - Dim oInteger As Integer = 0 - - Try - oInteger = oCryptoStream.Read(oData, 0, oData.Length) - Dim oResult As String = Encoding.UTF8.GetString(oData, 0, oInteger) - - oCryptoStream.Close() - oRijndael.Clear() - Return oResult - - Catch ex As Exception - ' Falsches Passwort - _Logger.Warn("DecodeLicenseKey: Password Incorrect") - _Logger.Error(ex) - - Return Nothing - - End Try - Catch ex As Exception - ' Falsches Passwort - _Logger.Warn("DecodeLicenseKey: Password Incorrect") - _Logger.Error(ex) - End Try - - Return Nothing - End Function - - - ''' - ''' Zerlegt den entschlüsselten Lizenzkey - ''' - ''' entschlüsselter Lizenzkey - ''' - ''' - Public Function SplitLicenseString(ByVal licenseStr As String) As String(,) - - Try - If licenseStr IsNot Nothing Then - Dim licenseTemp() As String = licenseStr.Split(";") - - Dim licenses(licenseTemp.Length, 3) As String - - Dim i As Integer = 0 - - If licenseTemp IsNot Nothing Then - For Each lizenz As String In licenseTemp - - Dim temp() = lizenz.Split(":") - - licenses(i, 0) = temp(0) - licenses(i, 1) = temp(1) - If temp.Length > 2 Then - licenses(i, 2) = temp(2) - licenses(i, 3) = temp(3) - Dim expires As Date - Date.TryParse(licenses(i, 1), expires) - End If - - - i += 1 - Next - - Return licenses - End If - End If - Catch ex As Exception - _Logger.Warn("Error in SplitLicenseString") - _Logger.Error(ex) - End Try - - Return Nothing - End Function - - - - ' ++++++++++++++++++++++++++++++++++++++++++++++ Properties ++++++++++++++++++++++++++++++++++++++++++++++ - - ''' - ''' Liefert das Passwort zum Entschlüsseln des Lizenzschlüssels - ''' - ''' - ''' - ''' - Public ReadOnly Property Password() As String - - - ''' - ''' Liefert eine Sammlung von Lizenzobjekten - ''' - ''' - ''' - ''' - Public ReadOnly Property Licenses() As LicensesLegacy - Get - Return _licenses - End Get - End Property - - - ''' - ''' Liefert oder setzt den Lizenzschlüssel - ''' - ''' - ''' - ''' - Public Property Key() As String -End Class diff --git a/Modules.License/LicenseSchema.vb b/Modules.License/LicenseSchema.vb deleted file mode 100644 index 877fe8c0..00000000 --- a/Modules.License/LicenseSchema.vb +++ /dev/null @@ -1,203 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict Off -Option Explicit On - -Imports System.Xml.Serialization -Imports System.ComponentModel -Imports System.CodeDom.Compiler - -' -'This source code was auto-generated by xsd, Version=4.6.1586.0. -' - -''' - -Partial Public Class LicenseSchema - - Private modulesField() As LicenseModule - - ''' - - Public Property Modules() As LicenseModule() - Get - Return Me.modulesField - End Get - Set - Me.modulesField = Value - End Set - End Property -End Class - -''' - -Partial Public Class LicenseModule - - Private usersField() As LicenseModuleUser - - Private nameField As String - - Private validUntilField As Date - - Private validUntilFieldSpecified As Boolean - - ''' - - Public Property Users() As LicenseModuleUser() - Get - Return Me.usersField - End Get - Set - Me.usersField = Value - End Set - End Property - - ''' - - Public Property Name() As String - Get - Return Me.nameField - End Get - Set - Me.nameField = Value - End Set - End Property - - ''' - - Public Property ValidUntil() As Date - Get - Return Me.validUntilField - End Get - Set - Me.validUntilField = Value - End Set - End Property - - ''' - - Public Property ValidUntilSpecified() As Boolean - Get - Return Me.validUntilFieldSpecified - End Get - Set - Me.validUntilFieldSpecified = Value - End Set - End Property -End Class - -''' - -Partial Public Class LicenseModuleUser - - Private typeField As UserType - - Private countField As String - - Private testField As Boolean - - Private validUntilField As Date - - Private validUntilFieldSpecified As Boolean - - Public Sub New() - MyBase.New - Me.testField = True - End Sub - - ''' - - Public Property Type() As UserType - Get - Return Me.typeField - End Get - Set - Me.typeField = Value - End Set - End Property - - ''' - - Public Property Count() As String - Get - Return Me.countField - End Get - Set - Me.countField = Value - End Set - End Property - - ''' - - Public Property Test() As Boolean - Get - Return Me.testField - End Get - Set - Me.testField = Value - End Set - End Property - - ''' - - Public Property ValidUntil() As Date - Get - Return Me.validUntilField - End Get - Set - Me.validUntilField = Value - End Set - End Property - - ''' - - Public Property ValidUntilSpecified() As Boolean - Get - Return Me.validUntilFieldSpecified - End Get - Set - Me.validUntilFieldSpecified = Value - End Set - End Property -End Class - -''' - -Public Enum UserType - - ''' - PowerUser - - ''' - [ReadOnly] - - ''' - [WriteOnly] - - ''' - ReadWrite -End Enum diff --git a/Modules.License/LicenseSchema.xsd b/Modules.License/LicenseSchema.xsd deleted file mode 100644 index 34a4f742..00000000 --- a/Modules.License/LicenseSchema.xsd +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Modules.License/LicensesLegacy.vb b/Modules.License/LicensesLegacy.vb deleted file mode 100644 index 582acbf8..00000000 --- a/Modules.License/LicensesLegacy.vb +++ /dev/null @@ -1,104 +0,0 @@ -Imports DigitalData.Modules.Logging - -Public Class LicensesLegacy - Private _licenses() As LicenseLegacy - Private _WDLizenz As String - Private _Logger As Logger - - ' ++++++++++++++++++++++++++++++++++++++++++++++ Methoden ++++++++++++++++++++++++++++++++++++++++++++++ - - ''' - ''' Konstruktor für die Lizenzen-Sammlung - ''' - ''' In Array übertragene Lizenzinformationen - Sub New(LogConfig As LogConfig, ByVal licenseStringArray(,) As String) - Try - _Logger = LogConfig.GetLogger() - - If licenseStringArray IsNot Nothing Then - Dim license1() As String = licenseStringArray(0, 1).Split("#") - - If license1.Length > 1 Then - Me.machine = license1(1) - Else - Me.machine = "all" - End If - Me.Company = license1(0) 'licenseStringArray(0, 1) - Dim i As Integer - For i = 1 To licenseStringArray.GetLength(0) - 2 ' minus 2, weil GetLength nicht null-basiert ist und das erste Element Firma ist - Dim anzprof As String = licenseStringArray(i, 3) - If anzprof.ToLower = "unlimited" Then - anzprof = 99 - End If - Me.Add(licenseStringArray(i, 0), licenseStringArray(i, 1), licenseStringArray(i, 2), anzprof) - Next - End If - Catch ex As Exception - _Logger.Error(ex) - End Try - End Sub - - - ''' - ''' Fügt der Lizenz-Sammlung eine Lizenz hinzu - ''' - ''' Name des Moduls, für das eine Lizenz angelegt werden soll - ''' Datum der Gültigkeit der Lizenz - Public Sub Add(ByVal modulename As String, ByVal expires As Date, ByVal type As String, ByVal anzprof As String) - - If _licenses IsNot Nothing Then - ReDim Preserve _licenses(_licenses.Length) - Else - ReDim Preserve _licenses(0) - End If - - _licenses(_licenses.Length - 1) = New LicenseLegacy(modulename, expires, type, anzprof) - End Sub - - - ''' - ''' Liefert eine Lizenz an Hand des Modulnamens - ''' - ''' Name des zu suchenden Moduls - ''' liefert ein Lizenzobjekt - Public Function GetLicense(ByVal modulename As String) As LicenseLegacy - If _licenses IsNot Nothing Then - For Each license As LicenseLegacy In _licenses - If license.Modulename = modulename Then - Return license - End If - Next - End If - - Return Nothing - End Function - - ' ++++++++++++++++++++++++++++++++++++++++++++++ Properties ++++++++++++++++++++++++++++++++++++++++++++++ - - ''' - ''' liefert eine Sammlung von Lizenzobjekten - ''' - Public ReadOnly Property Licenses() As LicenseLegacy() - Get - Return _licenses - End Get - End Property - - - ''' - ''' liefert eine Lizenz an Hand des Modulnamens - ''' - ''' Name des zu suchenden Moduls - Public ReadOnly Property License(ByVal modulename As String) As LicenseLegacy - Get - Return GetLicense(modulename) - End Get - End Property - - - ''' - ''' Liefert oder setzt den Firmennamen des Lizenzeigentümers - ''' - Public Property Company() As String - Public Property machine() As String -End Class diff --git a/Modules.License/My Project/Application.Designer.vb b/Modules.License/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.License/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.License/My Project/Application.myapp b/Modules.License/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.License/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.License/My Project/AssemblyInfo.vb b/Modules.License/My Project/AssemblyInfo.vb deleted file mode 100644 index 8a2b13b6..00000000 --- a/Modules.License/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.License/My Project/Resources.Designer.vb b/Modules.License/My Project/Resources.Designer.vb deleted file mode 100644 index 56b61925..00000000 --- a/Modules.License/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.License.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.License/My Project/Resources.resx b/Modules.License/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.License/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.License/My Project/Settings.Designer.vb b/Modules.License/My Project/Settings.Designer.vb deleted file mode 100644 index de8d4535..00000000 --- a/Modules.License/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.License.My.MySettings - Get - Return Global.DigitalData.Modules.License.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.License/My Project/Settings.settings b/Modules.License/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.License/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.License/packages.config b/Modules.License/packages.config deleted file mode 100644 index 63f3075e..00000000 --- a/Modules.License/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Modules.Logging.Test/ConstructorUnitTest.vb b/Modules.Logging.Test/ConstructorUnitTest.vb deleted file mode 100644 index 3a790cfd..00000000 --- a/Modules.Logging.Test/ConstructorUnitTest.vb +++ /dev/null @@ -1,52 +0,0 @@ -Imports System.Text -Imports System.IO -Imports Microsoft.VisualStudio.TestTools.UnitTesting -Imports DigitalData.Modules.Logging - -''' -''' Test creating the log path in various configurations -''' - Public Class ConstructorUnitTest - Private Shared _currentDirectoryLogPath = Path.Combine(Directory.GetCurrentDirectory(), "Log") - Private Shared _appdataDirectoryLogPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Digital Data", "Modules.Logging", "Log") - Private Shared _customDirectoryLogPath = Path.Combine(Directory.GetCurrentDirectory(), "CustomLogFolder") - Private Shared _restrictedDirectoryLogPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "ShouldNotBeCreated") - Private Shared _nonsenseDirectoryLogPath = "X:\FOO\BAR\BAZ\QUUX" - - Public Sub TestConstructorCurrentDirectory() - Assert.ThrowsException(Of ArgumentException)(Sub() - Dim oLogConfig As New LogConfig(LogConfig.PathType.Temp) - End Sub) - End Sub - - Public Sub TestConstructorApplicationDirectory() - Dim oLogConfig As New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing, "Digital Data", "Modules.Logging") - - Assert.AreEqual(_appdataDirectoryLogPath, oLogConfig.LogDirectory) - End Sub - - Public Sub TestConstructorCustomDirectory() - Dim oLogConfig As New LogConfig(LogConfig.PathType.CustomPath, _customDirectoryLogPath) - - Assert.AreEqual(_customDirectoryLogPath, oLogConfig.LogDirectory) - End Sub - - Public Sub TestConstructorRestrictedDirectory() - Dim oLogConfig As New LogConfig(LogConfig.PathType.CustomPath, _restrictedDirectoryLogPath) - - Assert.AreEqual(Path.GetTempPath, oLogConfig.LogDirectory) - End Sub - - Public Sub TestConstructorNonsenseDirectory() - Dim oLogConfig As New LogConfig(LogConfig.PathType.CustomPath, _nonsenseDirectoryLogPath) - - Assert.AreEqual(Path.GetTempPath, oLogConfig.LogDirectory) - End Sub - - Public Shared Sub Cleanup() - Directory.Delete(_currentDirectoryLogPath, True) - Directory.Delete(_appdataDirectoryLogPath, True) - Directory.Delete(_customDirectoryLogPath, True) - End Sub - -End Class \ No newline at end of file diff --git a/Modules.Logging.Test/Logging.Test.vbproj b/Modules.Logging.Test/Logging.Test.vbproj deleted file mode 100644 index c2b3051d..00000000 --- a/Modules.Logging.Test/Logging.Test.vbproj +++ /dev/null @@ -1,133 +0,0 @@ - - - - - Debug - AnyCPU - {3207D8E7-36E3-4714-9B03-7B5B3D6D351A} - Library - DigitalData.Modules.Logging.Test - DigitalData.Modules.Logging.Test - 512 - Windows - v4.6.1 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Logging.Test.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Logging.Test.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - ..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - - - ..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - - - - Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - - - - - \ No newline at end of file diff --git a/Modules.Logging.Test/My Project/Application.Designer.vb b/Modules.Logging.Test/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.Logging.Test/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.Logging.Test/My Project/Application.myapp b/Modules.Logging.Test/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.Logging.Test/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.Logging.Test/My Project/AssemblyInfo.vb b/Modules.Logging.Test/My Project/AssemblyInfo.vb deleted file mode 100644 index c26126de..00000000 --- a/Modules.Logging.Test/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,18 +0,0 @@ -Imports System -Imports System.Reflection -Imports System.Runtime.InteropServices - - - - - - - - - - - - -' - - diff --git a/Modules.Logging.Test/My Project/Resources.Designer.vb b/Modules.Logging.Test/My Project/Resources.Designer.vb deleted file mode 100644 index 49091756..00000000 --- a/Modules.Logging.Test/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Logging.Test.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.Logging.Test/My Project/Resources.resx b/Modules.Logging.Test/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.Logging.Test/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.Logging.Test/My Project/Settings.Designer.vb b/Modules.Logging.Test/My Project/Settings.Designer.vb deleted file mode 100644 index 80ff0bac..00000000 --- a/Modules.Logging.Test/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Logging.Test.My.MySettings - Get - Return Global.DigitalData.Modules.Logging.Test.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Logging.Test/My Project/Settings.settings b/Modules.Logging.Test/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.Logging.Test/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.Logging.Test/packages.config b/Modules.Logging.Test/packages.config deleted file mode 100644 index 371adee0..00000000 --- a/Modules.Logging.Test/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Modules.Logging/LogConfig.vb b/Modules.Logging/LogConfig.vb deleted file mode 100644 index 7a063d5d..00000000 --- a/Modules.Logging/LogConfig.vb +++ /dev/null @@ -1,590 +0,0 @@ -Imports System.IO -Imports System.Reflection -Imports NLog -Imports NLog.Config -Imports NLog.Targets - -''' LogConfig -''' 0.0.1.0 -''' 02.10.2018 -''' -''' Module that writes file-logs to different locations: -''' local application data, the current directory or a custom path. -''' Files and directories will be automatically created. -''' -''' -''' NLog, >= 4.5.8 -''' -''' -''' Imports DigitalData.Modules.Logging -''' -''' Class FooProgram -''' Private Logger as Logger -''' Private LogConfig as LogConfig -''' -''' Public Sub New() -''' LogConfig = new LogConfig(args) -''' Logger = LogConfig.GetLogger() -''' End Sub -''' -''' Public Sub Bar() -''' Logger.Info("Baz") -''' End Sub -''' End Class -''' -''' Class FooLib -''' Private Logger as NLog.Logger -''' -''' Public Sub New(LogConfig as LogConfig) -''' Logger = LogConfig.GetLogger() -''' End Sub -''' -''' Public Sub Bar() -''' Logger.Info("Baz") -''' End Sub -''' End Class -''' -''' -''' If logpath can not be written to, falls back to temp folder as defined in: -''' https://docs.microsoft.com/de-de/dotnet/api/system.io.path.gettemppath?view=netframework-4.7.2 -''' -''' If used in a service, LogPath must be set to CustomPath, otherwise the Log will be written to System32! -''' -''' For NLog Troubleshooting, set the following Environment variables to write the NLog internal Log: -''' - NLOG_INTERNAL_LOG_LEVEL: Debug -''' - NLOG_INTERNAL_LOG_FILE: ex. C:\Temp\Nlog_Internal.log -''' -Public Class LogConfig -#Region "Private Properties" - Private Const OPEN_FILE_CACHE_TIMEOUT As Integer = 30 - Private Const OPEN_FILE_FLUSH_TIMEOUT As Integer = 5 - Private Const AUTO_FLUSH As Boolean = False - - Private Const KEEP_FILES_OPEN As Boolean = False - Private Const KEEP_FILES_OPEN_DEBUG As Boolean = True - - ' MAX_ARCHIVES_FILES works like this (in version 4.5.8): - ' 0 = keep ALL archives files - ' 1 = only keep latest logfile and NO archive files - ' n = keep n archive files - Private Const MAX_ARCHIVE_FILES_DEFAULT As Integer = 0 - Private Const MAX_ARCHIVE_FILES_DEBUG_DETAIL As Integer = 0 - Private Const ARCHIVE_EVERY As FileArchivePeriod = FileArchivePeriod.Day - - Private Const FILE_NAME_FORMAT_DEFAULT As String = "${shortdate}-${var:product}${var:suffix}${event-properties:item=ModuleName}.log" - Private Const FILE_NAME_FORMAT_DEBUG As String = "${shortdate}-${var:product}${var:suffix}${event-properties:item=ModuleName}-Debug.log" - Private Const FILE_NAME_FORMAT_TRACE As String = "${shortdate}-${var:product}${var:suffix}${event-properties:item=ModuleName}-Trace.log" - Private Const FILE_NAME_FORMAT_ERROR As String = "${shortdate}-${var:product}${var:suffix}${event-properties:item=ModuleName}-Error.log" - - Private Const TARGET_DEFAULT As String = "defaultTarget" - Private Const TARGET_ERROR_EX As String = "errorExceptionTarget" - Private Const TARGET_ERROR As String = "errorTarget" - Private Const TARGET_DEBUG As String = "debugTarget" - Private Const TARGET_TRACE As String = "traceTarget" - 'Private Const TARGET_MEMORY As String = "memoryTarget" - - Private Const LOG_FORMAT_BASE As String = "${time}|${logger:shortName=True}|${level:uppercase=true}" - Private Const LOG_FORMAT_CALLSITE As String = "${callsite:className=false:fileName=true:includeSourcePath=false:methodName=true}" - Private Const LOG_FORMAT_EXCEPTION As String = "${exception:format=Message,StackTrace:innerFormat=Message:maxInnerExceptionLevel=3}" - - Private Const LOG_FORMAT_DEFAULT As String = LOG_FORMAT_BASE & " >> ${message}" - Private Const LOG_FORMAT_ERROR As String = LOG_FORMAT_BASE & " >> " & LOG_FORMAT_EXCEPTION - Private Const LOG_FORMAT_DEBUG As String = LOG_FORMAT_BASE & " >> " & LOG_FORMAT_CALLSITE & " -> " & "${message}" - - Private Const FILE_NAME_ACCESS_TEST = "accessTest.txt" - Private Const FOLDER_NAME_LOG = "Log" - - Private Const FILE_KEEP_RANGE As Integer = 30 - 'Private Const MAX_MEMORY_LOG_COUNT As Integer = 1000 - - Private ReadOnly _failSafePath As String = Path.GetTempPath() - Private ReadOnly _basePath As String = _failSafePath - - Private _config As LoggingConfiguration - Private _isDebug As Boolean = False - Private _isTrace As Boolean = False - -#End Region -#Region "Public Properties" - Public Enum PathType As Integer - AppData = 0 - CurrentDirectory = 1 - CustomPath = 2 - Temp = 3 - End Enum - - ''' - ''' Returns the NLog.LogFactory object that is used to create Loggers - ''' - ''' LogFactory object - Public ReadOnly Property LogFactory As LogFactory - - ''' - ''' Returns the path to the current default logfile - ''' - ''' Filepath to the logfile - Public ReadOnly Property LogFile As String - - ''' - ''' Returns the path to the current log directory - ''' - ''' Directory path to the log directory - Public ReadOnly Property LogDirectory As String - - ''' - ''' Determines if a debug log will be written - ''' - ''' True, if debug log will be written. False otherwise. - Public Property Debug As Boolean - Get - Return _isDebug - End Get - Set(isDebug As Boolean) - _isDebug = isDebug - ReloadConfig(isDebug, _isTrace) - End Set - End Property - - Public Property Trace As Boolean - Get - Return _isTrace - End Get - Set(isTrace As Boolean) - _isTrace = isTrace - ReloadConfig(_isDebug, isTrace) - End Set - End Property - - ''' - ''' Returns Logs in Memory as List(Of String) if Debug is enabled - ''' Returns an empty list if debug is disabled - ''' - ''' A list of log messages - Public ReadOnly Property Logs As List(Of String) - Get - 'Dim oTarget = _config.FindTargetByName(Of MemoryTarget)(TARGET_MEMORY) - 'Return oTarget?.Logs.ToList() - Return New List(Of String) - End Get - End Property - - Public ReadOnly Property NLogConfig As LoggingConfiguration - Get - Return _config - End Get - End Property - -#End Region - - ''' - ''' Initializes a new LogConfig object with the options supplied as a LogOptions object - ''' - ''' - Public Sub New(Options As LogOptions) - MyClass.New(Options.LogPath, Options.CustomLogPath, Options.Suffix, Options.CompanyName, Options.ProductName, Options.FileKeepInterval) - End Sub - - ''' - ''' Initializes a new LogConfig object with a logpath and optinally a filename-suffix. - ''' - ''' The basepath to write logs to. Can be AppData, CurrentDirectory or CustomPath. - ''' If `logPath` is set to custom, this defines the custom logPath. - ''' If set to anything other than Nothing, extends the logfile name with this suffix. - ''' CompanyName is used to construct log-path in when LogPath is set to PathType:AppData - ''' ProductName is used to construct log-path in when LogPath is set to PathType:AppData - ''' Amount of days where files are kept and not deleted. - Public Sub New(LogPath As PathType, - Optional CustomLogPath As String = Nothing, - Optional Suffix As String = Nothing, - Optional CompanyName As String = Nothing, - Optional ProductName As String = Nothing, - Optional FileKeepRangeInDays As Integer = FILE_KEEP_RANGE) - - If LogPath = PathType.AppData And (ProductName Is Nothing Or CompanyName Is Nothing) Then - Throw New ArgumentException("Modules.Logging: PathType is AppData and either CompanyName or ProductName was not supplied!") - End If - - If LogPath = PathType.CurrentDirectory Then - Throw New ArgumentException("Modules.Logging: LogPath.CurrentDirectory is deprecated. Please use LogPath.CustomPath!") - End If - - If LogPath = PathType.AppData Then - Dim appDataDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) - _basePath = Path.Combine(appDataDir, CompanyName, ProductName, FOLDER_NAME_LOG) - ElseIf LogPath = PathType.Temp Then - _basePath = _failSafePath - Else 'Custom Path - _basePath = CustomLogPath - End If - - ' If directory does not exist, try to create it! - If Not Directory.Exists(_basePath) Then - Try - Directory.CreateDirectory(_basePath) - Catch ex As Exception - ' If creation fails, use failSafe path - _basePath = _failSafePath - End Try - End If - - ' Try to create a file in `basePath` to check write permissions - Try - Dim fileAccessPath = Path.Combine(_basePath, FILE_NAME_ACCESS_TEST) - Using fs As FileStream = File.Create(fileAccessPath) - fs.WriteByte(0) - End Using - - File.Delete(fileAccessPath) - Catch ex As Exception - ' If creation fails, use failSafe path - _basePath = _failSafePath - End Try - - ' Set the suffix to the given string if it exists - Dim logFileSuffix As String = String.Empty - - If Suffix IsNot Nothing AndAlso Suffix.Count > 0 Then - logFileSuffix = $"-{Suffix}" - End If - - Dim oProductName As String = "Main" - - If ProductName IsNot Nothing Then - oProductName = ProductName - End If - - ' Create config object and initalize it - _config = GetConfig(oProductName, logFileSuffix) - - ' Save config - LogFactory = New LogFactory With { - .Configuration = _config - } - - ' Save log paths for files/directory - LogDirectory = _basePath - LogFile = GetCurrentLogFilePath() - - Dim oLogger = GetLogger() - oLogger.Info("Logging started for [{0}{1}] in [{2}]", oProductName, logFileSuffix, LogFile) - oLogger.Info("Logging Version [{0}]", Assembly.GetExecutingAssembly().GetName().Version) - - ' Clear old Logfiles as defined in `FileKeepInterval` - ClearOldLogfiles(FileKeepRangeInDays) - End Sub - - ''' - ''' Clears old LogFiles from the configured logpath for compliance with the GDPR - ''' - ''' Days in which logfiles should be kept. All files older than `Now - FileKeepInterval` will be deleted. - ''' True, if files were deleted as expected or no files were deleted. Otherwise false. - Private Function ClearOldLogfiles(FileKeepRange As Integer) As Boolean - Dim oClassName As String = GetClassFullName() - Dim oLogger As Logger = GetLogger(oClassName) - - Try - Dim oContinueOnError = True - Dim oUnableToDeleteCounter = 0 - Dim oDirectory As New DirectoryInfo(LogDirectory) - Dim oDateLimit As Date = Date.Now.AddDays(-FileKeepRange) - Dim oFiles As List(Of FileInfo) = oDirectory. - EnumerateFiles(). - Where(Function(oFileInfo As FileInfo) oFileInfo.Extension = ".log" And oFileInfo.LastWriteTime < oDateLimit). - ToList() - - If oFiles.Count = 0 Then - oLogger.Info("No logfiles were marked for deletion in the range [last {0} days].", FileKeepRange) - Return True - End If - - oLogger.Info("Deleting [{0}] old logfiles that are marked for deletion in the range [last {1} days].", oFiles.Count, FileKeepRange) - - For Each oFile As FileInfo In oFiles - Try - oFile.Delete() - Catch ex As Exception - oUnableToDeleteCounter += 1 - oLogger.Warn("File {0} could not be deleted!") - End Try - Next - - If oUnableToDeleteCounter > 0 Then - oLogger.Info("Delete old logfiles partially. {0} files could not be deleted.", oUnableToDeleteCounter) - Else - oLogger.Info("Deleted [{0}] old logfiles.", oFiles.Count) - End If - - Return True - Catch ex As Exception - oLogger.Error(ex) - - Return False - End Try - End Function - - ''' - ''' Returns the Logger for the calling class - ''' - ''' An object of Logging.Logger - - Public Function GetLogger() As Logger - Dim oClassName As String = GetClassFullName() - Return GetLogger(oClassName, String.Empty) - End Function - - ''' - ''' Returns the Logger for the specified classname - ''' - ''' An object of Logging.Logger - - Public Function GetLogger(ClassName As String) As Logger - Return GetLogger(ClassName, String.Empty) - End Function - - ''' - ''' Returns the Logger for the specified module using event-properties - ''' - ''' - ''' https://github.com/NLog/NLog/wiki/EventProperties-Layout-Renderer - ''' https://stackoverflow.com/questions/31337030/separate-log-file-for-specific-class-instance-using-nlog/32065824#32065824 - ''' - ''' An object of Logging.Logger - - Public Function GetLoggerFor(ModuleName As String) As Logger - Dim oClassName As String = GetClassFullName() - Return GetLogger(oClassName, ModuleName) - End Function - - ''' - ''' Returns the Logger for a class specified by `ClassName` - ''' - ''' The name of the class the logger belongs to - ''' An object of Logging.Logger - Public Function GetLogger(ClassName As String, ModuleName As String) As Logger - Dim oLogger = LogFactory.GetLogger(Of Logger)(ClassName) - - If ModuleName IsNot Nothing AndAlso ModuleName.Length > 0 Then - Return oLogger.WithProperty("ModuleName", $"-{ModuleName}") - End If - - Return oLogger - End Function - - ''' - ''' Clears the internal log - ''' - Public Sub ClearLogs() - 'Dim oTarget = _config.FindTargetByName(Of MemoryTarget)(TARGET_MEMORY) - 'oTarget?.Logs.Clear() - End Sub - - ''' - ''' Gets the fully qualified name of the class invoking the calling method, - ''' including the namespace but Not the assembly. - ''' - ''' The fully qualified class name - ''' This method is very resource-intensive! - - Public Shared Function GetClassFullName(Optional IncludeMethodNames As Boolean = False, Optional Parts As Integer = 0) As String - Dim oFramesToSkip As Integer = 2 - Dim oClassName As String = String.Empty - Dim oStackTrace = Environment.StackTrace - Dim oStackTraceLines = oStackTrace.Replace(vbCr, "").Split({vbLf}, StringSplitOptions.RemoveEmptyEntries) - - For i As Integer = 0 To oStackTraceLines.Length - 1 - Dim oCallingClassAndMethod = oStackTraceLines(i).Split({" ", "<>", "(", ")"}, StringSplitOptions.RemoveEmptyEntries)(1) - Dim oMethodStartIndex As Integer = oCallingClassAndMethod.LastIndexOf(".", StringComparison.Ordinal) - - If oMethodStartIndex > 0 Then - If IncludeMethodNames Then - oMethodStartIndex = oCallingClassAndMethod.Count - End If - - Dim oCallingClass = oCallingClassAndMethod.Substring(0, oMethodStartIndex) - oClassName = oCallingClass.TrimEnd("."c) - - If Not oClassName.StartsWith("System.Environment") AndAlso oFramesToSkip <> 0 Then - i += oFramesToSkip - 1 - oFramesToSkip = 0 - Continue For - End If - - If Not oClassName.StartsWith("System.") Then Exit For - End If - Next - - If Parts > 0 Then - Dim oParts = oClassName. - Split("."). - Reverse(). - Take(Parts). - Reverse() - - oClassName = String.Join(".", oParts) - End If - - Return oClassName - End Function - - ''' - ''' Returns the initial log configuration - ''' - ''' The chosen productname - ''' The chosen suffix - ''' A NLog.LoggingConfiguration object - Private Function GetConfig(productName As String, logFileSuffix As String) As LoggingConfiguration - _config = New LoggingConfiguration() - _config.Variables("product") = productName - _config.Variables("suffix") = logFileSuffix - - ' Add default targets - _config.AddTarget(TARGET_ERROR_EX, GetErrorExceptionLogTarget(_basePath)) - _config.AddTarget(TARGET_ERROR, GetErrorLogTarget(_basePath)) - _config.AddTarget(TARGET_DEFAULT, GetDefaultLogTarget(_basePath)) - _config.AddTarget(TARGET_DEBUG, GetDebugLogTarget(_basePath)) - _config.AddTarget(TARGET_TRACE, GetTraceLogTarget(_basePath)) - '_config.AddTarget(TARGET_MEMORY, GetMemoryDebugTarget()) - - ' Add default rules - AddDefaultRules(_config) - - Return _config - End Function - - ''' - ''' Adds the default rules - ''' - ''' A NLog.LoggingConfiguration object - Private Sub AddDefaultRules(ByRef config As LoggingConfiguration) - config.AddRuleForOneLevel(LogLevel.Error, TARGET_ERROR_EX) - config.AddRuleForOneLevel(LogLevel.Fatal, TARGET_ERROR_EX) - config.AddRuleForOneLevel(LogLevel.Warn, TARGET_DEFAULT) - config.AddRuleForOneLevel(LogLevel.Info, TARGET_DEFAULT) - 'config.AddRuleForAllLevels(TARGET_MEMORY) - End Sub - - ''' - ''' Returns the full path of the current default log file. - ''' - ''' Full path of the current default log file - Private Function GetCurrentLogFilePath() - Dim logEventInfo As New LogEventInfo() With {.TimeStamp = Date.Now} - Dim target As FileTarget = _config.FindTargetByName(TARGET_DEFAULT) - Dim fileName As String = target.FileName.Render(logEventInfo) - - Return fileName - End Function - - ''' - ''' Reconfigures and re-adds all loggers, optionally adding the debug rule. - ''' - ''' Adds the Debug rule if true. - ''' Adds the Trace rule if true. - Private Sub ReloadConfig(Optional Debug As Boolean = False, Optional Trace As Boolean = False) - ' Clear Logging Rules - _config.LoggingRules.Clear() - - ' Add default rules - AddDefaultRules(_config) - - ' Add debug rule, if configured - If Debug = True Then - _config.AddRule(LogLevel.Debug, LogLevel.Error, TARGET_DEBUG) - End If - - If Trace = True Then - _config.AddRule(LogLevel.Trace, LogLevel.Error, TARGET_TRACE) - End If - - ' Reload all running loggers - LogFactory.ReconfigExistingLoggers() - End Sub - -#Region "Log Targets" - Private Function GetDefaultLogTarget(basePath As String) As FileTarget - Dim defaultLog As New FileTarget() With { - .FileName = Path.Combine(basePath, FILE_NAME_FORMAT_DEFAULT), - .Name = TARGET_DEFAULT, - .Layout = LOG_FORMAT_DEFAULT, - .MaxArchiveFiles = MAX_ARCHIVE_FILES_DEFAULT, - .ArchiveEvery = ARCHIVE_EVERY, - .KeepFileOpen = KEEP_FILES_OPEN, - .Encoding = Text.Encoding.Unicode - } - - Return defaultLog - End Function - Private Function GetErrorExceptionLogTarget(basePath As String) As FileTarget - Dim errorLogWithExceptions As New FileTarget() With { - .FileName = Path.Combine(basePath, FILE_NAME_FORMAT_ERROR), - .Name = TARGET_ERROR_EX, - .Layout = LOG_FORMAT_ERROR, - .MaxArchiveFiles = MAX_ARCHIVE_FILES_DEFAULT, - .ArchiveEvery = ARCHIVE_EVERY, - .KeepFileOpen = KEEP_FILES_OPEN, - .Encoding = Text.Encoding.Unicode - } - - Return errorLogWithExceptions - End Function - - Private Function GetErrorLogTarget(basePath As String) As FileTarget - Dim errorLog As New FileTarget() With { - .FileName = Path.Combine(basePath, FILE_NAME_FORMAT_ERROR), - .Name = TARGET_ERROR, - .Layout = LOG_FORMAT_DEFAULT, - .MaxArchiveFiles = MAX_ARCHIVE_FILES_DEFAULT, - .ArchiveEvery = ARCHIVE_EVERY, - .KeepFileOpen = KEEP_FILES_OPEN, - .Encoding = Text.Encoding.Unicode - } - - Return errorLog - End Function - - Private Function GetDebugLogTarget(basePath As String) As FileTarget - Dim debugLog As New FileTarget() With { - .FileName = Path.Combine(basePath, FILE_NAME_FORMAT_DEBUG), - .Name = TARGET_DEBUG, - .Layout = LOG_FORMAT_DEBUG, - .MaxArchiveFiles = MAX_ARCHIVE_FILES_DEBUG_DETAIL, - .ArchiveEvery = ARCHIVE_EVERY, - .KeepFileOpen = KEEP_FILES_OPEN_DEBUG, - .OpenFileCacheTimeout = OPEN_FILE_CACHE_TIMEOUT, - .AutoFlush = AUTO_FLUSH, - .OpenFileFlushTimeout = OPEN_FILE_FLUSH_TIMEOUT, - .Encoding = Text.Encoding.Unicode - } - - Return debugLog - End Function - - Private Function GetTraceLogTarget(basePath As String) As FileTarget - Dim debugLog As New FileTarget() With { - .FileName = Path.Combine(basePath, FILE_NAME_FORMAT_TRACE), - .Name = TARGET_DEBUG, - .Layout = LOG_FORMAT_DEBUG, - .MaxArchiveFiles = MAX_ARCHIVE_FILES_DEBUG_DETAIL, - .ArchiveEvery = ARCHIVE_EVERY, - .KeepFileOpen = KEEP_FILES_OPEN_DEBUG, - .OpenFileCacheTimeout = OPEN_FILE_CACHE_TIMEOUT, - .AutoFlush = AUTO_FLUSH, - .OpenFileFlushTimeout = OPEN_FILE_FLUSH_TIMEOUT, - .Encoding = Text.Encoding.Unicode - } - - Return debugLog - End Function - - 'Private Function GetMemoryDebugTarget() As MemoryTarget - ' Dim memoryLog As New MemoryTarget() With { - ' .Layout = LOG_FORMAT_DEBUG, - ' .Name = TARGET_MEMORY, - ' .OptimizeBufferReuse = True, - ' .MaxLogsCount = MAX_MEMORY_LOG_COUNT - ' } - - ' Return memoryLog - 'End Function -#End Region -End Class diff --git a/Modules.Logging/LogOptions.vb b/Modules.Logging/LogOptions.vb deleted file mode 100644 index 98c42933..00000000 --- a/Modules.Logging/LogOptions.vb +++ /dev/null @@ -1,10 +0,0 @@ -Imports DigitalData.Modules.Logging.LogConfig - -Public Class LogOptions - Property LogPath As PathType - Property CustomLogPath As String = Nothing - Property Suffix As String = Nothing - Property CompanyName As String = Nothing - Property ProductName As String = Nothing - Property FileKeepInterval As Integer = 0 -End Class diff --git a/Modules.Logging/Logger.vb b/Modules.Logging/Logger.vb deleted file mode 100644 index 4337bb2f..00000000 --- a/Modules.Logging/Logger.vb +++ /dev/null @@ -1,27 +0,0 @@ -Imports NLog - -Public Class Logger - Inherits NLog.Logger - - - Public Sub NewBlock(blockId As String) - Dim message As String = $"-----> Start of Block {blockId}" - Dim logEventInfo As New LogEventInfo(LogLevel.Info, Name, message) - Dim logEventDebug As New LogEventInfo(LogLevel.Debug, Name, message) - Dim WrapperType As Type = GetType(Logger) - - Log(WrapperType, logEventDebug) - Log(WrapperType, logEventInfo) - End Sub - - - Public Sub EndBlock() - Dim message As String = $"<----- End of Block" - Dim logEventInfo As New LogEventInfo(LogLevel.Info, Name, message) - Dim logEventDebug As New LogEventInfo(LogLevel.Debug, Name, message) - Dim WrapperType As Type = GetType(Logger) - - Log(WrapperType, logEventDebug) - Log(WrapperType, logEventInfo) - End Sub -End Class diff --git a/Modules.Logging/Logging.vbproj b/Modules.Logging/Logging.vbproj deleted file mode 100644 index a1198559..00000000 --- a/Modules.Logging/Logging.vbproj +++ /dev/null @@ -1,116 +0,0 @@ - - - - - Debug - AnyCPU - {903B2D7D-3B80-4BE9-8713-7447B704E1B0} - Library - DigitalData.Modules.Logging - DigitalData.Modules.Logging - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Logging.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Logging.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - ..\packages\NLog.4.7.11\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - \ No newline at end of file diff --git a/Modules.Logging/My Project/Application.Designer.vb b/Modules.Logging/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.Logging/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.Logging/My Project/Application.myapp b/Modules.Logging/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.Logging/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.Logging/My Project/AssemblyInfo.vb b/Modules.Logging/My Project/AssemblyInfo.vb deleted file mode 100644 index 8cdf0f5e..00000000 --- a/Modules.Logging/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.Logging/My Project/Resources.Designer.vb b/Modules.Logging/My Project/Resources.Designer.vb deleted file mode 100644 index 200685a0..00000000 --- a/Modules.Logging/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Logging.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.Logging/My Project/Resources.resx b/Modules.Logging/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.Logging/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.Logging/My Project/Settings.Designer.vb b/Modules.Logging/My Project/Settings.Designer.vb deleted file mode 100644 index 4fcffacd..00000000 --- a/Modules.Logging/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Logging.My.MySettings - Get - Return Global.DigitalData.Modules.Logging.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Logging/My Project/Settings.settings b/Modules.Logging/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.Logging/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.Logging/TraceListener.vb b/Modules.Logging/TraceListener.vb deleted file mode 100644 index 3cd5c7d3..00000000 --- a/Modules.Logging/TraceListener.vb +++ /dev/null @@ -1,249 +0,0 @@ -Imports System -Imports System.Configuration -Imports System.Diagnostics -Imports System.Globalization -Imports System.IO -Imports System.Security.Permissions -Imports System.Text.RegularExpressions - - -Public Class RollingXmlWriterTraceListener - Inherits XmlWriterTraceListener - - Private Shared ReadOnly LogFileNumberCaptureName As String = "LogFileNumber" - Private attributesLoaded As Boolean = False - Private logfileSuffixExpression As Regex = New Regex("_(?<" & LogFileNumberCaptureName & ">\d*)\.", RegexOptions.Compiled) - Private currentFileSuffixNumber As Integer = 0 - Private _maxTraceFileSize As Long = 128 * 1024 * 1024 - Private basicTraceFileName As String = String.Empty - - Public Sub New(ByVal filename As String) - MyBase.New(filename) - Me.basicTraceFileName = filename - Me.currentFileSuffixNumber = Me.GetTraceFileNumber() - Me.StartNewTraceFile() - End Sub - - Public Sub New(ByVal filename As String, ByVal name As String) - MyBase.New(filename, name) - Me.basicTraceFileName = filename - Me.StartNewTraceFile() - End Sub - - Public ReadOnly Property CurrentTraceFileName As String - Get - Return Path.Combine(Path.GetDirectoryName(Me.basicTraceFileName), Path.GetFileNameWithoutExtension(Me.basicTraceFileName) & "_" & Me.currentFileSuffixNumber.ToString().PadLeft(4, "0"c) & Path.GetExtension(Me.basicTraceFileName)) - End Get - End Property - - Public Property MaxTraceFileSize As Long - Get - - If Not Me.attributesLoaded Then - Me.LoadAttributes() - End If - - Return Me._maxTraceFileSize - End Get - Set(ByVal value As Long) - - If Not Me.attributesLoaded Then - Me.LoadAttributes() - End If - - Me._maxTraceFileSize = value - End Set - End Property - - Protected ReadOnly Property IsRollingConditionReached As Boolean - Get - Dim streamWriter As StreamWriter = CType(Me.Writer, StreamWriter) - Dim fileStream As FileStream = CType(streamWriter.BaseStream, FileStream) - Dim traceFileName As String = fileStream.Name - Dim traceFileInfo As FileInfo = New FileInfo(traceFileName) - - If traceFileInfo.Length > Me._maxTraceFileSize Then - Return True - Else - Return False - End If - End Get - End Property - - Public Overrides Sub Fail(ByVal message As String) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.Fail(message) - End Sub - - Public Overrides Sub Fail(ByVal message As String, ByVal detailMessage As String) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.Fail(message, detailMessage) - End Sub - - Public Overrides Sub TraceData(ByVal eventCache As TraceEventCache, ByVal source As String, ByVal eventType As TraceEventType, ByVal id As Integer, ByVal data As Object) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.TraceData(eventCache, source, eventType, id, data) - End Sub - - Public Overrides Sub TraceData(ByVal eventCache As TraceEventCache, ByVal source As String, ByVal eventType As TraceEventType, ByVal id As Integer, ParamArray data As Object()) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.TraceData(eventCache, source, eventType, id, data) - End Sub - - Public Overrides Sub TraceEvent(ByVal eventCache As TraceEventCache, ByVal source As String, ByVal eventType As TraceEventType, ByVal id As Integer) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.TraceEvent(eventCache, source, eventType, id) - End Sub - - Public Overrides Sub TraceEvent(ByVal eventCache As TraceEventCache, ByVal source As String, ByVal eventType As TraceEventType, ByVal id As Integer, ByVal message As String) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.TraceEvent(eventCache, source, eventType, id, message) - End Sub - - Public Overrides Sub TraceEvent(ByVal eventCache As TraceEventCache, ByVal source As String, ByVal eventType As TraceEventType, ByVal id As Integer, ByVal format As String, ParamArray args As Object()) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.TraceEvent(eventCache, source, eventType, id, format, args) - End Sub - - Public Overrides Sub TraceTransfer(ByVal eventCache As TraceEventCache, ByVal source As String, ByVal id As Integer, ByVal message As String, ByVal relatedActivityId As Guid) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.TraceTransfer(eventCache, source, id, message, relatedActivityId) - End Sub - - Public Overrides Sub Write(ByVal o As Object) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.Write(o) - End Sub - - Public Overrides Sub Write(ByVal o As Object, ByVal category As String) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.Write(o, category) - End Sub - - Public Overrides Sub Write(ByVal message As String) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.Write(message) - End Sub - - Public Overrides Sub Write(ByVal message As String, ByVal category As String) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.Write(message, category) - End Sub - - Public Overrides Sub WriteLine(ByVal o As Object) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.WriteLine(o) - End Sub - - Public Overrides Sub WriteLine(ByVal o As Object, ByVal category As String) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.WriteLine(o, category) - End Sub - - Public Overrides Sub WriteLine(ByVal message As String) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.WriteLine(message) - End Sub - - Public Overrides Sub WriteLine(ByVal message As String, ByVal category As String) - If Me.IsRollingConditionReached Then - Me.StartNewTraceFile() - End If - - MyBase.WriteLine(message, category) - End Sub - - Protected Overrides Function GetSupportedAttributes() As String() - Return New String(0) {"MaxTraceFileSize"} - End Function - - Private Sub StartNewTraceFile() - Dim streamWriter As StreamWriter = CType(Me.Writer, StreamWriter) - Dim fileStream As FileStream = CType(streamWriter.BaseStream, FileStream) - fileStream.Close() - Me.currentFileSuffixNumber += 1 - Me.Writer = New StreamWriter(New FileStream(Me.CurrentTraceFileName, FileMode.Create)) - End Sub - - Private Function GetTraceFileNumber() As Integer - Dim directoryName As String = Path.GetDirectoryName(Me.basicTraceFileName) - Dim basicTraceFileNameWithoutExtension As String = Path.GetFileNameWithoutExtension(Me.basicTraceFileName) - Dim basicTraceFileNameExtension As String = Path.GetExtension(Me.basicTraceFileName) - Dim existingLogFiles As String() = Directory.GetFiles(directoryName, basicTraceFileNameWithoutExtension & "*") - Dim highestNumber As Integer = -1 - - For Each existingLogFile As String In existingLogFiles - Dim match As Match = Me.logfileSuffixExpression.Match(existingLogFile) - - If match IsNot Nothing Then - Dim tempInt As Integer - - If match.Groups.Count >= 1 AndAlso Integer.TryParse(match.Groups(LogFileNumberCaptureName).Value, tempInt) AndAlso tempInt >= highestNumber Then - highestNumber = tempInt - End If - End If - Next - - Return highestNumber - End Function - - Private Sub LoadAttributes() - If Attributes.ContainsKey("MaxTraceFileSize") AndAlso Not String.IsNullOrEmpty(Attributes("MaxTraceFileSize")) Then - Dim tempLong As Long = 0 - Dim attributeValue As String = Attributes("MaxTraceFileSize") - - If Long.TryParse(attributeValue, tempLong) Then - Me._maxTraceFileSize = Long.Parse(Attributes("MaxTraceFileSize"), NumberFormatInfo.InvariantInfo) - Else - Throw New ConfigurationErrorsException(String.Format("Trace listener {0} has an unparseable configuration attribute ""MaxTraceFileSize"". The value ""{1}"" cannot be parsed to a long value.", Me.Name, attributeValue)) - End If - End If - - Me.attributesLoaded = True - End Sub -End Class diff --git a/Modules.Logging/packages.config b/Modules.Logging/packages.config deleted file mode 100644 index 63a721ac..00000000 --- a/Modules.Logging/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Modules.Messaging/Email.vb b/Modules.Messaging/Email.vb deleted file mode 100644 index 85e3b606..00000000 --- a/Modules.Messaging/Email.vb +++ /dev/null @@ -1,559 +0,0 @@ -Imports Independentsoft.Email -Imports Independentsoft.Email.Pop3 -Imports Independentsoft.Email.Mime -Imports Independentsoft.Email.Imap -Imports System.Net.Mail -Imports System.Net -Imports System.Reflection -Imports System.IO - -Public Class Email - Private ReadOnly _logger As Logging.Logger - Private ReadOnly _logConfig As Logging.LogConfig - Public Err_Message As String - Public _msg_Send As Boolean - - Public Sub New(LogConfig As Logging.LogConfig) - _logger = LogConfig.GetLogger() - _logConfig = LogConfig - End Sub - - '''' - '''' Tests connection to a given IMAP Server by connecting and doing a simple message query. - '''' - '''' IP-Address or Domainname of Server - '''' IMAP-Port - '''' IMAP-Username - '''' IMAP-Password - '''' The folder to fetch messages from. Defaults to `Inbox` - '''' True if connection and query were successful. False otherwise. - 'Public Function TestIMAPLogin(Server As String, Port As Integer, Username As String, Password As String, Optional Folder As String = "Inbox") As Boolean - ' _logger.Debug("Testing Login to Server {0}:{1} with user {2}", Server, Port, Username) - - ' Try - ' _logger.Debug("Connecting...") - ' Using oClient As New S22.Imap.ImapClient(Server, Port, Username, Password, S22.Imap.AuthMethod.Login, True) - ' If Not oClient.Authed Then - ' _logger.Warn("Connected to server but authentication failed.") - ' Return False - ' End If - ' _logger.Debug("Connection successful") - - ' _logger.Debug("Fetching MessageIds..") - ' Dim oMessageIds As IEnumerable(Of UInteger) = oClient.Search(S22.Imap.SearchCondition.Unseen, Folder) - - ' _logger.Debug("Found {0} messages", oMessageIds.Count) - ' _logger.Debug("Fetching messages...") - - ' Dim oMessages As IEnumerable(Of MailMessage) = oClient.GetMessages(oMessageIds, False, Folder) - ' _logger.Debug("Messages fetched") - - ' oClient.Dispose() - - ' Return True - ' End Using - ' Catch ex As Exception - ' _logger.Error(ex) - ' Return False - ' End Try - 'End Function - - '''' - '''' Connects to an IMAP Server with the given credentials and - '''' fetches emails from the given folder. - '''' Results can be filtered with `SearchCondition` - '''' - '''' IP-Address or Domainname of Server - '''' IMAP-Port - '''' IMAP-Username - '''' IMAP-Password - '''' The folder to fetch messages from - '''' Filter the search command. Defaults to `All` - '''' A list of Independentsoft.Email.Mime.Message objects - 'Public Function FetchIMAPMessages(Server As String, Port As Integer, Username As String, Password As String, Folder As String) As List(Of Message) ', Optional SearchCondition As S22.Imap.SearchCondition = S22.Imap.SearchCondition.All - ' Dim oMessages As New List(Of Message) - - ' _logger.Debug("Connecting to Server {0}:{1} with user {2}", Server, Port, Username) - - ' Try - ' _logger.Debug("Connecting...") - ' Using oClient As New S22.Imap.ImapClient(Server, Port, Username, Password, S22.Imap.AuthMethod.Login, True) - ' If Not oClient.Authed Then - ' _logger.Warn("Connected to server but authentication failed.") - ' Return Nothing - ' End If - ' _logger.Debug("Connection successful") - - ' _logger.Debug("Fetching MessageIds..") - ' Dim oMessageIds As IEnumerable(Of UInteger) = oClient.Search(S22.Imap.SearchCondition.Unseen, Folder) - - ' _logger.Debug("Found {0} messages", oMessageIds.Count) - ' _logger.Debug("Fetching messages...") - - ' ' Since this needs to return a list of IndependentSoft Message objects, - ' ' we 'convert' the .NET MailMessage objects that are fetched from the server - ' ' by writing them temporarily to disk as an eml file and then reading them back into a Message object. - ' ' This approach uses an unintended use of internal .NET APIs and may break in the future. - ' For Each oMessageId As UInteger In oMessageIds - ' Dim oMessage = oClient.GetMessage(oMessageId, False, Folder) - ' Dim oTempPath = Path.GetTempFileName() - ' Dim oResult = WriteMessageToFile(oMessage, oTempPath) - - ' Dim oMsg As New Message(oTempPath) - ' oMessages.Add(oMsg) - - ' Try - ' File.Delete(oTempPath) - ' Catch ex As Exception - ' _logger.Error(ex) - ' _logger.Warn("Temp file could not be deleted") - ' End Try - ' Next - - ' _logger.Debug("{0} Messages fetched", oMessages.Count) - ' End Using - - ' Return oMessages - ' Catch ex As Exception - ' _logger.Error(ex) - ' Return Nothing - ' End Try - 'End Function - - ''' - ''' Uses a private API from MailWriter to write a MailMessage to disk. - ''' May break in future versions of .NET - ''' - Public Function WriteMessageToFile(Message As MailMessage, Filename As String) As Boolean - Dim oAssembly As Assembly = GetType(System.Net.Mail.SmtpClient).Assembly - Dim oMailWriterType As Type = oAssembly.[GetType]("System.Net.Mail.MailWriter") - - Try - Using oStream As New FileStream(Filename, FileMode.Create) - Dim oMailWriterConstructor As ConstructorInfo = oMailWriterType.GetConstructor( - BindingFlags.Instance Or BindingFlags.NonPublic, Nothing, New Type() {GetType(Stream)}, Nothing - ) - Dim oMailWriter As Object = oMailWriterConstructor.Invoke(New Object() {oStream}) - Dim sendMethod As MethodInfo = GetType(MailMessage).GetMethod("Send", BindingFlags.Instance Or BindingFlags.NonPublic) - sendMethod.Invoke(Message, BindingFlags.Instance Or BindingFlags.NonPublic, Nothing, {oMailWriter, True, True}, Nothing) - End Using - - Return True - Catch ex As Exception - Return Nothing - End Try - End Function - - 'Public Function IMAP_COLLECT(INBOXNAME As String, MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String) - ' Try - ' Dim oMAIL_LIST As New ArrayList() - ' _logger.Info(String.Format("Working on IMAP_COLLECT...")) - ' Dim oClient As New ImapClient(MYMAIL_SERVER, MYMAIL_PORT) - ' oClient.Connect() - ' oClient.Login(MYMAIL_USER, MYMAIL_USER_PW) - ' oClient.SelectFolder("Inbox") - ' Dim oEnvelopes As Envelope() = oClient.ListMessages() - ' For i As Integer = 0 To oEnvelopes.Length - 1 - ' If Not IsNothing(oEnvelopes(i).Subject) Then - ' 'If envelopes(i).Subject.ToString.ToUpper.Contains("[PROCESSMANAGER]") Or envelopes(i).Subject.ToString.ToUpper.Contains("[ADDI]") Then - ' _logger.Info($"Working on email: UniqueID: {oEnvelopes(i).UniqueID} - Subject:{oEnvelopes(i).Subject} - Date {oEnvelopes(i).Date.ToString}") - ' Dim message As Mime.Message = oClient.GetMessage(oEnvelopes(i).UniqueID) - ' If Not IsNothing(message) Then - ' oMAIL_LIST.Add(message) - ' End If - ' 'End If - ' End If - ' Next - - ' oClient.Disconnect() - ' _logger.Debug("IMAP_COLLECT finished!") - ' Return oMAIL_LIST - - ' Catch ex As Exception - ' _logger.Error(ex, "Unexpected Error in IMAP COLLECT:") - ' Return Nothing - ' End Try - 'End Function - 'Public Function TEST_IMAP_COLLECT(INBOXNAME As String, MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String) - ' Try - - ' _logger.Info(String.Format("Working on TEST_IMAP_COLLECT.....")) - ' Dim oClient As New ImapClient(MYMAIL_SERVER, MYMAIL_PORT) - ' oClient.Connect() - ' oClient.Login(MYMAIL_USER, MYMAIL_USER_PW) - ' oClient.SelectFolder(INBOXNAME) - ' Dim oEnvelopes As Envelope() = oClient.ListMessages() - - ' For i As Integer = 0 To oEnvelopes.Length - 1 - ' If Not IsNothing(oEnvelopes(i).Subject) Then - ' 'If envelopes(i).Subject.ToString.ToUpper.Contains("[PROCESSMANAGER]") Or envelopes(i).Subject.ToString.ToUpper.Contains("[ADDI]") Then - ' MsgBox($"Working on email: UniqueID: {oEnvelopes(i).UniqueID} - Subject:{oEnvelopes(i).Subject} - Date {oEnvelopes(i).Date.ToString}") - ' Dim message As Mime.Message = oClient.GetMessage(oEnvelopes(i).UniqueID) - ' End If - ' Next - ' oClient.Disconnect() - ' _logger.Info("TEST_IMAP_COLLECT finished!") - ' Return True - ' Catch ex As Exception - ' _logger.Error(ex, "Unexpected Error in TEST_IMAP_COLLECT:") - ' Return False - ' End Try - 'End Function - 'Public Function POP3_COLLECT(MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String) - ' Try - ' Dim oMAIL_LIST As New ArrayList() - ' _logger.Debug(String.Format("Working on POP3_COLLECT.....")) - ' Dim oClient As New Pop3Client(MYMAIL_SERVER, MYMAIL_PORT) - - ' oClient.ValidateRemoteCertificate = False - ' oClient.Connect() - ' _logger.Debug(String.Format("..connected!")) - ' oClient.Login(MYMAIL_USER, MYMAIL_USER_PW) - - ' Dim oMessageInfo As MessageInfo() = oClient.List() - - ' For i As Integer = 0 To oMessageInfo.Length - 1 - ' Dim message As Message = oClient.GetMessage(oMessageInfo(i).Index) - ' oMAIL_LIST.Add(message) - ' Try - ' _logger.Debug(String.Format("Message [{0}] added", message.Subject)) - ' Catch ex As Exception - - ' End Try - ' Next - - ' oClient.Disconnect() - ' _logger.Debug(String.Format(" POP3_COLLECT finished!")) - ' Return oMAIL_LIST - ' Catch ex As Exception - ' _logger.Error(ex) - - ' Return Nothing - ' End Try - 'End Function - 'Public Function TEST_POP3_COLLECT(MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String) As Boolean - ' Try - ' _logger.Debug(String.Format("Working on TEST_POP3_COLLECT...")) - ' Dim oClient As New Pop3Client(MYMAIL_SERVER, MYMAIL_PORT) - - ' oClient.ValidateRemoteCertificate = False - ' oClient.Connect() - ' _logger.Debug(String.Format("..connected!")) - ' oClient.Login(MYMAIL_USER, MYMAIL_USER_PW) - - ' Dim messageInfo As MessageInfo() = oClient.List() - - ' For i As Integer = 0 To messageInfo.Length - 1 - ' Dim message As Message = oClient.GetMessage(messageInfo(i).Index) - ' MsgBox(String.Format("Message [{0}] added", message.Subject)) - - ' Next - - ' oClient.Disconnect() - ' MsgBox(String.Format("TEST_POP3_COLLECT finished!")) - ' Return True - ' Catch ex As Exception - ' _logger.Error(ex) - - ' Return False - ' End Try - 'End Function - Public Function NewEmail(mailto As String, mailSubject As String, mailBody As String, - mailfrom As String, mailsmtp As String, mailport As Integer, mailUser As String, mailPW As String, - AUTH_TYPE As String, SENDER_INSTANCE As String, Optional attachmentString As String = "", Optional Test As Boolean = False) - Dim myClient As Net.Mail.SmtpClient - Dim myMesssage As New MailMessage - - Try - Dim oError As Boolean = False - Dim oReceipiants As String() - If mailto.Contains(";") Then - oReceipiants = mailto.Split(";") - Else - ReDim Preserve oReceipiants(0) - oReceipiants(0) = mailto - End If - For Each oMailReceipiant As String In oReceipiants - _logger.Debug($"oMailReceipiant [{oMailReceipiant}]") - _logger.Debug($"mailsmtp [{mailsmtp}]") - - Try - myClient = New Net.Mail.SmtpClient(mailsmtp, mailport) - Catch ex As Exception - _logger.Warn($"Could not create SMTP-Client: [{ex.Message}]") - Return False - End Try - myClient.DeliveryMethod = SmtpDeliveryMethod.Network - - myClient.Port = mailport - _logger.Debug($"mailport [{mailport}]") - If AUTH_TYPE = "SSL" Then - _logger.Debug("SSL = true") - myClient.EnableSsl = True - Else - _logger.Debug("SSL = false") - myClient.EnableSsl = False - End If - _logger.Debug($"mailUser [{mailUser}]") - myClient.Credentials = New NetworkCredential(mailUser, mailPW) - myClient.UseDefaultCredentials = False - - If Test = True Then - myMesssage.Body = $"This is the body (text will be replaced within profile)!
mailsmtp: {mailsmtp}
mailport: {mailport}
mailUser: {mailUser}
mailPW: XXXX
AUTH_TYPE: {AUTH_TYPE}" - Else - myMesssage.Body = mailBody - End If - _logger.Debug($"mailBody [{mailBody}]") - 'mymesssage.IsBodyHtml = True - Dim htmlView As AlternateView = AlternateView.CreateAlternateViewFromString(myMesssage.Body) - htmlView.ContentType = New System.Net.Mime.ContentType("text/html") - myMesssage.AlternateViews.Add(htmlView) - _logger.Debug($"attachmentString [{attachmentString}]") - If attachmentString <> "" Then - _logger.Info($"Attachment Path is: {attachmentString}") - Dim oAttachment As New System.Net.Mail.Attachment(attachmentString) - - 'If attment.ToLower.EndsWith("pdf") Then - ' oAttachment.ContentType = New Independentsoft.Email.Mime.ContentType("application", "pdf") - 'ElseIf attment.ToLower.EndsWith("jpg") Then - ' oAttachment.ContentType = New Independentsoft.Email.Mime.ContentType("application", "jpg") - 'ElseIf attment.ToLower.EndsWith("docx") Then - ' oAttachment.ContentType = New Independentsoft.Email.Mime.ContentType("application", "MS-word") - 'End If - myMesssage.Attachments.Add(oAttachment) - Else - _logger.Debug("No Attachment.") - End If - _logger.Debug($"mailfrom [{mailfrom}]") - - myMesssage.From = New MailAddress(mailfrom) - _logger.Debug($"mailSubject [{mailSubject}]") - myMesssage.Subject = mailSubject - myMesssage.To.Add(New MailAddress(oMailReceipiant)) - _logger.Debug($"Now Sending mail...") - myClient.Send(myMesssage) - _logger.Debug($"Mail has been sent!") - _logger.Info("Message to " & oMailReceipiant & " has been send.") - Next - If oError = False Then - Return True - Else - Return False - End If - - Catch ex As Exception - _logger.Error(ex) - Try - _logger.Info("Unexpected error in Sending smtp-Mail: ") - If Not IsNothing(myClient) Then - _logger.Info($"myClient.Host: {myClient.Host.ToString}") - _logger.Info($"myClient.Port: {myClient.Port.ToString}") - _logger.Info($"myClient.EnableSsl: {myClient.EnableSsl.ToString}") - - End If - If Not IsNothing(myMesssage) Then - _logger.Info($"myMesssage.Subject: {myMesssage.Subject.ToString}") - _logger.Info($"myMesssage.Body: {myMesssage.Body.ToString}") - _logger.Info($"myMesssage.From: {myMesssage.From.ToString}") - End If - Catch e1x As Exception - - End Try - Return False - End Try - - End Function - 'Public Function New_EmailISoft(ByVal mailSubject As String, ByVal mailBody As String, mailto As String, - ' from_mailaddress As String, from_name As String, mailsmtp As String, mailport As Integer, mailUser As String, mailPW As String, - ' AUTH_TYPE As String, SENDER_INSTANCE As String, Optional attment As String = "") - ' Try - ' Err_Message = "" - ' _msg_Send = False - ' ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 - ' _logger.Debug($"in Email_Send_Independentsoft..") - ' Dim empfaenger As String() - ' If mailto.Contains(";") Then - ' empfaenger = mailto.Split(";") - ' Else - ' ReDim Preserve empfaenger(0) - ' empfaenger(0) = mailto - ' End If - ' Dim _error As Boolean = False - ' 'Für jeden Empfänger eine Neue Mail erzeugen - ' For Each _mailempfaenger As String In empfaenger - ' _logger.Debug($"Working on email for {_mailempfaenger}..") - ' Try - ' Dim oMessage As New Message() - ' oMessage.From = New Mailbox(from_mailaddress, from_name) - - ' oMessage.[To].Add(New Mailbox(_mailempfaenger)) - ' oMessage.Subject = mailSubject - ' _logger.Debug($"Message created..") - ' Dim textBodyPart As New BodyPart() - ' textBodyPart.ContentType = New ContentType("text", "html", "utf-8") - ' textBodyPart.ContentTransferEncoding = ContentTransferEncoding.QuotedPrintable - ' textBodyPart.Body = mailBody - ' oMessage.BodyParts.Add(textBodyPart) - ' If attment <> String.Empty Then - ' If System.IO.File.Exists(attment) Then - ' Dim attachment1 As New Independentsoft.Email.Mime.Attachment(attment) - ' If attment.ToLower.EndsWith("pdf") Then - ' attachment1.ContentType = New ContentType("application", "pdf") - ' ElseIf attment.ToLower.EndsWith("jpg") Then - ' attachment1.ContentType = New ContentType("application", "jpg") - ' ElseIf attment.ToLower.EndsWith("docx") Then - ' attachment1.ContentType = New ContentType("application", "MS-word") - ' End If - ' oMessage.BodyParts.Add(attachment1) - ' Else - ' _logger.Warn($"Attachment {attment.ToString} is not existing!") - ' End If - ' End If - ' Dim client As Independentsoft.Email.Smtp.SmtpClient - ' Try - ' client = New Independentsoft.Email.Smtp.SmtpClient(mailsmtp, mailport) - ' Catch ex As Exception - ' _logger.Warn("clsEmail.Create Client: " & ex.Message) - ' _error = True - ' Continue For - ' End Try - ' Try - ' client.Connect() - ' Catch ex As Exception - ' _logger.Warn("clsEmail.Client.Connect1: " & ex.Message) - ' _logger.Debug("Error in ClientConnect - but still trying to send") - ' _error = True - ' ' Continue For - ' End Try - ' _logger.Debug("Connected to Client!") - ' If AUTH_TYPE = "SSL" Then - ' client.EnableSsl = True - ' 'client.ValidateRemoteCertificate = True - ' _logger.Debug("Authentification via SSL.") - ' ElseIf AUTH_TYPE = "TLS" Then - ' ' client.ValidateRemoteCertificate = False - ' client.StartTls() - ' client.EnableSsl = False - ' _logger.Debug("Authentification via TLS. SSL disabled") - ' Else - ' client.EnableSsl = False - ' _logger.Debug("Authentification NONE. SSL disabled") - ' End If - ' Try - - ' client.Connect() - ' Catch ex As Exception - ' _logger.Warn("clsEmail.Client.Connect: " & ex.Message) - ' Err_Message = "clsEmail.Client.Connect: " & ex.Message - ' _error = True - ' ' Continue For - ' End Try - ' Try - ' If mailsmtp.Contains("office365.com") Then - ' client.Login(mailUser, mailPW, AuthenticationType.None) - ' Else - ' client.Login(mailUser, mailPW) - ' End If - - ' _logger.Debug("Logged in!") - ' Catch ex As Exception - ' Try - ' If mailsmtp.Contains("office365.com") Then - ' client.Login(mailUser, mailPW, AuthenticationType.Login) - ' Else - ' client.Login(mailUser, mailPW, AuthenticationType.Anonymous) - ' End If - - ' Catch ex1 As Exception - ' Try - ' client.Login(mailUser, mailPW, AuthenticationType.Login) - ' Catch ex2 As Exception - ' _logger.Warn("clsEmail.Client.Login: " & ex.Message) - ' _error = True - ' client.Disconnect() - ' Continue For - ' End Try - ' End Try - ' End Try - ' Try - ' client.Send(oMessage) - ' _logger.Info("Message to " & _mailempfaenger & " has been send.") - ' _msg_Send = True - ' _error = False - ' Catch ex As Exception - ' _logger.Warn("clsEmail.Client.Send: " & ex.Message) - ' Err_Message = ex.Message - ' _error = True - ' client.Disconnect() - ' Continue For - ' End Try - ' client.Disconnect() - - ' Catch ex As Exception - ' Err_Message = ex.Message - ' If _msg_Send = True Then - ' _logger.Info($"Error Closing Connection [{ex.Message}]") - ' Else - ' _logger.Error(ex) - ' End If - ' _error = True - ' End Try - ' Next - - ' If _error = True Then - ' Return False - ' Else - ' Return True - ' End If - ' Catch ex As Exception - ' _logger.Error(ex) - ' Err_Message = ex.Message - ' Return False - ' End Try - 'End Function - 'Public Function DELETE_EMAIL(POLLTYPE As String, msgid As String, MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String) - ' Try - ' If POLLTYPE = "POP" Then - ' Dim oClient As New Pop3Client(MYMAIL_SERVER, MYMAIL_PORT) - - ' oClient.ValidateRemoteCertificate = False - ' oClient.Connect() - ' oClient.Login(MYMAIL_USER, MYMAIL_USER_PW) - - ' Dim oMessageInfo As MessageInfo() = oClient.List() - - ' For i As Integer = 0 To oMessageInfo.Length - 1 - ' Dim message As Message = oClient.GetMessage(oMessageInfo(i).Index) - ' If message.MessageID = msgid Then - ' oClient.Delete(oMessageInfo(i).Index) - ' _logger.Info(String.Format("Message [{0}] was deleted!", message.Subject)) - ' Exit For - ' End If - ' Next - ' oClient.Disconnect() - ' Return True - ' ElseIf POLLTYPE = "IMAP" Then - ' Dim oIMAPClient As New ImapClient(MYMAIL_SERVER, MYMAIL_PORT) - - ' oIMAPClient.ValidateRemoteCertificate = False - ' oIMAPClient.Connect() - ' oIMAPClient.Login(MYMAIL_USER, MYMAIL_USER_PW) - - ' oIMAPClient.SelectFolder("Inbox") - ' Dim envelopes As Envelope() = oIMAPClient.ListMessages() - ' For i As Integer = 0 To envelopes.Length - 1 - ' If envelopes(i).MessageID = msgid Then - ' oIMAPClient.Delete(envelopes(i).UniqueID) 'mark as deleted - ' End If - ' Next - ' oIMAPClient.Expunge() 'delete messages marked as deleted - ' oIMAPClient.Disconnect() - ' Return True - ' End If - ' Catch ex As Exception - ' _logger.Error(ex) - ' 'clsLogger.Add("Unexpected Error in DELETE_EMAIL: " & ex.Message) - ' Return False - ' End Try - 'End Function -End Class diff --git a/Modules.Messaging/Email2.vb b/Modules.Messaging/Email2.vb deleted file mode 100644 index c97aec66..00000000 --- a/Modules.Messaging/Email2.vb +++ /dev/null @@ -1,483 +0,0 @@ -Imports System.IO -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Filesystem -Imports Limilabs.Mail -Imports Limilabs.Mail.MIME -Imports Limilabs.Mail.MSG -Imports Limilabs.Client.IMAP -Imports Limilabs.Client.SMTP -Imports Limilabs.Client - -Public Class Email2 - Private ReadOnly Logger As Logger - Private ReadOnly LoggerMail As Logger - Private ReadOnly LogConfig As LogConfig - Private ReadOnly FileEx As Filesystem.File - Private ReadOnly MailBuilder As New MailBuilder() - Private ReadOnly TempFiles As New List(Of String) - - Private DisableExcessiveLogging As Boolean = False - - Public Sub New(pLogConfig As LogConfig) - LogConfig = pLogConfig - Logger = pLogConfig.GetLogger() - LoggerMail = pLogConfig.GetLogger("Limilabs.Mail") - FileEx = New Filesystem.File(pLogConfig) - - ' Turn on internal Mail.dll logging - Limilabs.Mail.Log.Enabled = True - - AddHandler Limilabs.Mail.Log.WriteLine, AddressOf ProcessMailLog - End Sub - - Public Enum EmailSecurity - SSL - START_TLS - End Enum - - Private Sub ProcessMailLog(pMessage As String) - If DisableExcessiveLogging = False Then - LoggerMail.Debug(pMessage) - End If - End Sub - - Public Function New_SMTPConnection(pSMTP As Smtp, pServer As String, pUsername As String, pPassword As String, pSecurity As EmailSecurity, Optional pPort As Integer = 0) As Smtp - Try - Logger.Info("Connecting to SMTP server [{0}:{1}] with user [{2}]", pServer, pPort, pUsername) - - Dim oPort As Integer - If pPort = 0 Then - If pSecurity = EmailSecurity.SSL Then - oPort = Smtp.DefaultSSLPort - - Else - oPort = Smtp.DefaultPort - - End If - - Else - oPort = pPort - - End If - Logger.Debug("Using Port [{0}] for connection", oPort) - - If pSecurity = EmailSecurity.SSL Then - Logger.Debug("Using SSL/TLS as Security Option") - pSMTP.ConnectSSL(pServer, oPort) - Else - Logger.Debug("Using STARTTLS as Security Option") - pSMTP.Connect(pServer, oPort) - pSMTP.StartTLS() - End If - Logger.Debug("Connection to SMTP Server [{0}] established!", pServer) - - Logger.Debug("Logging in with user [{0}]", pUsername) - pSMTP.UseBestLogin(pUsername, pPassword) - - Return pSMTP - - Catch ex As Exception - Logger.Warn("Could not connect to server [{0}] with user [{1}]", pServer, pUsername) - Logger.Error(ex) - Return pSMTP - - End Try - End Function - - Public Function New_IMAPConnection(pServer As String, pUsername As String, pPassword As String, pSecurity As EmailSecurity, Optional pPort As Integer = 0) As Imap - Try - Logger.Info("Connecting to IMAP server [{0}:{1}] with user [{2}]", pServer, pPort, pUsername) - - Dim oIMAP As New Imap() - Dim oPort As Integer - If pPort = 0 Then - If pSecurity = EmailSecurity.SSL Then - oPort = Imap.DefaultSSLPort - - Else - oPort = Imap.DefaultPort - - End If - - Else - oPort = pPort - - End If - Logger.Debug("Using Port [{0}] for connection", oPort) - - If pSecurity = EmailSecurity.SSL Then - Logger.Debug("Using SSL/TLS as Security Option") - oIMAP.ConnectSSL(pServer, oPort) - Else - Logger.Debug("Using STARTTLS as Security Option") - oIMAP.Connect(pServer, oPort) - oIMAP.StartTLS() - End If - Logger.Debug("Connection to IMAP Server [{0}] established!", pServer) - - Logger.Debug("Logging in with user [{0}]", pUsername) - oIMAP.UseBestLogin(pUsername, pPassword) - - Return oIMAP - - Catch ex As Exception - Logger.Warn("Could not connect to server [{0}] with user [{1}]", pServer, pUsername) - Logger.Error(ex) - Throw ex - - End Try - End Function - - Public Function Test_IMAPLogin(pClient As Imap, Optional pFolder As String = "Inbox") As Boolean - Logger.Info("Testing Login to IMAP Server") - - Try - Logger.Debug("Fetching Inbox") - Dim oStatus As FolderStatus = pClient.SelectInbox() - - Logger.Debug("Test succeeded!") - - Return True - Catch ex As Exception - Logger.Warn("Login failed for IMAP server!") - Logger.Error(ex) - - Return False - End Try - End Function - - Public Function Test_SMTPLogin(pClient As Smtp) As Boolean - Logger.Info("Testing Login to IMAP Server") - - Try - Dim oExtensions = pClient.SupportedExtensions() - Dim oExtensionArray = oExtensions.Select(Function(ex) ex.ToString).ToArray - Logger.Debug("Supported Extensions: ") - Logger.Debug(String.Join(", ", oExtensionArray)) - Logger.Debug("Test succeeded!") - - Return True - Catch ex As Exception - Logger.Warn("Login failed for SMTP server!") - Logger.Error(ex) - - Return False - End Try - End Function - - Public Function Get_IMAPMessages(pClient As Imap, Optional pFolder As String = "Inbox") As List(Of IMail) - Logger.Info("Fetching Messages in Folder [{0}]", pFolder) - Dim oMails As New List(Of IMail) - - Try - Logger.Debug("Fetching Folder [{0}]", pFolder) - Dim oStatus As FolderStatus = pClient.Select(pFolder) - - Logger.Debug("Fetching Unseen UUIDs") - - DisableExcessiveLogging = True - Dim oUUIDs As List(Of Long) = pClient.Search(Flag.Unseen) - DisableExcessiveLogging = False - - Logger.Debug("Fetching Unseen Mails") - For Each oUUID As Long In oUUIDs - DisableExcessiveLogging = True - Dim oEmlFile As Byte() = pClient.GetMessageByUID(oUUID) - DisableExcessiveLogging = False - - Dim oEmail As IMail = MailBuilder.CreateFromEml(oEmlFile) - oMails.Add(oEmail) - - Next - - Logger.Debug("Emails fetched!") - - Return oMails - - Catch ex As Exception - Logger.Warn("Fetching messages for folder [{0}] failed!", pFolder) - Logger.Error(ex) - Return New List(Of IMail) - - End Try - End Function - - Public Function Get_IMAPMessage(pClient As Imap, pMessageId As String, Optional pFolder As String = "Inbox") As IMail - Logger.Info("Fetching Message [{0}]", pMessageId) - - Dim oMail As IMail = Nothing - - Try - Logger.Debug("Fetching Folder [{0}]", pFolder) - Dim oStatus As FolderStatus = pClient.Select(pFolder) - - Logger.Debug("Fetching UUIDs") - Dim oUUIDs As List(Of Long) = pClient.Search(Flag.All) - Logger.Debug("Fetching Mails") - - DisableExcessiveLogging = True - Dim oInfos As List(Of MessageInfo) = pClient.GetMessageInfoByUID(oUUIDs) - DisableExcessiveLogging = False - - Dim oMailInfo = oInfos.Where(Function(i) i.Envelope.MessageID = pMessageId).FirstOrDefault() - - If oMailInfo IsNot Nothing Then - DisableExcessiveLogging = True - Dim oMailData As Byte() = pClient.GetMessageByUID(oMailInfo.UID) - DisableExcessiveLogging = False - oMail = MailBuilder.CreateFromEml(oMailData) - End If - - Logger.Debug("Email fetched!") - - Return oMail - - Catch ex As Exception - Logger.Warn("Fetching message with MessageID [{0}] failed!", pMessageId) - Logger.Error(ex) - - Return Nothing - - End Try - End Function - - Public Function Send_SMTPMessage(pClient As Smtp, pSender As String, pReceiver As String, pSubject As String, pBody As String) As Boolean - Logger.Info("Sending Message with Subject [{0}]", pSubject) - - Try - Dim oBuilder As New MailBuilder() - oBuilder.From.Add(New Headers.MailBox(pSender)) - oBuilder.To.Add(New Headers.MailBox(pReceiver)) - oBuilder.Subject = pSubject - oBuilder.Text = pBody - - Dim oMail As IMail = oBuilder.Create() - Dim oResult As ISendMessageResult = pClient.SendMessage(oMail) - - If oResult.Status = SendMessageStatus.Success Then - Logger.Debug("Message sent successful!") - Return True - - Else - Logger.Warn("Message sending failed. Status: [{0}]", oResult.Status) - Return False - - End If - - Catch ex As Exception - Logger.Warn("Message sending failed.") - Logger.Error(ex) - Return False - - End Try - End Function - - ''' - ''' Loads an eml file from disk and returns the IMail representation of it - ''' - ''' Path to the eml file - ''' The IMail object - Public Function Load_Email(pFileName As String) As IMail - Dim oFileName As String = MaybeConvert_MsgToEml(pFileName) - Return MailBuilder.CreateFromEmlFile(oFileName) - End Function - - ''' - ''' Removes all attachments from an EML file and saves it to a temporary file. - ''' - ''' The EML file to process. - ''' The optional suffix to add to the original filename. - ''' The path of the new EML without attachments. - Public Function Remove_AttachmentsFromEmail(pFileName As String, Optional pSuffix As String = "") As String - Try - ' Convert possible msg file to eml - Dim oEmlPath As String = MaybeConvert_MsgToEml(pFileName) - - ' Clean and version new path - Dim oTempPath As String = Path.Combine(Path.GetTempPath(), Add_FilenameSuffix(oEmlPath, pSuffix, ".eml")) - Dim oCleanedPath As String = FileEx.GetCleanPath(oTempPath) - Dim oVersionedPath As String = FileEx.GetVersionedFilename(oCleanedPath) - - ' Load eml file - Dim oMail = MailBuilder.CreateFromEmlFile(oEmlPath) - - ' Remove attachments and save - oMail.RemoveAttachments() - oMail.Save(oVersionedPath) - - Return oVersionedPath - Catch ex As Exception - Logger.Error(ex) - - Return Nothing - End Try - End Function - - Public Function Save_AttachmentsToDisk(pFileName As String) As List(Of String) - Try - Dim oAttachmentPaths As New List(Of String) - Dim oEmlFile As String = MaybeConvert_MsgToEml(pFileName) - Dim oMail = MailBuilder.CreateFromEmlFile(oEmlFile) - Dim oTempPath As String = IO.Path.GetTempPath() - - If oMail.Attachments.Count = 0 Then - Return New List(Of String) - End If - - For Each oAttachment As MimeData In oMail.Attachments - Dim oPath As String = IO.Path.Combine(oTempPath, oAttachment.SafeFileName) - Dim oVersionedPath As String = FileEx.GetVersionedFilename(oPath) - - oAttachment.Save(oVersionedPath) - oAttachmentPaths.Add(oVersionedPath) - TempFiles.Add(oVersionedPath) - Next - - Return oAttachmentPaths - Catch ex As Exception - Logger.Error(ex) - - Return New List(Of String) - End Try - End Function - - Public Sub Clear_TempFiles() - Logger.Info("Cleaning [{0}] email temp files", TempFiles.Count) - For Each oFile In TempFiles - Try - IO.File.Delete(oFile) - Catch ex As Exception - Logger.Warn("Could not clean temp file [{0}]", oFile) - Logger.Error(ex) - End Try - Next - - TempFiles.Clear() - End Sub - - Public Function Get_MessageDate(Mail As IMail) As Date - Try - Dim oDate = Mail.Date - Return oDate - Catch ex As Exception - Logger.Warn("Could not get Date from Mail [{0}]", Mail.MessageID) - Logger.Error(ex) - Return Date.MinValue - End Try - End Function - - Public Function Get_MessageSender(Mail As IMail) As String - Try - Dim oAddress = Mail.From.First() - - If oAddress Is Nothing Then - Logger.Warn("Could not get MessageSender from Mail [{0}]", Mail.MessageID) - Return Nothing - End If - - Return oAddress.Address - - Catch ex As Exception - Logger.Warn("Could not get MessageSender from Mail [{0}]", Mail.MessageID) - Logger.Error(ex) - Return Nothing - - End Try - End Function - - Public Function Get_MessageReceiver(Mail As IMail) As String - Try - Dim oAddress = Mail.To.FirstOrDefault() - - If oAddress Is Nothing Then - Logger.Warn("Could not get MessageReceiver from Mail [{0}]", Mail.MessageID) - Return Nothing - End If - - Dim oMailBox = oAddress.GetMailboxes().First() - - If oMailBox Is Nothing Then - Logger.Warn("Could not get MessageReceiver from Mail [{0}]", Mail.MessageID) - Return Nothing - End If - - Return oMailBox.Address - - Catch ex As Exception - Logger.Error(ex) - Return Nothing - - End Try - End Function - - Public Function Convert_ToEml(pFilePath As String) As String - Return MaybeConvert_MsgToEml(pFilePath) - End Function - - Private Function MaybeConvert_MsgToEml(pEmailFilePath As String) As String - Dim oInfo As New FileInfo(pEmailFilePath) - - If oInfo.Extension.ToUpper = ".EML" Then - Return pEmailFilePath - - ElseIf oInfo.Extension.ToUpper = ".MSG" Then - Return DoConvertMsgToEmlFile(pEmailFilePath) - - Else - Return Nothing - - End If - End Function - - Private Function DoConvertMsgToEmlFile(pMsgFile As String) As String - Try - Logger.Debug("Converting Msg file to Eml: [{0}]", pMsgFile?.ToString) - - Dim oTempPath As String = IO.Path.GetTempPath() - Dim oFileNameWithoutExtension = Path.GetFileNameWithoutExtension(pMsgFile) - Dim oFileNameWithoutInvalidChars = Language.Utils.RemoveInvalidCharacters(oFileNameWithoutExtension) - Dim oEmlPath As String = IO.Path.Combine(oTempPath, $"{oFileNameWithoutInvalidChars}.eml") - Dim oVersionedPath As String = FileEx.GetVersionedFilename(oEmlPath) - - Logger.Debug("New Path for Eml file: [{0}]", oVersionedPath) - - Using oConverter As New MsgConverter(pMsgFile) - Logger.Debug("Converter created") - Dim oEmail As IMail = oConverter.CreateMessage() - Logger.Debug("Message created") - Dim oData As Byte() = oEmail.Render() - Logger.Debug("Message rendered") - - oEmail.Save(oVersionedPath) - Logger.Debug("Message saved") - End Using - - Logger.Info("Msg File successfully converted to Eml: [{0}]", oVersionedPath) - TempFiles.Add(oVersionedPath) - Return oVersionedPath - - Catch ex As Exception - Logger.Warn("Converting Msg to Eml file failed!") - Logger.Error(ex) - - Return Nothing - End Try - End Function - - Private Function Add_FilenameSuffix(pFilename As String, pSuffix As String, Optional pExtension As String = Nothing) - Dim oFileInfo As New FileInfo(pFilename) - Dim oExtension As String = oFileInfo.Extension - - If pExtension IsNot Nothing Then - If pExtension.StartsWith(".") = False Then - oExtension = $".{pExtension}" - Else - oExtension = pExtension - End If - End If - - Dim oFileNameWithoutExtension = Path.GetFileNameWithoutExtension(pFilename) - - Return $"{oFileNameWithoutExtension}{pSuffix}{oExtension}" - End Function -End Class diff --git a/Modules.Messaging/EventBus.vb b/Modules.Messaging/EventBus.vb deleted file mode 100644 index 15eabd40..00000000 --- a/Modules.Messaging/EventBus.vb +++ /dev/null @@ -1,70 +0,0 @@ -Imports System.Reflection - -''' -''' A Simple EventBus for .NET -''' https://stackoverflow.com/questions/368265/a-simple-event-bus-for-net -''' -Public Class EventBus - Private Shared _Instance As EventBus - Private _Listeners As List(Of EventListenerWrapper) = New List(Of EventListenerWrapper)() - - Public Shared ReadOnly Property Instance As EventBus - Get - If IsNothing(_Instance) Then - _Instance = New EventBus() - End If - Return _Instance - End Get - End Property - - ''' - ''' Register a form as an event listener. - ''' - ''' The event listener, usually `Me` - Public Sub Register(ByVal listener As Object) - If Not _Listeners.Any(Function(l) l.Listener.Equals(listener)) Then - _Listeners.Add(New EventListenerWrapper(listener)) - End If - End Sub - - Public Sub Unregister(ByVal listener As Object) - Try - _Listeners.RemoveAll(Function(l) l.Listener = listener) - Catch ex As Exception - - End Try - - End Sub - - Public Sub PostEvent(ByVal e As Object) - _Listeners. - Where(Function(l) l.EventType = e.[GetType]()). - ToList(). - ForEach(Sub(l) l.PostEvent(e)) - End Sub - - Private Class EventListenerWrapper - Public Property Listener As Object - Public Property EventType As Type - Private _method As MethodBase - - Public Sub New(ByVal listener As Object) - Me.Listener = listener - Dim oType As Type = listener.[GetType]() - _method = oType.GetMethod("OnEvent") - If _method Is Nothing Then - Throw New ArgumentException("Class " & oType.Name & " does not containt method OnEvent") - End If - Dim oParameters As ParameterInfo() = _method.GetParameters() - - If oParameters.Length <> 1 Then - Throw New ArgumentException("Method OnEvent of class " & oType.Name & " have invalid number of parameters (should be one)") - End If - EventType = oParameters(0).ParameterType - End Sub - - Public Sub PostEvent(ByVal e As Object) - _method.Invoke(Listener, {e}) - End Sub - End Class -End Class diff --git a/Modules.Messaging/Limilab.vb b/Modules.Messaging/Limilab.vb deleted file mode 100644 index c48632f9..00000000 --- a/Modules.Messaging/Limilab.vb +++ /dev/null @@ -1,404 +0,0 @@ -Imports DigitalData.Modules.Logging -Imports Limilabs.Mail -Imports Limilabs.Client.IMAP -Imports Limilabs.Client.SMTP -Imports Limilabs.Client -Imports System.Net.Security -Imports System -Imports System.Security.Authentication -Imports Limilabs.Mail.Headers -Imports Limilabs.Mail.MIME -Imports Limilabs - -Public Class Limilab - Private Initialized As Boolean = False - Private LogConfig As LogConfig - Private Logger As DigitalData.Modules.Logging.Logger - Private IMAPServer As String - Private IMAPPort As Integer - Private User As String - Private Password As String - Private AuthType As String - Public CurrentImapObject As Imap - Public ErrorMessage As String - Private CURR_ListUIDs As List(Of Long) - Public Sub New(LogConfig As LogConfig) - LogConfig = LogConfig - Logger = LogConfig.GetLogger() - End Sub - ''' - ''' Initializes the module. - ''' - ''' IP-Address or Domainname of Server - ''' IMAP-Port - ''' IMAP-Username - ''' IMAP-Password - ''' Auth-Type - ''' The folder to fetch messages from. Defaults to `Inbox` - Public Sub InitIMAP(Log_enabled As Boolean, oImapServer As String, oPort As Integer, oUser As String, oPassword As String, oAuthType As String, Optional Folder As String = "Inbox") - LOG_Limilab(Log_enabled) - IMAPServer = oImapServer - IMAPPort = oPort - User = oUser - Password = oPassword - AuthType = oAuthType - Initialized = True - End Sub - Public Function CloseImap() As Boolean - Try - If Initialized = False Then - Return True - Else - If Not IsNothing(CurrentImapObject) Then - CurrentImapObject.Close() - End If - - Return True - End If - - Catch ex As Exception - Logger.Error(ex) - ErrorMessage = ex.Message - Return False - End Try - - - End Function - - Private Function LOG_Limilab(Log_enabled As Boolean) As Boolean - Mail.Log.Enabled = Log_enabled - End Function - - ''' - ''' Tests connection to a given IMAP Server by connecting and doing a simple message query. - ''' - ''' True if connection and query were successful. False otherwise. - Public Function IMAPTestLogin() As Boolean - Logger.Debug("Starting IMAPTestLogin ...") - - If Initialized = False Then - Return False - End If - Try - Logger.Debug("Connecting...") - Dim oReturn As Boolean = ImapConnect() - If oReturn = True Then - CurrentImapObject.Close() - End If - Return oReturn - Catch ex As Exception - Logger.Error(ex) - ErrorMessage = ex.Message - Return False - End Try - End Function - Public Function IMAPGetUnseenMessageIDs() As List(Of Long) - Dim oListuids As New List(Of Long) - Logger.Debug("Starting IMAPGetMessageIDs ...") - If Initialized = False Then - Return Nothing - End If - Try - Dim oConnect As Boolean = ImapConnect() - - If oConnect = True Then - oListuids = ImapGetMessageIDs_Unseen() - CURR_ListUIDs = oListuids - End If - Return oListuids - Catch ex As Exception - Logger.Error(ex) - ErrorMessage = ex.Message - Return Nothing - End Try - End Function - Public Function IMAPGetMessageIDs_AllMails() As List(Of Long) - Dim oListuids As New List(Of Long) - Logger.Debug("Starting IMAPGetMessageIDs ...") - If Initialized = False Then - Return Nothing - End If - Try - Dim oConnect As Boolean = ImapConnect() - - If oConnect = True Then - oListuids = ImapGetMessageIDs_All() - CURR_ListUIDs = oListuids - End If - Return oListuids - Catch ex As Exception - Logger.Error(ex) - ErrorMessage = ex.Message - Return Nothing - End Try - End Function - Private Function ImapConnect() As Boolean - Try - If Initialized = False Then - Return True - End If - Logger.Debug("ImapConnect {0}:{1} with user {2}", IMAPServer, IMAPPort, User) - Dim oReturnImap As New Imap() - AddHandler oReturnImap.ServerCertificateValidate, AddressOf Validate - Logger.Debug($"AUTH_TYPE [{AuthType}]") - If AuthType = "SSL/TLS" Then - If IMAPPort <> "993" Then - Logger.Debug($"Connecting with explizit port [{IMAPPort}]") - oReturnImap.Connect(IMAPServer, IMAPPort) - Else - Logger.Debug("Connecting to IMAP-Server without port...") - oReturnImap.ConnectSSL(IMAPServer) - End If - Logger.Debug($"Connect to [{IMAPServer}] successful!") - - Dim oSupportsStartTLS As Boolean = oReturnImap.SupportedExtensions().Contains(ImapExtension.StartTLS) - If oSupportsStartTLS And AuthType.EndsWith("TLS") Then - Logger.Debug("Server supports StartTLS, so starting...") - oReturnImap.StartTLS() - Else - Logger.Info("Server supports no StartTLS") - oReturnImap.SSLConfiguration.EnabledSslProtocols = SslProtocols.Tls12 - End If - ElseIf AuthType = "SSL" Then - If IMAPPort <> "993" Then - Logger.Debug($"Connecting with explizit port [{IMAPPort}]") - oReturnImap.Connect(IMAPServer, IMAPPort) - Else - Logger.Debug("Connecting to IMAP-Server without port...") - oReturnImap.ConnectSSL(IMAPServer) - End If - ElseIf AuthType = "Simple" Then - - End If - Logger.Debug(">> Connected to IMAP-Server!") - - Logger.Debug("Login with User and password...") - oReturnImap.UseBestLogin(User, Password) - Logger.Debug(">> Logged on!") - CurrentImapObject = oReturnImap - Return True - Catch ex As Exception - Logger.Error(ex) - ErrorMessage = ex.Message - If Not IsNothing(ex.InnerException) Then - Logger.Warn("Inner Exception ImapConnect: " + ex.InnerException.Message) - End If - - - Return False - End Try - End Function - - Private Sub Validate( - ByVal sender As Object, - ByVal e As ServerCertificateValidateEventArgs) - - Const ignoredErrors As SslPolicyErrors = - SslPolicyErrors.RemoteCertificateChainErrors Or _ ' self-signed - SslPolicyErrors.RemoteCertificateNameMismatch ' name mismatch - - Dim nameOnCertificate As String = e.Certificate.Subject - - If (e.SslPolicyErrors And Not ignoredErrors) = SslPolicyErrors.None Then - e.IsValid = True - Return - End If - e.IsValid = False - End Sub - Private Function ImapGetMessageIDs_Unseen() As List(Of Long) - Dim oListuids As New List(Of Long) - Try - CurrentImapObject.SelectInbox() - - oListuids = CurrentImapObject.Search(Flag.Unseen) - - Return oListuids - Catch ex As Exception - Logger.Error(ex) - ErrorMessage = ex.Message - Return Nothing - End Try - - End Function - Private Function ImapGetMessageIDs_All() As List(Of Long) - Dim oListuids As New List(Of Long) - Try - CurrentImapObject.SelectInbox() - - oListuids = CurrentImapObject.Search(Flag.All) - - Return oListuids - Catch ex As Exception - Logger.Error(ex) - ErrorMessage = ex.Message - Return Nothing - End Try - - End Function - ''' - ''' Creates a MailObject and sends Mail via smtp. - ''' - ''' True if Message was send. False otherwise. - Public Function NewSMTPEmail(mailto As String, mailSubject As String, mailBody As String, - mailfrom As String, mailsmtp As String, mailport As Integer, mailUser As String, mailPW As String, - AUTH_TYPE As String, SENDER_INSTANCE As String, ADDED_DATETIME As String, Optional attachmentString As String = "", Optional Test As Boolean = False) - Try - Dim oError As Boolean = False - Dim oReceipiants As String() - If mailto.Contains(";") Then - oReceipiants = mailto.Split(";") - Else - ReDim Preserve oReceipiants(0) - oReceipiants(0) = mailto - End If - For Each oMailReceipiant As String In oReceipiants - Logger.Debug($"oMailReceipiant [{oMailReceipiant}]") - Logger.Debug($"mailsmtp [{mailsmtp}]") - Logger.Debug($"mailport [{mailport}]") - Logger.Debug($"mailSubject [{mailSubject}]") - - Dim oMailBuilder As New MailBuilder() - oMailBuilder.From.Add(New MailBox(mailfrom)) - oMailBuilder.[To].Add(New MailBox(oMailReceipiant)) - oMailBuilder.Subject = mailSubject - If ADDED_DATETIME <> "" Then - mailBody &= "

Creation-time: " & ADDED_DATETIME - End If - If Test = True Then - oMailBuilder.Html = $"This is a Testmail!

The body-text will be replaced within profile!

mailsmtp: {mailsmtp}
mailport: {mailport} -
mailUser: {mailUser}
mailPW: XXXX
AUTH_TYPE: {AUTH_TYPE}" - - Else - oMailBuilder.Html = mailBody - End If - - Logger.Debug($"mailBody [{oMailBuilder.Html.ToString}]") - - If attachmentString <> "" Then - ' Read attachment from disk, add it to Attachments collection - If System.IO.File.Exists(attachmentString) Then - Dim oAttachment As MimeData = oMailBuilder.AddAttachment(attachmentString) - End If - End If - - Dim email As IMail = oMailBuilder.Create() - ' Send the message - Using oSmtp As New Smtp() - AddHandler oSmtp.ServerCertificateValidate, AddressOf Validate - Logger.Debug($"AUTH_TYPE [{AUTH_TYPE}]") - If AUTH_TYPE = "SSL" Then - - Try - If mailport <> "465" Then - Logger.Debug($"Connecting with explizit port [{mailport}]") - oSmtp.Connect(mailsmtp, mailport) - Logger.Debug($"Connect to [{mailsmtp}] successful!") - Else - oSmtp.ConnectSSL(mailsmtp) - End If - Catch ex As Exception - Logger.Error(ex) - End Try - ElseIf AUTH_TYPE = "SSL/TLS" Then - '########################################################################################## - 'Tested with ExchangeServer SWB 22.10.2021 - '########################################################################################## - If mailport <> "587" Then - Logger.Debug($"Connecting with explizit port [{mailport}]") - oSmtp.Connect(mailsmtp, mailport) - Else - oSmtp.Connect(mailsmtp) - End If - Logger.Debug($"Connect to [{mailsmtp}] successful!") - Dim supportsStartTLS As Boolean = oSmtp.SupportedExtensions().Contains(SmtpExtension.StartTLS) - If supportsStartTLS = True Then - oSmtp.StartTLS() - Logger.Debug($"TLS started!") - Else - Logger.Info("Server supports no StartTLS") - oSmtp.SSLConfiguration.EnabledSslProtocols = SslProtocols.Tls12 - End If - Else - oSmtp.Connect(mailsmtp) - End If - Logger.Debug($"mailUser [{mailUser}]") - oSmtp.UseBestLogin(mailUser, mailPW) ' remove if not needed - - oSmtp.SendMessage(email) - Logger.Info("Message to " & oMailReceipiant & " has been send.") - oSmtp.Close() - End Using - Next - Return True - - Catch ex As Exception - Logger.Error(ex) - ErrorMessage = ex.Message - Return False - End Try - - End Function - Public Function GetMailInfo(UID As Long) As Boolean - Try - Dim eml = CurrentImapObject.GetMessageByUID(UID) - Dim email As IMail = New MailBuilder().CreateFromEml(eml) - ' Subject - Console.WriteLine(email.Subject) - - ' From - For Each m As MailBox In email.From - Console.WriteLine(m.Address) - Console.WriteLine(m.Name) - Next - ' Date - Console.WriteLine(email.[Date]) - ' Text body of the message - Console.WriteLine(email.Text) - ' Html body of the message - Console.WriteLine(email.Html) - ' Custom header - Console.WriteLine(email.Document.Root.Headers("x-spam-value")) - ' Save all attachments to disk - For Each mime As MimeData In email.Attachments - mime.Save("c:\" + mime.SafeFileName) - Next - Return True - Catch ex As Exception - Logger.Error(ex) - ErrorMessage = ex.Message - Return False - End Try - - End Function - Public Function GetMailObjects() As ArrayList - Try - Dim WORKMAIL_LIST As New ArrayList() - For Each oUID In CURR_ListUIDs - Dim oEml = CurrentImapObject.GetMessageByUID(oUID) - Dim oEmail As IMail = New MailBuilder().CreateFromEml(oEml) - WORKMAIL_LIST.Add(oEmail) - Next - Return WORKMAIL_LIST - Catch ex As Exception - Logger.Error(ex) - ErrorMessage = ex.Message - Return Nothing - End Try - - End Function - Public Function IMAP_DeleteByUID(UID As Long) As Boolean - Try - If Not IsNothing(CurrentImapObject) Then - CurrentImapObject.DeleteMessageByUID(UID) - Return True - Else - Return False - End If - - Catch ex As Exception - Logger.Error(ex) - ErrorMessage = ex.Message - Return False - End Try - End Function -End Class diff --git a/Modules.Messaging/MailLicense.xml b/Modules.Messaging/MailLicense.xml deleted file mode 100644 index 05105264..00000000 --- a/Modules.Messaging/MailLicense.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - 4dc5ef40-f1a9-468b-994c-b7ed600ad878 - Mail.dll - 2022-07-29 - Digital Data GmbH - single developer - Digital Data GmbH - - - - - - - - - - 75MRtl4ipYelIZYlpT8O7QDX9Zc= - - - Raxfkz6DfQVs/sMvH+F2nH0eHXD8FoUFSdP3t7AgBUdpABJQx86srlyuMSEhXPlc1THCqPouEVob4RsWnd9OXvTiPPSOUSK9zuNG6uz93KLAhpSD5PraAgBCF4jwZArlAp7aCNfZpHqQ3w6TRHS+CfravUU0AHHG3MZ1ZcRkGuo= - - \ No newline at end of file diff --git a/Modules.Messaging/Messaging.vbproj b/Modules.Messaging/Messaging.vbproj deleted file mode 100644 index 2709f59b..00000000 --- a/Modules.Messaging/Messaging.vbproj +++ /dev/null @@ -1,140 +0,0 @@ - - - - - Debug - AnyCPU - {AF664D85-0A4B-4BAB-A2F8-83110C06553A} - Library - DigitalData.Modules.Messaging - DigitalData.Modules.Messaging - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Messaging.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Messaging.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - P:\Visual Studio Projekte\Bibliotheken\Limilabs\Mail.dll\Mail.dll - False - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {991d0231-4623-496d-8bd0-9ca906029cbc} - Filesystem - - - {d3c8cfed-d6f6-43a8-9bdf-454145d0352f} - Language - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - - PreserveNewest - - - - \ No newline at end of file diff --git a/Modules.Messaging/My Project/Application.Designer.vb b/Modules.Messaging/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.Messaging/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.Messaging/My Project/Application.myapp b/Modules.Messaging/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.Messaging/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.Messaging/My Project/AssemblyInfo.vb b/Modules.Messaging/My Project/AssemblyInfo.vb deleted file mode 100644 index b211902e..00000000 --- a/Modules.Messaging/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.Messaging/My Project/Resources.Designer.vb b/Modules.Messaging/My Project/Resources.Designer.vb deleted file mode 100644 index c581f02e..00000000 --- a/Modules.Messaging/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - '''

- ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Messaging.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.Messaging/My Project/Resources.resx b/Modules.Messaging/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.Messaging/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.Messaging/My Project/Settings.Designer.vb b/Modules.Messaging/My Project/Settings.Designer.vb deleted file mode 100644 index 3d97a058..00000000 --- a/Modules.Messaging/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Messaging.My.MySettings - Get - Return Global.DigitalData.Modules.Messaging.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Messaging/My Project/Settings.settings b/Modules.Messaging/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.Messaging/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.Messaging/SMS.vb b/Modules.Messaging/SMS.vb deleted file mode 100644 index eeab6d15..00000000 --- a/Modules.Messaging/SMS.vb +++ /dev/null @@ -1,3 +0,0 @@ -Public Class SMS - -End Class diff --git a/Modules.Messaging/packages.config b/Modules.Messaging/packages.config deleted file mode 100644 index fcacaf63..00000000 --- a/Modules.Messaging/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Modules.Patterns/Constants.vb b/Modules.Patterns/Constants.vb deleted file mode 100644 index 2dfcf510..00000000 --- a/Modules.Patterns/Constants.vb +++ /dev/null @@ -1,3 +0,0 @@ -Public Class Constants - -End Class diff --git a/Modules.Patterns/IModule.vb b/Modules.Patterns/IModule.vb deleted file mode 100644 index 5caaa4cd..00000000 --- a/Modules.Patterns/IModule.vb +++ /dev/null @@ -1,13 +0,0 @@ -Public Interface IModule - ''' - ''' The short identifier which identifies all placeholders of this module - ''' - ''' - Property PatternIdentifier As String - - ''' - ''' Does this Module have outside dependencies like a database or a library like windream - ''' - ''' - Property IsComplex As Boolean -End Interface diff --git a/Modules.Patterns/Modules/BaseModule.vb b/Modules.Patterns/Modules/BaseModule.vb deleted file mode 100644 index 82ac08e3..00000000 --- a/Modules.Patterns/Modules/BaseModule.vb +++ /dev/null @@ -1,119 +0,0 @@ -Imports DigitalData.Modules.Logging -Imports System.Text.RegularExpressions - -Namespace Modules - Public Class BaseModule - Friend ReadOnly Logger As Logger - Private ReadOnly MyRegex As Regex = New Regex("{#(\w+)#([\:\.\w\s_/-]+)}+") - Private ReadOnly SqlPhrases As New List(Of String) From { - "SELECT ", "UPDATE ", "DELETE ", "EXEC " - } - - Private Const MAX_TRY_COUNT = 100 - - Public Sub New(pLogConfig As LogConfig) - Logger = pLogConfig.GetLogger() - End Sub - - Public Sub IncrementCounterOrThrow(ByRef pCounter As Integer) - If pCounter >= MAX_TRY_COUNT Then - Throw New OverflowException("Max tries exceeded while replacing placeholders!") - End If - - pCounter += 1 - End Sub - - Public Function ReplacePattern(pInput As String, pType As String, pReplacement As String) As String - Dim oElements As MatchCollection = MyRegex.Matches(pInput) - - If IsNothing(pReplacement) Then - Return pInput - End If - - Dim oIsSQL As Boolean = False - For Each oPhrase In SqlPhrases - If pInput.Contains(oPhrase) Then - oIsSQL = True - Exit For - End If - Next - - If oIsSQL = True Then - Logger.Debug("Input string is most likely an SQL Query, masking quotes in replacement string.") - pReplacement = pReplacement.Replace("'", "''") - End If - - For Each oElement As Match In oElements - ' if group 1 contains the 'pattern' the replace whole group with 'replacement' - ' and return it - If oElement.Groups(1).Value = pType Then - Logger.Debug("Replacing Placeholder with [{0}]", pReplacement) - Return Regex.Replace(pInput, oElement.Groups(0).Value, pReplacement) - End If - Next - - ' no replacement made - Return pInput - End Function - - Public Function ContainsPatternAndValue(pInput As String, pType As String, pValue As String) As Boolean - Dim oElements As MatchCollection = MyRegex.Matches(pInput) - - For Each oElement As Match In oElements - ' Pattern in pInput - Dim oType As String = oElement.Groups(1).Value - Dim oValue As String = oElement.Groups(2).Value - - If oType = pType And oValue = pValue Then - Return True - End If - Next - - Return False - End Function - - Public Function ContainsPattern(pInput As String, pType As String) As String - Dim oElements As MatchCollection = MyRegex.Matches(pInput) - - For Each oElement As Match In oElements - Dim t As String = oElement.Groups(1).Value - - If t = pType Then - Return True - End If - Next - - Return False - End Function - - Public Function HasPattern(pInput As String, pType As String) As Boolean - Dim oMatches = MyRegex.Matches(pInput) - - For Each oMatch As Match In oMatches - For Each oGroup As Group In oMatch.Groups - If oGroup.Value = pType Then - Return True - End If - Next - Next - - Return False - End Function - - Public Function GetNextPattern(pInput As String, pType As String) As Pattern - Dim oElements As MatchCollection = MyRegex.Matches(pInput) - - For Each oElement As Match In oElements - ' Pattern in pInput - Dim oType As String = oElement.Groups(1).Value - Dim oValue As String = oElement.Groups(2).Value - - If oType = pType Then - Return New Pattern(oType, oValue) - End If - Next - - Return Nothing - End Function - End Class -End Namespace diff --git a/Modules.Patterns/Modules/Clipboard.vb b/Modules.Patterns/Modules/Clipboard.vb deleted file mode 100644 index 43cc729b..00000000 --- a/Modules.Patterns/Modules/Clipboard.vb +++ /dev/null @@ -1,49 +0,0 @@ -Imports DigitalData.Modules.Logging - -Namespace Modules - Public Class Clipboard - Inherits BaseModule - Implements IModule - - Public Const CLIP_VALUE_BOARD As String = "BOARD" - - Public Const CLIPBOARD_VALUE_DE = "@Zwischenablage" - Public Const CLIPBOARD_VALUE_EN = "@Clipboard" - - Public Property PatternIdentifier As String = "CLIP" Implements IModule.PatternIdentifier - Public Property IsComplex As Boolean = False Implements IModule.IsComplex - - Public Sub New(pLogConfig As LogConfig) - MyBase.New(pLogConfig) - End Sub - - Public Function Replace(pInput As String, pClipboardContents As String) As String - Dim oResult = pInput - Dim oCounter = 0 - - Try - ' LEGACY: Replace Clipboard Contents - oResult = oResult.Replace(CLIPBOARD_VALUE_DE.ToLower, pClipboardContents) - oResult = oResult.Replace(CLIPBOARD_VALUE_DE.ToUpper, pClipboardContents) - oResult = oResult.Replace(CLIPBOARD_VALUE_DE, pClipboardContents) - - oResult = oResult.Replace(CLIPBOARD_VALUE_EN.ToLower, pClipboardContents) - oResult = oResult.Replace(CLIPBOARD_VALUE_EN.ToUpper, pClipboardContents) - oResult = oResult.Replace(CLIPBOARD_VALUE_EN, pClipboardContents) - - ' Replace Clipboard Contents - While ContainsPatternAndValue(oResult, PatternIdentifier, CLIP_VALUE_BOARD) - oResult = ReplacePattern(oResult, PatternIdentifier, pClipboardContents) - IncrementCounterOrThrow(oCounter) - End While - - Logger.Debug("Input after Clipboard.Replace: [{0}]", pInput) - Catch ex As Exception - Logger.Error(ex) - - End Try - - Return oResult - End Function - End Class -End Namespace diff --git a/Modules.Patterns/Modules/Controls.vb b/Modules.Patterns/Modules/Controls.vb deleted file mode 100644 index 4c4f7e56..00000000 --- a/Modules.Patterns/Modules/Controls.vb +++ /dev/null @@ -1,105 +0,0 @@ -Imports System.Windows.Forms -Imports DigitalData.Controls.LookupGrid -Imports DigitalData.Modules.Logging - -Namespace Modules - ''' - ''' Patterns for control values on a panel - ''' - Public Class Controls - Inherits BaseModule - Implements IModule - - Public Const CTRL_VALUE_PANEL = "CTRL_VALUE_PANEL" - - Public Property PatternIdentifier As String = "CTRL" Implements IModule.PatternIdentifier - Public Property IsComplex As Boolean = True Implements IModule.IsComplex - - Public Sub New(pLogConfig As LogConfig) - MyBase.New(pLogConfig) - End Sub - - Public Function Replace(pInput As String, pPanel As Panel) As String - Dim oControls As List(Of Control) = pPanel.Controls.Cast(Of Control).ToList() - Return Replace(pInput, oControls) - End Function - - Public Function Replace(pInput As String, pControls As List(Of Control)) As String - Dim oResult = pInput - Dim oCounter = 0 - - While ContainsPattern(oResult, PatternIdentifier) - Try - Dim oControlName As String = GetNextPattern(oResult, PatternIdentifier).Value - - Dim oControl As Control = pControls. - Where(Function(control) control.Name = oControlName). - FirstOrDefault() - - If oControl IsNot Nothing Then - Dim oReplaceValue As String - Select Case oControl.GetType - Case GetType(TextBox) - oReplaceValue = oControl.Text - - Case GetType(DevExpress.XtraEditors.TextEdit) - Dim oTextEdit As DevExpress.XtraEditors.TextEdit = oControl - oReplaceValue = oTextEdit.EditValue - - Case GetType(DevExpress.XtraEditors.DateEdit) - Dim oDateEdit As DevExpress.XtraEditors.DateEdit = oControl - Dim oDateValue As Date = oDateEdit.EditValue - oReplaceValue = oDateValue.ToString("yyyyMMdd") - - Case GetType(DevExpress.XtraEditors.LookUpEdit) - Dim oLookupEdit As DevExpress.XtraEditors.LookUpEdit = oControl - - If IsNothing(oLookupEdit.EditValue) Then - oReplaceValue = String.Empty - Else - oReplaceValue = oLookupEdit.EditValue - End If - - Case GetType(LookupControl3) - Dim oLookupControl3 As LookupControl3 = oControl - If oLookupControl3.Properties.SelectedValues.Count = 1 Then - oReplaceValue = oLookupControl3.Properties.SelectedValues.Item(0) - Else - oReplaceValue = "0" - End If - - Case GetType(ComboBox) - oReplaceValue = oControl.Text - - Case GetType(DevExpress.XtraEditors.ComboBoxEdit) - Dim oCombobox As DevExpress.XtraEditors.ComboBoxEdit = oControl - oReplaceValue = oCombobox.EditValue - - Case GetType(CheckBox) - Dim oCheckBox As CheckBox = oControl - oReplaceValue = oCheckBox.Checked - - Case GetType(DevExpress.XtraEditors.CheckEdit) - Dim oCheckEdit As DevExpress.XtraEditors.CheckEdit = oControl - oReplaceValue = oCheckEdit.Checked - - Case Else - oReplaceValue = "0" - - End Select - - oResult = ReplacePattern(oResult, PatternIdentifier, oReplaceValue) - End If - Catch ex As Exception - Logger.Error(ex) - Finally - IncrementCounterOrThrow(oCounter) - End Try - - End While - - Return oResult - End Function - - End Class -End Namespace diff --git a/Modules.Patterns/Modules/FileInformation.vb b/Modules.Patterns/Modules/FileInformation.vb deleted file mode 100644 index 8022dfd8..00000000 --- a/Modules.Patterns/Modules/FileInformation.vb +++ /dev/null @@ -1,66 +0,0 @@ -Imports System.IO -Imports DigitalData.Modules.Logging - -Namespace Modules - Public Class FileInformation - Inherits BaseModule - Implements IModule - - Public Const FILE_VALUE_FILEINFO = "FILEINFO" - Public Const FILE_VALUE_FILENAME = "FILENAME" - Public Const FILE_VALUE_EXTENSION = "EXTENSION" - Public Const FILE_VALUE_FILENAME_EXT = "FILENAME_EXT" - Public Const FILE_VALUE_DATE_CREATED = "DATE_CREATED" - Public Const FILE_VALUE_DATE_MODIFIED = "DATE_MODIFIED" - - Public Property PatternIdentifier As String = "FILE" Implements IModule.PatternIdentifier - Public Property IsComplex As Boolean = False Implements IModule.IsComplex - - Public Sub New(pLogConfig As LogConfig) - MyBase.New(pLogConfig) - End Sub - - Public Function Replace(pInput As String, pFileInfo As FileInfo) As String - Dim oResult = pInput - Dim oCounter = 0 - - ' Replace Filename without extension - While ContainsPatternAndValue(oResult, PatternIdentifier, FILE_VALUE_FILENAME) - Dim oFilenameWithoutExtension = Path.GetFileNameWithoutExtension(pFileInfo.Name) - oResult = ReplacePattern(oResult, PatternIdentifier, oFilenameWithoutExtension) - IncrementCounterOrThrow(oCounter) - End While - - ' Replace Filename with extension - While ContainsPatternAndValue(oResult, PatternIdentifier, FILE_VALUE_FILENAME_EXT) - Dim oFilename As String = pFileInfo.Name - oResult = ReplacePattern(oResult, PatternIdentifier, oFilename) - IncrementCounterOrThrow(oCounter) - End While - - ' Replace Extension - While ContainsPatternAndValue(oResult, PatternIdentifier, FILE_VALUE_FILENAME_EXT) - Dim oExtension As String = pFileInfo.Extension.Substring(1) - oResult = ReplacePattern(oResult, PatternIdentifier, oExtension) - IncrementCounterOrThrow(oCounter) - End While - - ' Replace creation date - While ContainsPatternAndValue(oResult, PatternIdentifier, FILE_VALUE_DATE_CREATED) - Dim oDateCreated = pFileInfo.CreationTime.ToString("yyyy-MM-dd") - oResult = ReplacePattern(oResult, PatternIdentifier, oDateCreated) - IncrementCounterOrThrow(oCounter) - End While - - ' Replace last modification date - While ContainsPatternAndValue(oResult, PatternIdentifier, FILE_VALUE_DATE_CREATED) - Dim oDateModified = pFileInfo.LastWriteTime.ToString("yyyy-MM-dd") - oResult = ReplacePattern(oResult, PatternIdentifier, oDateModified) - IncrementCounterOrThrow(oCounter) - End While - - Return oResult - End Function - End Class - -End Namespace \ No newline at end of file diff --git a/Modules.Patterns/Modules/Globix/GlobixAutomatic.vb b/Modules.Patterns/Modules/Globix/GlobixAutomatic.vb deleted file mode 100644 index 9f0dd236..00000000 --- a/Modules.Patterns/Modules/Globix/GlobixAutomatic.vb +++ /dev/null @@ -1,60 +0,0 @@ -Imports DigitalData.Modules.Logging - -Namespace Modules.Globix - ''' - ''' Patterns for Generating a Filename in Global Indexer - ''' - Public Class GlobixAutomatic - Inherits BaseModule - Implements IModule - - Public Property PatternIdentifier As String = "ATTR_A" Implements IModule.PatternIdentifier - Public Property IsComplex As Boolean = True Implements IModule.IsComplex - - Public Sub New(pLogConfig As LogConfig) - MyBase.New(pLogConfig) - End Sub - - Public Function Replace(pInput As String, pIndexes As Dictionary(Of String, List(Of String))) As String - Dim oResult = pInput - Dim oCounter = 0 - - If pIndexes Is Nothing Then - Throw New ArgumentNullException("pIndexes") - End If - - Logger.Debug("Replacing Automatic Indexes. [{0}] Indexes loaded.", pIndexes?.Count) - - While ContainsPattern(oResult, PatternIdentifier) - Try - Dim oIndexName As String = GetNextPattern(oResult, PatternIdentifier).Value - Logger.Info("Replacing value for Index {0}", oIndexName) - - If pIndexes.ContainsKey(oIndexName) = False Then - Logger.Warn("Value for Index [{0}] does not exist and will not be used for replacing. Skipping.", oIndexName) - - Else - ' TODO: If Index contains multiple values, only the first value will be used as value - Dim oIndexValues As List(Of String) = pIndexes.Item(oIndexName) - Dim oFirstValue As String = oIndexValues.FirstOrDefault() - - If oFirstValue Is Nothing Then - Logger.Warn("Value for Index [{0}] is empty and will not be used for replacing. Skipping.") - Return oResult - End If - - oResult = ReplacePattern(oResult, PatternIdentifier, oFirstValue) - End If - - Catch ex As Exception - Logger.Error(ex) - Return oResult - Finally - IncrementCounterOrThrow(oCounter) - End Try - End While - - Return oResult - End Function - End Class -End Namespace diff --git a/Modules.Patterns/Modules/Globix/GlobixManual.vb b/Modules.Patterns/Modules/Globix/GlobixManual.vb deleted file mode 100644 index 4652a151..00000000 --- a/Modules.Patterns/Modules/Globix/GlobixManual.vb +++ /dev/null @@ -1,59 +0,0 @@ -Imports DigitalData.Modules.Logging - -Namespace Modules.Globix - ''' - ''' Patterns for Generating a Filename in Global Indexer - ''' - Public Class GlobixManual - Inherits BaseModule - Implements IModule - - Public Property PatternIdentifier As String = "ATTR_M" Implements IModule.PatternIdentifier - Public Property IsComplex As Boolean = True Implements IModule.IsComplex - - Public Sub New(pLogConfig As LogConfig) - MyBase.New(pLogConfig) - End Sub - - Public Function Replace(pInput As String, pIndexes As Dictionary(Of String, List(Of String))) As String - Dim oResult = pInput - Dim oCounter = 0 - - If pIndexes Is Nothing Then - Throw New ArgumentNullException("pIndexes") - End If - - Logger.Debug("Replacing Manual Indexes. [{0}] Indexes loaded.", pIndexes?.Count) - - While ContainsPattern(oResult, PatternIdentifier) - Try - Dim oIndexName As String = GetNextPattern(oResult, PatternIdentifier).Value - - If pIndexes.ContainsKey(oIndexName) = False Then - Logger.Warn("Value for Index [{0}] does not exist and will not be used for replacing. Exiting.", oIndexName) - Return oResult - End If - - ' TODO: If Index contains multiple values, only the first value will be used as value - Dim oIndexValues As List(Of String) = pIndexes.Item(oIndexName) - Dim oFirstValue As String = oIndexValues.FirstOrDefault() - - If oFirstValue Is Nothing Then - Logger.Warn("Value for Index [{0}] is empty and will not be used for replacing. Exiting.") - Return oResult - End If - - oResult = ReplacePattern(oResult, PatternIdentifier, oFirstValue) - - Catch ex As Exception - Logger.Error(ex) - Return oResult - Finally - IncrementCounterOrThrow(oCounter) - End Try - End While - - Return oResult - End Function - End Class -End Namespace diff --git a/Modules.Patterns/Modules/IDB.vb b/Modules.Patterns/Modules/IDB.vb deleted file mode 100644 index e22a12c4..00000000 --- a/Modules.Patterns/Modules/IDB.vb +++ /dev/null @@ -1,28 +0,0 @@ -Imports System.Windows.Forms -Imports DigitalData.Controls.LookupGrid -Imports DigitalData.Modules.Logging - -Namespace Modules - ''' - ''' Patterns for IDB Attributes - ''' - Public Class IDB - Inherits BaseModule - Implements IModule - - Public Const IDB_OBJECT_ID = "IDB_OBJECT_ID" - - Public Property PatternIdentifier As String = "ATTR" Implements IModule.PatternIdentifier - Public Property IsComplex As Boolean = True Implements IModule.IsComplex - - Public Sub New(pLogConfig As LogConfig) - MyBase.New(pLogConfig) - End Sub - - Public Function Replace(pInput As String) As String - 'TODO: Implement, depends on IDB Data, which is not in monorepo yet - - Return pInput - End Function - End Class -End Namespace diff --git a/Modules.Patterns/Modules/Internal.vb b/Modules.Patterns/Modules/Internal.vb deleted file mode 100644 index c7cc56d7..00000000 --- a/Modules.Patterns/Modules/Internal.vb +++ /dev/null @@ -1,86 +0,0 @@ -Imports DigitalData.Modules.Logging - -Namespace Modules - ''' - ''' Simple patterns that only rely on .NET functions - ''' - Public Class Internal - Inherits BaseModule - Implements IModule - - Public Const INT_VALUE_USERNAME = "USERNAME" - Public Const INT_VALUE_MACHINE = "MACHINE" - Public Const INT_VALUE_DOMAIN = "DOMAIN" - Public Const INT_VALUE_DATE = "DATE" - - Public Const INT_VALUE_DATE_YYYY = "YYYY" - Public Const INT_VALUE_DATE_MM = "MM" - Public Const INT_VALUE_DATE_DD = "DD" - Public Const INT_VALUE_DATE_YYYY_MM_DD = "YYYY/MM/DD" - Public Const INT_VALUE_DATE_YYYY_MM_DD_2 = "YYYY_MM_DD" - - Public Property PatternIdentifier As String = "INT" Implements IModule.PatternIdentifier - Public Property IsComplex As Boolean = False Implements IModule.IsComplex - - Public Sub New(pLogConfig As LogConfig) - MyBase.New(pLogConfig) - End Sub - - Public Function Replace(pInput As String) As String - Dim oResult = pInput - Dim oCounter = 0 - Dim oNow As Date = Now - - 'TODO: Make date patterns dynamic - - Logger.Trace("Replacing Internal Patterns") - - ' Replace CurrentDate(s) - While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_DATE_YYYY_MM_DD) - Logger.Trace("Replacing Pattern [{0}]", INT_VALUE_DATE_YYYY_MM_DD) - oResult = ReplacePattern(oResult, PatternIdentifier, oNow.ToString("yyyy\\MM\\dd")) - IncrementCounterOrThrow(oCounter) - End While - - Logger.Trace("Replace Counter: [{0}]", oCounter) - - ' Replace CurrentDate(s) - While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_DATE_YYYY_MM_DD_2) - Logger.Trace("Replacing Pattern [{0}]", INT_VALUE_DATE_YYYY_MM_DD_2) - oResult = ReplacePattern(oResult, PatternIdentifier, oNow.ToString("yyyy_MM_dd")) - IncrementCounterOrThrow(oCounter) - End While - - Logger.Trace("Replace Counter: [{0}]", oCounter) - - ' Replace Year(s) - While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_DATE_YYYY) - Logger.Trace("Replacing Pattern [{0}]", INT_VALUE_DATE_YYYY) - oResult = ReplacePattern(oResult, PatternIdentifier, oNow.ToString("yyyy")) - IncrementCounterOrThrow(oCounter) - End While - - Logger.Trace("Replace Counter: [{0}]", oCounter) - - ' Replace Month(s) - While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_DATE_MM) - Logger.Trace("Replacing Pattern [{0}]", INT_VALUE_DATE_MM) - oResult = ReplacePattern(oResult, PatternIdentifier, oNow.ToString("MM")) - IncrementCounterOrThrow(oCounter) - End While - - Logger.Trace("Replace Counter: [{0}]", oCounter) - - ' Replace Day(s) - While ContainsPatternAndValue(oResult, PatternIdentifier, INT_VALUE_DATE_DD) - Logger.Trace("Replacing Pattern [{0}]", INT_VALUE_DATE_DD) - oResult = ReplacePattern(oResult, PatternIdentifier, oNow.ToString("dd")) - IncrementCounterOrThrow(oCounter) - End While - - Logger.Trace("Replace Counter: [{0}]", oCounter) - - Return oResult - End Function - End Class -End Namespace diff --git a/Modules.Patterns/Modules/User.vb b/Modules.Patterns/Modules/User.vb deleted file mode 100644 index d5ddca22..00000000 --- a/Modules.Patterns/Modules/User.vb +++ /dev/null @@ -1,61 +0,0 @@ -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.ZooFlow - -Namespace Modules - Public Class User - Inherits BaseModule - Implements IModule - - Public Const USER_VALUE_PRENAME = "PRENAME" - Public Const USER_VALUE_SURNAME = "SURNAME" - Public Const USER_VALUE_EMAIL = "EMAIL" - Public Const USER_VALUE_SHORTNAME = "SHORTNAME" - Public Const USER_VALUE_LANGUAGE = "LANGUAGE" - Public Const USER_VALUE_USER_ID = "USER_ID" - Public Const USER_VALUE_USER_NAME = "USER_NAME" - - Public Property PatternIdentifier As String = "USER" Implements IModule.PatternIdentifier - Public Property IsComplex As Boolean = True Implements IModule.IsComplex - - Public Sub New(pLogConfig As LogConfig) - MyBase.New(pLogConfig) - End Sub - - Public Function Replace(pInput As String, pUser As State.UserState) As String - Dim oResult = pInput - Dim oCounter = 0 - - While ContainsPatternAndValue(oResult, PatternIdentifier, USER_VALUE_PRENAME) - oResult = ReplacePattern(oResult, PatternIdentifier, pUser.GivenName) - IncrementCounterOrThrow(oCounter) - End While - - While ContainsPatternAndValue(oResult, PatternIdentifier, USER_VALUE_SURNAME) - oResult = ReplacePattern(oResult, PatternIdentifier, pUser.Surname) - IncrementCounterOrThrow(oCounter) - End While - - While ContainsPatternAndValue(oResult, PatternIdentifier, USER_VALUE_EMAIL) - oResult = ReplacePattern(oResult, PatternIdentifier, pUser.Email) - IncrementCounterOrThrow(oCounter) - End While - - While ContainsPatternAndValue(oResult, PatternIdentifier, USER_VALUE_SHORTNAME) - oResult = ReplacePattern(oResult, PatternIdentifier, pUser.ShortName) - IncrementCounterOrThrow(oCounter) - End While - - While ContainsPatternAndValue(oResult, PatternIdentifier, USER_VALUE_LANGUAGE) - oResult = ReplacePattern(oResult, PatternIdentifier, pUser.Language) - IncrementCounterOrThrow(oCounter) - End While - - While ContainsPatternAndValue(oResult, PatternIdentifier, USER_VALUE_USER_ID) - oResult = ReplacePattern(oResult, PatternIdentifier, pUser.UserId) - IncrementCounterOrThrow(oCounter) - End While - - Return oResult - End Function - End Class -End Namespace diff --git a/Modules.Patterns/Modules/Windream.vb b/Modules.Patterns/Modules/Windream.vb deleted file mode 100644 index 98d14ebb..00000000 --- a/Modules.Patterns/Modules/Windream.vb +++ /dev/null @@ -1,49 +0,0 @@ -Imports System.Windows.Forms -Imports DigitalData.Controls.LookupGrid -Imports DigitalData.Modules.Logging - -Namespace Modules - ''' - ''' Patterns for Windream Indicies - ''' - Public Class Windream - Inherits BaseModule - Implements IModule - - Public Const WM_VALUE_DOCUMENT = "WM_DOCUMENT" - - Public Property PatternIdentifier As String = "WMI" Implements IModule.PatternIdentifier - Public Property IsComplex As Boolean = True Implements IModule.IsComplex - - Public Sub New(pLogConfig As LogConfig) - MyBase.New(pLogConfig) - End Sub - - Public Function Replace(pInput As String, pWMObject As WINDREAMLib.WMObject) As String - Dim oResult = pInput - Dim oCounter = 0 - - While ContainsPattern(oResult, PatternIdentifier) - Try - Dim oIndexName As String = GetNextPattern(oResult, PatternIdentifier).Value - Dim oWMValue As Object = pWMObject.GetVariableValue(oIndexName) - - If oWMValue Is Nothing Then - Logger.Warn("Value for Index [{0}] is empty and will not be used for replacing. Skipping.") - Return oResult - End If - - oResult = ReplacePattern(oResult, PatternIdentifier, oWMValue.ToString) - - Catch ex As Exception - Logger.Error(ex) - Return oResult - Finally - IncrementCounterOrThrow(oCounter) - End Try - End While - - Return oResult - End Function - End Class -End Namespace diff --git a/Modules.Patterns/My Project/Application.Designer.vb b/Modules.Patterns/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.Patterns/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.Patterns/My Project/Application.myapp b/Modules.Patterns/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.Patterns/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.Patterns/My Project/AssemblyInfo.vb b/Modules.Patterns/My Project/AssemblyInfo.vb deleted file mode 100644 index 7ae8659f..00000000 --- a/Modules.Patterns/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.Patterns/My Project/Resources.Designer.vb b/Modules.Patterns/My Project/Resources.Designer.vb deleted file mode 100644 index a2cb98e3..00000000 --- a/Modules.Patterns/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Patterns.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.Patterns/My Project/Resources.resx b/Modules.Patterns/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.Patterns/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.Patterns/My Project/Settings.Designer.vb b/Modules.Patterns/My Project/Settings.Designer.vb deleted file mode 100644 index feccec48..00000000 --- a/Modules.Patterns/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Patterns.My.MySettings - Get - Return Global.DigitalData.Modules.Patterns.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Patterns/My Project/Settings.settings b/Modules.Patterns/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.Patterns/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.Patterns/Pattern.vb b/Modules.Patterns/Pattern.vb deleted file mode 100644 index d3da97de..00000000 --- a/Modules.Patterns/Pattern.vb +++ /dev/null @@ -1,21 +0,0 @@ -Public Class Pattern - Public ReadOnly Property Type As String - Public ReadOnly Property Value As String - - Public Sub New(pType As String, pValue As String) - Me.Type = pType - Me.Value = pValue - End Sub - - Public Overrides Function ToString() As String - Return $"{{#{Type}#{Value}}}" - End Function - - Public Overrides Function GetHashCode() As Integer - Return (Value.GetHashCode & Type.GetHashCode).GetHashCode - End Function - - Public Overrides Function Equals(obj As Object) As Boolean - Return Me.GetHashCode = DirectCast(obj, Pattern).GetHashCode - End Function -End Class diff --git a/Modules.Patterns/Patterns.vb b/Modules.Patterns/Patterns.vb deleted file mode 100644 index fc23fe65..00000000 --- a/Modules.Patterns/Patterns.vb +++ /dev/null @@ -1,294 +0,0 @@ -Imports System.Text.RegularExpressions -Imports System.Windows.Forms -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.ZooFlow - -''' -''' Defines common Functions for Checking for and replacing placeholders. -''' This Class also includes a child class `Pattern` for passing around Patterns. -''' -''' The format of all placeholders is: -''' {#TYPE#VALUE} -''' -''' Some Examples: -''' {#INT#USERNAME} -''' {#CTRL#CMB_2} -''' {#WMI#String 39} -''' -Public Class ClassPatterns - ' Complex patterns that rely on a datasource like a Database or Windream - Public Const PATTERN_WMI = "WMI" - Public Const PATTERN_CTRL = "CTRL" - ' Simple patterns that only rely on .NET functions - Public Const PATTERN_INT = "INT" - ' Simple patterns that rely on Data from the TBDD_USER table - Public Const PATTERN_USER = "USER" - - Public Const USER_VALUE_PRENAME = "PRENAME" - Public Const USER_VALUE_SURNAME = "SURNAME" - Public Const USER_VALUE_EMAIL = "EMAIL" - Public Const USER_VALUE_SHORTNAME = "SHORTNAME" - Public Const USER_VALUE_USER_ID = "USER_ID" - Public Const USER_VALUE_PROFILE_ID = "PROFILE_ID" - - Public Const INT_VALUE_USERNAME = "USERNAME" - Public Const INT_VALUE_MACHINE = "MACHINE" - Public Const INT_VALUE_DOMAIN = "DOMAIN" - Public Const INT_VALUE_DATE = "DATE" - - Public Const CLIPBOARD_VALUE_DE = "@Zwischenablage" - Public Const CLIPBOARD_VALUE_EN = "@Clipboard" - - Public Const MAX_TRY_COUNT = 100 - - Public ReadOnly Property PatternRegex As Regex - Get - Return _Regex - End Get - End Property - - Private ReadOnly _Logger As Logger - Private ReadOnly _LogConfig As LogConfig - - Private ReadOnly _Regex As Regex = New Regex("{#(\w+)#([\w\s_-]+)}+") - Private ReadOnly _AllPatterns As New List(Of String) From {PATTERN_WMI, PATTERN_CTRL, PATTERN_USER, PATTERN_INT} - Private ReadOnly _ComplexPatterns As New List(Of String) From {PATTERN_WMI, PATTERN_CTRL} - Private ReadOnly _SimplePatterns As New List(Of String) From {PATTERN_USER, PATTERN_INT} - - ''' - ''' Wraps a pattern-type and -value in the common format: {#type#value} - ''' - Public Function WrapPatternValue(pType As String, pValue As String) As String - Return New Pattern(pType, pValue).ToString - End Function - - Public Sub New(pLogConfig As LogConfig) - _LogConfig = pLogConfig - _Logger = pLogConfig.GetLogger - End Sub - - Public Function ReplaceAllValues(pInput As String, pUser As State.UserState, pClipboardContents As String) As String - Try - Dim result = pInput - - result = ReplaceClipboardContents(result, pClipboardContents) - result = ReplaceInternalValues(result) - result = ReplaceUserValues(result, pUser) - - Return result - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("Error in ReplaceAllValues:" & ex.Message) - Return pInput - End Try - End Function - - Public Function ReplaceClipboardContents(pInput As String, pClipboardContents As String) As String - Dim oResult = pInput - - oResult = oResult.Replace(CLIPBOARD_VALUE_DE.ToLower, pClipboardContents) - oResult = oResult.Replace(CLIPBOARD_VALUE_DE.ToUpper, pClipboardContents) - oResult = oResult.Replace(CLIPBOARD_VALUE_EN.ToLower, pClipboardContents) - oResult = oResult.Replace(CLIPBOARD_VALUE_EN.ToUpper, pClipboardContents) - oResult = oResult.Replace(CLIPBOARD_VALUE_DE, pClipboardContents) - oResult = oResult.Replace(CLIPBOARD_VALUE_EN, pClipboardContents) - - Return oResult - End Function - - Public Function ReplaceInternalValues(pInput As String) As String - Try - Dim oResult = pInput - - ' Replace Username(s) - While ContainsPatternAndValue(oResult, PATTERN_INT, INT_VALUE_USERNAME) - oResult = ReplacePattern(oResult, PATTERN_INT, System.Environment.UserName) - End While - - ' Replace Machinename(s) - While ContainsPatternAndValue(oResult, PATTERN_INT, INT_VALUE_MACHINE) - oResult = ReplacePattern(oResult, PATTERN_INT, System.Environment.MachineName) - End While - - ' Replace Domainname(s) - While ContainsPatternAndValue(oResult, PATTERN_INT, INT_VALUE_DOMAIN) - oResult = ReplacePattern(oResult, PATTERN_INT, System.Environment.UserDomainName) - End While - - ' Replace CurrentDate(s) - While ContainsPatternAndValue(oResult, PATTERN_INT, INT_VALUE_DATE) - oResult = ReplacePattern(oResult, PATTERN_INT, Now.ToShortDateString) - End While - - Return oResult - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("Error in ReplaceInternalValues:" & ex.Message) - Return pInput - End Try - End Function - - Public Function ReplaceUserValues(pInput As String, pUser As State.UserState) As String - Try - Dim oResult = pInput - - While ContainsPatternAndValue(oResult, PATTERN_USER, USER_VALUE_PRENAME) - oResult = ReplacePattern(pInput, PATTERN_USER, pUser.GivenName) - End While - - While ContainsPatternAndValue(oResult, PATTERN_USER, USER_VALUE_USER_ID) - oResult = ReplacePattern(pInput, PATTERN_USER, pUser.UserId.ToString) - End While - - While ContainsPatternAndValue(oResult, PATTERN_USER, USER_VALUE_SURNAME) - oResult = ReplacePattern(pInput, PATTERN_USER, pUser.Surname) - End While - - While ContainsPatternAndValue(oResult, PATTERN_USER, USER_VALUE_SHORTNAME) - oResult = ReplacePattern(pInput, PATTERN_USER, pUser.ShortName) - End While - - While ContainsPatternAndValue(oResult, PATTERN_USER, USER_VALUE_EMAIL) - oResult = ReplacePattern(pInput, PATTERN_USER, pUser.Email) - End While - - Return oResult - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("Error in ReplaceUserValues:" & ex.Message) - Return pInput - End Try - End Function - - Public Function ReplaceControlValues(pInput As String, pPanel As Panel) As String - Try - Dim oResult = pInput - Dim oTryCounter = 0 - - While ContainsPattern(oResult, PATTERN_CTRL) - If oTryCounter > MAX_TRY_COUNT Then - Throw New Exception("Max tries in ReplaceControlValues exceeded.") - End If - - Dim controlName As String = GetNextPattern(oResult, PATTERN_CTRL).Value - Dim control As Control = pPanel.Controls.Find(controlName, False).FirstOrDefault() - - If control IsNot Nothing Then - Dim value As String = control.Text - oResult = ReplacePattern(oResult, PATTERN_CTRL, value) - End If - - oTryCounter += 1 - End While - - Return oResult - Catch ex As Exception - _Logger.Error(ex) - _Logger.Warn("Error in ReplaceControlValues:" & ex.Message) - Return pInput - End Try - End Function - - Private Function ContainsPattern(pInput As String, pType As String) As Boolean - Dim elements As MatchCollection = _Regex.Matches(pInput) - - For Each element As Match In elements - Dim t As String = element.Groups(1).Value - - If t = pType Then - Return True - End If - Next - - Return False - End Function - - Public Function GetNextPattern(pInput As String, pType As String) As Pattern - Dim oElements As MatchCollection = _Regex.Matches(pInput) - - For Each oElement As Match In oElements - ' Pattern in input - Dim oType As String = oElement.Groups(1).Value - Dim oValue As String = oElement.Groups(2).Value - - If oType = pType Then - Return New Pattern(oType, oValue) - End If - Next - - Return Nothing - End Function - Public Function GetAllPatterns(pInput As String) As List(Of Pattern) - Dim elements As MatchCollection = _Regex.Matches(pInput) - Dim results As New List(Of Pattern) - - For Each element As Match In elements - ' Pattern in input - Dim t As String = element.Groups(1).Value - Dim v As String = element.Groups(2).Value - - results.Add(New Pattern(t, v)) - Next - - Return results - End Function - Public Function ReplacePattern(pInput As String, pType As String, pReplacement As String) As String - Dim oElements As MatchCollection = _Regex.Matches(pInput) - - If IsNothing(pReplacement) Or pReplacement = String.Empty Then - Return pInput - End If - - For Each element As Match In oElements - ' if group 1 contains the 'pattern' the replace whole group with 'replacement' - ' and return it - If element.Groups(1).Value = pType Then - Return Regex.Replace(pInput, element.Groups(0).Value, pReplacement) - End If - Next - - ' no replacement made - Return pInput - End Function - Private Function ContainsPatternAndValue(pInput As String, pType As String, pValue As String) As Boolean - Dim oElements As MatchCollection = _Regex.Matches(pInput) - - For Each oElement As Match In oElements - ' Pattern in input - Dim oType As String = oElement.Groups(1).Value - Dim oValue As String = oElement.Groups(2).Value - - If oType = pType And oValue = pValue Then - Return True - End If - Next - - Return False - End Function - - Public Function HasAnyPatterns(pInput As String) As Boolean - Return _AllPatterns.Any(Function(pPattern) HasPattern(pInput, pPattern)) - End Function - - Public Function HasOnlySimplePatterns(pInput As String) As Boolean - Return Not HasComplexPatterns(pInput) - End Function - - Public Function HasComplexPatterns(pInput As String) As Boolean - Return _ComplexPatterns.Any(Function(oPattern) HasPattern(pInput, oPattern)) - End Function - - Public Function HasPattern(pInput As String, pType As String) As Boolean - Dim oMatches = _Regex.Matches(pInput) - - For Each oMatch As Match In oMatches - For Each oGroup As Group In oMatch.Groups - If oGroup.Value = pType Then - Return True - End If - Next - Next - - Return False - End Function -End Class \ No newline at end of file diff --git a/Modules.Patterns/Patterns.vbproj b/Modules.Patterns/Patterns.vbproj deleted file mode 100644 index 7822ae2e..00000000 --- a/Modules.Patterns/Patterns.vbproj +++ /dev/null @@ -1,153 +0,0 @@ - - - - - Debug - AnyCPU - {7C3B0C7E-59FE-4E1A-A655-27AE119F9444} - Library - DigitalData.Modules.Patterns - DigitalData.Modules.Patterns - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Patterns.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Patterns.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - - - - - P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WINDREAMLib.dll - True - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {3dcd6d1a-c830-4241-b7e4-27430e7ea483} - LookupControl - - - {903B2D7D-3B80-4BE9-8713-7447B704E1B0} - Logging - - - {81cac44f-3711-4c8f-ae98-e02a7448782a} - ZooFlow - - - - - \ No newline at end of file diff --git a/Modules.Patterns/Patterns.vbproj.bak b/Modules.Patterns/Patterns.vbproj.bak deleted file mode 100644 index c22610ea..00000000 --- a/Modules.Patterns/Patterns.vbproj.bak +++ /dev/null @@ -1,151 +0,0 @@ - - - - - Debug - AnyCPU - {7C3B0C7E-59FE-4E1A-A655-27AE119F9444} - Library - DigitalData.Modules.Patterns - DigitalData.Modules.Patterns - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Patterns.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Patterns.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - - - P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WINDREAMLib.dll - True - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {3dcd6d1a-c830-4241-b7e4-27430e7ea483} - LookupControl - - - {903B2D7D-3B80-4BE9-8713-7447B704E1B0} - Logging - - - {81cac44f-3711-4c8f-ae98-e02a7448782a} - ZooFlow - - - - - \ No newline at end of file diff --git a/Modules.Patterns/Patterns2.vb b/Modules.Patterns/Patterns2.vb deleted file mode 100644 index c94d45c8..00000000 --- a/Modules.Patterns/Patterns2.vb +++ /dev/null @@ -1,165 +0,0 @@ -Imports System.IO -Imports System.Text.RegularExpressions -Imports System.Windows.Forms -Imports DigitalData.Controls.LookupGrid -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.ZooFlow -Imports WINDREAMLib - -''' -''' Defines common Functions for Checking for and replacing placeholders. -''' This Class also includes a child class `Pattern` for passing around Patterns. -''' -''' The format of all placeholders is: -''' {#TYPE#VALUE} -''' -''' Some Examples: -''' {#INT#USERNAME} -''' {#CTRL#CMB_2} -''' {#WMI#String 39} -''' -Public Class Patterns2 - Private ReadOnly LogConfig As LogConfig - Private ReadOnly Logger As Logger - Private ReadOnly Base As Modules.BaseModule - Private ReadOnly Modules As New List(Of IModule) - - Public Sub New(pLogConfig As LogConfig) - LogConfig = pLogConfig - Logger = pLogConfig.GetLogger() - Base = New Modules.BaseModule(LogConfig) - - Modules.AddRange({ - New Modules.Internal(LogConfig), - New Modules.Clipboard(LogConfig), - New Modules.Controls(LogConfig), - New Modules.User(LogConfig), - New Modules.FileInformation(LogConfig), - New Modules.IDB(LogConfig), - New Modules.Globix.GlobixAutomatic(LogConfig), - New Modules.Globix.GlobixManual(LogConfig) - }) - End Sub - - Public Function ReplaceUserValues(pInput As String, pUser As State.UserState) As String - Try - Logger.Debug("Replacing User Values") - Dim oModule = New Modules.User(LogConfig) - Return oModule.Replace(pInput, pUser) - Catch ex As Exception - Logger.Warn("Error occurred while replacing User Values") - Logger.Error(ex) - Return pInput - End Try - End Function - - Public Function ReplaceFileValues(pInput As String, pFileInfo As FileInfo) As String - Try - Logger.Debug("Replacing File Values") - Dim oModule = New Modules.FileInformation(LogConfig) - Return oModule.Replace(pInput, pFileInfo) - Catch ex As Exception - Logger.Warn("Error occurred while replacing File Values") - Logger.Error(ex) - Return pInput - End Try - End Function - - Public Function ReplaceControlValues(pInput As String, pPanel As Panel) As String - Try - Logger.Debug("Replacing Control Values") - Dim oModule = New Modules.Controls(LogConfig) - Return oModule.Replace(pInput, pPanel) - Catch ex As Exception - Logger.Warn("Error occurred while replacing Control Values") - Logger.Error(ex) - Return pInput - End Try - End Function - - Public Function ReplaceControlValues(pInput As String, pControls As List(Of Control)) As String - Try - Logger.Debug("Replacing Control Values") - Dim oModule = New Modules.Controls(LogConfig) - Return oModule.Replace(pInput, pControls) - Catch ex As Exception - Logger.Warn("Error occurred while replacing Control Values") - Logger.Error(ex) - Return pInput - End Try - End Function - - Public Function ReplaceWindreamValues(pInput As String, pWMObject As WMObject) As String - Try - Logger.Debug("Replacing Windream Values") - Dim oModule = New Modules.Windream(LogConfig) - Return oModule.Replace(pInput, pWMObject) - Catch ex As Exception - Logger.Warn("Error occurred while replacing Windream Values") - Logger.Error(ex) - Return pInput - End Try - End Function - - Public Function ReplaceInternalValues(pInput As String, Optional pClipboardContents As String = "") As String - Logger.Debug("Replacing Internal Values") - Dim oResult = pInput - - Try - Dim oInternal = New Modules.Internal(LogConfig) - Dim oClipboard = New Modules.Clipboard(LogConfig) - - oResult = oInternal.Replace(oResult) - oResult = oClipboard.Replace(oResult, pClipboardContents) - - Return oResult - Catch ex As Exception - Logger.Warn("Error occurred while replacing Internal Values") - Logger.Error(ex) - Return oResult - End Try - End Function - - Public Function ReplaceGlobixValues(pInput As String, pManualIndexes As Dictionary(Of String, List(Of String)), pAutomaticIndexes As Dictionary(Of String, List(Of String))) As String - Logger.Debug("Replacing Globix Values") - Dim oResult = pInput - - Try - Dim oAutomatic = New Modules.Globix.GlobixAutomatic(LogConfig) - Dim oManual = New Modules.Globix.GlobixManual(LogConfig) - - oResult = oAutomatic.Replace(oResult, pAutomaticIndexes) - oResult = oManual.Replace(oResult, pManualIndexes) - - Return oResult - Catch ex As Exception - Logger.Warn("Error occurred while replacing Globix Values") - Logger.Error(ex) - Return oResult - End Try - End Function - -#Region "Helper Functions" - ''' - ''' Wraps a pattern-type and -value in the common format: {#type#value} - ''' - Public Function WrapPatternValue(pType As String, pValue As String) As String - Return New Pattern(pType, pValue).ToString - End Function - - Public Function HasAnyPatterns(input) As Boolean - Return Modules.Any(Function(m) Base.HasPattern(input, m.PatternIdentifier)) - End Function - - Public Function HasComplexPatterns(input As String) As Boolean - Return Modules. - Where(Function(m) m.IsComplex = True). - Any(Function(m) Base.HasPattern(input, m.PatternIdentifier)) - End Function - - Public Function HasOnlySimplePatterns(input As String) As Boolean - Return Not HasComplexPatterns(input) - End Function -#End Region - -End Class \ No newline at end of file diff --git a/Modules.Patterns/app.config b/Modules.Patterns/app.config deleted file mode 100644 index d5fed9f7..00000000 --- a/Modules.Patterns/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.Patterns/packages.config b/Modules.Patterns/packages.config deleted file mode 100644 index 63f3075e..00000000 --- a/Modules.Patterns/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Modules.Utils/Utils/My Project/Application.Designer.vb b/Modules.Utils/Utils/My Project/Application.Designer.vb deleted file mode 100644 index 88dd01c7..00000000 --- a/Modules.Utils/Utils/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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 - diff --git a/Modules.Utils/Utils/My Project/Application.myapp b/Modules.Utils/Utils/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.Utils/Utils/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.Utils/Utils/My Project/AssemblyInfo.vb b/Modules.Utils/Utils/My Project/AssemblyInfo.vb deleted file mode 100644 index 502a463c..00000000 --- a/Modules.Utils/Utils/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.Utils/Utils/My Project/Resources.Designer.vb b/Modules.Utils/Utils/My Project/Resources.Designer.vb deleted file mode 100644 index 6928a731..00000000 --- a/Modules.Utils/Utils/My Project/Resources.Designer.vb +++ /dev/null @@ -1,62 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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("Utils.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/Modules.Utils/Utils/My Project/Resources.resx b/Modules.Utils/Utils/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.Utils/Utils/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.Utils/Utils/My Project/Settings.Designer.vb b/Modules.Utils/Utils/My Project/Settings.Designer.vb deleted file mode 100644 index 9a74dd93..00000000 --- a/Modules.Utils/Utils/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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.Utils.My.MySettings - Get - Return Global.Utils.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Utils/Utils/My Project/Settings.settings b/Modules.Utils/Utils/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.Utils/Utils/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.Utils/Utils/Utils.vbproj b/Modules.Utils/Utils/Utils.vbproj deleted file mode 100644 index cff5b3fb..00000000 --- a/Modules.Utils/Utils/Utils.vbproj +++ /dev/null @@ -1,105 +0,0 @@ - - - - - Debug - AnyCPU - {E891AB56-35BC-419E-8254-816A1C6A6661} - Library - Utils - Utils - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - Utils.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - Utils.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - \ No newline at end of file diff --git a/Modules.Utils/Utils/Window.vb b/Modules.Utils/Utils/Window.vb deleted file mode 100644 index b1e01ae6..00000000 --- a/Modules.Utils/Utils/Window.vb +++ /dev/null @@ -1,6 +0,0 @@ -Imports System.Drawing -Imports System.Windows.Forms - -Public Class Window - -End Class diff --git a/Modules.Windream/ConnectionBuilder.vb b/Modules.Windream/ConnectionBuilder.vb deleted file mode 100644 index 17c8def6..00000000 --- a/Modules.Windream/ConnectionBuilder.vb +++ /dev/null @@ -1,118 +0,0 @@ -Imports NLog -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Windream -Imports DigitalData.Modules.Language - -Public Class ConnectionBuilder - Implements IConnectionBuilder - - Private ReadOnly LogConfig As LogConfig - Private SessionReconnect As Boolean = False - Private DriveLetter As String = "W" - Private BasePath As String = BASE_PATH - Private Support64Bit As Boolean = False - Private ServerName As String = Nothing - Private UserName As String = Nothing - Private Password As String = Nothing - Private Domain As String = Nothing - - Private Const BASE_PATH As String = "\\windream\objects" - - Public Sub New(LogConfig As LogConfig) - Me.LogConfig = LogConfig - End Sub - - ''' - ''' Sets flag in Windream class to reconnect on lost connection - ''' - ''' A IConnectionBuilder instance to allow for chaining - Public Function WithSessionReconnect() As IConnectionBuilder Implements IConnectionBuilder.WithSessionReconnect - SessionReconnect = True - Return Me - End Function - - ''' - ''' Sets the drive letter of windream drive, default is "W" - ''' - ''' The drive letter to use - ''' A IConnectionBuilder instance to allow for chaining - Public Function WithDriveLetter(driveLetter As String) As IConnectionBuilder Implements IConnectionBuilder.WithDriveLetter - Me.DriveLetter = driveLetter - BasePath = String.Empty - Return Me - End Function - - ''' - ''' Sets the drive letter to String.Empty, use \\windream\objects as Windream base path - ''' - ''' The windream base path, eg. \\windream\objects - ''' A IConnectionBuilder instance to allow for chaining - Public Function WithWindreamObjects(BasePath As String) As IConnectionBuilder Implements IConnectionBuilder.WithWindreamObjects - BasePath = BasePath - DriveLetter = String.Empty - Return Me - End Function - - ''' - ''' Sets the drive letter to String.Empty, use \\windream\objects as Windream base path - ''' - ''' A IConnectionBuilder instance to allow for chaining - Public Function WithWindreamObjects() As IConnectionBuilder Implements IConnectionBuilder.WithWindreamObjects - BasePath = BASE_PATH - DriveLetter = String.Empty - Return Me - End Function - - Public Function WithWindreamObjectsOrDriveLetter(BasePath As String, DriveLetter As String) As IConnectionBuilder Implements IConnectionBuilder.WithWindreamObjectsOrDriveLetter - If Utils.NotNull(BasePath, Nothing) IsNot Nothing Then - Return WithWindreamObjects(BasePath) - ElseIf Utils.NotNull(DriveLetter, Nothing) IsNot Nothing Then - Return WithDriveLetter(DriveLetter) - Else - Return WithWindreamObjects() - End If - End Function - - ''' - ''' Sets flag in Windream class to indicate 64-bit support - ''' - ''' A IConnectionBuilder instance to allow for chaining - Public Function With64BitSupport() As IConnectionBuilder Implements IConnectionBuilder.With64BitSupport - Support64Bit = True - Return Me - End Function - - ''' - ''' Sets the servername in Windream class, overriding the client setting - ''' - ''' - ''' A IConnectionBuilder instance to allow for chaining - Public Function WithServerName(serverName As String) As IConnectionBuilder Implements IConnectionBuilder.WithServerName - Me.ServerName = serverName - Return Me - End Function - - ''' - ''' Sets the username, password and domain in Windream class, overriding the client settings - ''' - ''' The username used for the connection - ''' The password used for the connection - ''' The domain used for the connection - ''' A IConnectionBuilder instance to allow for chaining - Public Function WithImpersonation(userName As String, password As String, domain As String) As IConnectionBuilder Implements IConnectionBuilder.WithImpersonation - Me.UserName = userName - Me.Password = password - Me.Domain = domain - Return Me - End Function - - ''' - ''' Creates a connection. - ''' - ''' If there was an error while establishing the connection - ''' A Windream Object - Public Function Connect() As Windream Implements IConnectionBuilder.Connect - Return New Windream(LogConfig, SessionReconnect, DriveLetter, BasePath, Support64Bit, ServerName, UserName, Password, Domain) - End Function - -End Class diff --git a/Modules.Windream/Constants.vb b/Modules.Windream/Constants.vb deleted file mode 100644 index 228533c9..00000000 --- a/Modules.Windream/Constants.vb +++ /dev/null @@ -1,67 +0,0 @@ -Public Class Constants - ' Primitive Types - Public Const INDEX_TYPE_UNDEFINED = 0 - Public Const INDEX_TYPE_STRING = 1 - Public Const INDEX_TYPE_INTEGER = 2 - Public Const INDEX_TYPE_FLOAT = 3 - Public Const INDEX_TYPE_BOOLEAN = 4 - Public Const INDEX_TYPE_DATE = 5 - Public Const INDEX_TYPE_FIXED_POINT = 6 - Public Const INDEX_TYPE_DATE_TIME = 7 - Public Const INDEX_TYPE_CURRENCY = 8 - Public Const INDEX_TYPE_TIME = 9 - Public Const INDEX_TYPE_VARIANT = 10 - - ' Vector Types - Public Const INDEX_TYPE_VECTOR_STRING = 4097 - Public Const INDEX_TYPE_VECTOR_INTEGER = 4098 - Public Const INDEX_TYPE_VECTOR_FLOAT = 4099 - Public Const INDEX_TYPE_VECTOR_BOOLEAN = 4100 - Public Const INDEX_TYPE_VECTOR_DATE = 4101 - Public Const INDEX_TYPE_VECTOR_FIXED_POINT = 4102 - Public Const INDEX_TYPE_VECTOR_DATE_TIME = 4103 - Public Const INDEX_TYPE_VECTOR_CURRENCY = 4014 - Public Const INDEX_TYPE_VECTOR_TIME = 4105 - Public Const INDEX_TYPE_VECTOR_INTEGER_64BIT = 4107 - - ' Special Types - Public Const INDEX_TYPE_FULLTEXT = 8193 - Public Const INDEX_TYPE_HASH = 36865 - - ' Misc Types / Unknown Types - Public Const INDEX_TYPE_MASK = &HFFF - Public Const INDEX_FLAG_MASK = &HFFFFF000 - Public Const INDEX_TYPE_VECTOR = &H1000 - Public Const INDEX_TYPE_DEFAULT_VALUE = &H4000 - 'Single Index Types - Public Const WMObjectVariableValueTypeUndefined = 0 - - 'History Tags - Public Const HISTORY_NEW_FROM_VERSION = "HISTORY_New_From_Version" - Public Const HISTORY_USER_DEFINED = "HISTORY_User_Defined" - - ' Entity Types - Public Const ENTITY_TYPE_OBJECTTYPE = 10 - - 'Search Types - Public Const SEARCH_TYPE_QUICK_SEARCH = "WMOSRCH.WMQUICKSEARCH" - Public Const SEARCH_TYPE_INDEX_SEARCH = "WMOSRCH.WMINDEXSEARCH" - Public Const SEARCH_TYPE_OBJECTTYPE_SEARCH = "WMOSRCH.WMOBJECTTYPESEARCH" - - ' Attribute Types - Public Const ATTRIBUTE_TYPE_SYSTEMINDEX = 1 - Public Const ATTRIBUTE_TYPE_TYPEINDEX = 2 - - ' Misc - Public Const OBJECT_TYPE_DEFAULT = "Standard" - - ' File Stream - Public Const STREAM_BINARY_OBJECT = "BinaryObject" - Public Const STREAM_OPEN_MODE_READ_WRITE = 2 - - ' COM Events - Public Const COM_EVENT_SESSION_NEED_INDEX = 1 - - ' Regexes - Public Const REGEX_CLEAN_FILENAME As String = "[?*^""<>|]" -End Class diff --git a/Modules.Windream/DDWindream.zip b/Modules.Windream/DDWindream.zip deleted file mode 100644 index eea90865..00000000 Binary files a/Modules.Windream/DDWindream.zip and /dev/null differ diff --git a/Modules.Windream/Exceptions.vb b/Modules.Windream/Exceptions.vb deleted file mode 100644 index 3add4c21..00000000 --- a/Modules.Windream/Exceptions.vb +++ /dev/null @@ -1,19 +0,0 @@ -Imports System.Runtime.InteropServices - -Public Class Exceptions - Public Class SessionException - Inherits ApplicationException - - Public Sub New() - MyBase.New() - End Sub - - Public Sub New(message As String) - MyBase.New(message) - End Sub - - Public Sub New(message As String, innerException As Exception) - MyBase.New(message, innerException) - End Sub - End Class -End Class diff --git a/Modules.Windream/Helpers.vb b/Modules.Windream/Helpers.vb deleted file mode 100644 index 82770bb1..00000000 --- a/Modules.Windream/Helpers.vb +++ /dev/null @@ -1,112 +0,0 @@ -Imports System.Text.RegularExpressions -Imports DigitalData.Modules.Windream.Constants - -Public Class Helpers - Private Shared ReadOnly VectorIndicies As New List(Of Integer) From { - INDEX_TYPE_VECTOR_BOOLEAN, - INDEX_TYPE_VECTOR_CURRENCY, - INDEX_TYPE_VECTOR_DATE, - INDEX_TYPE_VECTOR_DATE_TIME, - INDEX_TYPE_VECTOR_FIXED_POINT, - INDEX_TYPE_VECTOR_FLOAT, - INDEX_TYPE_VECTOR_INTEGER, - INDEX_TYPE_VECTOR_INTEGER_64BIT, - INDEX_TYPE_VECTOR_STRING, - INDEX_TYPE_VECTOR_TIME - } - - Friend Shared Function ConvertVectorType(pIndexType As Integer, pValue As String) - Dim myArray - ReDim myArray(0) - Select Case pIndexType - Case INDEX_TYPE_HASH ' 36865 - 'Umwandeln in String - myArray(0) = CStr(pValue) - Return myArray - Case INDEX_TYPE_VECTOR_STRING '4097 - 'Umwandeln in String - myArray(0) = CStr(pValue) - Return myArray - Case INDEX_TYPE_VECTOR_INTEGER '4098 - 'Umwandeln in Integer - myArray(0) = CInt(pValue.Replace(" ", "")) - Return myArray - Case INDEX_TYPE_VECTOR_FLOAT '4099 - pValue = pValue. - Replace(" ", ""). - Replace(".", ",") - 'Umwandeln in Double - myArray(0) = CDbl(pValue) - Return myArray - Case INDEX_TYPE_VECTOR_BOOLEAN '4100 - 'Umwandeln in Boolean - myArray(0) = CBool(pValue) - Return myArray - Case INDEX_TYPE_VECTOR_DATE '4101 - 'Umwandeln in Date - myArray(0) = CDate(pValue) - Return myArray - Case INDEX_TYPE_VECTOR_INTEGER_64BIT '4107 - myArray(0) = Convert.ToInt64(pValue) - Return myArray - Case INDEX_TYPE_VECTOR_DATE_TIME '4103 - 'Umwandeln in Datum Uhrzeit - Return pValue - Case 8204 - 'Umwandeln in Integer - myArray(0) = CInt(pValue.Replace(" ", "")) - Return myArray - Case Else - 'Umwandeln in String - myArray(0) = CStr(pValue) - Return myArray - End Select - End Function - - Friend Shared Function ConvertIndexValue(Type As Integer, Value As String) As Object - ' Leerzeichen an Anfang und Ende entfernen - Value = Value.Trim() - - Select Case Type - Case INDEX_TYPE_HASH - Return Value - Case INDEX_TYPE_STRING - Return Value - Case INDEX_TYPE_VECTOR_STRING - Return Value - Case INDEX_TYPE_INTEGER - Value = Value.Replace(" ", String.Empty) - Return Convert.ToInt32(Value) - Case INDEX_TYPE_VECTOR_INTEGER - Value = Value.Replace(" ", String.Empty) - Return Convert.ToInt32(Value) - Case INDEX_TYPE_VECTOR_INTEGER_64BIT - Value = Value.Replace(" ", String.Empty) - Return Convert.ToInt64(Value) - Case INDEX_TYPE_VECTOR_BOOLEAN - Return Convert.ToBoolean(Value) - Case INDEX_TYPE_BOOLEAN - Return Convert.ToBoolean(Value) - Case INDEX_TYPE_DATE - Return Convert.ToDateTime(Value) - Case INDEX_TYPE_DATE_TIME - Return Convert.ToDateTime(Value) - Case INDEX_TYPE_TIME - Return Convert.ToDateTime(Value) - Case INDEX_TYPE_VECTOR_DATE_TIME - Return Convert.ToDateTime(Value) - Case INDEX_TYPE_VECTOR_DATE - Return Convert.ToDateTime(Value) - Case INDEX_TYPE_FLOAT - Return Convert.ToDouble(Value) - Case INDEX_TYPE_VECTOR_FLOAT - Return Convert.ToDouble(Value) - Case Else - Return Value - End Select - End Function - - Friend Shared Function IsVectorIndex(indexType As Integer) - Return VectorIndicies.Contains(indexType) - End Function -End Class diff --git a/Modules.Windream/IConnectionBuilder.vb b/Modules.Windream/IConnectionBuilder.vb deleted file mode 100644 index 236843b1..00000000 --- a/Modules.Windream/IConnectionBuilder.vb +++ /dev/null @@ -1,11 +0,0 @@ -Public Interface IConnectionBuilder - Function WithSessionReconnect() As IConnectionBuilder - Function WithDriveLetter(driveLetter As String) As IConnectionBuilder - Function WithWindreamObjects() As IConnectionBuilder - Function WithWindreamObjects(BasePath As String) As IConnectionBuilder - Function WithWindreamObjectsOrDriveLetter(BasePath As String, DriveLetter As String) As IConnectionBuilder - Function With64BitSupport() As IConnectionBuilder - Function WithServerName(serverName As String) As IConnectionBuilder - Function WithImpersonation(userName As String, password As String, domain As String) As IConnectionBuilder - Function Connect() As Windream -End Interface diff --git a/Modules.Windream/My Project/Application.Designer.vb b/Modules.Windream/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.Windream/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.Windream/My Project/Application.myapp b/Modules.Windream/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.Windream/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.Windream/My Project/AssemblyInfo.vb b/Modules.Windream/My Project/AssemblyInfo.vb deleted file mode 100644 index c0625ca5..00000000 --- a/Modules.Windream/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.Windream/My Project/Resources.Designer.vb b/Modules.Windream/My Project/Resources.Designer.vb deleted file mode 100644 index e5304217..00000000 --- a/Modules.Windream/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Windream.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.Windream/My Project/Resources.resx b/Modules.Windream/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.Windream/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.Windream/My Project/Settings.Designer.vb b/Modules.Windream/My Project/Settings.Designer.vb deleted file mode 100644 index fca08ef3..00000000 --- a/Modules.Windream/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Windream.My.MySettings - Get - Return Global.DigitalData.Modules.Windream.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.Windream/My Project/Settings.settings b/Modules.Windream/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.Windream/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.Windream/Windream.vb b/Modules.Windream/Windream.vb deleted file mode 100644 index 3c122f95..00000000 --- a/Modules.Windream/Windream.vb +++ /dev/null @@ -1,1573 +0,0 @@ -Imports System.IO -Imports System.IO.Path -Imports System.Text.RegularExpressions - -Imports WINDREAMLib -Imports WINDREAMLib.WMCOMEvent -Imports WINDREAMLib.WMEntity -Imports WINDREAMLib.WMObjectEditMode -Imports WMOBRWSLib -Imports WMOSRCHLib -Imports WMCNNCTDLLLib -Imports WMOTOOLLib - -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Language - -''' Windream -''' 0.0.0.2 -''' 23.10.2018 -''' -''' Module that provides methods to access the Windream ECM -''' -''' -''' NLog, >= 4.5.8 -''' -''' -''' LogConfig, DigitalData.Modules.Logging.LogConfig -''' The LogFactory containing the current log config. Used to instanciate the class logger for this and any dependent class -''' -''' ClientDriveLetter, String -''' Drive Letter of the Windream Drive, should default to `W` -''' -''' ClientSupport64Bit, Boolean -''' Should this session support 64bit methods/functionality? -''' -''' SessionReconnect, Boolean -''' Should the session reconnect automatically when the connection to the server is lost? -''' -''' SessionServerName, String -''' Name of the server used in the connection. If this is `Nothing`, the current server defined in the client is used -''' -''' SessionUserName, String -''' Name of the user that is used in the connection. If this is `Nothing`, the currently signed in user is used -''' -''' SessionPassword, String -''' User-password that is used in the connection. If this is `Nothing`, the currently signed in user is used -''' -''' SessionDomain, String -''' User-domain that is used in the connection. If this is `Nothing`, the currently signed in user is used -''' -''' -''' ClientDriveLetter, String (readonly) -''' ClientSupports64Bit, Boolean (readonly) -''' Session, IWMSession2 (readonly) -''' SessionLoggedin, Boolean (readonly) -''' SessionReconnect, Boolean (readonly) -''' SessionServername, String (readonly) -''' Objecttypes, List(Of String) (readonly) -''' -''' -''' _windream = New ConnectionBuilder(LogConfig). -''' WithDriveLetter("W"). -''' WithSessionReconnect(). -''' With64BitSupport(). -''' WithServerName("sdd-vmx02-aps01"). -''' Connect() -''' -''' -''' This class should not be instanciated directly. Instead, ConnectionBuilder should be used. -''' -Public Class Windream -#Region "+++++ Konstanten +++++" - Protected Const WMObjectEditModeObject = &H1F - Protected Const WMObjectStreamOpenModeReadWrite = 2 - Protected Const WMEntityObjectType = 10 - Protected Const WMEntityDocument = 1 - - Public Const WMObjectVariableValueTypeUndefined = 0 - Public Const WMObjectVariableValueTypeString = 1 - Public Const WMObjectVariableValueTypeInteger = 2 - Public Const WMObjectVariableValueTypeFloat = 3 - Public Const WMObjectVariableValueTypeBoolean = 4 - Public Const WMObjectVariableValueTypeDate = 5 - Public Const WMObjectVariableValueTypeFixedPoint = 6 - Public Const WMObjectVariableValueTypeTimeStamp = 7 - Public Const WMObjectVariableValueTypeCurrency = 8 - Public Const WMObjectVariableValueTypeTime = 9 - Public Const WMObjectVariableValueTypeVariant = 10 - Public Const WMObjectVariableValueTypeMask = &HFFF - Public Const WMObjectVariableValueFlagMask = &HFFFFF000 - Public Const WMObjectVariableValueTypeVector = &H1000 - Public Const WMObjectVariableValueTypeFulltext = &H2000 - Public Const WMObjectVariableValueTypeDefaultValue = &H4000 - - Public Const WMObjectEditModeIndexEdit = &H3DA -#End Region -#Region "Private Properties" - Private ReadOnly _logger As Logger - Private ReadOnly _logConfig As LogConfig - Private ReadOnly _fileSystem As Filesystem.File - Private ReadOnly _sessionDomain As String - Private ReadOnly _sessionPassword As String - Private ReadOnly _sessionUsername As String - -#End Region -#Region "Public Properties" - Public ReadOnly Property ClientDriveLetter As String - Public ReadOnly Property ClientBasePath As String - Public ReadOnly Property ClientSupports64Bit As Boolean - - Public ReadOnly Property Session As IWMSession2 - Public ReadOnly Property SessionLoggedin As Boolean = False - Public ReadOnly Property SessionReconnect As Boolean - Public ReadOnly Property SessionServername As String - - Public ReadOnly Property UsesDriveLetter As Boolean = True - - ''' A list of object types that are available - Public ReadOnly Property ObjectTypes As List(Of String) - Get - Dim types As WMObjects = GetObjectTypes() - Dim list As New List(Of String) - - For Each type As WMObject In types - list.Add(type.aName) - Next - - Return list - End Get - End Property - - - -#End Region - ''' - ''' Creates a new Windream object and connects to a server with the provided options and credentials - ''' - ''' - ''' - ''' - ''' - ''' - ''' - ''' - ''' - ''' - Public Sub New(LogConfig As LogConfig, SessionReconnect As Boolean, ClientDriveLetter As String, BasePath As String, ClientSupport64Bit As Boolean, SessionServerName As String, SessionUserName As String, SessionPassword As String, SessionDomain As String) - ' Create logger and save LogFactory for dependent classes - _logger = LogConfig.GetLogger() - _logConfig = LogConfig - _fileSystem = New Filesystem.File(LogConfig) - - ' Create a session - Dim oSession As IWMSession2 = NewSession(SessionServerName, SessionUserName, SessionPassword, SessionDomain) - - ' If no session could be created, exit - If oSession Is Nothing Then - Throw New Exceptions.SessionException() - End If - - ' Set properties of currently established session - Session = oSession - SessionLoggedin = True - - Me.SessionReconnect = SessionReconnect - Me.ClientDriveLetter = ClientDriveLetter - Me.ClientSupports64Bit = ClientSupport64Bit - Me.SessionServername = SessionServerName - Me.ClientBasePath = GetNormalizedBasePath(BasePath) - - _logger.Debug("ClientBasePath: [{0}]", ClientBasePath) - _logger.Debug("ClientDriveLetter: [{0}]", ClientDriveLetter) - _logger.Debug("SessionServername: [{0}]", SessionServerName) - _logger.Debug("SessionUserName: [{0}]", SessionUserName) - _logger.Debug("SessionDomain: [{0}]", SessionDomain) - - If ClientDriveLetter = String.Empty Then - UsesDriveLetter = False - End If - - _sessionUsername = SessionUserName - _sessionPassword = SessionPassword - _sessionDomain = SessionDomain - End Sub - - Public Function GetCleanedPath(Path As String) As String - Return Regex.Replace(Path, Constants.REGEX_CLEAN_FILENAME, String.Empty) - End Function - - Public Function GetChoiceListItems(ChoiceListName As String) As List(Of String) - Dim oItems As New List(Of String) - Dim oChoicelist As WMObject - - If TestSessionLoggedIn() = False Then - Return oItems - End If - - Try - oChoicelist = Session.GetWMObjectByName(WMEntityChoiceList, ChoiceListName) - Catch ex As Exception - _logger.Error(ex, "Could not get choice list") - Return oItems - End Try - - Try - Dim oChoiceListItems As Object = oChoicelist.GetVariableValue("vItems") - - If oChoiceListItems Is Nothing Then - Return oItems - End If - - For Each oChoiceListItem In oChoiceListItems - oItems.Add(oChoiceListItem) - Next - - Return oItems - Catch ex As Exception - _logger.Error(ex, "Could not get choice list items") - Return oItems - End Try - End Function - - Public Function GetChoiceLists() As List(Of String) - Dim oItems As New List(Of String) - - If TestSessionLoggedIn() = False Then - Return oItems - End If - - Try - Dim oChoiceLists As WMObjects - Dim oChoiceList As IWMObject2 - 'load list of choicelists - oChoiceLists = Session.GetAllObjects(WMEntityChoiceList) - - For Each oChoiceList In oChoiceLists - oItems.Add(oChoiceList.aName) - Next - - Return oItems - Catch ex As Exception - _logger.Error(ex) - Return oItems - End Try - End Function - - Public Function GetFileByPath(pPath As String) As WMObject - If TestSessionLoggedIn() = False Then - Return Nothing - End If - pPath = GetNormalizedPath(pPath) - - Dim oWMObject As WMObject - Try - oWMObject = Session.GetWMObjectByPath(WMEntityDocument, pPath) - Return oWMObject - Catch ex As Exception - _logger.Error(ex) - Return Nothing - End Try - End Function - - Public Function GetIndexType(IndexName As String) As Integer - If TestSessionLoggedIn() = False Then - Return Nothing - End If - - Try - Dim oAttribute = Session.GetWMObjectByName(WMEntityAttribute, IndexName) - Dim oType = oAttribute.GetVariableValue("dwAttrType") - Return oType - Catch ex As Exception - _logger.Error(ex) - Return Nothing - End Try - End Function - - Public Function GetIndexValue(Path As String, IndexName As String) As List(Of String) - Dim oResult As New List(Of String) - - If TestSessionLoggedIn() = False Then - Return oResult - End If - - Try - Path = GetNormalizedPath(Path) - Dim oWMObject As WMObject = Session.GetWMObjectByPath(WMEntityDocument, Path) - - If oWMObject Is Nothing Then - Return oResult - End If - - Dim oValues = oWMObject.GetVariableValue(IndexName) - - If oValues Is Nothing Then - Return oResult - End If - - If TypeOf oValues Is IEnumerable Then - For Each oValue In oValues - oResult.Add(oValue) - Next - Else - oResult.Add(oValues) - End If - - Return oResult - Catch ex As Exception - _logger.Error(ex) - Return oResult - End Try - End Function - - Public Function GetIndiciesByObjecttype(ObjectTypeName As String) As List(Of String) - If TestSessionLoggedIn() = False Then - Return Nothing - End If - - Dim oObjectType As WMObject - Dim oIndexAttributes As WMObjectRelation - Dim oIndexAttribute As WMObject - Dim oIndex As WMObject - Dim oRelProperties As WMObjectRelation - Dim oTempSession As IWMSession2 - Dim oIndicies As New List(Of String) - - Try - ' den Objekttyp laden - oTempSession = DirectCast(Session, IWMSession2) - oObjectType = Session.GetWMObjectByName(WMEntityObjectType, ObjectTypeName) - - ' Beziehung zu Indizes des Objekttyp auslesen - oIndexAttributes = oObjectType.GetWMObjectRelationByName("TypeAttributes") - - ' alle Indizes durchlaufen - For j As Integer = 0 To oIndexAttributes.Count - 1 - - ' aktuellen Index auslesen - oIndexAttribute = oIndexAttributes.Item(j) - - ' Eigenschaften des Index auslesen - oRelProperties = oIndexAttribute.GetWMObjectRelationByName("Attribute") - - ' Index aus den Eigenschaften auslesen - oIndex = oRelProperties.Item(0) - - ' Indexname speichern - 'aIndexNames(j) = oIndex.aName - oIndicies.Add(oIndex.aName) - Next - - ' Indexarray zurückgeben - oIndicies.Sort() - 'Return aIndexNames - Return oIndicies - - Catch ex As Exception - _logger.Error(ex) - Return oIndicies - End Try - End Function - - Public Function GetTypeIndiciesByObjecttype(ObjectTypeName As String, Optional SystemIndicies As Boolean = False) As List(Of String) - If TestSessionLoggedIn() = False Then - Return Nothing - End If - - Dim oObjectType As IWMObject6 - Dim oTempSession As IWMSession2 - Dim oIndicies As New List(Of String) - Dim oAttributeFlag As Integer = 0 - - Try - ' den Objekttyp laden - oTempSession = DirectCast(Session, IWMSession2) - oObjectType = Session.GetWMObjectByName(WMEntityObjectType, ObjectTypeName) - - If SystemIndicies = True Then - oAttributeFlag = Constants.ATTRIBUTE_TYPE_SYSTEMINDEX - Else - oAttributeFlag = Constants.ATTRIBUTE_TYPE_TYPEINDEX - End If - - Dim oVariableNames As WMObjectVariableNames = oObjectType.GetVariableNames(oAttributeFlag, False) - - For oIndex = 0 To oVariableNames.Count - 1 - oIndicies.Add(oVariableNames.Item(oIndex)) - Next - - Return oIndicies - Catch ex As Exception - _logger.Warn("Type Indicies could not be read") - _logger.Error(ex) - Return Nothing - End Try - End Function - - Public Function NewSession(Optional ServerName As String = Nothing, Optional UserName As String = Nothing, Optional Password As String = Nothing, Optional Domain As String = Nothing) As IWMSession2 - Dim oBrowser As ServerBrowser - Dim oConnect As IWMConnect2 - Dim oSession As IWMSession2 - Dim oCredentials As WMUserIdentity - - Dim oImpersonation As Boolean - Dim oServerNameFromClient As Boolean - - ' Create initial windream objects - Try - oBrowser = New ServerBrowser() - oConnect = New WMConnect() - _logger.Info("Successfully created windream objects") - Catch ex As Exception - _logger.Error(ex, "Error while creating windream objects") - Return Nothing - End Try - - ' If no server was supplied, try to get the current server set in the client - Try - If ServerName Is Nothing OrElse ServerName.Length = 0 Then - ServerName = oBrowser.GetCurrentServer - oServerNameFromClient = True - Else - oServerNameFromClient = False - End If - Catch ex As Exception - _logger.Error(ex, "Error while getting Servername") - Return Nothing - End Try - - _logger.Info("Servername: {0}", ServerName) - _logger.Info("Servername aquired from client: {0}", oServerNameFromClient) - - 'Test connection to windream server - Try - Dim response = My.Computer.Network.Ping(ServerName) - If response = False Then - _logger.Warn("Windream Server {0} refused connection", ServerName) - Return Nothing - End If - Catch ex As Exception - _logger.Error(ex) - Return Nothing - End Try - - ' If username, password and domain are set, login with impersonation - ' Else, login with current credentials - If UserName IsNot Nothing And Password IsNot Nothing And Domain IsNot Nothing Then - oImpersonation = True - oCredentials = New WMUserIdentity() With { - .aServerName = ServerName, - .aUserName = UserName, - .aPassword = Password, - .aDomain = Domain - } - - oConnect.ModuleId = 9 - Else - oImpersonation = False - oCredentials = New WMUserIdentity() With { - .aServerName = ServerName - } - End If - If UserName IsNot Nothing Then - If UserName <> String.Empty Then - _logger.Info("Impersonated Login: {0}", oImpersonation) - _logger.Info("Username: {0}", IIf(UserName IsNot Nothing, UserName, Environment.UserName)) - _logger.Info("Domain: {0}", IIf(Domain IsNot Nothing, Domain, Environment.UserDomainName)) - End If - End If - - - Try - oSession = oConnect.Login(oCredentials) - _logger.Info("Connected..Session created") - Catch ex As Exception - _logger.Error(ex, "Error while logging in") - Return Nothing - End Try - - Try - ' Standardmässig hinterlegen dass abgelegte Dateien keine Indexmaske öffnet - oSession.SwitchEvents(WMCOMEventWMSessionNeedIndex, False) - Catch ex As Exception - _logger.Error(ex, "Could not SwitchEvents") - Return Nothing - End Try - - If oSession.aLoggedin = False Then - _logger.Warn("Session created but user {0} could not be logged in", Environment.UserName) - Return Nothing - End If - - _logger.Info("Connection to {0} established!", ServerName) - Return oSession - End Function - -#Region "Public Methods" - ''' - ''' changes the archive end date - ''' - ''' WM Filepath - ''' number/count of period (if - ''' date_unity (d,m,y or day(s),month(s),years(s) - ''' dateFrom_value - ''' Returns true when date was set, false if not - ''' - Public Function NewLifecycle_Period(ByVal wmfilepath As String, ByVal dateFrom_value As Date, ByVal date_period As Double, ByVal date_unit As String) - Dim oWMObject As WMObject - Try - oWMObject = GetFileByPath(wmfilepath) - _logger.Info($"Changing the archive end-date for file '{oWMObject.aName}', Items: {dateFrom_value},{date_period},{date_unit}") - Try - ' die Datei sperren - oWMObject.LockFor(WMObjectEditModeLifeCycleEdit) - _logger.Debug(">> object locked") - - Catch ex As Exception - _logger.Error(ex) - ' nichts tun (Datei ist bereits gesperrt) - End Try - - Dim oObjectLifecycle = oWMObject.aWMLifeCycle - - Dim oIntervalType As DateInterval - If date_unit.ToLower = "d" Or date_unit.ToLower = "day(s)" Then - oIntervalType = DateInterval.Day - ElseIf date_unit.ToLower = "m" Or date_unit.ToLower = "month(s)" Then - oIntervalType = DateInterval.Month - ElseIf date_unit.ToLower = "y" Or date_unit.ToLower = "year(s)" Then - oIntervalType = DateInterval.Year - End If - - Dim oArchUntil = DateAdd(oIntervalType, date_period, dateFrom_value) - _logger.Debug("New date shall be: " & oArchUntil.ToString) - - oObjectLifecycle.SetPeriodEndDate(2, oArchUntil) - _logger.Info("Archive end-date has been changed!") - oWMObject.Save() - oWMObject.unlock() - Return SetArchive_Active(oWMObject) - - Catch ex As Exception - _logger.Warn($"Unexpected Error in NewLifecycle_Period {ex.Message}") - If Not IsNothing(oWMObject) Then - If oWMObject.aLocked = True Then - oWMObject.unlock() - End If - End If - Return False - End Try - End Function - ''' - ''' changes the archive end date - ''' - ''' WM Filepath - ''' number/count of period (if - ''' date_unity (d,m,y or day(s),month(s),years(s) - ''' dateFrom_value - ''' Returns true when date was set, false if not - ''' - Public Function NewLifecycle_PeriodTEST(ByVal wmfilepath As String, ByVal oArchUntil As String) - Dim oWMObject As WMObject - Try - oWMObject = GetFileByPath(wmfilepath) - _logger.Info($"Changing the archive end-date for file '{oWMObject.aName}', Items: {oArchUntil}") - Try - ' die Datei sperren - oWMObject.LockFor(WMObjectEditModeLifeCycleEdit) - _logger.Debug(">> object locked") - - Catch ex As Exception - _logger.Error(ex) - ' nichts tun (Datei ist bereits gesperrt) - End Try - - Dim oObjectLifecycle = oWMObject.aWMLifeCycle - ' Dim oDate = CDate(oArchUntil) - ' Dim omMyFormattedDate = oDate.ToString("dd.MM.yyyy") - - If oArchUntil <> String.Empty Then - If IsDate(oArchUntil) Then - If CDate(oArchUntil) < CDate(Now) Then - _logger.Debug("oArchUntil < today so direct move to archivepool") - Else - _logger.Debug("New date shall be: " & oArchUntil) - oObjectLifecycle.SetPeriodEndDate(2, oArchUntil) - _logger.Info("Archive end-date has been changed!") - End If - End If - Else - _logger.Debug("oArchUntil is empty so direct move to archivepool") - End If - - Dim result = SetArchive_Active(oWMObject) - oWMObject.Save() - oWMObject.unlock() - Return result - - Catch ex As Exception - _logger.Warn($"Unexpected Error in NewLifecycle_PeriodTEST {ex.Message}") - If Not IsNothing(oWMObject) Then - If oWMObject.aLocked = True Then - oWMObject.unlock() - End If - End If - Return False - End Try - End Function - ''' - ''' Archives windream object immediately - ''' - ''' Returns true when archiving was set, false if not - ''' - Private Function SetArchive_Active(oWMObject As WMObject) - Try - oWMObject.MoveToArchivePool() - _logger.Info("oWMObject has been archived!") - Return True - Catch ex As Exception - _logger.Warn($"Unexpected Error in SetArchive_Active {ex.Message}") - Return False - End Try - End Function - - Public Function NewFolder(Path As String, pExtension As String) As Boolean - If Not TestSessionLoggedIn() Then - Return False - End If - - Try - Path = GetNormalizedPath(Path) - Dim oFolders As List(Of String) = Path.Split("\").ToList() - Dim oFolderObject As WMObject - Dim oCurrentPath As String = String.Empty - - - For Each oFolder In oFolders - If oFolder.ToString.EndsWith(pExtension) Then - Exit For - End If - oCurrentPath = Combine(oCurrentPath, oFolder) - - If TestFolderExists(oCurrentPath) = False Then - oFolderObject = Session.GetNewWMObjectFS(WMEntityFolder, oCurrentPath, WMObjectEditModeNoEdit) - _logger.Info($"new Folder [{oCurrentPath}] has been created!") - End If - Next - - Return True - Catch ex As Exception - _logger.Error(ex) - Return False - End Try - End Function - - Public Function NewFileVersion(Path As String, Comment As String) As Boolean - If Not TestSessionLoggedIn() Then - Return False - End If - - Try - Path = GetNormalizedPath(Path) - Dim oFileObject As IWMObject6 - oFileObject = GetObjectByPath(Path, WMEntityDocument) - oFileObject.CreateVersion2(False, Constants.HISTORY_NEW_FROM_VERSION, Comment) - Return True - Catch ex As Exception - _logger.Error(ex) - Return False - End Try - End Function - - Public Function NewFileStream(ByVal FilenameSource As String, ByVal FilenameTarget As String) As Boolean - Dim oExtension As String = Path.GetExtension(FilenameSource) - - If Not TestSessionLoggedIn() Then - Return False - End If - - Dim oTargetDrive As String = Path.GetDirectoryName(FilenameTarget) - FilenameTarget = GetNormalizedPath(FilenameTarget) - - _logger.NewBlock("File Stream") - _logger.Debug($"Preparing to stream file from {FilenameSource} to {FilenameTarget}") - - Dim oWMObject As IWMObject6 = Nothing - Dim oFileIO As WMFileIO - Dim oWMStream As WMStream - - 'Indexierungsdialog der Session unterdrücken - Session.SwitchEvents(Constants.COM_EVENT_SESSION_NEED_INDEX, False) - - Try - ' GetNewWMObjectFS already locks the WMObject - _logger.Debug("Creating WMObject for file {0}", FilenameTarget) - oWMObject = Session.GetNewWMObjectFS(WMEntityDocument, FilenameTarget, WMObjectEditModeObject) - Catch ex As Exception - _logger.Error(ex, "WMObject could not be created") - Return False - End Try - - If oWMObject Is Nothing Then - _logger.Warn("Document {0} could not be found", FilenameTarget) - Return False - End If - - Try - _logger.Debug("Opening stream for {0}", FilenameTarget) - oWMStream = oWMObject.OpenStream(Constants.STREAM_BINARY_OBJECT, Constants.STREAM_OPEN_MODE_READ_WRITE) - Catch ex As Exception - _logger.Error(ex) - If UnlockObject(oWMObject) Then RemoveFile(FilenameTarget) - Return False - End Try - - Try - _logger.Debug("Creating FileIO", FilenameTarget) - - oFileIO = New WMFileIO With { - .bstrOriginalFileName = FilenameSource, - .aWMStream = oWMStream - } - Catch ex As Exception - If UnlockObject(oWMObject) Then RemoveFile(FilenameTarget) - _logger.Error(ex, "Error while creating FileIO object") - Return False - End Try - - Try - _logger.Debug("Streaming file...") - oFileIO.ImportOriginal(True) - _logger.Debug("Content of file was transferred!") - Catch ex As Exception - If UnlockObject(oWMObject) Then RemoveFile(FilenameTarget) - _logger.Error(ex, "Error while streaming file") - Return False - End Try - - Try - _logger.Debug("Closing Stream") - oWMStream.Close() - _logger.Debug("Saving new object") - oWMObject.Save() - _logger.Debug("Unlocking new object") - oWMObject.unlock() - Catch ex As Exception - RemoveFile(FilenameTarget) - Return False - End Try - - _logger.Info($"File '{FilenameTarget}' was streamed.") - _logger.EndBlock() - - Return True - End Function - - Public Function LockObject(WMObject As WMObject, Optional EditMode As WMObjectEditMode = WMObjectEditModeNoEdit) As Boolean - Try - WMObject.LockFor(EditMode) - Return True - Catch ex As Exception - _logger.Error(ex) - Return False - End Try - End Function - - Public Function UnlockObject(WMObject As WMObject) As Boolean - Try - WMObject.unlock() - Return True - Catch ex As Exception - _logger.Error(ex) - Return False - End Try - End Function - - Public Function GetNormalizedPath(Path As String) As String - 'Dim oNormalizedPath = GetCleanedPath(Path) - Dim oNormalizedPath = Language.Utils.RemoveInvalidCharacters(Path) - _logger.Debug("Normalizing Path: [{0}]", oNormalizedPath) - - Try - ' Convert any forward slashes / and double slashes \\ into backslashes \ - ' See: https://stackoverflow.com/questions/3144492/how-do-i-get-nets-path-combine-to-convert-forward-slashes-to-backslashes - If IsPathRooted(oNormalizedPath) Then - oNormalizedPath = GetFullPath(oNormalizedPath) - End If - - ' Remove Driveletter, eg. W:\ - If oNormalizedPath.StartsWith($"{ClientDriveLetter}:\") Then - _logger.Debug($"Replacing ClientDriveLetter: [{ClientDriveLetter}]") - oNormalizedPath = oNormalizedPath.Substring(ClientDriveLetter.Length + 2) - End If - - ' Remove Windream Base Path, eg. \\windream\objects\ - If oNormalizedPath.ToLower.StartsWith(ClientBasePath.ToLower) Then - _logger.Debug($"Replacing ClientBasePath: [{ClientBasePath}]") - oNormalizedPath = oNormalizedPath.Substring(ClientBasePath.Length) - End If - - ' Handle misconfigured drive-letter - If oNormalizedPath.Contains(":") Then - _logger.Warn($"oNormalizedPath still contains a drive name!!") - _logger.Warn($"Check Your config ClientDriveLetter [{ClientDriveLetter}] // ClientBasePath [{ClientBasePath}]") - oNormalizedPath = oNormalizedPath.Substring(3) - End If - - _logger.Debug($"oNormalizedPath: [{oNormalizedPath}]") - - Return oNormalizedPath - Catch ex As Exception - _logger.Warn($"Unexpected error in GetNormalizedPath - oNormalizedPath [{oNormalizedPath}] - Error: [{ex.Message}]") - Return "" - End Try - End Function - - ''' - ''' Returns the result of a search file - ''' - ''' Path of a search file (*.wdf) - ''' Index containing the Document-ID - ''' A datatable of the results with columns PATH and DOCID - Public Function GetSearchDocuments(SearchFilePath As String, DocIdIndexName As String) As DataTable - Dim oDatatable As New DataTable - oDatatable.Columns.Add("PATH", GetType(String)) - oDatatable.Columns.Add("DOCID", GetType(Integer)) - - If TestSessionLoggedIn() = False Then - Return oDatatable - End If - - If TestFileExists(SearchFilePath) = False Then - Return oDatatable - End If - - Try - Dim oFileInfo = New FileInfo(SearchFilePath) - Dim oProfileName = oFileInfo.Name - Dim oProfilePath = oFileInfo.DirectoryName - - Dim oSearchController As New WMOSearchController() - oSearchController.CheckSearchProfile(SearchFilePath) - - Dim oSearchType = oSearchController.SearchProfileTargetProgID - - Dim oSearchProfileExSetttings As Integer = oSearchController.SearchProfileExSettings - - If oSearchProfileExSetttings = 0 Then - oSearchProfileExSetttings = 7 - End If - - Dim oSearch As WMSearch - - Select Case oSearchType.ToUpper() - Case Constants.SEARCH_TYPE_QUICK_SEARCH - Dim oQuickSearch As New WMQuickSearch With { - .WMSession = Session, - .SearchProfilePath = oProfilePath - } - oQuickSearch.ClearSearch() - oQuickSearch.LoadSearchProfile(oProfileName) - - oSearch = oQuickSearch.GetSearch() - Case Constants.SEARCH_TYPE_INDEX_SEARCH - Dim oIndexSearch As New WMIndexSearch With { - .WMSession = Session, - .SearchProfilePath = oProfilePath - } - oIndexSearch.ClearSearch() - oIndexSearch.LoadSearchProfile(oProfileName) - - oSearch = oIndexSearch.GetSearch() - Case Constants.SEARCH_TYPE_OBJECTTYPE_SEARCH - Dim oObjecttypeSearch As New WMObjectTypeSearch With { - .WMSession = Session, - .SearchProfilePath = oProfilePath - } - oObjecttypeSearch.ClearSearch() - oObjecttypeSearch.LoadSearchProfile(oProfileName) - - oSearch = oObjecttypeSearch.GetSearch() - Case Else - _logger.Warn("{0} is not a valid search type", oSearchType) - Return oDatatable - End Select - - Dim oSearchResults As WMObjects = oSearch.Execute() - - If oSearchResults.Count = 0 Then - Return oDatatable - End If - - For Each oSearchResult As WMObject In oSearchResults - Dim path As String = oSearchResult.aPath - Dim docId As Integer = oSearchResult.GetVariableValue(DocIdIndexName) - - oDatatable.Rows.Add(path, docId) - Next - oDatatable.AcceptChanges() - - Return oDatatable - Catch ex As Exception - _logger.Error(ex) - Return oDatatable - End Try - End Function - - Public Function GetVectorData(FilePath As String, IndexName As String, NewValues As Object, CheckDuplicates As Boolean) As String() - Try - Dim oWMObject = GetFileByPath(FilePath) - Dim oObjectArray As Object() = GetVektorData_Combined(oWMObject, IndexName, NewValues, CheckDuplicates) - Dim oStringArray As New List(Of String) - - For Each oObjectValue In oObjectArray - oStringArray.Add(oObjectValue.ToString) - Next - - Return oStringArray.ToArray - Catch ex As Exception - _logger.Error(ex) - Return Nothing - End Try - End Function - - ''' - ''' Gets an array of the actual vektorvalues of index, collated with the passed values - ''' - ''' windream-file as WMObject - ''' Indexname as String - ''' The new values as Array - ''' True if duplicates shall be prevented - ''' - Public Function GetVektorData_Combined(ByVal WindreamObject As WMObject, IndexName As String, NewValues As Object(), CheckDuplikat As Boolean) - Try - Dim oAnzahl As Integer = 0 - Dim oValueArray() - 'Jeden Wert des Vektorfeldes durchlaufen - Dim oWMValue = WindreamObject.GetVariableValue(IndexName) - If oWMValue Is Nothing = False Then - 'Nochmals prüfen ob wirklich Array - If oWMValue.GetType.ToString.Contains("System.Object") Then - 'Keine Duplikatprüfung also einfach neues Array füllen - If CheckDuplikat = False Then - For Each ovalue As Object In oWMValue - 'Das Array anpassen - ReDim Preserve oValueArray(oAnzahl) - 'Den Wert im Array speichern - oValueArray(oAnzahl) = ovalue.ToString - oAnzahl += 1 - Next - 'Und jetzt den/die Neuen Wert(e) anfügen - For Each oNewValue As Object In NewValues - If oNewValue Is Nothing = False Then - 'Das Array anpassen - ReDim Preserve oValueArray(oAnzahl) - 'Den Wert im Array speichern - oValueArray(oAnzahl) = oNewValue.ToString - oAnzahl += 1 - End If - Next - Else - _logger.Debug("Duplicates shall be checked...") - 'Duplikat Prüfung an, also nur anhängen wenn Wert <> - For Each oValue As Object In oWMValue - If oValue Is Nothing = False Then - 'Erst einmal die ALten Werte schreiben - ReDim Preserve oValueArray(oAnzahl) - 'Den Wert im Array speichern - oValueArray(oAnzahl) = oValue.ToString - _logger.Debug("Value (" & oAnzahl & ") " & oValue.ToString) - oAnzahl += 1 - End If - Next - 'Jetzt die Neuen Werte auf Duplikate überprüfen - For Each NewValue As Object In NewValues - If NewValue Is Nothing = False Then - If oValueArray.Contains(NewValue) = False Then - _logger.Debug("New Value (" & oAnzahl & ") " & NewValue.ToString) - 'Das Array anpassen - ReDim Preserve oValueArray(oAnzahl) - 'Den Wert im Array speichern - oValueArray(oAnzahl) = NewValue.ToString - oAnzahl += 1 - Else - _logger.Debug("Value '" & NewValue.ToString & "' bereits in Vektorfeld enthalten") - End If - End If - Next - End If - End If - Else - _logger.Debug("Vektorfeld ist noch leer....") - 'Den/die Neuen Wert(e) anfügen - For Each oNewValue As Object In NewValues - If oNewValue Is Nothing = False Then - If CheckDuplikat = True Then - If oValueArray Is Nothing = False Then - If oValueArray.Contains(oNewValue) = False Then - 'Das Array anpassen - ReDim Preserve oValueArray(oAnzahl) - 'Den Wert im Array speichern - oValueArray(oAnzahl) = oNewValue.ToString - oAnzahl += 1 - Else - _logger.Debug("Value '" & oNewValue.ToString & "' bereits in Array enthalten") - End If - Else 'Dererste Wert, also hinzufügen - 'Das Array anpassen - ReDim Preserve oValueArray(oAnzahl) - 'Den Wert im Array speichern - oValueArray(oAnzahl) = oNewValue.ToString - oAnzahl += 1 - End If - Else - 'Das Array anpassen - ReDim Preserve oValueArray(oAnzahl) - 'Den Wert im Array speichern - oValueArray(oAnzahl) = oNewValue.ToString - oAnzahl += 1 - End If - End If - Next - End If - _logger.Debug("Return ValueArray: length " & oValueArray.Length) - Return oValueArray - Catch ex As Exception - _logger.Error(ex) - Return Nothing - End Try - End Function - - ''' - ''' Sets objecttype of a folder - ''' - ''' - ''' - ''' - Public Function SetFolderObjecttype(FolderPath As String, Objecttype As String) As Boolean - If TestSessionLoggedIn() = False Then - Return False - End If - - Try - FolderPath = GetNormalizedPath(FolderPath) - - If TestFolderExists(FolderPath) = False Then - _logger.Warn("Folder {0} does not exist!", FolderPath) - Return False - End If - - Dim oWMFolder As WMObject = GetObjectByPath(FolderPath, WMEntityFolder) - - If LockObject(oWMFolder) = False Then - _logger.Warn("Folder {0} could not be locked", FolderPath) - End If - - If oWMFolder.aObjectType.aName <> Constants.OBJECT_TYPE_DEFAULT Then - _logger.Warn("Objecttype for folder {0} has already been set!", FolderPath) - End If - - Dim oObjecttype As WMObject = GetObjectByName(Objecttype, WMEntityObjectType) - - If oObjecttype Is Nothing Then - _logger.Warn("Objecttype {0} does not exist!", Objecttype) - Return False - End If - - oWMFolder.aObjectType = oObjecttype - oWMFolder.Save() - - If UnlockObject(oWMFolder) Then - _logger.Warn("Folder {0} could not be unlocked", FolderPath) - End If - - Return True - Catch ex As Exception - _logger.Error(ex) - Return False - End Try - End Function - - Public Function RemoveFile(Path As String) As Boolean - If TestSessionLoggedIn() = False Then - _logger.Warn("TestSession = False!") - Return Nothing - End If - - Try - Dim oWMObject As WMObject = GetFileByPath(Path) - - If oWMObject Is Nothing Then - _logger.Debug("File so far not existing in WM") - Return True - End If - _logger.Info($"Deleting WMObject [{Path}]") - oWMObject.Delete() - _logger.Info($"[RemoveFile] - File [{Path}] has been deleted!") - Return True - Catch ex As Exception - _logger.Error(ex) - Return False - End Try - End Function - - Public Function RemoveVectorIndexValue(Path As String, IndexName As String, ValueToDelete As String) As Boolean - If TestSessionLoggedIn() = False Then - Return False - End If - - Try - Dim oWMObject As WMObject = Session.GetWMObjectByName(WMEntityAttribute, Path) - - If oWMObject Is Nothing Then - _logger.Warn("Could not find document {0}", Path) - Return False - End If - - Dim oVectorValues = oWMObject.GetVariableValue(IndexName) - Dim oType As Integer = GetIndexType(IndexName) - - If Helpers.IsVectorIndex(oType) = False Then - _logger.Warn("Index {0} is not a vector index", IndexName) - Return False - End If - - If oVectorValues Is Nothing Then - _logger.Warn("Could not values of index {0}", IndexName) - Return False - End If - - Dim oNewValues As New List(Of Object) - oNewValues = oVectorValues.Except(New List(Of Object) From {ValueToDelete}).ToList() - - ' BEGIN WRITE INDEX - If LockObject(oWMObject, WMObjectEditModeIndexEdit) = False Then - _logger.Warn("File {0} could not be locked") - Return False - End If - - oWMObject.SetVariableValue(IndexName, oNewValues.ToArray()) - oWMObject.Save() - - UnlockObject(oWMObject) - - Return True - ' END WRITE INDEX - Catch ex As Exception - _logger.Error(ex) - Return False - End Try - End Function - - Public Function SetFileIndex(Path As String, IndexName As String, Value As String, ObjectType As String) As Boolean - If TestSessionLoggedIn() = False Then - Return False - End If - - If TestFileExists(Path) = False Then - _logger.Warn("File '{0}' does not exist", Path) - Return False - End If - - Dim oWMObject As IWMObject6 = GetFileByPath(Path) - - If LockObject(oWMObject, WMObjectEditModeIndexEdit) = False Then - _logger.Warn("File {0} could not be locked") - Return False - End If - - If oWMObject.aObjectType.aName = Constants.OBJECT_TYPE_DEFAULT Then - oWMObject.aObjectType = GetObjectByName(ObjectType, WMEntityObjectType) - End If - - Try - Dim oType As Integer = GetIndexType(IndexName) - Dim oConvertedValue As Object = Helpers.ConvertIndexValue(oType, Value) - - oWMObject.SetVariableValue(IndexName, oConvertedValue) - oWMObject.Save() - - If UnlockObject(oWMObject) = False Then - _logger.Warn("File {0} could not be unlocked", Path) - End If - - Return True - Catch ex As Exception - _logger.Error(ex) - UnlockObject(oWMObject) - Return False - End Try - End Function - - Public Function SetFileIndex(Path As String, IndexName As String, Values As List(Of String), ObjectType As String) As Boolean - If TestSessionLoggedIn() = False Then - Return False - End If - - If TestFileExists(Path) = False Then - _logger.Warn("File '{0}' does not exist", Path) - Return False - End If - Dim oWMObject As IWMObject6 - - Try - oWMObject = GetFileByPath(Path) - Catch ex As Exception - _logger.Warn("Could not create a WMObject for path '{0}'!!", Path) - _logger.Warn(ex.Message) - Return False - End Try - _logger.Debug("SetFileIndex '{0}' ... ", IndexName) - If LockObject(oWMObject, WMObjectEditModeIndexEdit) = False Then - _logger.Warn("File {0} could not be locked") - Return False - End If - - If oWMObject.aObjectType.aName = Constants.OBJECT_TYPE_DEFAULT Then - oWMObject.aObjectType = GetObjectByName(ObjectType, WMEntityObjectType) - End If - - Try - Dim oType As Integer = GetIndexType(IndexName) - Dim oConvertedValues As New List(Of String) - Dim oArray As Object - - ReDim oArray(Values.Count - 1) - - For oIndex = 0 To Values.Count - 1 - Dim oValue As Object = Helpers.ConvertIndexValue(oType, Values.Item(oIndex)) - oArray(oIndex) = oValue - Next - - oWMObject.SetVariableValue(IndexName, oArray) - oWMObject.Save() - - If UnlockObject(oWMObject) = False Then - _logger.Warn("File {0} could not be unlocked", Path) - End If - - Return True - Catch ex As Exception - _logger.Error(ex) - Return False - End Try - End Function - - Public Function ExportFile(WMObject As WMObject, ExportPath As String) As Boolean - Try - Dim oWMObject As IWMObject6 = DirectCast(WMObject, IWMObject6) - - Dim oFilenameFull As String = oWMObject.aName - Dim oFilenameExport As String - Dim oSplitIndex = oFilenameFull.LastIndexOf(".") - Dim oVersion = 1 - - Dim oFilename = oFilenameFull.Substring(0, oSplitIndex) - Dim oExtension = oFilenameFull.Substring(oSplitIndex) - - _logger.Debug("Preparing export of file {0}..", oFilenameFull) - _logger.Debug("Filename: {0}", oFilename) - _logger.Debug("Extension: {0}", oExtension) - - ' build the file path in case the exported file doesn't already exist - oFilenameExport = BuildExportPath(ExportPath, oFilename, oExtension) - - ' Add version until we find the version that does NOT exist - Do While File.Exists(oFilenameExport) - oVersion += 1 - oFilenameExport = BuildExportPath(ExportPath, oFilename, oExtension, oVersion) - Loop - - _logger.Debug("File will be exported to {0}", oFilenameExport) - - _logger.Debug("Opening file stream..") - Dim oStream As WMStream = oWMObject.OpenStream("BinaryObject", WMObjectStreamOpenMode.WMObjectStreamOpenModeRead) - Dim oWMFileIO As New WMFileIO() With { - .aWMStreamEx = oStream, - .aWMStream = oStream, - .bstrOriginalFileName = oFilenameExport - } - - _logger.Debug("Exporting file..") - oWMFileIO.ExportOriginal(True) - - _logger.Debug("Cleaning up..") - oStream.Flush() - oStream.Close() - - _logger.Debug("File exported to {0}", oFilenameExport) - Return True - Catch ex As Exception - _logger.Error(ex) - Return False - End Try - End Function - - Private Function BuildExportPath(BasePath As String, FilenameWithoutExtension As String, Extension As String, Optional Version As Integer = 1) - Dim oFilename - - If Version = 1 Then - oFilename = FilenameWithoutExtension & Extension - Else - oFilename = FilenameWithoutExtension & "_" & Version & Extension - End If - - Return Path.Combine(BasePath, oFilename) - End Function - - Public Function Export_WMFile(WMPath As String, Exportpath As String) - Try - If Not Exportpath.EndsWith("\") Then - Exportpath &= "\" - End If - - Dim oWMObject As WMObject = GetFileByPath(WMPath) - - _logger.Debug("(Export_WMFile)Working on file: " & oWMObject.aName) - - - Dim ExportFileIO = New WMOTOOLLib.WMFileIO ' CreateObject("WMOTOOLLib.WMFileIO") ' New WMOTOOLLib.WMFileIO - _logger.Debug("(Export_WMFile)ExportFileIO created...") - ' Stream Interface bereitstellen - oWMObject.LockFor(WMObjectEditModeFileSystem) - Try - If Not oWMObject.aLocked Then - oWMObject.lock() - End If - Catch ex As Exception - _logger.Error(ex) - Return False - End Try - - Dim oWMStream = oWMObject.OpenStream("BinaryObject", WMObjectEditModeTypedData) - '### VERSIONIERUNG ### - Dim version As Integer = 2 - 'Dim Stammname As String = System.IO.Path.GetFileNameWithoutExtension(Quelle) - Dim Filename = oWMObject.aName.Substring(0, oWMObject.aName.LastIndexOf(".")) - Dim Extension = oWMObject.aName.Substring(oWMObject.aName.LastIndexOf(".")) - Dim tempFilename As String = Exportpath & Filename & Extension - 'Überprüfen ob File existiert - Do While IO.File.Exists(tempFilename) = True - tempFilename = Exportpath & Filename & "_" & version & Extension - version = version + 1 - Loop - _logger.Debug("Exportfilename is: " & tempFilename) - ' den Dateiinhalt der neuen Datei zuweisen - ExportFileIO.aWMStream = oWMStream - ExportFileIO.bstrOriginalFileName = tempFilename - 'Das eigentliche kopieren - ExportFileIO.ExportOriginal(True) - ' close the windream file stream - oWMStream.Close() - oWMObject.Save() - oWMObject.unlock() - _logger.Info($"WMFile has been exported to {tempFilename} ") - - Return True - Catch ex As Exception - _logger.Error(ex) - Return False - End Try - End Function - Public Function Export_WMFile_DocID(WMPath As String, Exportpath As String, DocId As Integer) - Try - - - If Not Exportpath.EndsWith("\") Then - Exportpath &= "\" - End If - Dim Extension = WMPath.Substring(WMPath.LastIndexOf(".")) - Dim oTempFilename As String = Exportpath & DocId & Extension - _logger.Info($"(Export_WMFile_DocID)Working on file [{WMPath}] ") - - If IO.File.Exists(oTempFilename) Then - _logger.Info($"(Export_WMFile_DocID) DocID [{DocId}] already existing!! No action necessary!") - Return True - End If - - Dim oWMObject As WMObject - - - - Try - oWMObject = GetFileByPath(WMPath) - - Catch ex As Exception - _logger.Error(ex) - _logger.Warn("No object created: " & WMPath) - Return False - End Try - Dim ExportFileIO = New WMOTOOLLib.WMFileIO ' CreateObject("WMOTOOLLib.WMFileIO") ' New WMOTOOLLib.WMFileIO - _logger.Debug("(Export_WMFile_DocID)ExportFileIO created...") - Dim oWMStream = oWMObject.OpenStream("BinaryObject", 1) - '### VERSIONIERUNG ### - Dim version As Integer = 2 - - _logger.Debug($"Checking (FileExists) on [{oTempFilename}]... ") - 'Überprüfen ob File existiert - Do While IO.File.Exists(oTempFilename) = True - oTempFilename = Exportpath & DocId & "_" & version & Extension - version = version + 1 - Loop - _logger.Debug($"(Export_WMFile_DocID)Exportfilename is [{oTempFilename}] ") - ' den Dateiinhalt der neuen Datei zuweisen - ExportFileIO.aWMStream = oWMStream - ExportFileIO.bstrOriginalFileName = oTempFilename - 'Das eigentliche kopieren - ExportFileIO.ExportOriginal(True) - - Dim oCounter = 0 - Dim oError As Boolean = False - Do While IO.File.Exists(oTempFilename) = False - oCounter += 1 - If oCounter = 30000 Then - _logger.Warn($"WMStream took too long...Check the file [{WMPath}]") - oError = True - Exit Do - End If - Loop - If oError = True Then - Return False - End If - - - 'close the windream file stream - oWMStream.Close() - _logger.Info($"WMFile DocID [{DocId}] has been exported to [{oTempFilename}]") - Return True - Catch ex As Exception - _logger.Error(ex) - _logger.Info("Unexpected error in Export_WMFile: " & ex.Message) - Return False - End Try - End Function - Public Function VersionWMFilename(pPath As String, pExt As String) - Return _fileSystem.GetVersionedFilename(pPath) - - 'Dim rNewFilepath As String = pPath - 'pPath = GetNormalizedPath(pPath) - 'Dim oPath = pPath.Substring(0, pPath.LastIndexOf("\")) - 'Dim oFilename = pPath.Substring(pPath.LastIndexOf("\") + 1, pPath.Length - pPath.LastIndexOf("\") - 1) - 'Dim oCheck = oFilename - 'Dim oSplit As List(Of String) = oFilename.Split("~").ToList() - 'oFilename = oFilename.Replace(pExt, "") - 'Dim oCount As Integer = 2 - 'Do While TestFileExists(rNewFilepath) = True - ' oFilename = oFilename.Replace(pExt, "") - ' Dim oVersion = "~" + (oCount - 1).ToString - ' oFilename = oFilename.Replace(oVersion, "") - ' oFilename = oFilename & "~" & oCount & pExt - ' oCount += 1 - ' rNewFilepath = oPath + "\" + oFilename - 'Loop - 'Return rNewFilepath - End Function - Public Function TestFolderExists(Path As String) As Boolean - Return TestObjectExists(GetNormalizedPath(Path), WMEntityFolder) - End Function - - Public Function TestFileExists(Path As String) As Boolean - Return TestObjectExists(GetNormalizedPath(Path), WMEntityDocument) - End Function - - Public Function TestUserExists(Username As String) As Boolean - Return TestObjectExists(Username, WMEntityUser) - End Function - - Public Function TestGroupExists(Groupname As String) As Boolean - Return TestObjectExists(Groupname, WMEntityGroups) - End Function - - Public Function TestIndexTypeIsVectorIndex(IndexType As Integer) As Boolean - Return Helpers.IsVectorIndex(IndexType) - End Function - - Public Function TestIndexNameIsVectorIndex(IndexName As String) As Boolean - Dim oIndexType As Integer = GetIndexType(IndexName) - Return Helpers.IsVectorIndex(oIndexType) - End Function -#End Region - -#Region "Private Methods" - Private Function GetNormalizedBasePath(BasePath As String) As String - If BasePath.EndsWith("\") Then - Return BasePath - Else - Return BasePath & "\" - End If - End Function - - Private Function GetObjectTypes() As WMObjects - Dim oObjectTypes As WMObjects - - Try - oObjectTypes = Session.GetWMObjectTypes(WMEntityDocument) - Return oObjectTypes - Catch ex As Exception - _logger.Error(ex) - Return Nothing - End Try - End Function - - Private Function GetObjectByName(ObjectName As String, ObjectType As WMEntity) As WMObject - If TestSessionLoggedIn() = False Then - Return Nothing - End If - - If TestObjectExists(ObjectName, ObjectType) = False Then - _logger.Warn("GetObjectByName: Object {0} does not exist!", ObjectName) - Return Nothing - End If - - Try - Dim oWMObject As WMObject = Session.GetWMObjectByName(ObjectType, ObjectName) - Return oWMObject - Catch ex As Exception - _logger.Error(ex) - Return Nothing - End Try - End Function - - Private Function GetObjectByPath(ObjectPath As String, ObjectType As WMEntity) As WMObject - If TestSessionLoggedIn() = False Then - Return Nothing - End If - - If TestObjectExists(ObjectPath, ObjectType) = False Then - _logger.Warn("GetObjectByPath: Object {0} does not exist!", ObjectPath) - Return Nothing - End If - - Try - Dim oNormalizedPath = GetNormalizedPath(ObjectPath) - Dim oWMObject As WMObject = Session.GetWMObjectByPath(ObjectType, oNormalizedPath) - Return oWMObject - Catch ex As Exception - _logger.Error(ex) - Return Nothing - End Try - End Function - - Private Function TestSessionLoggedIn() As Boolean - Try - If Session.aLoggedin Then - Return True - Else - _logger.Warn("There is no active WM-Session for user {0}", _sessionUsername) - Return False - End If - Catch ex As Exception - _logger.Error(ex) - Return False - End Try - End Function - - Private Function TestObjectExists(ObjectName As String, ObjectType As WMEntity) As Boolean - If TestSessionLoggedIn() = False Then - Return False - End If - Try - Dim oObjectId = 0 - Dim oObjectDbId = 0 - - Return Session.WMObjectExists(ObjectType, ObjectName, oObjectId, oObjectDbId) - Catch ex As Exception - _logger.Error(ex, "Error while checking existence of WMObject {0} of type {1}", ObjectName, ObjectType.ToString) - Return False - End Try - End Function -#End Region -End Class - - diff --git a/Modules.Windream/Windream.vbproj b/Modules.Windream/Windream.vbproj deleted file mode 100644 index b9ded2b2..00000000 --- a/Modules.Windream/Windream.vbproj +++ /dev/null @@ -1,160 +0,0 @@ - - - - - Debug - AnyCPU - {4C86DF8F-A280-40D4-85B0-10B1BF66C15C} - Library - DigitalData.Modules.Windream - DigitalData.Modules.Windream - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Windream.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Windream.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WINDREAMLib.dll - False - - - P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMCNNCTDLLLib.dll - True - - - P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOSRCHLib.dll - True - - - P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOTOOLLib.dll - True - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {991d0231-4623-496d-8bd0-9ca906029cbc} - Filesystem - - - {d3c8cfed-d6f6-43a8-9bdf-454145d0352f} - Language - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - - {25B51999-6DCA-11D4-B815-00104BB52DEA} - 1 - 0 - 0 - tlbimp - False - True - - - - \ No newline at end of file diff --git a/Modules.Windream/Windream_alt.vb b/Modules.Windream/Windream_alt.vb deleted file mode 100644 index 14e77697..00000000 --- a/Modules.Windream/Windream_alt.vb +++ /dev/null @@ -1,1214 +0,0 @@ -Imports WINDREAMLib -Imports WINDREAMLib.WMCOMEvent -Imports WINDREAMLib.WMEntity -Imports WINDREAMLib.WMObjectEditMode -Imports WINDREAMLib.WMSearchOperator -Imports WINDREAMLib.WMSearchRelation -Imports WMOBRWSLib -Imports WMOSRCHLib -Imports WMCNNCTDLLLib -Imports WMOTOOLLib -Public Class Windream_alt - Inherits Constants -#Region "+++++ Variables +++++" - Private Shared Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger - - Private ServerBrowser As IServerBrowser - - Private CurrentController As WMOSearchController - Private CurrentSession As WMSession - Private CurrentConnect As WMConnect - Private CurrentServer As String - Private CurrentObjecttypes As WMObjects - - Public ReadOnly Property ReconnectSession As Boolean - Public ReadOnly Property DriveLetter As String - Public ReadOnly Property Support64Bit As Boolean - Public Property LoggedInSession As Boolean = False -#End Region -#Region "+++++ Init +++++" - ''' - ''' Initializes windream and creates a windream session with the actual user - ''' - ''' - Public Sub New( - Optional DriveLetter As String = "W", - Optional ReconnectSession As Boolean = False, - Optional Support64Bit As Boolean = False, - Optional ServerName As String = Nothing, - Optional UserName As String = Nothing, - Optional UserPass As String = Nothing, - Optional UserDomain As String = Nothing - ) - Try - Me.DriveLetter = DriveLetter - Me.ReconnectSession = ReconnectSession - Me.Support64Bit = Support64Bit - - Dim session As WMSession = NewSession(ServerName, UserName, UserPass, UserDomain) - - If session Is Nothing Then - Throw New Exception("Login failed") - End If - - CurrentSession = session - CurrentServer = ServerName - CurrentObjecttypes = GetObjectTypes() - - Catch ex As Exception - Logger.Error(ex) - End Try - End Sub - - Public Function NewSession(Optional serverName As String = Nothing) As WMSession - Dim browser As ServerBrowser - Dim connect As WMConnect - Dim session As WMSession - Dim credentials As WMUserIdentity - - Try - browser = New ServerBrowser() - connect = New WMConnect() - Logger.Info("Successfully created windream objects") - Catch ex As Exception - Logger.Error(ex, "Error while creating windream objects") - Return Nothing - End Try - - Try - If serverName Is Nothing OrElse serverName.Length = 0 Then - serverName = browser.GetCurrentServer() - End If - Catch ex As Exception - Logger.Error(ex, "Error while getting current server") - Return Nothing - End Try - - Try - credentials = New WMUserIdentity() With { - .aServerName = serverName - } - Catch ex As Exception - Logger.Error(ex, "Error while creating user identity") - Return Nothing - End Try - - Try - session = connect.Login(credentials) - 'LoggedInSession = True - CurrentServer = serverName - - Return session - Catch ex As Exception - Logger.Error(ex, "Error while logging in") - Return Nothing - End Try - End Function - - Public Function NewSession(Optional serverName As String = Nothing, Optional userName As String = Nothing, Optional password As String = Nothing, Optional domain As String = Nothing) As WMSession - Dim browser As ServerBrowser - Dim connect As WMConnect - Dim session As WMSession - Dim credentials As WMUserIdentity - - Dim impersonation As Boolean - Dim serverNameFromClient As Boolean - - Try - browser = New ServerBrowser() - connect = New WMConnect() - Logger.Info("Successfully created windream objects") - Catch ex As Exception - Logger.Error(ex, "Error while creating windream objects") - Return Nothing - End Try - - ' If no server was supplied, try to get the current server set in the client - Try - If serverName Is Nothing OrElse serverName.Length = 0 Then - serverName = browser.GetCurrentServer - serverNameFromClient = True - Else - serverNameFromClient = False - End If - Catch ex As Exception - Logger.Error(ex, "Error while getting Servername") - Return Nothing - End Try - - Logger.Info("Servername: {0}", serverName) - Logger.Info("Servername aquired from client: {0}", serverNameFromClient) - - 'TODO: Test connection to windream server - - ' If username, password and domain are set, login with impersonation - ' Else, login with current credentials - If userName IsNot Nothing And password IsNot Nothing And domain IsNot Nothing Then - impersonation = True - credentials = New WMUserIdentity() With { - .aServerName = serverName, - .aUserName = userName, - .aPassword = password, - .aDomain = domain - } - - connect.ModuleId = 9 - - Logger.Info("Impersonated Login: True") - Logger.Info("Username: {0}", userName) - Logger.Info("Domain: {0}", domain) - Else - impersonation = False - credentials = New WMUserIdentity() With { - .aServerName = serverName - } - - Logger.Info("Impersonated Login: False") - Logger.Info("Username: {0}", Environment.UserName) - Logger.Info("Domain: {0}", Environment.UserDomainName) - End If - - Try - session = connect.Login(credentials) - Catch ex As Exception - Logger.Error(ex, "Error while logging in") - Return Nothing - End Try - - Try - ' Standardmässig hinterlegen dass abgelegte Dateien keine Indexmaske öffnet - session.SwitchEvents(WMCOMEventWMSessionNeedIndex, False) - Catch ex As Exception - Logger.Error(ex, "Could not SwitchEvents") - Return Nothing - End Try - - If session.aLoggedin = False Then - Logger.Warn("Session created but user {0} could not be logged in", Environment.UserName) - Return Nothing - End If - - Return session - End Function - - - Private Function GetObjectTypes() As WMObjects - Dim objectTypes As WMObjects - - Try - objectTypes = CurrentSession.GetWMObjectTypes(WMEntityDocument) - Return objectTypes - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - End Function - - ''' - ''' Returns all Objecttypes of current server as list of strings - ''' - ''' List of String of all objecttypes - ''' - Public Function GetObjecttypeNames() As List(Of String) - Dim objectTypes As New List(Of String) - - Try - For i As Integer = 0 To CurrentObjecttypes.Count - objectTypes.Add(CurrentObjecttypes.Item(i).aName) - Next - Return objectTypes - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - End Function - - Private Function NormalizePath(path As String) - Dim normalizedPath = path - - If Not path.StartsWith("\") And path.ToUpper().StartsWith(DriveLetter.ToUpper) Then - normalizedPath = path.Substring(2) - End If - - Return normalizedPath - End Function - - - ''' - ''' Creates a windream session with the current user and the current server - ''' - ''' Returns true when created, false if not - ''' - 'Public Function NewSession() As Boolean - ' Try - ' ServerBrowser = New ServerBrowser() - ' CurrentServer = ServerBrowser.GetCurrentServer - ' Catch ex As Exception - ' Logger.Error(ex, "Could not create ServerBrowser") - ' Return False - ' End Try - - ' Try - ' ' Create Connect Object for Session - ' CurrentConnect = New WMConnect - ' Catch ex As Exception - ' Logger.Error(ex, "Could not create WMConnect") - ' Return False - ' End Try - - ' Try - ' ' Create session object with severname set - ' CurrentSession = CreateObject("Windream.WMSession", ServerBrowser.GetCurrentServer) - ' Catch ex As Exception - ' Logger.Error(ex, "Could not create WMConnect") - ' Return False - ' End Try - - ' Try - ' CurrentConnect.LoginSession(CurrentSession) - ' LoggedInSession = True - ' Catch ex As Exception - ' Logger.Error(ex, "Could not login session") - ' Return False - ' End Try - - ' Try - ' ' Standardmässig hinterlegen dass abgelegte Dateien keine Indexmaske öffnet - ' CurrentSession.SwitchEvents(WMCOMEventWMSessionNeedIndex, False) - ' Catch ex As Exception - ' Logger.Error(ex, "Could not SwitchEvents") - ' Return False - ' End Try - - ' If TestLoggedInSession() = False Then - ' Logger.Warn("Session created but user {0} could not be logged in", Environment.UserName) - ' Return False - ' End If - - ' Return True - 'End Function -#End Region -#Region "+++++ New +++++" - ''' - ''' Creates a folder in windream. All folder-parts will be checked - ''' - ''' full path of new folder - ''' Returns true when folder was created, false if not - ''' - Public Function NewFolder(ByVal folderpath As String) - Try - If TestLoggedInSession() = False Then - Return False - End If - folderpath = NormalizePath(folderpath) - Dim folders() As String = folderpath.Split("\") - For Each folder As String In folders - Dim WMObject As WINDREAMLib.WMObject - If TestFolderExists(folder) = False Then - Try - WMObject = CurrentSession.GetNewWMObjectFS(WMEntityFolder, folder, WMObjectEditModeNoEdit) - Catch ex As Exception - Logger.Error(ex) - 'clsLogger.Add("Could not create WMObject for folderpath '" & folder & "': " & ex.Message, True) - Return False - End Try - - End If - Next - Return True - Catch ex As Exception - Logger.Error(ex) - 'clsLogger.Add("Unexpected error in NewFolder: " & ex.Message, True) - Return False - End Try - End Function - ''' - ''' Indexes the file with the given values - ''' - ''' full filepath - ''' Name of the index - ''' values as array - ''' Returns true when folder was created, false if not - ''' - Public Function NewIndexFile(WMFile As String, ByVal indexname As String, ByVal aValues() As String) As Boolean - If TestLoggedInSession() = False Then - Return False - End If - Dim oWMFile As WMObject = GetWMObjectForFile(WMFile) - If IsNothing(oWMFile) Then - Return False - End If - Dim vektInsState As Integer = 1 - Try - If Not oWMFile.aLocked Then - oWMFile.lock() - Else - Logger.Info("WMDoc is locked already!") - Return False - End If - - - If aValues.Length = 1 And aValues(0) = "" Then - Logger.Info("Indexvalue is empty - No indexing") - - Return False - End If - Logger.Info("Indexing of index '" & indexname) - - Dim oWMType - Try - ' das entsprechende Attribut aus windream auslesen - Dim oAttribute = CurrentSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, indexname) - ' den Variablentyp (String, Integer, ...) auslesen - oWMType = oAttribute.GetVariableValue("dwAttrType") - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - - ' wenn in aValues an Position i ein Wert steht - Dim i As Integer = 0 - Dim value = aValues(i) - - Dim oWMValueConverted = Nothing - - Dim vektor As Boolean = False - 'Den Typ des Index-Feldes auslesen - Logger.Info("type of windreamIndex: " & oWMType.ToString) - Select Case (oWMType) - - Case INDEX_TYPE_STRING - oWMValueConverted = CStr(value) - Case INDEX_TYPE_INTEGER - value = value.ToString.Replace(" ", "") - value = value.ToString.Replace(" ", "") - oWMValueConverted = CInt(value) - Case INDEX_TYPE_FLOAT - value = value.ToString.Replace(" ", "") - oWMValueConverted = CDbl(value) - Case INDEX_TYPE_FIXED_POINT - value = value.ToString.Replace(" ", "") - oWMValueConverted = CDbl(value) - Case INDEX_TYPE_BOOLEAN - oWMValueConverted = CBool(value) - Case INDEX_TYPE_DATE - 'Dim _date As Date = value - oWMValueConverted = value - Case INDEX_TYPE_TIME - oWMValueConverted = CDbl(value) - Case INDEX_TYPE_CURRENCY - 'Wegen currency muß ein eigenes Objekt vom typ Variant erzeugt werden - Dim aValueWrapper As System.Runtime.InteropServices.CurrencyWrapper = New System.Runtime.InteropServices.CurrencyWrapper(CDec(value)) - oWMValueConverted = aValueWrapper - Case INDEX_TYPE_TIME - 'If ((value)) Then - ' oWMValueConverted = CDate(value) - 'Else - ' oWMValueConverted = "" - 'End If - 'Dim _date As Date = value - oWMValueConverted = oWMValueConverted '*_date.ToShortTimeString - Case INDEX_TYPE_FLOAT - oWMValueConverted = CStr(value) - Case INDEX_TYPE_VARIANT - - oWMValueConverted = CStr(value) - Case INDEX_TYPE_FULLTEXT - oWMValueConverted = CStr(value) - Case 4097 - 'Vektor alphanumerisch - vektor = True - Case 4098 - 'Vektor Numerisch - vektor = True - Case 4099 - 'Vektor Kommazahl - vektor = True - Case 4100 - 'Vektor Kommazahl - vektor = True - Case 4101 - 'Vektor Kommazahl - vektor = True - Case 4103 - 'Vektor DateTime - vektor = True - Case 4107 - vektor = True - Case 36865 - 'Vektor Kommazahl - vektor = True - Case Else - oWMValueConverted = "" - End Select - If vektor = False Then - If oWMValueConverted.ToString Is Nothing = False Then - Logger.Info("Converted value is: " & oWMValueConverted.ToString) - End If - End If - '############################################################################################ - '####################### Der eigentliche Indexierungsvorgang ################################ - '############################################################################################ - If vektor = False Then - Try - If oWMValueConverted.ToString Is Nothing = False Then - Logger.Info("Now: oWMFile.SetVariableValue(" & indexname & ", " & oWMValueConverted & ")") - oWMFile.SetVariableValue(indexname, oWMValueConverted) - 'Die Datei speichern - oWMFile.Save() - Logger.Info("Index has been written!") - Else - Logger.Info("No indexvalue exists!") - End If - Catch ex As Exception - Logger.Error(ex) - oWMFile.Save() - oWMFile.unlock() - Return False - End Try - - Else - Logger.Info("Vectorfield: Preparing of Array!") - Dim myArray() - Dim Anzahl As Integer = aValues.Length - 'Vektorfeld wird mit EINEM Wert gefüllt - If Anzahl = 1 Then - Logger.Info("Vectorfield will be filled with ONE VALUE!") - ReDim myArray(0) - myArray(0) = Helpers.ConvertVectorType(oWMType, value) - 'Jetzt überprüfen ob Werte in Vektorfeld angefügt oder überschrieben werden sollen - Logger.Info("Converted Value: " & myArray(0).ToString) - Dim VektorArray() - VektorArray = Return_VektorArray(oWMFile, indexname, myArray, oWMType) - If VektorArray Is Nothing = False Then - ReDim myArray(VektorArray.Length - 1) - Array.Copy(VektorArray, myArray, VektorArray.Length) - 'Jetzt die Nachindexierung - oWMFile.SetVariableValue(indexname, myArray) ' - Logger.Info("Vectorindex has been written!") - 'Die Änderungen festsschreiben/speichern - oWMFile.Save() - End If - - End If - - End If - i += 1 - - oWMFile.unlock() - Logger.Info("...and unlock") - Return True - Catch ex As Exception - Logger.Error(ex) - oWMFile.Save() - oWMFile.unlock() - Return False - End Try - End Function - Private Function NewLockWMFile(oWMFile As WMObject) As Boolean - Try - oWMFile.lock() - Return True - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - End Function - ''' - ''' Sets the folder-objecttype. - ''' - ''' full path of folder - ''' Obcjectype Name - ''' Returns true when Otype was set, false if not - ''' - Public Function NewObjecttypeForFolder(folderpath As String, folderObjecttype As String) As Boolean - Try - If TestLoggedInSession() = False Then - Return False - End If - Dim result As Boolean = False - Dim WMFolder As WINDREAMLib.WMObject - folderpath = NormalizePath(folderpath) - - If TestFolderExists(folderpath) = True Then - WMFolder = CurrentSession.GetWMObjectByPath(WMEntityFolder, folderpath) - Try - ' die Datei sperren - WMFolder.lock() - Catch ex As Exception - ' nichts tun (Datei ist bereits gesperrt) - End Try - - ' wenn der Datei noch kein Dokumenttyp zugewiesen wurde - If WMFolder.aObjectType.aName = "Standard" Then - - ' ihr den entsprechenden Dokumenttyp zuweisen - WMFolder.aObjectType = CurrentSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityObjectType, folderObjecttype) - ' WMObject.aObjectType = Me.selectedProfile.Dokumenttyp - Logger.Info("Objecttype has been set") - result = True - Else - If WMFolder.aObjectType.aName <> "Standard" Then - Logger.Warn("An Objecttype has already been set!") - End If - End If - - Try - WMFolder.Save() - Catch ex As Exception - ' wenn es einen Fehler beim speichern gab, dann konnte auch kein Dokumenttyp gesetzt werden -> es kann also auch keine - ' Indexierung stattfinden und die Indexierung muss nicht fortgesetzt werden - Return False - End Try - - Try - WMFolder.unlock() - Catch ex As Exception - ' wenn das entsperren nicht geklappt hat, dann war die Datei auch nicht gesperrt - End Try - End If - Return result - - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - End Function - ''' - ''' Creates a new version of the file - ''' - ''' full path to the file - ''' Comment - ''' Returns true when version was created, false if not - ''' - Public Function NewVersion(ByVal WMPath As String, ByVal Comment As String) - Try - If TestLoggedInSession() = False Then - Return False - End If - WMPath = NormalizePath(WMPath) - - Dim WMObject As WMObject '= CreateObject("WINDREAMLib.WMObject") 'New WINDREAMLib.WMObject - Try - WMObject = CurrentSession.GetWMObjectByPath(WMEntityDocument, WMPath) 'WINDREAMLib.WMEntity.WMEntityDocument - Catch ex As Exception - Logger.Warn("Could not create WMObject in Create_Version for file '" & WMPath & "': " & ex.Message) - Return False - End Try - WMObject.CreateVersion2(False, "HISTORY_New_From_Version", Comment) - Return True - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - End Function -#End Region -#Region "+++++ Get +++++" - ''' - ''' Returns all choicelists - ''' - ''' Choicelists as List of Strings or empty list if no choice lists are found - Public Function GetChoiceLists() As List(Of String) - Dim items As New List(Of String) - - If TestLoggedInSession() = False Then - Return items - End If - - Try - Dim choiceLists As WMObjects - Dim choiceList As IWMObject2 - 'load list of choicelists - choiceLists = CurrentSession.GetAllObjects(WMEntityChoiceList) - - For Each choiceList In choiceLists - items.Add(choiceList.aName) - Next - - Return items - Catch ex As Exception - Logger.Error(ex) - Return items - End Try - End Function - - ''' - ''' Returns all indices for an objecttype - ''' - ''' Name of objecttype - ''' Names of indices as list of String - ''' - Public Function GetIndicesByObjecttype(ByVal ObjecttypeName As String) As List(Of String) - Try - If TestLoggedInSession() = False Then - Return Nothing - End If - - Dim oObjectType As WMObject - Dim oIndexAttributes As WMObjectRelation - Dim oIndexAttribute As WMObject - Dim oIndex As WMObject - Dim oRelProperties As WMObjectRelation - ' den Objekttyp laden - oObjectType = CurrentSession.GetWMObjectByName(WMEntityObjectType, ObjecttypeName) - - ' Beziehung zu Indizes des Objekttyp auslesen - oIndexAttributes = oObjectType.GetWMObjectRelationByName("TypeAttributes") - - ' Array für Indizes vorbereiten - 'Dim aIndexNames(oIndexAttributes.Count - 1) As String - Dim indexNames As New List(Of String) - ' alle Indizes durchlaufen - For j As Integer = 0 To oIndexAttributes.Count - 1 - ' aktuellen Index auslesen - oIndexAttribute = oIndexAttributes.Item(j) - - ' Eigenschaften des Index auslesen - oRelProperties = oIndexAttribute.GetWMObjectRelationByName("Attribute") - - ' Index aus den Eigenschaften auslesen - oIndex = oRelProperties.Item(0) - - ' Indexname speichern - 'aIndexNames(j) = oIndex.aName - indexNames.Add(oIndex.aName) - Next - - ' Indexarray zurückgeben - 'Return aIndexNames - Return indexNames - - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - End Function - - ''' - ''' Returns all items of a choicelist - ''' - ''' name of choicelist - ''' Items as list of String - ''' - Public Function GetChoicelistItems(ByVal NameChoicelist As String) As List(Of String) - Dim items As New List(Of String) - - If TestLoggedInSession() = False Then - Return Nothing - End If - - Dim choiceList As WMObject - - ' Try to get the choicelist first and abort if an error occurs - Try - Dim session As IWMSession2 = DirectCast(CurrentSession, IWMSession2) - choiceList = session.GetWMObjectByName(WMEntityChoiceList, NameChoicelist) - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - - ' Try to get choicelist items - Try - Dim values As Object = choiceList.GetVariableValue("vItems") - - ' If values is nothing, the list is empty - If values Is Nothing Then - Return items - End If - - For Each value In values - items.Add(value) - Next - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - - Return items - End Function - - ''' - ''' Returns the result of windream-search - ''' - ''' filepath of windreamSearch-file - ''' Name of the Docid Index - ''' Returns datatable - ''' - Public Function GetSearchDocuments(ByVal wdfLocation As String, NameIndexDocID As String) As DataTable - Dim dtresult As New DataTable - dtresult.Columns.Add("DOC_ID", GetType(Integer)) - dtresult.Columns.Add("PATH", GetType(String)) - If TestLoggedInSession() = False Then - Return dtresult - End If - If TestWMFileExists(wdfLocation) = False Then - Return dtresult - End If - Try - Dim ProfileName = wdfLocation.Substring(wdfLocation.LastIndexOf("\") + 1) - Dim ProfilePath = wdfLocation.Substring(0, wdfLocation.Length - ProfileName.Length) - - CurrentController = New WMOSearchController - CurrentController.CheckSearchProfile(wdfLocation.ToLower) - Dim suchTyp = CurrentController.SearchProfileTargetProgID - Dim ExSettings As Object - Dim oSearch As Object - ExSettings = CurrentController.SearchProfileExSettings - If ExSettings = 0 Then ExSettings = 7 - - Dim srchQuick As WMOSRCHLib.WMQuickSearch = CreateObject("WMOSrch.WMQuickSearch") - Dim srchIndex As WMOSRCHLib.WMIndexSearch = CreateObject("WMOSrch.WMIndexSearch") - Dim srchObjectType As WMOSRCHLib.WMObjectTypeSearch = CreateObject("WMOSrch.WMObjectTypeSearch") - Dim suchTyp1 = suchTyp.ToString.ToUpper - '' Der öffentliche Member CheckSearchProfile für den Typ IWMQuickSearch7 wurde nicht gefunden. [Microsoft.VisualBasic] => GetSearchDocuments() - Select Case suchTyp.ToString.ToUpper - Case "WMOSRCH.WMQUICKSEARCH" - srchQuick.WMSession = CreateObject("Windream.WMSession", CurrentServer) - - CurrentConnect.LoginSession(srchQuick.WMSession) - - srchQuick.ClearSearch() - srchQuick.SearchProfilePath = ProfilePath - srchQuick.LoadSearchProfile(ProfileName) - - oSearch = srchQuick.GetSearch() - - Case "WMOSRCH.WMINDEXSEARCH" - srchIndex.WMSession = CreateObject("Windream.WMSession", CurrentServer) - - CurrentConnect.LoginSession(srchIndex.WMSession) - - srchIndex.ClearSearch() - srchIndex.SearchProfilePath = ProfilePath - srchIndex.LoadSearchProfile(ProfileName) - - oSearch = srchIndex.GetSearch() - - Case "WMOSRCH.WMOBJECTTYPESEARCH" - srchObjectType.WMSession = CreateObject("Windream.WMSession", CurrentServer) - - CurrentConnect.LoginSession(srchObjectType.WMSession) - - srchObjectType.ClearSearch() - srchObjectType.SearchProfilePath = ProfilePath - srchObjectType.LoadSearchProfile(ProfileName) - - oSearch = srchObjectType.GetSearch() - - Case Else - Logger.Warn("No valid WM-SearchType") - Return dtresult - End Select - Dim WMObjects As Object - WMObjects = oSearch.Execute - 'If returnDT = True Then - If WMObjects.Count > 0 Then - - For Each dok As WMObject In WMObjects - Dim path As String = dok.aPath - Dim DOC_ID = dok.GetVariableValue(NameIndexDocID) - Logger.Info("Adding DocInfo for DocID: " & DOC_ID.ToString) - dtresult.Rows.Add(DOC_ID, path) - - Next - dtresult.AcceptChanges() - End If - Return dtresult - Catch ex As Exception - Logger.Error(ex) - Return dtresult - End Try - End Function - ''' - ''' Returns a windream-type as Integer. - ''' - ''' Name of indexfield - ''' Returns integer, which describes the type - ''' - Public Function GetTypeOfIndexAsInt(ByVal indexname As String) As Integer - Try - If TestLoggedInSession() = False Then - Return False - End If - Dim oAttribute = CurrentSession.GetWMObjectByName(WMEntityAttribute, indexname) - Dim vType = oAttribute.GetVariableValue("dwAttrType") - Return vType - Catch ex As Exception - Return Nothing - End Try - End Function - ''' - ''' Returns the value(s) for an index as a datatable - ''' - ''' filepath of windream-file - ''' Name of the index - ''' Datatable - ''' - Public Function GetValueforIndex(ByVal WMFile As String, ByVal NameIndex As String) As DataTable - Dim dt As New DataTable - dt.Columns.Add("RESULT", GetType(String)) - If TestLoggedInSession() = False Then - Return dt - End If - Try - - If Not WMFile.StartsWith("\") And WMFile.ToUpper.StartsWith(DriveLetter.ToUpper) Then - WMFile = WMFile.Substring(2) - End If - Dim WMObject As WINDREAMLib.WMObject '= CreateObject("WINDREAMLib.WMObject") 'New WINDREAMLib.WMObject - Try - WMObject = CurrentSession.GetWMObjectByPath(WINDREAMLib.WMEntity.WMEntityDocument, WMFile) 'WINDREAMLib.WMEntity.WMEntityDocument - Catch ex As Exception - Logger.Error(ex) - Return dt - End Try - - Dim result = WMObject.GetVariableValue(NameIndex) - If IsNothing(result) Then - Return Nothing - Else - If result.GetType.ToString.Contains("System.Object") Then - For Each val As String In result - dt.Rows.Add(val) - Next - dt.AcceptChanges() - Else - dt.Rows.Add(result) - End If - End If - Return dt - Catch ex As Exception - Logger.Error(ex) - Return dt - End Try - End Function - ''' - ''' Returns the values for a vektorfield plus the new ones - ''' - ''' windream-file as Object - ''' Name of the index - ''' Returns value as Datatable - ''' - Public Function Return_VektorArray(ByVal oDocument As WMObject, vktIndexName As String, arrIndexwerte As Object, vType As Object) - Try - If TestLoggedInSession() = False Then - Return False - End If - Dim missing As Boolean = False - Dim valueCount As Integer = 0 - Dim ValueArray() = Nothing - 'Jeden Wert des Vektorfeldes durchlaufen - Dim DT_RESULT = GetValueforIndex(oDocument.aPath, vktIndexName) - If DT_RESULT.Rows.Count > 0 Then - 'Erst die aktuellen Werte speichern und schreiben - For Each row As DataRow In DT_RESULT.Rows - - ReDim Preserve ValueArray(valueCount) - 'Den Wert im Array speichern - ValueArray(valueCount) = Helpers.ConvertVectorType(vType, row.Item(0)) - valueCount += 1 - Next - 'Jetzt die Neuen Werte auf Duplikate überprüfen - For Each NewValue As Object In arrIndexwerte - If NewValue Is Nothing = False Then - If ValueArray.Contains(NewValue) = False Then - 'Das Array anpassen - ReDim Preserve ValueArray(valueCount) - 'Den Wert im Array speichern - ValueArray(valueCount) = Helpers.ConvertVectorType(vType, NewValue) - valueCount += 1 - Else - Logger.Info("Value '" & NewValue.ToString & "' already existing in vectorfield(1)") - - End If - End If - Next - Else - Logger.Info(" vectorfield is empty....") - - 'Den/die Neuen Wert(e) anfügen - For Each NewValue As Object In arrIndexwerte - If NewValue Is Nothing = False Then - If ValueArray Is Nothing = False Then - If ValueArray.Contains(NewValue) = False Then - 'Das Array anpassen - ReDim Preserve ValueArray(valueCount) - 'Den Wert im Array speichern - ValueArray(valueCount) = Helpers.ConvertVectorType(vType, NewValue) - valueCount += 1 - Else - Logger.Info("Value '" & NewValue.ToString & "' already existing in vectorfield(2)") - - End If - Else 'Dererste Wert, also hinzufügen - 'Das Array anpassen - ReDim Preserve ValueArray(valueCount) - 'Den Wert im Array speichern - ValueArray(valueCount) = Helpers.ConvertVectorType(vType, NewValue) - valueCount += 1 - - End If - - - End If - Next - End If - - Return ValueArray - Catch ex As Exception - Logger.Error(ex) - End Try - End Function - ''' - ''' Returns a WMObject if file exists - ''' - ''' full path to the file - ''' Returns WMObject - ''' - Public Function GetWMObjectForFile(ByVal WMPath As String) As WMObject - Try - If TestLoggedInSession() = False Then - Return Nothing - End If - WMPath = NormalizePath(WMPath) - Dim oWMObject As WINDREAMLib.WMObject - Try - oWMObject = CurrentSession.GetWMObjectByPath(WINDREAMLib.WMEntity.WMEntityDocument, WMPath) - Catch ex As Exception - Logger.Warn("Could not create WMObject for file '" & WMPath & "': " & ex.Message) - Return Nothing - End Try - Return oWMObject - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - End Function -#End Region -#Region "+++++ Test +++++" - ''' - ''' Checks if the folder exists - ''' - ''' The path of the folder - ''' True if exists or false if not or error occured - ''' - Public Function TestFolderExists(folderpath As String) - Try - If TestLoggedInSession() = False Then - Return False - End If - folderpath = NormalizePath(folderpath) - Try - Dim exists = CurrentSession.WMObjectExists(WMEntityFolder, folderpath, 0, 0) - Return exists - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - Catch ex As Exception - Return False - End Try - End Function - ''' - ''' Checks wether file exists in windream - ''' - ''' full path to the file - ''' Returns true when file was deleted, false if not - ''' - Public Function TestWMFileExists(ByVal WMPath As String) - Try - If TestLoggedInSession() = False Then - Return False - End If - WMPath = NormalizePath(WMPath) - If IsNothing(GetWMObjectForFile(WMPath)) Then - Return False - Else - Return True - End If - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - End Function - - - Private Function TestLoggedInSession() As Boolean - Try - If CurrentSession.aLoggedin Then - Return True - Else - Logger.Warn("There is no active WM-SSession!") - Return False - End If - Catch ex As Exception - Return False - End Try - End Function - ''' - ''' Checks if user exists in windream. - ''' - ''' test username - ''' Returns true if exists, false if not - ''' - Public Function TestWMUSerExists(username As String) As Boolean - Try - If TestLoggedInSession() = False Then - Return False - End If - Return CurrentSession.WMObjectExists(WMEntityUser, username, 0, 0) - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - End Function - ''' - ''' Checks if group exists in windream. - ''' - ''' test username - ''' Returns true if exists, false if not - ''' - Public Function TestWMGroupExists(groupname As String) - Try - If TestLoggedInSession() = False Then - Return False - End If - Return CurrentSession.WMObjectExists(WMEntityGroups, groupname, 0, 0) - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - End Function -#End Region -#Region "+++++ Remove +++++" - ''' - ''' Deletes a file in windream including all preversions - ''' - ''' full path to the file - ''' Returns true when file was deleted, false if not - ''' - Public Function RemFile(ByVal WMPath As String) - Try - Const COL_Document_VersionID = "dwVersionID" - Const WMObjectPartVersion = 128 - Dim oUnexpected_Error As Boolean = False - WMPath = NormalizePath(WMPath) - Dim oWMObject = GetWMObjectForFile(WMPath) - If IsNothing(oWMObject) = False Then - Try - If (oWMObject.aPart And WMObjectPartVersion) Then - Dim oWMObjects As WMObjects - Dim oWMVersion As WMObject - Dim iCount As Integer - oWMObjects = oWMObject.aVersions - iCount = oWMObjects.Count - If iCount > 0 Then - For Each oWMVersion In oWMObjects - oWMVersion.Delete() - Logger.Info($">> Deleted version '{oWMVersion.GetVariableValue(COL_Document_VersionID)}' of file '{oWMVersion.aName}'!") - Next - End If - End If - Catch ex As Exception - Logger.Warn($"Unexpected Error in CheckingDeleting Prevesions: {ex.Message}") - oUnexpected_Error = True - End Try - If oUnexpected_Error = False Then - oWMObject.Delete() - Logger.Info($">> File '{oWMObject.aName}' has been deleted!") - Return True - Else - Return False - End If - Else - Return False - End If - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - End Function - ''' - ''' Removes the vektorlink from windream - ''' - ''' full path to the file - ''' Indexname of Vektor-Index - ''' Value which is to be deleted - ''' Returns true when indexing was successfull, false if not - ''' - Public Function REMOVE_VEKTOR_LINK(ByVal WMPath As String, vktIndexName As String, deleteValue As String) - Try - Logger.Info("Removing Value '" & deleteValue & "' of Index '" & vktIndexName & "' " & WMPath) - Dim oWMFile As WMObject = GetWMObjectForFile(WMPath) - If IsNothing(oWMFile) Then - Logger.Warn("Exit from REMOVE_VEKTOR_LINK...") - Return False - End If - Dim containsvalue As Boolean = False - Dim ValueArray() = Nothing - 'Jeden Wert des Vektorfeldes durchlaufen - Dim WMValue = oWMFile.GetVariableValue(vktIndexName) - If WMValue Is Nothing = False Then - 'Nochmals prüfen ob wirklich Array - If WMValue.GetType.ToString.Contains("System.Object") Then - ' das entsprechende Attribut aus windream auslesen - Dim oAttribute = CurrentSession.GetWMObjectByName(WMEntityAttribute, vktIndexName) - ' den Variablentyp (String, Integer, ...) auslesen - Dim vType = oAttribute.getVariableValue("dwAttrType") - Dim Anzahl As Integer = 0 - For Each WDValue As Object In WMValue - If WDValue Is Nothing = False Then - If WDValue = deleteValue Then - containsvalue = True - Logger.Info("The Index contains the value to be deleted!") - End If - If WDValue <> deleteValue Then - 'Erst die ALten Werte schreiben - ReDim Preserve ValueArray(Anzahl) - 'Den Wert im Array speichern - ValueArray(Anzahl) = Helpers.ConvertVectorType(vType, WDValue) - Anzahl += 1 - End If - End If - Next - Else - Logger.Warn("Index is not a vector") - Return False - End If - Else - Logger.Warn("oWMObject is nothing") - Return True - End If - - If containsvalue = True Then 'And Not IsNothing(ValueArray) - If NewLockWMFile(oWMFile) = False Then - Return False - End If - 'Indexiern des Vektorfeldes - oWMFile.SetVariableValue(vktIndexName, ValueArray) - ' die Indexinformationen des Dokuments speichern - oWMFile.Save() - Logger.Info("The new vectorvalues were saved!") - ' Unlock in einem unbehandelten Try-Block um Fehler abzufangen, - Try - ' die Sperrung des Dokuments aufheben - oWMFile.unlock() - - Catch ex As Exception - ' nichts tun (Datei war nicht gesperrt) - End Try - 'Zurückgeben - Return True - Else - Logger.Info("containsvalue is not true") - Return True - End If - - Catch ex As Exception - Logger.Error(ex) - Return False - End Try - End Function -#End Region -End Class diff --git a/Modules.Windream/packages.config b/Modules.Windream/packages.config deleted file mode 100644 index 63f3075e..00000000 --- a/Modules.Windream/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Modules.ZooFlow/AdHocWorkflow.vb b/Modules.ZooFlow/AdHocWorkflow.vb deleted file mode 100644 index 3eaf8d28..00000000 --- a/Modules.ZooFlow/AdHocWorkflow.vb +++ /dev/null @@ -1,5 +0,0 @@ -Public Class AdHocWorkflow - Public Property AHWF_CMD_LAYOUT_SELECT As String - Public Property AHWF_CMD_USR_SELECT As String - Public Property OBJECT_ID As Long -End Class diff --git a/Modules.ZooFlow/Constants.vb b/Modules.ZooFlow/Constants.vb deleted file mode 100644 index 41d86d27..00000000 --- a/Modules.ZooFlow/Constants.vb +++ /dev/null @@ -1,8 +0,0 @@ -Public Class Constants - Public Enum OperationMode - WithAppServer - NoAppServer - ZooFlow - None - End Enum -End Class diff --git a/Modules.ZooFlow/Environment.vb b/Modules.ZooFlow/Environment.vb deleted file mode 100644 index 2a010237..00000000 --- a/Modules.ZooFlow/Environment.vb +++ /dev/null @@ -1,10 +0,0 @@ -Imports DigitalData.Modules.Database - -Public Class Environment - Public Property User As State.UserState - Public Property Settings As State.SettingsState - Public Property Service As State.ServiceState - Public Property Database As MSSQLServer - Public Property DatabaseIDB As MSSQLServer - Public Property Modules As Dictionary(Of String, State.ModuleState) -End Class diff --git a/Modules.ZooFlow/My Project/Application.Designer.vb b/Modules.ZooFlow/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Modules.ZooFlow/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Modules.ZooFlow/My Project/Application.myapp b/Modules.ZooFlow/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules.ZooFlow/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules.ZooFlow/My Project/AssemblyInfo.vb b/Modules.ZooFlow/My Project/AssemblyInfo.vb deleted file mode 100644 index bab052d6..00000000 --- a/Modules.ZooFlow/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Modules.ZooFlow/My Project/Resources.Designer.vb b/Modules.ZooFlow/My Project/Resources.Designer.vb deleted file mode 100644 index 7f80f5d1..00000000 --- a/Modules.ZooFlow/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.ZooFlow.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Modules.ZooFlow/My Project/Resources.resx b/Modules.ZooFlow/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules.ZooFlow/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules.ZooFlow/My Project/Settings.Designer.vb b/Modules.ZooFlow/My Project/Settings.Designer.vb deleted file mode 100644 index 69590c62..00000000 --- a/Modules.ZooFlow/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.ZooFlow.My.MySettings - Get - Return Global.DigitalData.Modules.ZooFlow.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules.ZooFlow/My Project/Settings.settings b/Modules.ZooFlow/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules.ZooFlow/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules.ZooFlow/Params/Attribute.vb b/Modules.ZooFlow/Params/Attribute.vb deleted file mode 100644 index 3fc9052d..00000000 --- a/Modules.ZooFlow/Params/Attribute.vb +++ /dev/null @@ -1,14 +0,0 @@ -Public Class Attribute - Public Const TYPE_BIT = "BIT" - Public Const TYPE_FLOAT = "FLOAT" - Public Const TYPE_DECIMAL = "DECIMAL" - Public Const TYPE_DATE = "DATE" - Public Const TYPE_BIG_INTEGER = "BIG INTEGER" - Public Const TYPE_VECTOR_STRING = "VECTOR STRING" - - Public Property ID As Long - Public Property Title As String - Public Property TypeID As Long - Public Property TypeName As String - Public Property IsSystem As Boolean -End Class diff --git a/Modules.ZooFlow/Params/ClipboardWatcherParams.vb b/Modules.ZooFlow/Params/ClipboardWatcherParams.vb deleted file mode 100644 index e21ebdf5..00000000 --- a/Modules.ZooFlow/Params/ClipboardWatcherParams.vb +++ /dev/null @@ -1,10 +0,0 @@ -Imports System.Windows.Forms -Imports DigitalData.Modules.ZooFlow.Constants -Imports DigitalData.Modules.ZooFlow.Params - -Public Class ClipboardWatcherParams - Public ClipboardContents As String - Public MatchingProfiles As List(Of ProfileData) - Public MatchTreeView As TreeView - Public OperationModeOverride As OperationMode = OperationMode.None -End Class diff --git a/Modules.ZooFlow/Params/ProfileData.vb b/Modules.ZooFlow/Params/ProfileData.vb deleted file mode 100644 index 574a04e9..00000000 --- a/Modules.ZooFlow/Params/ProfileData.vb +++ /dev/null @@ -1,79 +0,0 @@ -Namespace Params - Public Class ProfileData - Public Guid As Integer - Public Regex As String - Public Name As String - Public Comment As String - Public ProfileType As Integer - - Public Processes As List(Of ProcessData) - Public Windows As List(Of WindowData) - Public Controls As List(Of ControlData) - - Public CountDocs As Integer = 0 - Public CountData As Integer = 0 - - Public IsMatched As Boolean = False - Public IsCatchAll As Boolean = False - - Public MatchedProcessID As Integer = 0 - Public MatchedWindowID As Integer = 0 - Public MatchedControlID As Integer = 0 - - Public SelectCommand As String - - Public ErrorMessage As String = "" - - Public Overrides Function Equals(obj As Object) As Boolean - Return Guid = DirectCast(obj, ProfileData).Guid - End Function - - Public Overrides Function GetHashCode() As Integer - Return Guid.ToString.GetHashCode() - End Function - End Class - - Public Class ProcessData - Public Guid As Integer - Public PROFILE_ID As Integer - Public ProcessName As String - Public IsMatched As Boolean = False - - Public Overrides Function Equals(obj As Object) As Boolean - Return Guid = DirectCast(obj, ProcessData).Guid - End Function - - Public Overrides Function GetHashCode() As Integer - Return Guid.ToString.GetHashCode() - End Function - End Class - Public Class WindowData - Public Guid As Integer - Public WindowProcessID As Integer - Public Title As String - Public Regex As String - Public Sequence As Integer - Public IsMatched As Boolean = False - - End Class - Public Class ControlData - Public Guid As Integer - Public WindowId As Integer - Public Description As String - Public Regex As String - Public AutomationId As String - Public ControlName As String - Public ProcessName As String - Public IsMatched As Boolean = False - Public TopLeft As ControlBounds - Public TopRight As ControlBounds - Public BottomLeft As ControlBounds - Public BottomRight As ControlBounds - End Class - Public Class ControlBounds - Public Top As Integer - Public Bottom As Integer - Public Left As Integer - Public Right As Integer - End Class -End Namespace \ No newline at end of file diff --git a/Modules.ZooFlow/State/ModuleState.vb b/Modules.ZooFlow/State/ModuleState.vb deleted file mode 100644 index 9f960d5f..00000000 --- a/Modules.ZooFlow/State/ModuleState.vb +++ /dev/null @@ -1,7 +0,0 @@ -Namespace State - Public Class ModuleState - Public Property HasAccess As Boolean - Public Property IsAdmin As Boolean - Public Property LoggedIn As Integer - End Class -End Namespace \ No newline at end of file diff --git a/Modules.ZooFlow/State/ServiceState.vb b/Modules.ZooFlow/State/ServiceState.vb deleted file mode 100644 index 5b00e66e..00000000 --- a/Modules.ZooFlow/State/ServiceState.vb +++ /dev/null @@ -1,11 +0,0 @@ -Imports DigitalData.Modules.EDMI.API - -Namespace State - Public Class ServiceState - Public Property IsOnline As Boolean = False - Public Property IsActive As Boolean = False - Public Property LastChecked As Date = Date.Now - Public Property Address As String = String.Empty - Public Property Client As Client = Nothing - End Class -End Namespace \ No newline at end of file diff --git a/Modules.ZooFlow/State/SettingsState.vb b/Modules.ZooFlow/State/SettingsState.vb deleted file mode 100644 index 6a9e50e6..00000000 --- a/Modules.ZooFlow/State/SettingsState.vb +++ /dev/null @@ -1,5 +0,0 @@ -Namespace State - Public Class SettingsState - Public GdPictureKey As String = String.Empty - End Class -End Namespace \ No newline at end of file diff --git a/Modules.ZooFlow/State/UserState.vb b/Modules.ZooFlow/State/UserState.vb deleted file mode 100644 index 27244026..00000000 --- a/Modules.ZooFlow/State/UserState.vb +++ /dev/null @@ -1,92 +0,0 @@ -Imports System.Threading - -Namespace State - ''' - ''' Helper Class to hold User State - ''' - Public Class UserState - Public Const LANG_DE_DE As String = "de-DE" - Public Const LANG_EN_US As String = "en-US" - - ''' - ''' Numeric UserId, ex. 1 - ''' - Public Property UserId As Integer - - ''' - ''' The windows username, ex. JenneJ - ''' - ''' - Public Property UserName As String - - ''' - ''' The user's surname, ex. Jenne - ''' - Public Property Surname As String - - ''' - ''' The user's given name, ex. Jonathan - ''' - Public Property GivenName As String - - ''' - ''' The shortname given to the user, ex. JJ - ''' - Public Property ShortName As String - - ''' - ''' The user's email address - ''' - Public Property Email As String - - ''' - ''' The user's windows machine name, ex. DD-PC-ENT04 - ''' - Public Property MachineName As String - - ''' - ''' The users preferred date format, ex. dd-MM-yyyy - ''' - Public Property DateFormat As String - - ''' - ''' The user's language code, ex. de-DE - ''' - Public Property Language As String - - ''' - ''' The user's language id, what is this? - ''' - Public Property LanguageId As Integer - - ''' - ''' Is the user a general administrator? - ''' - ''' - Public Property IsAdmin As Boolean = False - - ''' - ''' Should basic config (DB Settings) be hidden from this user? - ''' - ''' - Public Property HideBasicConfig As Boolean = False - - ''' - ''' Initialize user object with values that can be read from the environment. Only meant for Global Application State - ''' - Public Sub New() - Language = Thread.CurrentThread.CurrentCulture.Name - UserName = System.Environment.UserName - MachineName = System.Environment.MachineName - End Sub - - ''' - ''' Initialize user object with user name. Mandatory for sending user data between systems. - ''' - Public Sub New(pUserName As String) - MyBase.New() - UserName = pUserName - End Sub - End Class -End Namespace - diff --git a/Modules.ZooFlow/ZooFlow.vbproj b/Modules.ZooFlow/ZooFlow.vbproj deleted file mode 100644 index 3184ff3c..00000000 --- a/Modules.ZooFlow/ZooFlow.vbproj +++ /dev/null @@ -1,146 +0,0 @@ - - - - - Debug - AnyCPU - {81CAC44F-3711-4C8F-AE98-E02A7448782A} - Library - DigitalData.Modules.ZooFlow - DigitalData.Modules.ZooFlow - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.ZooFlow.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.ZooFlow.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {EAF0EA75-5FA7-485D-89C7-B2D843B03A96} - Database - - - {25017513-0D97-49D3-98D7-BA76D9B251B0} - EDMI.API - - - {d3c8cfed-d6f6-43a8-9bdf-454145d0352f} - Language - - - {903B2D7D-3B80-4BE9-8713-7447B704E1B0} - Logging - - - {5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86} - Windows - - - - \ No newline at end of file diff --git a/Modules.ZooFlow/packages.config b/Modules.ZooFlow/packages.config deleted file mode 100644 index 63f3075e..00000000 --- a/Modules.ZooFlow/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Modules/Filesystem.Test/FileTest.vb b/Modules/Filesystem.Test/FileTest.vb deleted file mode 100644 index 412372bd..00000000 --- a/Modules/Filesystem.Test/FileTest.vb +++ /dev/null @@ -1,21 +0,0 @@ -Imports System.Text -Imports Microsoft.VisualStudio.TestTools.UnitTesting -Imports DigitalData.Modules.Logging - - Public Class FileTest - - Public Shared Sub Setup(Context As TestContext) - System.IO.File.Create("E:\Test.txt") - End Sub - - Public Sub TestMethod1() - Dim oLogConfig = New DigitalData.Modules.Logging.LogConfig(LogConfig.PathType.Temp) - Dim oFilesystem As New DigitalData.Modules.Filesystem.File(oLogConfig) - - Dim oPath = "E:\Test~2345676778697678678967867.txt" - Dim oVersionedPath = oFilesystem.GetVersionedFilename(oPath) - - Assert.AreEqual(oVersionedPath, oPath) - End Sub - -End Class \ No newline at end of file diff --git a/Modules/Filesystem.Test/Filesystem.Test.vbproj b/Modules/Filesystem.Test/Filesystem.Test.vbproj deleted file mode 100644 index 87b70aaa..00000000 --- a/Modules/Filesystem.Test/Filesystem.Test.vbproj +++ /dev/null @@ -1,137 +0,0 @@ - - - - - Debug - AnyCPU - {B29ED6D4-839B-413A-A485-B10F4A4788EA} - Library - Filesystem.Test - Filesystem.Test - 512 - Windows - v4.6.1 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - - true - full - true - true - bin\Debug\ - Filesystem.Test.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - Filesystem.Test.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - ..\..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - - - ..\..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {991d0231-4623-496d-8bd0-9ca906029cbc} - Filesystem - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - - - - Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - - - - - \ No newline at end of file diff --git a/Modules/Filesystem.Test/My Project/Application.Designer.vb b/Modules/Filesystem.Test/My Project/Application.Designer.vb deleted file mode 100644 index 88dd01c7..00000000 --- a/Modules/Filesystem.Test/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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 - diff --git a/Modules/Filesystem.Test/My Project/Application.myapp b/Modules/Filesystem.Test/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Modules/Filesystem.Test/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Modules/Filesystem.Test/My Project/AssemblyInfo.vb b/Modules/Filesystem.Test/My Project/AssemblyInfo.vb deleted file mode 100644 index 954e4783..00000000 --- a/Modules/Filesystem.Test/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,18 +0,0 @@ -Imports System -Imports System.Reflection -Imports System.Runtime.InteropServices - - - - - - - - - - - - -' - - diff --git a/Modules/Filesystem.Test/My Project/Resources.Designer.vb b/Modules/Filesystem.Test/My Project/Resources.Designer.vb deleted file mode 100644 index 81d342eb..00000000 --- a/Modules/Filesystem.Test/My Project/Resources.Designer.vb +++ /dev/null @@ -1,62 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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("Filesystem.Test.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/Modules/Filesystem.Test/My Project/Resources.resx b/Modules/Filesystem.Test/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Modules/Filesystem.Test/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Modules/Filesystem.Test/My Project/Settings.Designer.vb b/Modules/Filesystem.Test/My Project/Settings.Designer.vb deleted file mode 100644 index 365aec20..00000000 --- a/Modules/Filesystem.Test/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' 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.Filesystem.Test.My.MySettings - Get - Return Global.Filesystem.Test.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Modules/Filesystem.Test/My Project/Settings.settings b/Modules/Filesystem.Test/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Modules/Filesystem.Test/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Modules/Filesystem.Test/packages.config b/Modules/Filesystem.Test/packages.config deleted file mode 100644 index 371adee0..00000000 --- a/Modules/Filesystem.Test/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/State/ModuleState.vb b/State/ModuleState.vb deleted file mode 100644 index 9f960d5f..00000000 --- a/State/ModuleState.vb +++ /dev/null @@ -1,7 +0,0 @@ -Namespace State - Public Class ModuleState - Public Property HasAccess As Boolean - Public Property IsAdmin As Boolean - Public Property LoggedIn As Integer - End Class -End Namespace \ No newline at end of file diff --git a/State/My Project/Application.Designer.vb b/State/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/State/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/State/My Project/Application.myapp b/State/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/State/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/State/My Project/AssemblyInfo.vb b/State/My Project/AssemblyInfo.vb deleted file mode 100644 index 09bb81e4..00000000 --- a/State/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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 wird für die typelib-ID verwendet, 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, -' indem Sie "*" wie unten gezeigt eingeben: -' - - - diff --git a/State/My Project/Resources.Designer.vb b/State/My Project/Resources.Designer.vb deleted file mode 100644 index cbcc5534..00000000 --- a/State/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.State.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/State/My Project/Resources.resx b/State/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/State/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/State/My Project/Settings.Designer.vb b/State/My Project/Settings.Designer.vb deleted file mode 100644 index dec125aa..00000000 --- a/State/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.State.My.MySettings - Get - Return Global.DigitalData.Modules.State.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/State/My Project/Settings.settings b/State/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/State/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/State/ServiceState.vb b/State/ServiceState.vb deleted file mode 100644 index 5b00e66e..00000000 --- a/State/ServiceState.vb +++ /dev/null @@ -1,11 +0,0 @@ -Imports DigitalData.Modules.EDMI.API - -Namespace State - Public Class ServiceState - Public Property IsOnline As Boolean = False - Public Property IsActive As Boolean = False - Public Property LastChecked As Date = Date.Now - Public Property Address As String = String.Empty - Public Property Client As Client = Nothing - End Class -End Namespace \ No newline at end of file diff --git a/State/SettingsState.vb b/State/SettingsState.vb deleted file mode 100644 index 6a9e50e6..00000000 --- a/State/SettingsState.vb +++ /dev/null @@ -1,5 +0,0 @@ -Namespace State - Public Class SettingsState - Public GdPictureKey As String = String.Empty - End Class -End Namespace \ No newline at end of file diff --git a/State/State.vbproj b/State/State.vbproj deleted file mode 100644 index ce551278..00000000 --- a/State/State.vbproj +++ /dev/null @@ -1,108 +0,0 @@ - - - - - Debug - AnyCPU - {3D8AEB1A-1FAB-4107-8FFE-67337C281AD0} - Library - DigitalData.Modules.State - DigitalData.Modules.State - 512 - Windows - v4.6.1 - true - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.State.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.State.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - True - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - \ No newline at end of file diff --git a/State/UserState.vb b/State/UserState.vb deleted file mode 100644 index ffe668e5..00000000 --- a/State/UserState.vb +++ /dev/null @@ -1,33 +0,0 @@ -Imports System.Threading -Imports System.Environment - -Namespace State - ''' - ''' Helper Class to hold User State - ''' - Public Class UserState - Public Property UserId As Integer - Public Property UserName As String - Public Property Surname As String - Public Property GivenName As String - Public Property ShortName As String - Public Property Email As String - Public Property MachineName As String - Public Property DateFormat As String - Public Property Language As String - Public Property LanguageID As Int16 - Public Property IsAdmin As Boolean = False - - Public Property HideBasicConfig As Boolean = False - - ''' - ''' Initialize user object with values that can be read from the environment - ''' - Public Sub New() - Language = Thread.CurrentThread.CurrentCulture.Name - UserName = Environment.UserName - MachineName = Environment.MachineName - End Sub - End Class -End Namespace - diff --git a/Windows/Animator.vb b/Windows/Animator.vb deleted file mode 100644 index c1c14b51..00000000 --- a/Windows/Animator.vb +++ /dev/null @@ -1,82 +0,0 @@ -Imports System.Drawing -Imports System.Windows.Forms -Public Class Animator - Private Const DEFAULT_POPUP_OPACITY = 0.5 - Private Const DEFAULT_POPUP_SIZE = 30 - Private Const DEFAULT_POPUP_FADE_SPEED = 10 - Private Const DEFAULT_POPUP_FADE_INTERVAL = 250 - - ''' - ''' Time the popup stays visible between the animations - ''' - Public Property AnimationInterval As Integer - ''' - ''' Basevalue for calculating the time the popup takes to animate - ''' - Public Property AnimationSpeed As Integer - ''' - ''' Opacity the popup animates to (From 0.0 to .., back to 0.0) - ''' - Public Property PopupOpacity As Double - ''' - ''' Color of the popup - ''' - ''' - Public Property PopupColor As Color - ''' - ''' Size of the popup in width and height - ''' - Public Property PopupSize As Size - - Public Sub New() - _PopupSize = New Size(DEFAULT_POPUP_SIZE, DEFAULT_POPUP_SIZE) - _AnimationSpeed = DEFAULT_POPUP_FADE_SPEED - _AnimationInterval = DEFAULT_POPUP_FADE_INTERVAL - _PopupOpacity = DEFAULT_POPUP_OPACITY - _PopupColor = Color.FromArgb(255, 214, 49) - End Sub - - Public Async Sub Highlight(Position As Point) - Dim oForm = GetPopup(Position, PopupSize) - oForm.Show() - FadeIn(oForm, _PopupOpacity, _AnimationSpeed / 2) - Await Task.Delay(_AnimationInterval) - FadeOut(oForm, _AnimationSpeed * 2) - End Sub - - Private Function GetPopup(CursorPosition As Point, PopupSize As Size) As frmPopup - Dim oFormLocation = New Point( - CursorPosition.X - (PopupSize.Width / 2), - CursorPosition.Y - (PopupSize.Height / 2)) - - Return New frmPopup() With { - .Location = oFormLocation, - .StartPosition = FormStartPosition.Manual, - .Size = PopupSize, - .MaximumSize = PopupSize, - .MinimumSize = PopupSize, - .Opacity = 0, - .ShowInTaskbar = False, - .BackColor = _PopupColor, - .TopMost = True - } - End Function - - Private Async Sub FadeIn(ByVal o As Form, finalOpacity As Double, ByVal Optional interval As Integer = 80) - While o.Opacity < finalOpacity - Await Task.Delay(interval) - o.Opacity += 0.05 - End While - - o.Opacity = finalOpacity - End Sub - - Private Async Sub FadeOut(ByVal o As Form, ByVal Optional interval As Integer = 80) - While o.Opacity > 0.0 - Await Task.Delay(interval) - o.Opacity -= 0.05 - End While - - o.Opacity = 0 - End Sub -End Class diff --git a/Windows/Animator/frmPopup.Designer.vb b/Windows/Animator/frmPopup.Designer.vb deleted file mode 100644 index 09bb5b0d..00000000 --- a/Windows/Animator/frmPopup.Designer.vb +++ /dev/null @@ -1,43 +0,0 @@ -Imports System.Windows.Forms - - -Partial Class frmPopup - Inherits 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.SuspendLayout() - ' - 'frmPopup - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.BackColor = System.Drawing.Color.Yellow - Me.ClientSize = New System.Drawing.Size(30, 30) - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None - Me.MaximumSize = New System.Drawing.Size(30, 30) - Me.MinimumSize = New System.Drawing.Size(30, 30) - Me.Name = "frmPopup" - Me.Text = "frmPopup" - Me.ResumeLayout(False) - - End Sub -End Class diff --git a/Windows/Animator/frmPopup.resx b/Windows/Animator/frmPopup.resx deleted file mode 100644 index 1af7de15..00000000 --- a/Windows/Animator/frmPopup.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Windows/Animator/frmPopup.vb b/Windows/Animator/frmPopup.vb deleted file mode 100644 index 5a5f2724..00000000 --- a/Windows/Animator/frmPopup.vb +++ /dev/null @@ -1,3 +0,0 @@ -Public Class frmPopup - -End Class \ No newline at end of file diff --git a/Windows/Drawing.vb b/Windows/Drawing.vb deleted file mode 100644 index b3f3286e..00000000 --- a/Windows/Drawing.vb +++ /dev/null @@ -1,27 +0,0 @@ -Imports System.Drawing -Imports DigitalData.Modules.Logging - -Public Class Drawing - Private _Logger As Logger - - Public Sub New(LogConfig As LogConfig) - _Logger = LogConfig.GetLogger() - End Sub - - Public Sub DrawRectangle(Bounds As Rectangle) - Dim oContext As IntPtr - oContext = NativeMethods.GetDC(IntPtr.Zero) - - Try - Dim g As Graphics - g = Graphics.FromHdc(oContext) - Try - g.DrawRectangle(Pens.Red, Bounds) - Finally - g.Dispose() - End Try - Finally - NativeMethods.ReleaseDC(IntPtr.Zero, oContext) - End Try - End Sub -End Class diff --git a/Windows/File.vb b/Windows/File.vb deleted file mode 100644 index 4f003e76..00000000 --- a/Windows/File.vb +++ /dev/null @@ -1,36 +0,0 @@ -Imports System.ComponentModel -Imports System.Runtime.InteropServices -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Windows.NativeMethods - -Public Class File - Private _LogConfig As LogConfig - Private _Logger As Logger - - Public Sub New(LogConfig As LogConfig) - _LogConfig = LogConfig - _Logger = LogConfig.GetLogger() - End Sub - - Public Function OpenFileProperties(FilePath As String) As Boolean - Try - Dim oShellExecuteInfo As New ShellExecuteInfo() - oShellExecuteInfo.cbSize = Marshal.SizeOf(oShellExecuteInfo) - oShellExecuteInfo.lpVerb = "properties" - oShellExecuteInfo.lpFile = FilePath - oShellExecuteInfo.nShow = SW_SHOW - oShellExecuteInfo.fMask = SEE_MASK_INVOKEIDLIST - - If Not ShellExecuteEx(oShellExecuteInfo) Then - Dim oWin32Error = Marshal.GetLastWin32Error() - Dim oException As New Win32Exception(oWin32Error) - Throw oException - End If - - Return True - Catch ex As Exception - _Logger.Error(ex) - Return False - End Try - End Function -End Class diff --git a/Windows/FileDrop.vb b/Windows/FileDrop.vb deleted file mode 100644 index 51fce442..00000000 --- a/Windows/FileDrop.vb +++ /dev/null @@ -1,363 +0,0 @@ -Imports System.Text -Imports DigitalData.Modules.Base -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Language.Utils -Imports Microsoft.Office.Interop -Imports System.Windows.Forms - -Partial Public Class FileDrop - Inherits BaseClass - - Public Enum FileFormat - OutlookAttachment - OutlookMail - ThunderbirdAttachment - ThunderbirdMail - MailWithoutAttachments - LocalFile - Unknown - End Enum - - Public Enum FileSource - DragDrop - FolderWatch - Attachment - End Enum - - Public ReadOnly Property TempFileSubDirectory - Get - Return _TempFileSubDirectory - End Get - End Property - - Private _TempFileSubDirectory As String = "FileDrop" - - Public Sub New(pLogConfig As LogConfig) - MyBase.New(pLogConfig) - End Sub - - Public Sub New(pLogConfig As LogConfig, pTempFileSubDirectory As String) - MyClass.New(pLogConfig) - _TempFileSubDirectory = pTempFileSubDirectory - End Sub - - - - Public Function GetFileFormats(pEvent As DragEventArgs) As List(Of String) - Dim oFormats As New List(Of String) - - For Each oFormat As String In pEvent.Data.GetFormats(False) - oFormats.Add(oFormat) - Next - - Return oFormats - End Function - - Public Function GetFileFormat(pEvent As DragEventArgs) As FileFormat - Logger.Debug("Determining FileFormat") - - If IsThunderbird(pEvent) Then - Logger.Debug("File is a Thunderbird File") - - If IsThunderbirdAttachment(pEvent) Then - Return FileFormat.ThunderbirdAttachment - - ElseIf IsThunderbirdMail(pEvent) Then - Return FileFormat.ThunderbirdMail - - Else - Return FileFormat.Unknown - End If - End If - - If IsOutlook(pEvent) Then - Logger.Debug("File is an Outlook File") - - If IsOutlookAttachment(pEvent) Then - Return FileFormat.OutlookAttachment - - ElseIf IsOutlookMail(pEvent) Then - Return FileFormat.OutlookMail - - Else - Return FileFormat.Unknown - End If - End If - - If IsNormalFile(pEvent) Then - Logger.Debug("File is a normal File") - - Return FileFormat.LocalFile - - Else - Return FileFormat.Unknown - End If - End Function - - Public Function GetFiles(pEvent As DragEventArgs) As List(Of DroppedFile) - Try - Dim oFormats As List(Of String) = GetFileFormats(pEvent) - Dim oFormatString = String.Join(", ", oFormats) - Logger.Debug("Available Formats: [{0}]", oFormatString) - - Dim oFormat = GetFileFormat(pEvent) - Logger.Debug("Format: [{0}]", oFormat.ToString) - - Dim oFiles As New List(Of DroppedFile) - - Select Case oFormat - Case FileFormat.OutlookAttachment, FileFormat.OutlookMail - Dim oFilePaths = GetOutlookFilePath(pEvent) - - For Each oPath In oFilePaths - oFiles.Add(New DroppedFile(oPath) With { - .FileFormat = oFormat - }) - Next - - Case Else - Dim oDroppedFiles As String() = GetFormat(pEvent, "FileDrop") - Dim oTempPath As String = GetTempPathWithSubdirectory() - - If oDroppedFiles IsNot Nothing Then - For Each oPath In oDroppedFiles - oFiles.Add(New DroppedFile(oPath) With { - .FileFormat = oFormat - }) - Next - End If - - End Select - - Logger.Debug("Handled [{0}] dropped files.", oFiles.Count) - - Return oFiles - - Catch ex As Exception - Logger.Warn("Error while handling dropped files.") - Logger.Error(ex) - Return Nothing - - End Try - End Function - - Private Function GetOutlookFilePath(pEvent As DragEventArgs) As List(Of String) - Dim oTempPath As String = GetTempPathWithSubdirectory() - Dim oFileName As String = GetOutlookFileName(pEvent) - Dim oFilePath As String = IO.Path.Combine(oTempPath, oFileName) - Dim oContentsList As List(Of Byte()) = GetOutlookFileContents_FromInterop(pEvent) - - If oContentsList Is Nothing Then - Return Nothing - End If - - Dim oPathList As New List(Of String) - - For Each oContents In oContentsList - Using oFileStream As IO.FileStream = New IO.FileStream(oFilePath, IO.FileMode.Create) - oFileStream.Write(oContents, 0, oContents.Length) - oFileStream.Close() - End Using - - oPathList.Add(oFilePath) - Next - - Return oPathList - - End Function - - Private Function GetOutlookFileName(pEvent As DragEventArgs) As String - Dim oFileDescriptorSize = 512 - Dim oIndex As Integer = 76 - Dim oBuilder As New StringBuilder() - - Using oStream As IO.MemoryStream = GetFormat(pEvent, "FileGroupDescriptor") - Dim oFileGroupDescriptor As Byte() = New Byte(oFileDescriptorSize) {} - oStream.Read(oFileGroupDescriptor, 0, oFileDescriptorSize) - - While oFileGroupDescriptor(oIndex) <> 0 - Dim oChar = Convert.ToChar(oFileGroupDescriptor(oIndex)) - oBuilder.Append(oChar) - oIndex += 1 - End While - End Using - - Dim oFileName As String = oBuilder.ToString - Logger.Debug("Outlook filename is [{0}]", oFileName) - - Return oFileName - End Function - - Private Function GetOutlookFileContents_FromDragEvent(pEvent As DragEventArgs) As List(Of Byte()) - Logger.Debug("Getting file contents") - - Using oStream As IO.MemoryStream = pEvent.Data.GetData("FileContents", True) - If oStream Is Nothing Then - Return Nothing - End If - - Dim oContentLength = Convert.ToInt32(oStream.Length) - Dim oContents As Byte() = New Byte(oContentLength) {} - - oStream.Position = 0 - oStream.Read(oContents, 0, Convert.ToInt32(oContentLength)) - - Return New List(Of Byte()) From {oContents} - End Using - End Function - - Private Function GetOutlookFileContents_FromInterop(pEvent As DragEventArgs) As List(Of Byte()) - Logger.Debug("Getting file contents") - Logger.Debug("Creating Outlook Application") - - Dim oApp As Outlook.Application - Try - oApp = New Outlook.Application() - Catch ex As Exception - Logger.Error(ex) - Return Nothing - End Try - - Dim oResults As New List(Of Byte()) - Dim oMailItem As Outlook.MailItem - For oIndex As Integer = 1 To oApp.ActiveExplorer.Selection.Count - Try - Logger.Debug("Fetching mail [{0}]") - - oMailItem = oApp.ActiveExplorer.Selection.Item(oIndex) - - Dim oSubject As String = ConvertTextToSlug(oMailItem.Subject) - If oSubject = "" Then - oSubject = "NO_SUBJECT" - End If - Logger.Info("Subject Slug: [{0}]", oSubject) - - Dim oFileName As String = $"{oSubject}.msg" - Dim oTempPath As String = GetTempPathWithSubdirectory() - Dim oFilePath As String = IO.Path.Combine(oTempPath, oFileName) - - oMailItem.SaveAs(oFilePath) - - Using oFileStream As New IO.FileStream(oFilePath, IO.FileMode.Open) - - Dim oContents As Byte() = New Byte(oFileStream.Length) {} - oFileStream.Read(oContents, 0, oFileStream.Length) - - oResults.Add(oContents) - End Using - - Try - IO.File.Delete(oFilePath) - Catch ex As Exception - Logger.Warn("Temp file [{0}] could not be deleted!", oFilePath) - Logger.Error(ex) - End Try - - Return oResults - Catch ex As Exception - Logger.Error(ex) - - End Try - Next - - Return Nothing - End Function - - Public Function GetFormat(pEvent As DragEventArgs, pFormat As String, pAutoConvert As Boolean) As Object - If CheckFor(pEvent, pFormat) Then - Dim oValue = pEvent.Data.GetData(pFormat, pAutoConvert) - Return oValue - Else - Return Nothing - End If - End Function - - Public Function GetFormat(pEvent As DragEventArgs, pFormat As String) As Object - Return GetFormat(pEvent, pFormat, False) - End Function - - Public Function CheckFor(pEvent As DragEventArgs, pFormat As String, pAutoConvert As Boolean) As Boolean - Dim oFormats = pEvent.Data.GetFormats(pAutoConvert).ToList() - Dim oFormatExists = oFormats.Any(Function(format) format = pFormat) - - Logger.Debug("Format [{0}] exists: [{1}]", pFormat, oFormatExists) - Return oFormatExists - End Function - - Public Function CheckFor(pEvent As DragEventArgs, pFormat As String) As Boolean - Return CheckFor(pEvent, pFormat, False) - End Function - - Public Function IsNormalFile(e As DragEventArgs) As Boolean - Return CheckFor(e, DataFormats.FileDrop, False) - End Function - - Public Function IsOutlook(e As DragEventArgs) As Boolean - Logger.Debug("Checking for Outlook") - Return CheckFor(e, "FileGroupDescriptor") AndAlso CheckFor(e, "FileContents") - End Function - Public Function IsThunderbird(e As DragEventArgs) As Boolean - Logger.Debug("Checking for Thunderbird") - Return CheckFor(e, "text/x-moz-url") AndAlso CheckFor(e, "FileDrop") - End Function - - Public Sub RemoveTempDirectory() - Dim oTempPath As String = IO.Path.Combine(IO.Path.GetTempPath(), _TempFileSubDirectory) - - If IO.Directory.Exists(oTempPath) Then - Try - IO.Directory.Delete(oTempPath, recursive:=True) - Catch ex As Exception - Logger.Warn("Could not delete Temp Subdirectory [{0}].", oTempPath) - Logger.Error(ex) - End Try - End If - End Sub - - Private Function GetTempPathWithSubdirectory() As String - Dim oTempPath As String = IO.Path.Combine(IO.Path.GetTempPath(), _TempFileSubDirectory) - - If IO.Directory.Exists(oTempPath) = False Then - Try - IO.Directory.CreateDirectory(oTempPath) - Catch ex As Exception - Logger.Warn("Could not create Temp Subdirectory [{0}]. Returning default Temp Path.", oTempPath) - Logger.Error(ex) - Return IO.Path.GetTempPath() - End Try - End If - - Return oTempPath - End Function - - -#Region "Thunderbird" - Private Function IsOutlookMail(e As DragEventArgs) As Boolean - Logger.Debug("Checking for Outlook Mail") - Return Not IsOutlookAttachment(e) AndAlso CheckFor(e, "RenPrivateSourceFolder") - End Function - - Private Function IsOutlookAttachment(e As DragEventArgs) As Boolean - Logger.Debug("Checking for Outlook Attachment") - Return IsOutlook(e) AndAlso CheckFor(e, "RenPrivateItem") - End Function -#End Region - -#Region "Outlook" - Private Function IsThunderbirdMail(e As DragEventArgs) As Boolean - Logger.Debug("Checking for Thunderbird Mail") - Return Not IsThunderbirdAttachment(e) - End Function - - Private Function IsThunderbirdAttachment(e As DragEventArgs) As Boolean - Logger.Debug("Checking for Thunderbird Attachment") - Return IsThunderbird(e) AndAlso - CheckFor(e, "text/x-moz-url-data") AndAlso - CheckFor(e, "text/x-moz-url-desc") - End Function -#End Region - - - - -End Class diff --git a/Windows/FileDrop/DroppedFile.vb b/Windows/FileDrop/DroppedFile.vb deleted file mode 100644 index a843329f..00000000 --- a/Windows/FileDrop/DroppedFile.vb +++ /dev/null @@ -1,57 +0,0 @@ -Imports System.Text -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Language.Utils -Imports Microsoft.Office.Interop -Imports System.Windows - - -Partial Class FileDrop - Public Class DroppedFile - Public ReadOnly Property FilePath As String - Public ReadOnly Property DropType As String = "|DROPFROMFSYSTEM|" - - Public Property FileFormat As FileFormat = FileFormat.LocalFile - Public Property FileSource As FileSource = FileSource.DragDrop - - Public Sub New(pFilePath As String) - FilePath = pFilePath - End Sub - - Public Sub New(pFilePath As String, pDropType As String) - MyClass.New(pFilePath) - DropType = pDropType - - Select Case pDropType - Case "|DROPFROMFSYSTEM|" - FileFormat = FileFormat.LocalFile - - Case "OUTLOOK_ATTACHMENT" - FileFormat = FileFormat.OutlookAttachment - - Case "|OUTLOOK_MESSAGE|" - FileFormat = FileFormat.OutlookMail - - Case "|MSGONLY|" - FileFormat = FileFormat.MailWithoutAttachments - - Case "|FW_OUTLOOK_MESSAGE|" - FileFormat = FileFormat.OutlookMail - FileSource = FileSource.FolderWatch - - Case "|FW_SIMPLEINDEXER|" - FileFormat = FileFormat.LocalFile - FileSource = FileSource.FolderWatch - - Case "|ATTMNTEXTRACTED|" - FileFormat = FileFormat.LocalFile - FileSource = FileSource.Attachment - - End Select - End Sub - End Class -End Class - - - - - diff --git a/Windows/FileDrop/TobitDavid.vb b/Windows/FileDrop/TobitDavid.vb deleted file mode 100644 index e2a397a2..00000000 --- a/Windows/FileDrop/TobitDavid.vb +++ /dev/null @@ -1,139 +0,0 @@ -Public Class TobitDavid - ' Tobit David Drag Drop: https://www.david-forum.de/thread/12671-drag-and-drop-von-faxen-und-mails-in-net-anwendung/ - 'Private Declare Function DVEmlFromMailItem Lib "DvApi32" (ByVal oMailItem As MailItem, ByVal strFileName As String) As Long - - 'Private Sub DragDrop_HandleTobit(e As DragEventArgs) - ' If e.Data.GetDataPresent("#TobitMsgData") Then - ' Dim Quellpfad As String = "" - ' Dim Dateinamen As String() - ' 'Quellpfad zu den David Dateien auslesen - ' Using ms As MemoryStream = e.Data.GetData("#TobitMsgData") - ' Dim bytes As Byte() = ms.ToArray() - ' Dim n As Integer = 0 - ' Dim c As Char - ' Do While True - ' c = Convert.ToChar(bytes(n)) - ' If bytes(n) <> 0 Then - ' Quellpfad &= c - ' n += 1 - ' Else - ' Exit Do - ' End If - ' Loop - ' End Using - ' 'Dateinamen der gedroppten Emails auslesen - ' Using ms As MemoryStream = e.Data.GetData("FileGroupDescriptor") - ' 'Header sind 4B - ' 'Jeder Datensatz ist 332B - ' 'Bei Index 72 des Datensatzes beginnt das "Dateiname.eml" - ' Dim bytes As Byte() = ms.ToArray() - ' ReDim Dateinamen(Int(bytes.Count / 332) - 1) - ' ' Array mit so vielen Elementen wie Datensätze im FileGroupDescriptor sind - ' Dim AnzahlMails As Integer = bytes(0) - ' Dim Dateiname As String - ' Dim n As Integer - ' For i = 0 To AnzahlMails - 1 - ' Dateiname = "" - ' n = 0 - ' Do While True - ' 'Solange die Bytes auslesen, bis man einen vbNullChar liest - ' If bytes(i * 332 + 4 + 72 + n) <> 0 Then - ' Dateiname = Dateiname & Convert.ToChar(bytes(i * 332 + 4 + 72 + n)) - - ' n += 1 - ' Else - ' Exit Do - ' End If - ' Loop - ' Dateinamen(i) = Dateiname - ' Next - ' End Using - ' Using EntryDataEx As MemoryStream = e.Data.GetData("#TobitEntryDataEx") - ' Dim bytes As Byte() = EntryDataEx.ToArray() - ' 'Die Größe des Headers steht im ersten Byte - ' Dim HeadExSize As Integer = bytes(0) - ' 'Die Anzahl der Datensätze steht im 8. - 11. Byte - ' Dim nCountEntries As Integer = BitConverter.ToInt32(bytes, 8) - ' Dim nPositions(nCountEntries - 1) As Integer - ' For i = 0 To nCountEntries - 1 - ' 'Datensätze in der #TobitEntryDataEx sind 269 Byte groß. - ' 'In den ersten 4 Bytes steht die QID aus der archive.dat - ' nPositions(i) = BitConverter.ToInt32(bytes, HeadExSize + i * 269) - ' Next - - ' Using fs As New FileStream(Quellpfad & "\archive.dat", FileMode.Open, FileAccess.Read) - - ' 'archive.dat als MemoryStream kopieren - ' Using ms As New MemoryStream - ' fs.CopyTo(ms) - ' 'MemoryStream in ein Byte-Array konvertieren - ' Dim archiveBytes As Byte() = ms.ToArray() - ' 'Datensätze in der archive.dat sind 430 Byte groß - ' For i = 16 To archiveBytes.Length - 1 Step 430 - - ' 'Das 17.-20. Byte ist die QID die wir suchen - ' Dim QID As Integer = BitConverter.ToInt32(archiveBytes, i) - ' 'Wenn die QID übereinstimmt mit einer der David-Mails, dann lies den Dateinamen im Archiv aus - ' If nPositions.Contains(QID) Then - - ' 'Der Index der QID (0, ..., nCountEntries - 1) - ' Dim nPosIndex As Integer = -1 - ' For j = 0 To nPositions.Length - 1 - ' If QID = nPositions(j) Then - ' nPosIndex = j - ' Exit For - ' End If - ' Next - ' 'Alle Bytes ab dem 17. bis zum Ende des Datensatzes aus der archive.bat auslesen und als String konvertieren - ' Dim byteString As String = "" - ' For j = 0 To 429 - 17 - ' byteString &= Convert.ToChar(archiveBytes(i + j)) - ' Next - ' 'Index der Id herausfinden (Index des Quellpfads im byteString + Länge des Quellpfads + 1 "\") - ' Dim IdIndex As Integer = byteString.IndexOf(Quellpfad, StringComparison.OrdinalIgnoreCase) + Quellpfad.Length + 1 - ' 'Die Id sind dann die 8 Zeichen ab dem IdIndex - ' Dim Id As String = byteString.Substring(IdIndex, 8) - ' 'EML speichern - ' DavidEmlSpeichern(Quellpfad, Dateinamen(nPosIndex), QID, Id) - ' End If - ' Next - ' End Using - ' End Using - ' End Using - ' End If - 'End Sub - - 'Private Sub DavidEmlSpeichern(ArchivePfad As String, Dateiname As String, ID As String, FaxID As String) - ' Dim oApp As DavidAPIClass - ' Dim oAcc As Account - ' Dim oArchive As Archive - ' Dim oMessageItems As MessageItems - ' Dim oMailItem As MailItem - ' oApp = New DavidAPIClass() - ' oApp.LoginOptions = DvLoginOptions.DvLoginForceAsyncDuplicate - ' oAcc = oApp.Logon("DavidServer", "", "", "", "", "NOAUTH") - ' oArchive = oAcc.ArchiveFromID(ArchivePfad) - ' If FaxID.First() = "M" Then - ' 'Faxe beginnen mit M - ' 'Bei Faxen kann man einfach die .001 Datei kopieren und als TIF speichern - ' File.Copy(ArchivePfad & "\" & FaxID & ".001", "C:\Temp\" & Dateiname, True) - ' ListeAktualisieren() - ' ElseIf FaxID.First() = "I" Then - ' 'Emails beginnen mit I - ' 'Bei Emails muss man die DVEmlFromMailItem mit dem richtigen oMailItem aufrufen - ' oMessageItems = oArchive.MailItems - ' For Each oMailItem In oMessageItems - ' If oMailItem._ID = ID Then - ' Dim fileName As String = Space(260) - ' If DVEmlFromMailItem(oMailItem, fileName) <> 0 Then - ' fileName = Trim(fileName) - ' fileName = fileName.Substring(0, fileName.Length - 1) - ' File.Copy(fileName, "C:\Temp\" & Dateiname, True) - ' ListeAktualisieren() - ' End If - ' Exit For - ' End If - ' Next - ' End If - 'End Sub -End Class diff --git a/Windows/Hotkey.vb b/Windows/Hotkey.vb deleted file mode 100644 index d0d654ee..00000000 --- a/Windows/Hotkey.vb +++ /dev/null @@ -1,86 +0,0 @@ -Option Explicit On - -Imports System.Windows.Forms - -Public Class Hotkey - Implements IMessageFilter - - Private _OwnerForm As Form - Private _HotkeyList As New Dictionary(Of Short, HotKeyObject) - Private _HotkeyIDList As New Dictionary(Of String, Short) - - ''' - ''' Diesem Event wird immer die zugewiesene HotKeyID übergeben, wenn eine HotKey Kombination gedrückt wurde. - ''' - Public Event HotKeyPressed(HotKeyID As String) - - ''' - ''' Definiert verfügbare Modfier Keys - ''' - Public Enum ModfierKey As Integer - MOD_ALT = 1 - MOD_CONTROL = 2 - MOD_SHIFT = 4 - MOD_WIN = 8 - End Enum - - Sub New(pOwnerForm As Form) - _OwnerForm = pOwnerForm - Application.AddMessageFilter(Me) - End Sub - - ''' - ''' Diese Funktion fügt einen Hotkey hinzu und registriert ihn auch sofort - ''' - ''' Den KeyCode für die Taste - ''' Die Zusatztasten wie z.B. Strg oder Alt, diese können auch mit OR kombiniert werden - ''' Die ID die der Hotkey bekommen soll um diesen zu identifizieren - Public Sub AddHotKey(pKeyCode As Keys, pModifiers As ModfierKey, pHotKeyID As Integer) - If _HotkeyIDList.ContainsKey(pHotKeyID) = True Then - Exit Sub - End If - - Dim oHotkeyId As Short = NativeMethods.GlobalAddAtom(pHotKeyID.ToString()) - _HotkeyList.Add(oHotkeyId, New HotKeyObject(pKeyCode, pModifiers, pHotKeyID)) - - NativeMethods.RegisterHotKey(_OwnerForm.Handle, oHotkeyId, _HotkeyList(oHotkeyId).Modifier, _HotkeyList(oHotkeyId).HotKey) - End Sub - - ''' - ''' Diese Funktion entfernt einen Hotkey und deregistriert ihn auch sofort - ''' - ''' Gibt die HotkeyID an welche entfernt werden soll - Public Sub RemoveHotKey(ByVal pHotKeyID As Integer) - If _HotkeyIDList.ContainsKey(pHotKeyID) = False Then - Exit Sub - End If - - Dim oHotkeyId As Short = _HotkeyIDList(pHotKeyID) - _HotkeyIDList.Remove(pHotKeyID) - _HotkeyList.Remove(oHotkeyId) - NativeMethods.UnregisterHotKey(_OwnerForm.Handle, CInt(oHotkeyId)) - NativeMethods.GlobalDeleteAtom(oHotkeyId) - End Sub - - Private Function PreFilterMessage(ByRef m As Message) As Boolean Implements IMessageFilter.PreFilterMessage - If m.Msg = NativeMethods.WM_HOTKEY Then - If Clipboard.GetText().Trim() <> String.Empty Then - RaiseEvent HotKeyPressed(_HotkeyList(CShort(m.WParam)).HotKeyID) - End If - End If - Return False - End Function - - Public Class HotKeyObject - Public Property HotKey As Keys - Public Property Modifier As ModfierKey - Public Property HotKeyID As Integer - Public Property AtomID As Short - - Sub New(NewHotKey As Keys, NewModifier As ModfierKey, NewHotKeyID As Integer) - HotKey = NewHotKey - Modifier = NewModifier - HotKeyID = NewHotKeyID - End Sub - End Class -End Class diff --git a/Windows/My Project/Application.Designer.vb b/Windows/My Project/Application.Designer.vb deleted file mode 100644 index 8ab460ba..00000000 --- a/Windows/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Windows/My Project/Application.myapp b/Windows/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Windows/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Windows/My Project/AssemblyInfo.vb b/Windows/My Project/AssemblyInfo.vb deleted file mode 100644 index c1c4e43e..00000000 --- a/Windows/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -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/Windows/My Project/Resources.Designer.vb b/Windows/My Project/Resources.Designer.vb deleted file mode 100644 index 82955370..00000000 --- a/Windows/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - ''' - ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - ''' - _ - 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("DigitalData.Modules.Windows.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Windows/My Project/Resources.resx b/Windows/My Project/Resources.resx deleted file mode 100644 index 1af7de15..00000000 --- a/Windows/My Project/Resources.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Windows/My Project/Settings.Designer.vb b/Windows/My Project/Settings.Designer.vb deleted file mode 100644 index c458a722..00000000 --- a/Windows/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:4.0.30319.42000 -' -' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -' der Code erneut generiert wird. -' -'------------------------------------------------------------------------------ - -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 "Automatische My.Settings-Speicherfunktion" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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.DigitalData.Modules.Windows.My.MySettings - Get - Return Global.DigitalData.Modules.Windows.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Windows/My Project/Settings.settings b/Windows/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Windows/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Windows/NativeMethods.vb b/Windows/NativeMethods.vb deleted file mode 100644 index 22e91a63..00000000 --- a/Windows/NativeMethods.vb +++ /dev/null @@ -1,223 +0,0 @@ -Imports System.Runtime.InteropServices -Imports System.Text - -Public Class NativeMethods - Public Declare Function GetWindowTextLength Lib "user32.dll" Alias "GetWindowTextLengthA" (ByVal hwnd As Int32) As Integer - Public Declare Function GetWindowText Lib "user32.dll" Alias "GetWindowTextA" (ByVal hWnd As IntPtr, ByVal WinTitle As String, ByVal MaxLength As Integer) As Integer - - Public Shared Function ShellExecuteEx(ByRef lpExecInfo As ShellExecuteInfo) As Boolean - End Function - - Public Shared Function SetClipboardViewer(ByVal hWnd As IntPtr) As IntPtr - End Function - - Public Shared Function GetDC(ByVal hwnd As IntPtr) As IntPtr - End Function - - Public Shared Function ReleaseDC(ByVal hwnd As IntPtr, ByVal hdc As IntPtr) As IntPtr - End Function - - Public Shared Function ReleaseCapture() As Boolean - End Function - - Public Shared Function GetWindowRect(ByVal hWnd As HandleRef, ByRef lpRect As RectangleAPI) As Boolean - End Function - - Public Shared Function AttachThreadInput(ByVal idAttach As IntPtr, ByVal idAttachTo As IntPtr, fAttach As Boolean) As Boolean - End Function - - Public Shared Function GetFocus() As IntPtr - End Function - - Public Shared Function WindowFromPoint(ByVal p As PointAPI) As IntPtr - End Function - - Public Shared Function GetForegroundWindow() As IntPtr - End Function - - Public Shared Function GetWindowThreadProcessId(ByVal hwnd As IntPtr, ByRef lpdwProcessID As Integer) As Integer - End Function - - Public Shared Function GetClassName(ByVal hwnd As Integer, ByVal lpClassName As StringBuilder, ByVal nMaxCount As Integer) As Integer - End Function - - Public Shared Function OpenProcess(ByVal dwDesiredAccess As UInteger, ByVal bInheritHandle As Boolean, ByVal dwProcessId As UInteger) As IntPtr - End Function - - Public Shared Function VirtualAllocEx(ByVal hProcess As IntPtr, ByVal lpAddress As IntPtr, ByVal dwSize As UIntPtr, ByVal flAllocationType As UInteger, ByVal flProtect As PageProtection) As IntPtr - End Function - - Public Shared Function GetWindowThreadProcessId(ByVal hWnd As IntPtr, ByRef lpdwProcessId As UInteger) As UInteger - End Function - - Public Shared Function VirtualFreeEx(ByVal hProcess As IntPtr, ByVal lpAddress As IntPtr, ByVal dwSize As UIntPtr, ByVal dwFreeType As UInteger) As Boolean - End Function - - Public Shared Function CloseHandle(ByVal hObject As IntPtr) As Boolean - End Function - - Public Shared Function MapViewOfFile(ByVal hFileMappingObject As IntPtr, ByVal dwDesiredAccess As UInteger, ByVal dwFileOffsetHigh As UInteger, ByVal dwFileOffsetLow As UInteger, ByVal dwNumberOfBytesToMap As UIntPtr) As IntPtr - End Function - - Public Shared Function UnmapViewOfFile(ByVal lpBaseAddress As IntPtr) As Boolean - End Function - - Public Shared Function CreateFileMapping(ByVal hFile As IntPtr, ByVal lpFileMappingAttributes As IntPtr, ByVal flProtect As PageProtection, ByVal dwMaximumSizeHigh As Integer, ByVal dwMaximumSizeLow As Integer, ByVal lpName As String) As IntPtr - End Function - - Public Shared Function SendMessage(ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr - End Function - - Public Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, - ByVal lpBuffer As Byte(), ByVal nSize As UIntPtr, ByVal lpNumberOfBytesRead As IntPtr) As Boolean - End Function - - Public Shared Sub MoveMemoryFromByte(ByVal dest As IntPtr, ByRef src As Byte, ByVal size As Integer) - End Sub - - Public Shared Sub MoveMemoryToByte(ByRef dest As Byte, ByVal src As IntPtr, ByVal size As Integer) - End Sub - - Public Shared Function RegisterWindowMessage(ByVal lpString As String) As Integer - End Function - - Public Shared Function GetCursorPos(ByRef lpPoint As PointAPI) As Boolean - End Function - - Public Declare Function RegisterHotKey Lib "user32" ( - ByVal Hwnd As IntPtr, - ByVal ID As Integer, - ByVal Modifiers As Integer, - ByVal Key As Integer - ) As Integer - - Public Declare Function UnregisterHotKey Lib "user32" ( - ByVal Hwnd As IntPtr, - ByVal ID As Integer - ) As Integer - - Public Declare Auto Function GetWindowText Lib "user32" ( - ByVal hWnd As IntPtr, - ByVal lpString As StringBuilder, - ByVal cch As Integer - ) As Integer - - Public Declare Function GlobalAddAtom Lib "kernel32" Alias "GlobalAddAtomA" (ByVal IDString As String) As Short - Public Declare Function GlobalDeleteAtom Lib "kernel32" (ByVal Atom As Short) As Short - - Public Const STANDARD_RIGHTS_REQUIRED As Integer = &HF0000 - - Public Const SECTION_QUERY As Short = &H1 - Public Const SECTION_MAP_WRITE As Short = &H2 - Public Const SECTION_MAP_READ As Short = &H4 - Public Const SECTION_MAP_EXECUTE As Short = &H8 - Public Const SECTION_EXTEND_SIZE As Short = &H10 - Public Const SECTION_ALL_ACCESS As Integer = STANDARD_RIGHTS_REQUIRED Or SECTION_QUERY Or SECTION_MAP_WRITE Or SECTION_MAP_READ Or SECTION_MAP_EXECUTE Or SECTION_EXTEND_SIZE - Public Const FILE_MAP_ALL_ACCESS As Integer = SECTION_ALL_ACCESS - - Public Const PROCESS_VM_OPERATION As Short = &H8 - Public Const PROCESS_VM_READ As Short = &H10 - Public Const PROCESS_VM_WRITE As Short = &H20 - Public Const PROCESS_ALL_ACCESS As Long = &H1F0FFF - - Public Const MEM_COMMIT As Short = &H1000 - Public Const MEM_RESERVE As Short = &H2000 - Public Const MEM_DECOMMIT As Short = &H4000 - Public Const MEM_RELEASE As Integer = &H8000 - Public Const MEM_FREE As Integer = &H10000 - Public Const MEM_PRIVATE As Integer = &H20000 - Public Const MEM_MAPPED As Integer = &H40000 - Public Const MEM_TOP_DOWN As Integer = &H100000 - - Public Const INVALID_HANDLE_VALUE As Integer = -1 - Public Const SW_SHOW As Short = 5 - - Public Const SEE_MASK_INVOKEIDLIST = &HC - Public Const SEE_MASK_NOCLOSEPROCESS = &H40 - Public Const SEE_MASK_FLAG_NO_UI = &H400 - - Public Const ULW_COLORKEY As Integer = &H1 - Public Const ULW_ALPHA As Integer = &H2 - Public Const ULW_OPAQUE As Integer = &H4 - - Public Const AC_SRC_OVER As Byte = &H0 - Public Const AC_SRC_ALPHA As Byte = &H1 - - Public Const HTCAPTION As Integer = &H2 - - Public Const WM_NCLBUTTONDOWN As Integer = &HA1 - Public Const WM_HOTKEY As Integer = &H312 - Public Const WM_DRAWCLIPBOARD As Integer = &H308 - - Public Enum PageProtection As UInteger - NoAccess = &H1 - [Readonly] = &H2 - ReadWrite = &H4 - WriteCopy = &H8 - Execute = &H10 - ExecuteRead = &H20 - ExecuteReadWrite = &H40 - ExecuteWriteCopy = &H80 - Guard = &H100 - NoCache = &H200 - WriteCombine = &H400 - End Enum - - Public Enum ChildWindowFromPointFlags As UInteger - CWP_ALL - CWP_SKIPINVISIBLE - CWP_SKIPDISABLED - CWP_SKIPTRANSPARENT - End Enum - - - Public Structure WINDOWPOS - Public hwnd As IntPtr - Public hwndInsertAfter As IntPtr - Public x As Integer - Public y As Integer - Public cx As Integer - Public cy As Integer - Public flags As Integer - End Structure - - Public Structure RectangleAPI - Public Left As Integer - Public Top As Integer - Public Right As Integer - Public Bottom As Integer - - Public Overrides Function ToString() As String - Return String.Format("Top: {0}, Bottom: {1}, Left: {2}, Right: {3}", Top, Bottom, Left, Right) - End Function - End Structure - - Public Structure ShellExecuteInfo - Public cbSize As Integer - Public fMask As Integer - Public hwnd As IntPtr - Public lpVerb As String - Public lpFile As String - Public lpParameters As String - Public lpDirectory As String - Dim nShow As Integer - Dim hInstApp As IntPtr - Dim lpIDList As IntPtr - Public lpClass As String - Public hkeyClass As IntPtr - Public dwHotKey As Integer - Public hIcon As IntPtr - Public hProcess As IntPtr - End Structure - - - Public Structure PointAPI - Public X As Integer - Public Y As Integer - - Public Sub New(ByVal X As Integer, ByVal Y As Integer) - Me.X = X - Me.Y = Y - End Sub - End Structure -End Class diff --git a/Windows/Screen.vb b/Windows/Screen.vb deleted file mode 100644 index a8cc9a5e..00000000 --- a/Windows/Screen.vb +++ /dev/null @@ -1,89 +0,0 @@ -Imports System.Drawing -Imports System.Runtime.InteropServices -Imports System.Windows.Forms -Imports Microsoft.Win32 - -Public Class Screen - Public Function GetScreenScaling(Form As Form) As Single - Dim oHandle As IntPtr = Form.Handle - Dim oFactor1, oFactor2 As Single - - oFactor1 = GetFactorFromDeviceCaps(oHandle) - oFactor2 = GetDPIFromMonitor(oHandle) - - If oFactor1 > 1 Then - Return oFactor1 - Else - Return oFactor2 - End If - End Function - - ' ============================================================================================================= - ' === DEVICE CAPS - ' ============================================================================================================= - - - Friend Shared Function GetDeviceCaps(ByVal hdc As IntPtr, ByVal nIndex As Integer) As Integer - End Function - - Public Enum DeviceCap - VERTRES = 10 - DESKTOPVERTRES = 117 - End Enum - - Private Function GetFactorFromDeviceCaps(Handle As IntPtr) As Single - Dim g As Graphics = Graphics.FromHwnd(Handle) - Dim desktop As IntPtr = g.GetHdc() - Dim LogicalScreenHeight As Integer = GetDeviceCaps(desktop, CInt(DeviceCap.VERTRES)) - Dim PhysicalScreenHeight As Integer = GetDeviceCaps(desktop, CInt(DeviceCap.DESKTOPVERTRES)) - Dim oScreenScalingFactor As Single = CSng(PhysicalScreenHeight) / CSng(LogicalScreenHeight) - Return oScreenScalingFactor - End Function - - ' ============================================================================================================= - ' === MONITOR FROM WINDOW - ' ============================================================================================================= - - 'In W32 class - - Friend Shared Function MonitorFromWindow(ByVal hwnd As IntPtr, - ByVal dwFlags As Integer) As IntPtr - End Function - - Friend Const MONITORINFOF_PRIMARY As Integer = &H1 - Friend Const MONITOR_DEFAULTTONEAREST As Integer = &H2 - Friend Const MONITOR_DEFAULTTONULL As Integer = &H0 - Friend Const MONITOR_DEFAULTTOPRIMARY As Integer = &H1 - - - Friend Shared Function GetDpiForMonitor(ByVal hmonitor As IntPtr, - ByVal dpiType As Monitor_DPI_Type, - ByRef dpiX As UInteger, - ByRef dpiY As UInteger) As Integer - End Function - - Friend Enum Monitor_DPI_Type As Integer - MDT_Effective_DPI = 0 - MDT_Angular_DPI = 1 - MDT_Raw_DPI = 2 - MDT_Default = MDT_Effective_DPI - End Enum - - Private Function GetDPIFromMonitor(Handle As IntPtr) As Single - 'Get handle to monitor that contains this window. - Dim monitorHandle As IntPtr = MonitorFromWindow(Handle, MONITOR_DEFAULTTONEAREST) - - 'Get DPI (If the OS is not Windows 8.1 or newer, calling GetDpiForMonitor will cause exception). - Dim dpiX As UInteger - Dim dpiY As UInteger - - Dim result As Integer = GetDpiForMonitor(monitorHandle, Monitor_DPI_Type.MDT_Default, dpiX, dpiY) - - - If (result = 0) Then 'If S_OK (= 0) - Return dpiX / 96.0F - Else - Return -1 - End If - End Function -End Class diff --git a/Windows/Window.vb b/Windows/Window.vb deleted file mode 100644 index 7898fa24..00000000 --- a/Windows/Window.vb +++ /dev/null @@ -1,572 +0,0 @@ -Imports System.ComponentModel -Imports System.Drawing -Imports System.Runtime.InteropServices -Imports System.Text -Imports System.Windows.Forms -Imports DigitalData.Modules.Logging - -Public Class Window - Private _Logger As Logger - - Private Const WINDOW_SNAP_OFFSET = 35 - - Public Enum Anchor - TopLeft - BottomLeft - TopRight - BottomRight - End Enum - - Public Class RectangleInfo - Public Top As Integer = 0 - Public Left As Integer = 0 - Public Right As Integer = 0 - Public Bottom As Integer = 0 - - Public Overrides Function ToString() As String - Return String.Format("Top:{0},Left:{1},Bottom:{2},Right:{3}", Top, Left, Bottom, Right) - End Function - End Class - - Public Class WindowInfo - Public WindowTitle As String = "" - Public ProcessName As String = "" - Public ClassName As String = "" - Public ProcessId As Integer = 0 - Public ControlName As String = "" - Public hWnd As IntPtr = IntPtr.Zero - End Class - - Public Sub New(LogConfig As LogConfig) - _Logger = LogConfig.GetLogger() - End Sub - - ''' - ''' Returns Information about the currently focused window - ''' - Public Function GetWindowInfo() As WindowInfo - Try - Dim hWnd As IntPtr = NativeMethods.GetForegroundWindow() - Return GetWindowInfo(hWnd) - Catch ex As Exception - _Logger.Debug("Error in GetWindowInfo/0") - _Logger.Error(ex) - Throw ex - End Try - End Function - - ''' - ''' Returns Information about the Window with `hWnd` - ''' - Public Function GetWindowInfo(ByVal hWnd As IntPtr) As WindowInfo - Try - Dim oPID As Integer = 0 - Dim oTitleLength As Int32 = NativeMethods.GetWindowTextLength(hWnd) - Dim oWindowTitle As String = StrDup(oTitleLength + 1, "*") - Dim oClassBuilder As New StringBuilder(64) - - NativeMethods.GetWindowText(hWnd, oWindowTitle, oTitleLength + 1) - NativeMethods.GetWindowThreadProcessId(hWnd, oPID) - - If oPID = 0 Then - Return Nothing - End If - - Dim oProcess As Process = Process.GetProcessById(oPID) - - If oProcess Is Nothing Then - Return Nothing - End If - - NativeMethods.GetClassName(hWnd, oClassBuilder, 64) - - Return New WindowInfo With { - .hWnd = hWnd, - .ClassName = oClassBuilder.ToString, - .ProcessId = oProcess.Id, - .ProcessName = oProcess.ProcessName, - .WindowTitle = oWindowTitle.Replace(vbNullChar, String.Empty) - } - Catch ex As Exception - _Logger.Debug("Error in GetWindowInfo/1") - _Logger.Error(ex) - Throw ex - End Try - End Function - - ''' - ''' Returns the currently focused control - ''' - ''' Current window handle; can be obtained from Me.Handle - Public Function GetFocusedControl(WindowHandle As IntPtr) As WindowInfo - Try - Dim oWindow = GetWindowInfo() - - If oWindow Is Nothing Then - _Logger.Debug("Could not get Window Info!") - Return Nothing - End If - - Dim oThreadId As IntPtr = NativeMethods.GetWindowThreadProcessId(oWindow.hWnd, 0) - Dim oMyThreadId As IntPtr = NativeMethods.GetWindowThreadProcessId(WindowHandle, 0) - - If NativeMethods.AttachThreadInput(oThreadId, oMyThreadId, True) Then - Try - Dim oControlhWnd = NativeMethods.GetFocus() - Dim oControl As WindowInfo = GetWindowInfo(oControlhWnd) - - If oControl Is Nothing Then - _Logger.Debug("Could not get Control Info!") - Return Nothing - End If - - Dim oName = Utils.GetWinFormsId(oControlhWnd) - oControl.ControlName = oName - - - Return oControl - Catch ex As Exception - _Logger.Error(ex) - Finally - NativeMethods.AttachThreadInput(oThreadId, oMyThreadId, False) - End Try - End If - - Return Nothing - Catch ex As Exception - _Logger.Debug("Error in GetFocusedControl/1") - _Logger.Error(ex) - Throw ex - End Try - End Function - - ''' - ''' Returns Bounds of `ControlHandle`. Relative to `WindowHandle` and `Anchor` value. - ''' - Public Function GetControlLocation(ControlHandle As IntPtr, WindowHandle As IntPtr, Optional Anchor As Anchor = Anchor.TopLeft) As RectangleInfo - Dim oWindowRect As New NativeMethods.RectangleAPI - Dim oControlRect As New NativeMethods.RectangleAPI - Dim oResult As New RectangleInfo - - _Logger.Debug("Getting Control Location") - - Try - _Logger.Debug("Trying to get Window Rectangle") - If NativeMethods.GetWindowRect(New HandleRef(Me, WindowHandle), oWindowRect) = False Then - Return Nothing - End If - - _Logger.Debug("Trying to get Control Rectangle") - If NativeMethods.GetWindowRect(New HandleRef(Me, ControlHandle), oControlRect) = False Then - Return Nothing - End If - - Dim oRect As New NativeMethods.RectangleAPI - - ' Calculate Coordinates relative to parent window - oRect = GetRelativeRectangle(oControlRect, oWindowRect, Anchor) - - _Logger.Debug("Control Location for Anchor {0}: {1}", Anchor, oRect) - - oResult.Left = oRect.Left - oResult.Right = oRect.Right - oResult.Top = oRect.Top - oResult.Bottom = oRect.Bottom - - Return oResult - Catch ex As Exception - _Logger.Debug("Error in GetControlLocation/3") - _Logger.Error(ex) - Throw ex - End Try - End Function - - Public Function GetControlLocations(ControlHandle As IntPtr, WindowHandle As IntPtr) As Dictionary(Of String, RectangleInfo) - Dim oWindowRect As New NativeMethods.RectangleAPI - Dim oControlRect As New NativeMethods.RectangleAPI - Dim oResults As New Dictionary(Of String, RectangleInfo) - - _Logger.Debug("Getting Control Locations") - - Try - _Logger.Debug("Trying to get Window Rectangle") - If NativeMethods.GetWindowRect(New HandleRef(Me, WindowHandle), oWindowRect) = False Then - Return Nothing - End If - - _Logger.Debug("Trying to get Control Rectangle") - If NativeMethods.GetWindowRect(New HandleRef(Me, ControlHandle), oControlRect) = False Then - Return Nothing - End If - - - For Each oAnchor As Anchor In [Enum].GetValues(GetType(Anchor)) - Dim oRect As NativeMethods.RectangleAPI = GetRelativeRectangle(oControlRect, oWindowRect, oAnchor) - - _Logger.Debug("Control Location for Anchor {0}: {1}", oAnchor, oRect) - - oResults.Add(oAnchor.ToString, New RectangleInfo() With { - .Left = oRect.Left, - .Right = oRect.Right, - .Top = oRect.Top, - .Bottom = oRect.Bottom - }) - Next - - Return oResults - Catch ex As Exception - _Logger.Debug("Error in GetControlLocations/2") - _Logger.Error(ex) - Throw ex - End Try - End Function - - ''' - ''' Returns Bounds of the focused control. Relative to current form and `Anchor` value. - ''' - Public Function GetFocusedControlLocation(WindowHandle As IntPtr, Anchor As Anchor) As RectangleInfo - Dim oForegroundWindow As WindowInfo - Dim oFocusedControl As WindowInfo - - Try - oForegroundWindow = GetWindowInfo() - oFocusedControl = GetFocusedControl(WindowHandle) - - If IsNothing(oForegroundWindow) Then - _Logger.Debug("Foreground Window is nothing!") - End If - - If IsNothing(oFocusedControl) Then - _Logger.Debug("Focused Contol is nothing!") - End If - - _Logger.Debug("Control Handle: {0}", oFocusedControl.hWnd) - _Logger.Debug("Window Handle: {0}", oForegroundWindow.hWnd) - - Return GetControlLocation(oFocusedControl.hWnd, oForegroundWindow.hWnd, Anchor) - Catch ex As Exception - _Logger.Debug("Error in GetFocusedControlLocation/2") - _Logger.Error(ex) - Throw ex - End Try - End Function - - Public Function GetFocusedControlLocation(WindowHandle As IntPtr) As Dictionary(Of String, RectangleInfo) - Dim oForegroundWindow As WindowInfo - Dim oFocusedControl As WindowInfo - - Try - oForegroundWindow = GetWindowInfo() - oFocusedControl = GetFocusedControl(WindowHandle) - - If oForegroundWindow Is Nothing Then - _Logger.Warn("Foreground Window is Nothing!") - End If - - If oFocusedControl Is Nothing Then - _Logger.Warn("Focused Control is Nothing!") - End If - - Dim oDict As Dictionary(Of String, RectangleInfo) = GetControlLocations(oFocusedControl.hWnd, oForegroundWindow.hWnd) - - Return oDict - Catch ex As Exception - _Logger.Debug("Error in GetFocusedControlLocation/1") - _Logger.Error(ex) - Throw ex - End Try - End Function - - ''' - ''' Returns Bounds of the control under the cursor. Relative to current form and `Anchor` value. - ''' - Public Function GetHoveredControlLocation(Optional Anchor As Anchor = Anchor.TopLeft) As RectangleInfo - Dim oPoint As New NativeMethods.PointAPI - Dim oWindowRect As New NativeMethods.RectangleAPI - Dim oControlRect As New NativeMethods.RectangleAPI - Dim oForegroundWindow As IntPtr - Dim oControlUnderCursor As IntPtr - Dim oResult As New RectangleInfo - - Try - If NativeMethods.GetCursorPos(oPoint) = False Then - Return Nothing - End If - - oForegroundWindow = NativeMethods.GetForegroundWindow() - oControlUnderCursor = NativeMethods.WindowFromPoint(oPoint) - - Return GetControlLocation(oControlUnderCursor, oForegroundWindow, Anchor) - Catch ex As Exception - _Logger.Debug("Error in GetHoveredControlLocation/1") - _Logger.Error(ex) - Throw ex - End Try - End Function - - Public Function GetWindowRect(Handle As IntPtr) - Try - Dim oWindowRect As New NativeMethods.RectangleAPI - - If NativeMethods.GetWindowRect(New HandleRef(Me, Handle), oWindowRect) = False Then - Return Nothing - End If - - Return oWindowRect - Catch ex As Exception - _Logger.Debug("Error in GetWindowRect/1") - _Logger.Error(ex) - Throw ex - End Try - End Function - - Private Function GetRelativeRectangle(ControlRect As NativeMethods.RectangleAPI, WindowRect As NativeMethods.RectangleAPI, Anchor As Anchor) As NativeMethods.RectangleAPI - Try - Dim oScreenRect As Rectangle = System.Windows.Forms.Screen.PrimaryScreen.Bounds - Dim oLeft, oBottom, oTop, oRight As Integer - - _Logger.Debug("Calculating Rectangle for Anchor {0}", Anchor.ToString) - - Select Case Anchor - Case Anchor.TopLeft - oLeft = ControlRect.Left - WindowRect.Left - oTop = ControlRect.Top - WindowRect.Top - Case Anchor.BottomLeft - oLeft = ControlRect.Left - WindowRect.Left - oBottom = ControlRect.Bottom - WindowRect.Bottom - Case Anchor.TopRight - oRight = ControlRect.Right - WindowRect.Right - oTop = ControlRect.Top - WindowRect.Top - Case Anchor.BottomRight - oRight = ControlRect.Right - WindowRect.Right - oBottom = ControlRect.Bottom - WindowRect.Bottom - End Select - - _Logger.Debug("Done Calculating Rectangle for Anchor {0}", Anchor.ToString) - - Return New NativeMethods.RectangleAPI() With { - .Top = oTop, - .Bottom = oBottom, - .Left = oLeft, - .Right = oRight - } - Catch ex As Exception - _Logger.Debug("Error in GetRelativeRectangle/3") - _Logger.Error(ex) - Throw ex - End Try - End Function - - Private Function GetRect(Rect As NativeMethods.RectangleAPI, ParentRect As NativeMethods.RectangleAPI) As Rectangle - Try - Dim oX, oY, oWidth, oHeight As Integer - - oWidth = Rect.Right - Rect.Left - oHeight = Rect.Bottom - Rect.Top - oX = Rect.Left - ParentRect.Left - oY = Rect.Top - ParentRect.Top - - Return New Rectangle(oX, oY, oWidth, oHeight) - Catch ex As Exception - _Logger.Debug("Error in GetRect/2") - _Logger.Error(ex) - Throw ex - End Try - End Function - - Private Function GetRect(Rect As NativeMethods.RectangleAPI, ParentRect As Rectangle) As Rectangle - Try - Dim oX, oY, oWidth, oHeight As Integer - - oWidth = Rect.Right - Rect.Left - oHeight = Rect.Bottom - Rect.Top - oX = Rect.Left - ParentRect.X - oY = Rect.Top - ParentRect.Y - - Return New Rectangle(oX, oY, oWidth, oHeight) - Catch ex As Exception - _Logger.Debug("Error in GetRect/2") - _Logger.Error(ex) - Throw ex - End Try - End Function - - - Public Structure WINDOWPOS - Public hwnd As IntPtr - Public hwndInsertAfter As IntPtr - Public x As Integer - Public y As Integer - Public cx As Integer - Public cy As Integer - Public flags As Integer - End Structure - - Public Shared Sub SnapToDesktopBorder(pForm As Form, pLParam As IntPtr, Optional pWidthAdjustment As Integer = 0) - If pForm Is Nothing Then - ' Satisfies rule: Validate parameters - Throw New ArgumentNullException("pForm") - End If - - ' Snap client to the top, left, bottom or right desktop border - ' as the form is moved near that border - Try - ' Marshal the LPARAM value which is a WINDOWPOS struct - Dim oNewPosition As New WINDOWPOS - oNewPosition = CType(Marshal.PtrToStructure(pLParam, GetType(WINDOWPOS)), WINDOWPOS) - - If oNewPosition.y = 0 OrElse oNewPosition.x = 0 Then - Return ' Nothing to do! - End If - - ' Adjust the client size for borders and caption bar - Dim oClientRect As Rectangle = pForm.RectangleToScreen(pForm.ClientRectangle) - oClientRect.Width += SystemInformation.FrameBorderSize.Width - pWidthAdjustment - oClientRect.Height += (SystemInformation.FrameBorderSize.Height + SystemInformation.CaptionHeight) - - ' Now get the screen working area (without taskbar) - Dim oWorkingRect As Rectangle = System.Windows.Forms.Screen.GetWorkingArea(pForm.ClientRectangle) - - ' Left border - If oNewPosition.x >= oWorkingRect.X - WINDOW_SNAP_OFFSET AndAlso - oNewPosition.x <= oWorkingRect.X + WINDOW_SNAP_OFFSET Then - oNewPosition.x = oWorkingRect.X - End If - - ' Get screen bounds and taskbar height - ' (when taskbar is horizontal) - Dim oScreenRect As Rectangle = System.Windows.Forms.Screen.GetBounds(System.Windows.Forms.Screen.PrimaryScreen.Bounds) - Dim oTaskbarHeight As Integer = oScreenRect.Height - oWorkingRect.Height - - ' Top border (check if taskbar is on top - ' or bottom via WorkingRect.Y) - If oNewPosition.y >= -WINDOW_SNAP_OFFSET AndAlso - (oWorkingRect.Y > 0 AndAlso oNewPosition.y <= - (oTaskbarHeight + WINDOW_SNAP_OFFSET)) OrElse - (oWorkingRect.Y <= 0 AndAlso oNewPosition.y <= - (WINDOW_SNAP_OFFSET)) Then - If oTaskbarHeight > 0 Then - oNewPosition.y = oWorkingRect.Y ' Horizontal Taskbar - Else - oNewPosition.y = 0 ' Vertical Taskbar - End If - End If - - ' Right border - If oNewPosition.x + oClientRect.Width <= - oWorkingRect.Right + WINDOW_SNAP_OFFSET AndAlso - oNewPosition.x + oClientRect.Width >= - oWorkingRect.Right - WINDOW_SNAP_OFFSET Then - oNewPosition.x = oWorkingRect.Right - (oClientRect.Width + - SystemInformation.FrameBorderSize.Width) - End If - - ' Bottom border - If oNewPosition.y + oClientRect.Height <= - oWorkingRect.Bottom + WINDOW_SNAP_OFFSET AndAlso - oNewPosition.y + oClientRect.Height >= - oWorkingRect.Bottom - WINDOW_SNAP_OFFSET Then - oNewPosition.y = oWorkingRect.Bottom - (oClientRect.Height + - SystemInformation.FrameBorderSize.Height) - End If - - ' Marshal it back - Marshal.StructureToPtr(oNewPosition, pLParam, True) - Catch ex As ArgumentException - End Try - End Sub - - Public Class Utils - Private Shared GetControlNameMessage As Integer = 0 - - Public Shared Function GetWinFormsId(ByVal hWnd As IntPtr) As String - GetControlNameMessage = NativeMethods.RegisterWindowMessage("WM_GETCONTROLNAME") - Return XProcGetControlName(hWnd, GetControlNameMessage) - End Function - - Protected Shared Function XProcGetControlName(ByVal hwnd As IntPtr, ByVal msg As Integer) As String - Dim bytearray As Byte() = New Byte(65535) {} - Dim bufferMem As IntPtr = IntPtr.Zero - Dim written As IntPtr = IntPtr.Zero - Dim retHandle As IntPtr = IntPtr.Zero - Dim retVal As Boolean - Dim processHandle As IntPtr = IntPtr.Zero - Dim fileHandle As IntPtr = IntPtr.Zero - - If Not (Environment.OSVersion.Platform = PlatformID.Win32Windows) Then - - Try - Dim size As UInteger - size = 65536 - processHandle = NativeMethods.OpenProcess(NativeMethods.PROCESS_VM_OPERATION Or NativeMethods.PROCESS_VM_READ Or NativeMethods.PROCESS_VM_WRITE, False, GetProcessIdFromHWnd(hwnd)) - - If processHandle.ToInt64() = 0 Then - Throw New Win32Exception() - End If - - bufferMem = NativeMethods.VirtualAllocEx(processHandle, IntPtr.Zero, New UIntPtr(size), NativeMethods.MEM_RESERVE Or NativeMethods.MEM_COMMIT, NativeMethods.PageProtection.ReadWrite) - - If bufferMem.ToInt64() = 0 Then - Throw New Win32Exception() - End If - - retHandle = NativeMethods.SendMessage(hwnd, msg, New IntPtr(size), bufferMem) - retVal = NativeMethods.ReadProcessMemory(processHandle, bufferMem, bytearray, New UIntPtr(size), written) - - If Not retVal Then - Throw New Win32Exception() - End If - - Finally - retVal = NativeMethods.VirtualFreeEx(processHandle, bufferMem, New UIntPtr(0), NativeMethods.MEM_RELEASE) - - If Not retVal Then - Throw New Win32Exception() - End If - - NativeMethods.CloseHandle(processHandle) - End Try - Else - - Try - Dim size2 As Integer - size2 = 65536 - fileHandle = NativeMethods.CreateFileMapping(New IntPtr(NativeMethods.INVALID_HANDLE_VALUE), IntPtr.Zero, NativeMethods.PageProtection.ReadWrite, 0, size2, Nothing) - - If fileHandle.ToInt64() = 0 Then - Throw New Win32Exception() - End If - - bufferMem = NativeMethods.MapViewOfFile(fileHandle, NativeMethods.FILE_MAP_ALL_ACCESS, 0, 0, New UIntPtr(0)) - - If bufferMem.ToInt64() = 0 Then - Throw New Win32Exception() - End If - - NativeMethods.MoveMemoryFromByte(bufferMem, bytearray(0), size2) - retHandle = NativeMethods.SendMessage(hwnd, msg, New IntPtr(size2), bufferMem) - NativeMethods.MoveMemoryToByte(bytearray(0), bufferMem, 1024) - Finally - NativeMethods.UnmapViewOfFile(bufferMem) - NativeMethods.CloseHandle(fileHandle) - End Try - End If - - Return ByteArrayToString(bytearray) - End Function - - Private Shared Function GetProcessIdFromHWnd(ByVal hwnd As IntPtr) As UInteger - Dim pid As UInteger - NativeMethods.GetWindowThreadProcessId(hwnd, pid) - Return pid - End Function - - Private Shared Function ByteArrayToString(ByVal bytes As Byte()) As String - If Environment.OSVersion.Platform = PlatformID.Win32Windows Then - Return Encoding.[Default].GetString(bytes).TrimEnd(vbNullChar) - Else - Return Encoding.Unicode.GetString(bytes).TrimEnd(vbNullChar) - End If - End Function - End Class -End Class diff --git a/Windows/Windows.vbproj b/Windows/Windows.vbproj deleted file mode 100644 index f7f619dd..00000000 --- a/Windows/Windows.vbproj +++ /dev/null @@ -1,178 +0,0 @@ - - - - - Debug - AnyCPU - {5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86} - Library - DigitalData.Modules.Windows - DigitalData.Modules.Windows - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Modules.Windows.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Modules.Windows.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - ..\packages\NLog.4.7.10\lib\net45\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - frmPopup.vb - - - Form - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - frmPopup.vb - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {6ea0c51f-c2b1-4462-8198-3de0b32b74f8} - Base - - - {d3c8cfed-d6f6-43a8-9bdf-454145d0352f} - Language - - - {903B2D7D-3B80-4BE9-8713-7447B704E1B0} - Logging - - - - - {2DF8D04C-5BFA-101B-BDE5-00AA0044DE52} - 2 - 8 - 0 - primary - False - True - - - {00062FFF-0000-0000-C000-000000000046} - 9 - 6 - 0 - primary - False - True - - - {00020430-0000-0000-C000-000000000046} - 2 - 0 - 0 - primary - False - True - - - - \ No newline at end of file diff --git a/Windows/packages.config b/Windows/packages.config deleted file mode 100644 index 63f3075e..00000000 --- a/Windows/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file