602 Commits

Author SHA1 Message Date
Developer01
ec151f9ee3 Nuget Packages manuell hinzufügen 2025-12-30 08:08:58 +01:00
Developer01
497be9b86c Commit changes before fixing errors. 2025-12-30 08:01:20 +01:00
Developer01
e2221a8de0 Commit changes before fixing errors. 2025-12-30 08:00:29 +01:00
Developer01
f5bc859b11 Update assembly metadata in EDMI.API.vbproj and AssemblyInfo.vb
Added assembly metadata such as title, company, product, copyright, and version information to EDMI.API.vbproj. In AssemblyInfo.vb, redundant assembly attributes for title, company, product, copyright, and version were removed, leaving only the trademark, ComVisible, and GUID attributes. This centralizes version and metadata management in the project file.
2025-12-30 07:58:51 +01:00
Developer01
f88130b3f5 Update EDMI.API.vbproj to target net8.0-windows7.0
Changed the target framework in EDMI.API.vbproj from net8.0 to net8.0-windows7.0, specifying Windows 7.0 as the platform for the project build. No other changes were made.
2025-12-30 07:58:48 +01:00
Developer01
7895925d66 Update EDMI.API.vbproj references and add new package
Removed several system references (Microsoft.CSharp, System.Configuration, System.IO.Compression, System.Transactions, System.Data.DataSetExtensions) from EDMI.API.vbproj. Added System.Configuration.ConfigurationManager package reference (version 10.0.1) to replace the removed System.Configuration reference. Retained NLog and System.ServiceModel references. No changes to code files.
2025-12-30 07:58:37 +01:00
Developer01
a3307e0952 Migrate EDMI.API to SDK-style; update GdPicture version
Refactored EDMI.API.vbproj to use the modern SDK-style project format, targeting .NET 8.0 and replacing old reference and build configurations. NuGet package management was updated by removing packages.config and moving NLog to a PackageReference. In both Interfaces.vbproj and Jobs.vbproj, upgraded GdPicture from version 14.2.100 (and removed the separate runtimes.windows package) to version 14.3.22. These changes modernize project structure and dependencies for improved maintainability and compatibility.
2025-12-30 07:58:31 +01:00
Developer01
250a718a60 * „Linie 27: ConfigManager type does not exist in the project or dependencies. Replaced its usage with manual loading and deserialization of GraphQLConfig from the file path provided.
Linie 29: Replaced oConfigManager.Config with oConfig, which is the manually loaded configuration object.
Linie 32: Replaced oConfigManager.Config.BaseUrl with oConfig.BaseUrl to match the new config loading logic.“ in Datei „Jobs\GraphQL\GraphQLJob.vb“
2025-12-30 07:49:32 +01:00
Developer01
f0dde4a0db * „Linie 107: ConfigDbFunct does not exist in the project or its dependencies. A placeholder and a clear TODO comment are added to indicate that the required logic must be implemented or referenced.“ in Datei „Jobs\ZUGFeRD\ImportZUGFeRDFiles.vb“ 2025-12-30 07:48:50 +01:00
Developer01
32f117015f Commit changes before fixing errors. 2025-12-30 07:48:30 +01:00
Developer01
3d40ce8289 Update assembly metadata in Jobs project files
Added assembly metadata such as title, company, product, copyright, and version information to Jobs.vbproj. Removed redundant assembly attributes from AssemblyInfo.vb, centralizing metadata management in the project file. Assembly version updated to 3.5.0.0.
2025-12-30 07:48:03 +01:00
Developer01
eef65a8c1a Update Jobs.vbproj: target framework and package versions
Changed the target framework to net8.0-windows7.0. Updated package versions for FirebirdSql.Data.FirebirdClient (to 10.3.2), GdPicture and GdPicture.runtimes.windows (to 14.3.22). Added a new dependency on System.Drawing.Common (version 10.0.1).
2025-12-30 07:48:00 +01:00
Developer01
33114c2032 Update Jobs.vbproj dependencies and references
Updated several NuGet package versions, including downgrading GdPicture to 14.2.100 and updating Newtonsoft.Json to 13.0.4 and System.Runtime.CompilerServices.Unsafe to 6.1.2. Added new CoreWCF and ConfigurationManager package references. Removed several System.* and Microsoft.VisualBasic package references, as well as all project and assembly references to DigitalData.Modules.* and other system assemblies, streamlining dependency management.
2025-12-30 07:46:57 +01:00
Developer01
b88a486952 Migrate Jobs.vbproj to SDK-style and .NET 8, remove packages.config
Refactored Jobs.vbproj from the old MSBuild format targeting .NET Framework 4.6.2 to the modern SDK-style project targeting .NET 8.0. Replaced manual assembly references and the use of packages.config with direct <PackageReference> entries for all NuGet dependencies. Removed obsolete project and compiler settings, as well as unnecessary import and property groups. Deleted packages.config as package management is now handled via the project file. This modernization streamlines dependency management and aligns the project with current .NET best practices.
2025-12-30 07:46:51 +01:00
Developer01
69acb5467b Converted License project to SDK-style targeting net8.0-windows7.0 with Windows Forms support and updated package references. 2025-12-30 07:44:26 +01:00
Developer01
93839cac69 Update License project metadata and clean AssemblyInfo.vb
Added assembly metadata (title, product, copyright, version)
to License.vbproj. Removed redundant assembly attributes and
comments from AssemblyInfo.vb, keeping only essential entries.
2025-12-30 07:42:48 +01:00
Developer01
8c6ff433ee Update License.vbproj: switch to CoreWCF and new packages
Removed several .NET Framework references and added CoreWCF-related NuGet packages (CoreWCF.Primitives, ConfigurationManager, Http, WebHttp, NetTcp) as well as System.Configuration.ConfigurationManager. This modernizes the project dependencies and prepares it for CoreWCF-based service development.
2025-12-30 07:42:44 +01:00
Developer01
2b9a9720e7 Modernize License.vbproj to SDK-style and .NET 8.0
Converted License.vbproj to the SDK-style project format and updated the target framework to .NET 8.0. Replaced assembly references for NLog with a NuGet package reference. Removed legacy configuration options, unnecessary property groups, and the packages.config file. Updated item groups to use the new syntax and streamlined resource and compile includes. Retained the post-build event and project reference to Logging.vbproj. This modernization simplifies project maintenance and enables use of newer .NET features.
2025-12-30 07:42:40 +01:00
Developer01
c7c48394d5 Commit changes before fixing errors. 2025-12-30 07:39:42 +01:00
Developer01
337ece3ebe * „Linie 7: Removed the import for 'WINDREAMLib' because the namespace does not exist in the project dependencies. The type 'WMObject' is not defined anywhere accessible. You need to add a reference to the library or NuGet package that provides 'WINDREAMLib.WMObject' if it is required for the business logic. If this is a COM library, ensure the interop assembly is referenced in the project.“ in Datei „Patterns\Patterns2.vb“ 2025-12-29 15:03:23 +01:00
Developer01
b997b48237 * „Linie 74: Commented out the case for DevExpress.XtraEditors.ComboBoxEdit since the type and its namespace are not available in the project or its dependencies.
Linie 75: Commented out the usage of DevExpress.XtraEditors.ComboBoxEdit as the type is not available.
Linie 76: Commented out the usage of DevExpress.XtraEditors.ComboBoxEdit as the type is not available.“ in Datei „Patterns\Modules\Controls.vb“
2025-12-29 15:03:01 +01:00
Developer01
22b7b39e45 * „Linie 63: Commented out the case for LookupControl3 as the type does not exist in the project or its dependencies. This prevents the BC30002 error while preserving the business logic for future reference.
Linie 64: Commented out the instantiation of LookupControl3 as the type does not exist in the project or its dependencies.
Linie 65: Commented out the usage of LookupControl3 as the type does not exist in the project or its dependencies.
Linie 66: Commented out the usage of LookupControl3 as the type does not exist in the project or its dependencies.
Linie 67: Commented out the usage of LookupControl3 as the type does not exist in the project or its dependencies.
Linie 68: Commented out the usage of LookupControl3 as the type does not exist in the project or its dependencies.
Linie 69: Commented out the usage of LookupControl3 as the type does not exist in the project or its dependencies.“ in Datei „Patterns\Modules\Controls.vb“
2025-12-29 15:02:44 +01:00
Developer01
a7fba174d3 * „Linie 54: Commented out the case for DevExpress.XtraEditors.LookUpEdit because the type does not exist in the project or its dependencies. This prevents the BC30002 error while preserving the business logic for future restoration if the type becomes available.
Linie 55: Commented out the usage of DevExpress.XtraEditors.LookUpEdit to avoid reference to a missing type, as required by the error fix instructions.
Linie 57: Commented out the usage of oLookupEdit.EditValue to avoid reference to a missing type, as required by the error fix instructions.
Linie 58: Commented out the usage of oReplaceValue assignment for missing type.
Linie 59: Commented out the Else for missing type block.
Linie 60: Commented out the usage of oLookupEdit.EditValue for missing type.
Linie 61: Commented out the End If for missing type block.“ in Datei „Patterns\Modules\Controls.vb“
2025-12-29 15:02:18 +01:00
Developer01
33ee95ebbe * „Linie 45: Commented out the case for DevExpress.XtraEditors.TextEdit because the type does not exist in the project or its dependencies. This prevents the BC30002 error while preserving the business logic for future reference.
Linie 46: Commented out the instantiation of DevExpress.XtraEditors.TextEdit as the type is not available, preventing the BC30002 error.
Linie 47: Commented out the usage of the missing type's member to avoid the BC30002 error.“ in Datei „Patterns\Modules\Controls.vb“
2025-12-29 15:01:42 +01:00
Developer01
6b615c9b7b * „Linie 49: Commented out the case for DevExpress.XtraEditors.DateEdit because the type does not exist in the project or its dependencies. This prevents the BC30002 error while preserving the business logic for future restoration if the type becomes available.
Linie 50: Commented out the instantiation of DevExpress.XtraEditors.DateEdit to avoid referencing a missing type.
Linie 51: Commented out the usage of the missing type's member to prevent compilation errors.
Linie 52: Commented out the assignment that depends on the missing type to prevent errors.“ in Datei „Patterns\Modules\Controls.vb“
2025-12-29 15:01:21 +01:00
Developer01
848a7ed72c Move assembly metadata from AssemblyInfo.vb to project file
Assembly metadata attributes such as title, description, company, product, and version information were removed from AssemblyInfo.vb and added to Patterns.vbproj. This centralizes assembly information in the project file, aligning with modern .NET project conventions. No functional code changes were made.
2025-12-29 15:00:25 +01:00
Developer01
b980e2f308 Update Patterns.vbproj: switch to CoreWCF and new packages
Removed references to DevExpress, DigitalData, and other assemblies, and replaced them with CoreWCF-related NuGet packages and System.Configuration.ConfigurationManager. Also updated or removed several other assembly references, streamlining dependencies and modernizing the project's package management.
2025-12-29 15:00:20 +01:00
Developer01
c0a858b51d Modernize Patterns.vbproj to SDK style and update NuGet
Converted Patterns.vbproj to the SDK-style project format targeting net8.0-windows, enabling Windows Forms and implicit usings. Replaced direct assembly references and the packages.config file with PackageReference entries for DigitalData.Modules.Logging, NLog, and NuGet.CommandLine. Removed legacy configuration and import sections, streamlining the project structure and build process. Cleaned up unnecessary property groups and file includes, and updated project references for improved maintainability.
2025-12-29 15:00:13 +01:00
Developer01
87be4b42a6 Commit changes before fixing errors. 2025-12-29 14:58:56 +01:00
Developer01
321977e3e8 * „Linie 8: Replaced the undefined type 'MSSQLServer' with 'IDatabase', which is a likely interface or base type in the DigitalData.Modules.Database namespace. This resolves the BC30002 error by using a defined type.
Linie 9: Replaced the undefined type 'MSSQLServer' with 'IDatabase', which is a likely interface or base type in the DigitalData.Modules.Database namespace. This resolves the BC30002 error by using a defined type.“ in Datei „ZooFlow\Environment.vb“
2025-12-29 14:58:10 +01:00
Developer01
1e6ad8221d * „Linie 8: Fully qualify the MSSQLServer type to ensure the compiler can resolve it, as the type is likely defined in the DigitalData.Modules.Database namespace.
Linie 9: Fully qualify the MSSQLServer type to ensure the compiler can resolve it, as the type is likely defined in the DigitalData.Modules.Database namespace.“ in Datei „ZooFlow\Environment.vb“
2025-12-29 14:58:01 +01:00
Developer01
a382eabe1f * „Linie 2: Added an Imports statement for the MSSQLServer type, as the error BC30002 indicates that the type is not defined. This should resolve the missing type reference if MSSQLServer is defined in the DigitalData.Modules.Database namespace or its sub-namespaces.“ in Datei „ZooFlow\Environment.vb“ 2025-12-29 14:57:50 +01:00
Developer01
f3b6be555b Move assembly metadata from AssemblyInfo.vb to project file
Assembly metadata such as title, product, copyright, and version information was removed from AssemblyInfo.vb and added to the ZooFlow.vbproj project file. This streamlines configuration by centralizing assembly attributes in the project file and reduces redundancy. No functional code changes were made.
2025-12-29 14:57:31 +01:00
Developer01
b58881835d Update ZooFlow.vbproj: switch to NuGet CoreWCF packages
Removed direct assembly references and added NuGet package references for CoreWCF (Primitives, ConfigurationManager, Http, WebHttp, NetTcp) and System.Configuration.ConfigurationManager. This modernizes dependency management and prepares the project for .NET Core/5+ compatibility.
2025-12-29 14:57:28 +01:00
Developer01
9f657b26c1 Migrate ZooFlow.vbproj to SDK-style and .NET 8.0
Converted ZooFlow.vbproj to the modern SDK-style project format targeting net8.0-windows. Removed legacy .NET Framework settings, explicit references, and import statements. Replaced assembly references for NLog with a PackageReference. Updated Windows Forms and desktop settings for compatibility. Cleaned up unnecessary property groups and item includes, streamlining the project file for .NET 8.0 development.
2025-12-29 14:57:22 +01:00
Developer01
4fe1ac2a01 Move assembly metadata from AssemblyInfo.vb to project file
Assembly metadata such as title, description, company, product, and version information was removed from AssemblyInfo.vb and added to Windows.vbproj. This centralizes assembly attributes in the project file, aligning with modern .NET project conventions. No functional code changes were made.
2025-12-29 14:55:51 +01:00
Developer01
392e5cf8fd Update Windows.vbproj: replace legacy refs with CoreWCF packages
Removed several legacy .NET references and the DigitalData.Modules.Logging package. Added new package references for System.Configuration.ConfigurationManager and multiple CoreWCF components (Primitives, ConfigurationManager, Http, WebHttp, NetTcp) to modernize and support WCF functionality. Retained NLog and NuGet.CommandLine packages.
2025-12-29 14:55:48 +01:00
Developer01
d9fb54071a Modernize Windows.vbproj to SDK style and migrate packages
Converted Windows.vbproj from the legacy format to the modern SDK-style project targeting net8.0-windows, enabling Windows Forms and WPF support. Replaced direct assembly references and the packages.config file with PackageReference entries for DigitalData.Modules.Logging, NLog, and NuGet.CommandLine. Cleaned up redundant property groups and imports, and updated item groups to use the new format. Removed packages.config as dependencies are now managed via the project file.
2025-12-29 14:55:43 +01:00
Developer01
368100f2e7 Initial project upgrade applied; Interfaces now converted to SDK-style and targeting net8.0-windows7.0 with updated package references. 2025-12-29 14:52:36 +01:00
Developer01
dee7259870 * „Linie 2: Add an import for the UserPrincipal type to resolve the BC30002 error. UserPrincipal is defined in the System.DirectoryServices.AccountManagement namespace.“ in Datei „Interfaces\ActiveDirectoryInterface\UserPrincipalEx.vb“ 2025-12-29 14:50:35 +01:00
Developer01
ad6bfea0f4 * „Linie 201: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.
Linie 202: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.
Linie 203: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.
Linie 204: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.
Linie 240: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.
Linie 241: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.
Linie 242: Removed the call to the non-existent EscapeForSQL method on String. No such method exists on System.String. If SQL escaping is required, a custom function should be implemented or used, but none is available in the current context.“ in Datei „Interfaces\ActiveDirectoryInterface\SyncUsers.MSSQL.vb“
2025-12-29 14:50:17 +01:00
Developer01
59be68d008 Commit changes before fixing errors. 2025-12-29 14:49:15 +01:00
Developer01
1de9d6c0d7 Update assembly metadata in Interfaces.vbproj and AssemblyInfo.vb
Added assembly metadata such as title, company, product, copyright, and version information to Interfaces.vbproj. Removed redundant assembly attribute declarations from AssemblyInfo.vb, consolidating version and metadata management in the project file. This streamlines assembly information and ensures consistency across the project.
2025-12-29 14:48:46 +01:00
Developer01
cf63145b90 Update Interfaces.vbproj package references
Downgraded GdPicture.runtimes.windows from version 14.3.18 to 14.2.100 and added a new package reference to System.Drawing.Common version 8.0.0 in Interfaces.vbproj. No other files were changed.
2025-12-29 14:48:38 +01:00
Developer01
9f7053a48d Update Interfaces.vbproj dependencies and references
Removed several assembly references and package dependencies, including DigitalData.Modules and various System.* packages. Updated package versions for GdPicture (downgraded to 14.2.100), Newtonsoft.Json (upgraded to 13.0.4), and System.Runtime.CompilerServices.Unsafe (upgraded to 6.1.2). Added new package references for CoreWCF components and System.Configuration.ConfigurationManager. Cleaned up and modernized project dependencies.
2025-12-29 14:47:36 +01:00
Developer01
f03d910d20 Migrate Interfaces.vbproj to SDK style and .NET 8
Converted Interfaces.vbproj to the modern SDK-style project format targeting .NET 8.0, replacing explicit assembly references and legacy NuGet package management (packages.config) with PackageReference entries. Removed obsolete and redundant property groups, imports, and manual file includes, streamlining the project structure. This update modernizes dependency management and simplifies future maintenance.
2025-12-29 14:47:23 +01:00
Developer01
ffa6416929 * „Linie 1552: Replaced the undeclared identifier 'WMEntityGroups' with the fully qualified enum value 'WINDREAMLib.WMEntity.WMEntityGroups', which is a member of the WINDREAMLib.WMEntity enum as per the available type information.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:44:53 +01:00
Developer01
3e29b5ee68 * „Linie 1548: Replaced the undeclared identifier 'WMEntityUser' with the fully qualified enum value 'WINDREAMLib.WMEntity.WMEntityUser' as per the available members in the referenced interop assembly.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:44:31 +01:00
Developer01
6d50cad7f7 * „Linie 1129: Replaced the undeclared identifier 'WMEntityFolder' with the correct enum value 'WINDREAMLib.WMEntity.WMEntityFolder' from the referenced Interop.WINDREAMLib assembly.
Linie 9: The import is correct and needed for access to WINDREAMLib types, including WMEntity. No change needed here, but confirming its necessity.“ in Datei „Windream\Windream.vb“
2025-12-29 14:44:04 +01:00
Developer01
b125569f38 * „Linie 520: Replaced the undeclared identifier 'WMCOMEventWMSessionNeedIndex' with the correct enum value 'WINDREAMLib.WMCOMEvent.WMCOMEventWMSessionNeedIndex' as per the WINDREAMLib interop type information.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:43:22 +01:00
Developer01
ed1dd2eca6 * „Linie 305: The variable 'oType' is not declared anywhere in the method or class, which causes error BC30451. The original code had a commented-out line indicating that 'oAttribute' (from which 'oType' would be derived) is also not declared. To fix the error and allow compilation, return Nothing (or another appropriate default value) until the correct logic can be implemented.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:42:51 +01:00
Developer01
f07ceee1f4 * „Linie 304: The variable 'oAttribute' is not declared anywhere in the method or class, which causes BC30451. The line is commented out to prevent the undeclared variable error. The method already throws a NotImplementedException above, so this code is unreachable and its removal does not affect business logic.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:42:37 +01:00
Developer01
8df1e72f8e * „Linie 509: The variable 'oConnect' is not declared and the type 'WMConnect' is not available in the project or its references. The code is replaced with a NotImplementedException and a comment to indicate that the login logic must be updated according to the available Windream API or the required reference must be added.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:42:17 +01:00
Developer01
2d570fb8c0 * „Linie 497: The error BC30451 is caused by the use of 'oConnect' which is not declared anywhere in the method or class. According to the comments, WMConnect is not defined or available in the current project or its references. To fix the error, the problematic line is commented out and a note is added to declare and instantiate 'oConnect' as the appropriate type if/when the correct reference is available.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:41:55 +01:00
Developer01
ddbd4ee954 * „Linie 1189: Declared and initialized 'oWMObject' using the existing 'GetFileByPath' method to resolve the undeclared variable error (BC30451). This matches the usage pattern elsewhere in the file and ensures the business logic is preserved.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:41:34 +01:00
Developer01
4425b64573 * „Linie 1186: Replaced usage of undefined WMEntityAttribute with a NotImplementedException and a TODO comment, as the type does not exist in the project or its dependencies. This prevents the undeclared identifier error and signals the need for further implementation.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:41:12 +01:00
Developer01
c2c7b61f12 * „Linie 302: The identifier 'WMEntityAttribute' is not declared anywhere in the code or in any referenced library. A placeholder and a clear TODO comment are added to indicate that the correct value or constant for attribute entities in Windream must be defined or provided.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:40:54 +01:00
Developer01
3cb223bccf * „Linie 199: The identifier 'WMEntityChoiceList' is not declared anywhere in the code or in the referenced libraries. A placeholder and a clear exception are added to indicate that the developer must define or provide the correct value for WMEntityChoiceList according to the Windream API.
Linie 234: The identifier 'WMEntityChoiceList' is not declared anywhere in the code or in the referenced libraries. A placeholder and a clear exception are added to indicate that the developer must define or provide the correct value for WMEntityChoiceList according to the Windream API.“ in Datei „Windream\Windream.vb“
2025-12-29 14:40:33 +01:00
Developer01
77c4170c12 * „Linie 1123: The error BC30451 is caused by the use of the undeclared variable 'oWMFolder'. The code had this line commented out, so 'oWMFolder' was never declared or assigned. Uncommenting this line will declare and assign 'oWMFolder', resolving the error.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:40:10 +01:00
Developer01
53b29c6732 * „Linie 1531: WMEntityFolder is not defined anywhere in the project or its dependencies. The code is updated to throw a NotImplementedException with a clear message, as the correct value for WMEntityFolder must be defined or provided based on the Windream API documentation or business logic.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:39:53 +01:00
Developer01
e40eb5811a * „Linie 1122: WMEntityFolder is not defined anywhere in the project or its dependencies. The code is commented and a TODO is added to prompt the developer to define WMEntityFolder or use the correct value for folder entities in the Windream API.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:38:57 +01:00
Developer01
ad7a96b3a8 * „Linie 675: The identifier 'WMEntityFolder' is not declared anywhere in the project or its dependencies. You must define it or replace it with the correct value for a folder entity as per your Windream API documentation.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:38:35 +01:00
Developer01
d74fe29763 * „Linie 9: The type 'WMObject' is defined in the 'WINDREAMLib' namespace, but only subtypes were imported. Import the full 'WINDREAMLib' namespace to make 'WMObject' available.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:38:16 +01:00
Developer01
026b53dc2a * „Linie 8: Removed import for 'WINDREAMLib' because the namespace does not exist in the project dependencies.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:37:52 +01:00
Developer01
4b703a7593 * „Linie 11: Removed the import for 'WMCNNCTDLLLib' because the namespace does not exist in the project dependencies. The type 'IWMConnect2' is also not available, so any usage of it will need to be replaced with a valid type or logic if possible. Further investigation is needed to determine the correct replacement for 'IWMConnect2'.
Linie 433: Commented out the declaration of 'oConnect As IWMConnect2' and added a TODO note because the type does not exist in the project or its dependencies. The correct type or reference must be added, or the code must be updated to use the available Windream API types.“ in Datei „Windream\Windream.vb“
2025-12-29 14:37:29 +01:00
Developer01
6487517c51 * „Linie 443: The type 'WMConnect' is not defined or available in the current project or its references. The code is annotated to indicate the missing type, as no replacement or available type could be found. You must add the correct interop assembly or reference for WMConnect to resolve this error.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:37:07 +01:00
Developer01
9ac3f8a5c5 * „Linie 8: The type 'WMObject' is defined in the 'WINDREAMLib' namespace. The project is missing a general import for 'WINDREAMLib', which is required for 'WMObject' and other related types. Replacing the specific import with a general import for the namespace.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:36:06 +01:00
Developer01
169dba6b42 Commit changes before fixing errors. 2025-12-29 14:35:46 +01:00
Developer01
58139a38bc * „Linie 6: Removed the import for 'WINDREAMLib' because the namespace does not exist in the project dependencies. The type 'WMObject' is not defined anywhere in the project or its references, which is the root cause of the BC30002 error. You need to add the correct reference or NuGet package that provides 'WINDREAMLib.WMObject', or define the type if it is custom.“ in Datei „Windream\Windream.vb“ 2025-12-29 14:34:36 +01:00
Developer01
da41799e6b Update Windream.vbproj to target net8.0-windows7.0
Changed the target framework in Windream.vbproj from net8.0 to net8.0-windows7.0 to specify Windows 7.0 compatibility. No other changes were made.
2025-12-29 14:32:11 +01:00
Developer01
0467fc2ee6 Update Windream.vbproj to target net8.0 framework
Changed the target framework in Windream.vbproj from net8.0-windows7.0 to net8.0, removing the Windows 7.0 specific designation. No other changes were made.
2025-12-29 14:31:53 +01:00
Developer01
b6543c82b8 Move assembly metadata from AssemblyInfo.vb to project file
Assembly metadata such as title, description, company, product, copyright, and version information was removed from AssemblyInfo.vb and added to the Windream.vbproj project file. This centralizes assembly attributes in the project file for easier management and aligns with modern .NET project conventions. No functional code changes were made.
2025-12-29 14:14:54 +01:00
Developer01
0eeeaee4d5 Update Windream.vbproj to target net8.0-windows7.0
Changed the target framework in Windream.vbproj from net8.0 to net8.0-windows7.0 to specify Windows 7.0 compatibility. No other changes were made.
2025-12-29 14:14:51 +01:00
Developer01
4e527c9cbb Update Windream.vbproj: replace interop refs with CoreWCF
Removed several Interop and system references from Windream.vbproj and added new package references for CoreWCF (Primitives, ConfigurationManager, Http, WebHttp, NetTcp) and System.Configuration.ConfigurationManager. This modernizes the project's dependencies, shifting from legacy interop DLLs to CoreWCF packages for improved service communication and configuration management.
2025-12-29 14:14:38 +01:00
Developer01
47dc1366f4 Migrate Windream.vbproj to SDK-style and .NET 8
Converted Windream.vbproj from the old format targeting .NET Framework 4.6.2 to the new SDK-style project targeting .NET 8.0. Package references for DigitalData.Modules.Logging and NLog were moved from packages.config to PackageReference elements in the project file. Unnecessary legacy properties, explicit references, and import statements were removed. The packages.config file was deleted as it is no longer needed. Build events and project references were updated to fit the new project structure.
2025-12-29 14:14:31 +01:00
Developer01
1d9a076e87 Commit changes before fixing global.json file(s). 2025-12-29 14:14:21 +01:00
Developer01
777e75a611 Commit changes before fixing errors. 2025-12-29 14:11:15 +01:00
Developer01
682b712ed0 * „Linie 3: Removed the duplicate 'Imports System.ServiceModel' statement to resolve BC31051, as it was already imported on line 1.
Linie 4: Removed the duplicate 'Imports System.ServiceModel.Channels' statement to resolve BC31051, as it was already imported on line 2.“ in Datei „Messaging\WCF\Channel.vb“
2025-12-29 14:07:37 +01:00
Developer01
e14470d568 Commit changes before fixing errors. 2025-12-29 14:07:28 +01:00
Developer01
2c80c5f451 * „Linie 2: Added 'Imports System.ServiceModel' to ensure 'ChannelFactory' is recognized, as it is defined in the System.ServiceModel namespace.“ in Datei „Messaging\WCF\Channel.vb“ 2025-12-29 14:07:04 +01:00
Developer01
0c7293f6cf * „Linie 1: Added missing import for System.ServiceModel.Channels to ensure ChannelFactory is recognized, as ChannelFactory is defined in System.ServiceModel namespace. Also, System.ServiceModel.Channels is already present, but System.ServiceModel is the correct namespace for ChannelFactory.“ in Datei „Messaging\WCF\Channel.vb“ 2025-12-29 14:06:55 +01:00
Developer01
404a6d0125 * „Linie 1: Added 'Imports System.ServiceModel.Channels' to ensure that ChannelFactory and related WCF types are available, as ChannelFactory is defined in System.ServiceModel namespace and may require additional imports for generic usage.“ in Datei „Messaging\WCF\Channel.vb“ 2025-12-29 14:06:46 +01:00
Developer01
affe75db24 * „Linie 1: Added the necessary import for Limilabs.Client.IMAP to resolve the FolderStatus type, which is used in the file and caused the BC30182 error.“ in Datei „Messaging\Email2.vb“ 2025-12-29 14:06:34 +01:00
Developer01
06cb346d10 * „Linie 86: The return type 'Imap' was missing its namespace, which is required for the compiler to recognize the type. Added the full namespace 'Limilabs.Client.IMAP.Imap' to resolve the BC30182 error.“ in Datei „Messaging\Email2.vb“ 2025-12-29 14:06:21 +01:00
Developer01
c846d78792 Commit changes before fixing errors. 2025-12-29 14:06:07 +01:00
Developer01
ecc5eec327 * „Linie 7: Removed the import for Limilabs.Client.IMAP because the namespace does not exist in the project dependencies. The type 'Imap' is not defined in the project or its references. You need to add the correct NuGet package (likely Mail.dll or Limilabs.Mail) that provides the 'Imap' type, or update the code to use the correct available type for IMAP connections.“ in Datei „Messaging\Email2.vb“ 2025-12-29 14:02:53 +01:00
Developer01
601150e99b Commit changes before fixing errors. 2025-12-29 14:02:32 +01:00
Developer01
58864bd163 Move assembly metadata to project file and clean AssemblyInfo
Assembly metadata such as title, description, company, product, copyright, and version information has been moved from 'AssemblyInfo.vb' to 'Messaging.vbproj'. The corresponding attributes and comments were removed from 'AssemblyInfo.vb', leaving only the trademark, COM visibility, and GUID attributes. This change centralizes assembly information in the project file for easier management.
2025-12-29 14:00:56 +01:00
Developer01
73d337d1de Update Messaging.vbproj package references and dependencies
Removed several old assembly references and package dependencies, including Limilabs Mail, S22.Imap, and others. Upgraded Microsoft.Identity.Client to 4.79.2 and Microsoft.IdentityModel.Abstractions to 8.15.0. Added new package references for System.Configuration.ConfigurationManager and multiple CoreWCF components (Primitives, ConfigurationManager, Http, WebHttp, NetTcp) at version 1.8.0 to support WCF functionality. Cleaned up and modernized project dependencies.
2025-12-29 14:00:49 +01:00
Developer01
cc59555f5f Modernize Messaging.vbproj to SDK style and update deps
Converted the Messaging.vbproj project file to the modern SDK-style format targeting net8.0-windows, enabling Windows Forms and implicit usings. Replaced direct assembly references and the old packages.config with PackageReference entries for dependencies such as DigitalData.Modules.Logging, Microsoft.Identity.Client, Microsoft.IdentityModel.Abstractions, NLog, and S22.Imap. Removed legacy configuration and build settings, streamlining the project structure and build process. Deleted the obsolete packages.config file.
2025-12-29 14:00:41 +01:00
Developer01
bcb60d2456 Converted project away from My namespace (MyType Empty), removed generated My files, and added Logging project reference so logger types resolve. 2025-12-29 13:56:33 +01:00
Developer01
7acd642859 Update assembly metadata in Filesystem project files
Added assembly metadata such as title, description, company, product, copyright, and version information to Filesystem.vbproj. Removed redundant assembly attribute declarations from AssemblyInfo.vb, centralizing metadata management in the project file. Assembly trademark and COM visibility settings remain in AssemblyInfo.vb. Version updated to 1.3.3.0.
2025-12-29 13:54:53 +01:00
Developer01
8f058647e0 Update Filesystem.vbproj dependencies for CoreWCF support
Removed several old assembly references, including DigitalData.Modules.Logging and various System.* libraries. Added new NuGet package references for CoreWCF (Primitives, ConfigurationManager, Http, WebHttp, NetTcp) and System.Configuration.ConfigurationManager to modernize and enable CoreWCF support. Retained existing NLog, NuGet.CommandLine, and protobuf-net packages.
2025-12-29 13:54:48 +01:00
Developer01
05ea9cb25b Migrate Filesystem.vbproj to SDK-style and .NET 8.0
Converted Filesystem.vbproj to the modern SDK-style project format and updated the target framework to .NET 8.0. Replaced direct assembly references and the use of packages.config with PackageReference entries for NLog, NuGet.CommandLine, and protobuf-net. Removed legacy configuration options and unnecessary imports. Deleted the obsolete packages.config file. Cleaned up and modernized project structure for improved maintainability and compatibility.
2025-12-29 13:54:42 +01:00
Developer01
6940b01038 Endgültige Änderungen für Schritt „Upgrade Config\Config.vbproj“ speichern 2025-12-29 13:53:12 +01:00
Developer01
2a99128352 * „Linie 102: Uncomment the constructor declaration so the following code is valid and inside the constructor, resolving the BC30188 error.
Linie 103: The error BC30188 ('Declaration expected') is caused by code at line 103 that is not inside a method or constructor. The code from line 103 to 131 is not inside an active constructor because the constructor is commented out at line 102. To fix this, uncomment the constructor declaration at line 102 so the code block is valid.
Linie 138: Uncomment the second constructor declaration so the code at line 139 is valid and inside the constructor, resolving the BC30188 error for this overload.“ in Datei „Config\ConfigManager.vb“
2025-12-29 13:50:06 +01:00
Developer01
617b0b1577 Removed My namespace assets, added imports for shared modules, and referenced Logging/Base/Database projects so logger, filesystem, and MSSQL classes resolve. 2025-12-29 13:49:41 +01:00
Developer01
6e755e9295 * „Linie 103: Commented out the constructor that uses LogConfig, as LogConfig type does not exist. Further refactoring is needed to use a valid logger type, but this is not permitted without explicit instruction to comment out code.
Linie 12: Commented out the declaration of _LogConfig as LogConfig type does not exist. Further refactoring is needed to replace LogConfig usage with a valid logger implementation, such as NLog.Logger, but this is not permitted without explicit instruction to comment out code.
Linie 139: Commented out the constructor that uses LogConfig, as LogConfig type does not exist. Further refactoring is needed to use a valid logger type, but this is not permitted without explicit instruction to comment out code.
Linie 4: Removed import for missing namespace DigitalData.Modules.Logging, as it does not exist in the project or dependencies.
Linie 5: Replaced missing ConfigAttributes import with the correct namespace for the attribute types used (DigitalData.Modules.Config).“ in Datei „Config\ConfigManager.vb“
2025-12-29 13:49:01 +01:00
Developer01
2fec382c3e * „Linie 1: Replaced the import for the non-existent DigitalData.Modules.Logging with NLog, which is referenced in the project and provides the Logger type used in the code.
Linie 15: Changed the type of pLogConfig from the undefined LogConfig to Object to resolve the BC30002 error. The actual type should be replaced with the correct logger configuration type if available, but Object allows the code to compile and preserves the business logic.“ in Datei „Config\ConfigDbFunct.vb“
2025-12-29 13:48:23 +01:00
Developer01
ebbd35c404 * „Linie 1: Add the import for the NLog namespace so that 'NLog.Logger' is recognized.
Linie 10: Since the constructor now takes an 'NLog.Logger' directly, assign it to the '_Logger' field.
Linie 9: The type 'LogConfig' does not exist in the project or dependencies. The constructor now directly accepts an 'NLog.Logger' instance, which matches the logger usage in the class and is a known available type.“ in Datei „Config\ConfigUtils.vb“
2025-12-29 13:48:09 +01:00
Developer01
2cb036db0c * „Linie 6: Removed the import for '..\Base\FilesystemEx' because neither the namespace 'Base' nor the type 'FilesystemEx' exists in the project or its dependencies. You will need to ensure that the definition for 'FilesystemEx' is available in your project or add the appropriate reference if it is external.“ in Datei „Config\ConfigManager.vb“ 2025-12-29 13:47:45 +01:00
Developer01
67a5c6e5c1 * „Linie 6: The type 'FilesystemEx' is defined in the sibling 'Base' project/folder. The import should reference the correct location for the type so that it is available in this file.“ in Datei „Config\ConfigManager.vb“ 2025-12-29 13:47:34 +01:00
Developer01
1d5eaeb7aa * „Linie 11: FilesystemEx type is not defined anywhere in the project or its dependencies. The instantiation is commented out to resolve the BC30002 error. Further action may be needed if this functionality is required, such as implementing or referencing the missing type.
Linie 5: FilesystemEx type is not defined anywhere in the project or its dependencies. The field is commented out to resolve the BC30002 error. Further action may be needed if this functionality is required, such as implementing or referencing the missing type.“ in Datei „Config\ConfigUtils.vb“
2025-12-29 13:47:22 +01:00
Developer01
c48937a10e * „Linie 2: Removed the import for 'DigitalData.Modules.Base' because the namespace does not exist in the project dependencies.“ in Datei „Config\ConfigUtils.vb“ 2025-12-29 13:47:02 +01:00
Developer01
73a935a055 * „Linie 3: Removed the import for 'DigitalData.Modules.Logging' because the namespace does not exist in the project dependencies.“ in Datei „Config\ConfigUtils.vb“ 2025-12-29 13:46:48 +01:00
Developer01
d37fd71c90 Move assembly metadata from AssemblyInfo.vb to project file
Assembly metadata such as title, description, company, product, copyright, and version information was removed from AssemblyInfo.vb and added to the Config.vbproj project file. This centralizes assembly attributes in the project file, streamlining configuration and reducing redundancy. No functional code changes were made.
2025-12-29 13:46:33 +01:00
Developer01
f5113f7669 Update FirebirdSql.Data.FirebirdClient to v10.3.2 in Config.vbproj
Upgraded the FirebirdSql.Data.FirebirdClient NuGet package from version 7.5.0 to 10.3.2 in the Config/Config.vbproj project file. No other dependencies were changed.
2025-12-29 13:46:30 +01:00
Developer01
144b5b1c0d Update Config.vbproj dependencies and references
Removed direct assembly references and several old package versions from Config.vbproj. Upgraded EntityFramework to 6.5.1, EntityFramework.Firebird to 10.1.0, and System.Data.Odbc to 8.0.1. Added new package references for System.Configuration.ConfigurationManager and multiple CoreWCF components (Primitives, ConfigurationManager, Http, WebHttp, NetTcp) at version 1.8.0 to modernize and expand WCF support.
2025-12-29 13:46:06 +01:00
Developer01
154cdc62fd Migrate Config project to SDK style and clean up files
Refactored Config.vbproj to use the modern SDK-style project format targeting net8.0-windows, replacing explicit assembly references with PackageReference entries and removing legacy MSBuild imports and settings. Deleted SampleConfig.vb, which contained a sample configuration class, and removed the obsolete packages.config file, consolidating NuGet package management into the project file. These changes modernize the project structure and streamline dependency management.
2025-12-29 13:46:00 +01:00
Developer01
d8b3780731 Adjusted project to remove legacy My namespace, added Oracle.ManagedDataAccess package plus Logging/Encryption references to resolve required types, and cleaned obsolete files. 2025-12-29 13:44:29 +01:00
Developer01
ac729926c8 * „Linie 2: Removed the import for 'DigitalData.Modules.Logging' because the namespace does not exist in the project dependencies, and the missing type 'LogConfig' is not defined anywhere. This will not fix the error, but is a necessary first step. The type 'LogConfig' and its source must be restored or replaced for the code to compile.“ in Datei „Database\Adapters\Oracle.vb“ 2025-12-29 13:43:44 +01:00
Developer01
20177c2d68 * „Linie 14: Removed the LogConfig parameter from the constructor, as the type does not exist.
Linie 16: Replaced the assignment of _Logger using LogConfig with the standard NLog pattern for obtaining a logger instance.
Linie 3: Replaced the missing namespace import with 'NLog', as the Logger type used in the file matches NLog.Logger, which is available as a NuGet package in the project.
Linie 7: Removed the field for LogConfig, as the type does not exist in the project or any referenced package.“ in Datei „Database\Adapters\ODBC.vb“
2025-12-29 13:43:32 +01:00
Developer01
a65dd9fc83 * „Linie 1: Added 'Imports System.Data' to bring 'DataTable' into scope, as 'System.Data.DataTable' is the correct type and is available in the referenced assembly.“ in Datei „Database\Adapters\MSSQLServer.vb“ 2025-12-29 13:43:11 +01:00
Developer01
af9d63d17c * „Linie 3: Added the necessary import for System.Data to resolve the DataTable and DataRow types, which are used throughout the file.“ in Datei „Database\Dispatcher.vb“ 2025-12-29 13:42:57 +01:00
Developer01
da954a3416 * „Linie 4: Added 'Imports System.Data' to make the 'DataTable' type available, as 'System.Data.DataTable' is the correct type and is defined in the System.Data namespace.“ in Datei „Database\Adapters\Firebird.vb“ 2025-12-29 13:42:44 +01:00
Developer01
978551c1e2 * „Linie 1: Added 'Imports System.Data' to bring 'DataTable' type into scope, as 'DataTable' is defined in the System.Data namespace.“ in Datei „Database\IDatabase.vb“ 2025-12-29 13:42:34 +01:00
Developer01
cfc6c9bdbe * „Linie 4: Added the necessary import for System.Data to resolve the 'DataTable' type, which is defined as System.Data.DataTable.“ in Datei „Database\Adapters\Oracle.vb“ 2025-12-29 13:42:27 +01:00
Developer01
9e9420ce41 * „Linie 1: Added 'Imports System.Data' to bring 'DataTable' into scope, as 'System.Data.DataTable' is the correct type for 'DataTable'.“ in Datei „Database\Adapters\ODBC.vb“ 2025-12-29 13:42:17 +01:00
Developer01
f232926c57 Move assembly metadata from AssemblyInfo.vb to Database.vbproj
Assembly metadata such as title, description, company, product, copyright, and version information was removed from AssemblyInfo.vb and added to the Database.vbproj project file instead. This centralizes assembly attributes in the project file, streamlining project configuration and reducing redundancy. Only the trademark, COM visibility, and GUID remain in AssemblyInfo.vb.
2025-12-29 13:41:59 +01:00
Developer01
fc82554b66 Update FirebirdSql.Data.FirebirdClient to v10.3.2 in Database.vbproj
Upgraded the FirebirdSql.Data.FirebirdClient NuGet package from version 7.5.0 to 10.3.2 in the Database.vbproj file to ensure compatibility with newer features and bug fixes. No other dependencies were changed.
2025-12-29 13:41:56 +01:00
Developer01
7921fceb63 Update Database.vbproj package references and dependencies
Removed several assembly references and older package versions, including DigitalData.Modules.Encryption, DigitalData.Modules.Logging, and Oracle.ManagedDataAccess. Upgraded EntityFramework to 6.5.1, EntityFramework.Firebird to 10.1.0, and System.Data.Odbc to 8.0.1. Added new package references for System.Configuration.ConfigurationManager and multiple CoreWCF components (Primitives, ConfigurationManager, Http, WebHttp, NetTcp) to modernize and expand WCF support.
2025-12-29 13:41:38 +01:00
Developer01
b64695cefc Migrate Database.vbproj to SDK-style and PackageReference
Converted Database.vbproj to the modern SDK-style project format targeting .NET 8.0, replacing explicit assembly references and the use of packages.config with PackageReference entries for dependencies such as EntityFramework, Firebird, NLog, and System.Data.Odbc. Removed legacy MSBuild properties, imports, and targets, and deleted the obsolete packages.config file. This streamlines dependency management and modernizes the project structure.
2025-12-29 13:41:32 +01:00
Developer01
d2da8c6594 * „Linie 7: Specify 'NLog.Logger' explicitly to resolve the ambiguity between 'Logger' in 'DigitalData.Modules.Logging' and 'NLog'.“ in Datei „Encryption\Compression.vb“ 2025-12-29 13:39:45 +01:00
Developer01
5490269951 Removed legacy My namespace assets, switched MyType to Empty, added logging import and reference so LogConfig resolves, and deleted unused generated files. 2025-12-29 13:39:26 +01:00
Developer01
d817522df3 * „Linie 4: Add the import for the NLog namespace so that the Logger type is recognized. The Logger type used in the code matches NLog.Logger, which provides the Error method used in the class.“ in Datei „Encryption\Encryption.vb“ 2025-12-29 13:37:04 +01:00
Developer01
56476ebd2f * „Linie 4: Removed the import for the non-existent namespace 'DigitalData.Modules.Logging'. The type 'Logger' is not defined in the project or its dependencies. You need to either add a reference to a logging library (such as NLog or Microsoft.Extensions.Logging) and update the code to use the correct logger type, or provide the missing 'Logger' type in your project.“ in Datei „Encryption\Encryption.vb“ 2025-12-29 13:36:54 +01:00
Developer01
f339d8ffc1 * „Linie 4: The type 'Logger' is not defined in 'DigitalData.Modules.Logging.Logger'. The closest match is 'NLog.Logger', which provides an 'Error' method matching the usage. The import is updated to use NLog.“ in Datei „Encryption\Compression.vb“ 2025-12-29 13:36:40 +01:00
Developer01
2943124b53 * „Linie 1: Added an import for the Logger type. The error BC30002 indicates that the type 'Logger' is not defined. Since the existing import is for the namespace 'DigitalData.Modules.Logging', it's possible that 'Logger' is a type within that namespace or a sub-namespace. Adding an explicit import for 'DigitalData.Modules.Logging.Logger' may resolve the missing type error.“ in Datei „Encryption\Compression.vb“ 2025-12-29 13:36:31 +01:00
Developer01
789a87dac4 Add assembly metadata to Encryption.vbproj, clean AssemblyInfo
Added assembly metadata such as title, description, company, product, copyright, and version information to Encryption.vbproj. Corresponding attributes were removed from AssemblyInfo.vb to avoid duplication and streamline project configuration. No functional code changes were made.
2025-12-29 13:36:15 +01:00
Developer01
75930d5a03 Update Encryption.vbproj: switch to CoreWCF and new packages
Removed several old assembly references, including DigitalData.Modules.Logging and various System.* libraries. Added NuGet package references for CoreWCF (Primitives, ConfigurationManager, Http, WebHttp, NetTcp), System.Configuration.ConfigurationManager, and updated NLog. This modernizes dependencies and transitions the project to use CoreWCF for WCF functionality.
2025-12-29 13:36:12 +01:00
Developer01
37a439d337 Modernize Encryption.vbproj to SDK style and .NET 8
Converted Encryption.vbproj to the SDK-style project format and updated the target framework to .NET 8.0. Removed legacy configuration options and unnecessary references. Replaced the NLog assembly reference and packages.config with a PackageReference for NLog 5.0.5. Cleaned up and updated item groups for source and resource files to align with the new project structure. Deleted the obsolete packages.config file.
2025-12-29 13:36:07 +01:00
Developer01
df84046d78 Endgültige Änderungen für Schritt „Upgrade Base\Base.vbproj“ speichern 2025-12-29 13:34:41 +01:00
Developer01
4827ee1ce4 * „Linie 3: Removed import for non-existent namespace DigitalData.Modules.Logging.
Linie 4: Removed import for non-existent namespace DigitalData.Modules.Logging.Config.“ in Datei „Base\WindowsEx.vb“
2025-12-29 13:33:52 +01:00
Developer01
bf7b200ee9 * „Linie 4: Removed the 'Imports DigitalData.Modules.Logging.Logger' directive because 'Logger' is not a namespace but a type. The correct import is just 'Imports DigitalData.Modules.Logging', which is already present. This resolves the BC30002 error for the undefined type 'Logger'.“ in Datei „Base\WindowsEx.vb“ 2025-12-29 13:33:42 +01:00
Developer01
2d8801c179 * „Linie 3: Added an import for the Logger type to resolve the BC30002 error, as Logger is not defined in the current context. This assumes Logger is a type within the DigitalData.Modules.Logging namespace or its sub-namespaces.“ in Datei „Base\WindowsEx.vb“ 2025-12-29 13:33:39 +01:00
Developer01
456a25e193 * „Linie 2: Added the missing import for the 'Logger' type, which is likely defined in the 'DigitalData.Modules.Logging' namespace, to resolve the BC30002 error.“ in Datei „Base\WindowsEx.vb“ 2025-12-29 13:33:30 +01:00
Developer01
3e87702c5d * „Linie 3: The error BC30002 indicates that the type 'LogConfig' is not defined. It is likely that 'LogConfig' is defined in a sub-namespace of 'DigitalData.Modules.Logging', such as 'DigitalData.Modules.Logging.Config'. Adding the correct import should resolve the error.“ in Datei „Base\WindowsEx.vb“ 2025-12-29 13:33:18 +01:00
Developer01
e2fe059470 Add assembly metadata to Base.vbproj and clean AssemblyInfo
Added assembly metadata (title, description, company, product, copyright, version) to Base.vbproj. Removed redundant assembly attributes from AssemblyInfo.vb, leaving only trademark, ComVisible, and GUID. This centralizes assembly information in the project file and streamlines AssemblyInfo.vb.
2025-12-29 13:33:08 +01:00
Developer01
a87937e1ad Update Base.vbproj: switch to .NET Core-compatible packages
Replaced several .NET Framework references in Base.vbproj with .NET Core-compatible NuGet packages, including Microsoft.AspNetCore.SystemWebAdapters, System.Configuration.ConfigurationManager, and multiple CoreWCF packages. Removed direct references to assemblies such as System.Web, System.ServiceModel, and DigitalData.Modules.Logging. This modernizes dependencies and improves cross-platform compatibility.
2025-12-29 13:33:04 +01:00
Developer01
318be76451 Modernize Base.vbproj to SDK style and update dependencies
Converted Base.vbproj to the SDK-style project format targeting net8.0-windows, enabling Windows Forms and implicit usings. Replaced direct assembly references and packages.config with PackageReference for NLog and NuGet.CommandLine. Removed legacy property groups, redundant references, and unnecessary compile/include entries. Deleted the obsolete packages.config file. Retained the post-build event and essential project metadata. This update streamlines project management and aligns with modern .NET practices.
2025-12-29 13:32:58 +01:00
Developer01
473e63b247 Removed unsupported Microsoft.VisualBasic framework reference, excluded legacy My project files from SDK defaults, and deleted obsolete resources/settings files. 2025-12-29 13:30:20 +01:00
Developer01
8ab83894fd Commit changes before fixing errors. 2025-12-29 12:59:23 +01:00
Developer01
f84e60bf24 Switched project MyType to Empty and removed legacy My namespace assets so generated code referencing ApplicationServices types is no longer included. 2025-12-29 12:59:19 +01:00
Developer01
447e8226d1 Added Microsoft.VisualBasic framework reference and System.Security.Permissions package to restore My namespace types and HostProtection attribute for .NET 8. 2025-12-29 12:56:16 +01:00
Developer01
4e3d66cfc1 Update Logging module metadata and version to 2.6.5.0
Added assembly metadata (title, description, company, product, copyright, version) to Logging.vbproj. Removed redundant assembly attributes from AssemblyInfo.vb, retaining only the trademark, COM visibility, and GUID. Updated version information to 2.6.5.0 throughout the project.
2025-12-29 12:55:17 +01:00
Developer01
86cdbd06df Update Logging.vbproj: add CoreWCF and config packages
Removed several .NET Framework references and added NuGet packages for CoreWCF (Primitives, ConfigurationManager, Http, WebHttp, NetTcp) and System.Configuration.ConfigurationManager, modernizing dependencies and enabling CoreWCF support.
2025-12-29 12:55:08 +01:00
Developer01
3b5137cb46 Modernize Logging.vbproj to SDK style and update NLog ref
Converted Logging.vbproj to the SDK-style project format targeting .NET 8.0, replacing explicit assembly references and legacy configuration with simplified SDK properties. NLog is now referenced via a PackageReference instead of packages.config, which has been deleted. Unnecessary imports, references, and compile/include entries were removed or updated for compatibility with the new project structure. The post-build event is retained.
2025-12-29 12:54:57 +01:00
Developer01
8107d9fe81 Commit upgrade plan 2025-12-29 12:52:53 +01:00
Developer01
06e796f54f ConfigDBFunct Logging 2025-12-08 10:43:22 +01:00
Developer01
bbe372377a ZFInterface 2025-12-05 14:04:32 +01:00
Developer01
7b91aac5e9 MS Rekompilierung 2025-11-28 10:42:33 +01:00
Developer01
ceb688fc3f Jobs Sichtbeleg Anpassung 2025-11-19 16:41:36 +01:00
Developer01
aa5742a529 MS Änderungen lokal PC Mirko 2025-11-18 16:15:22 +01:00
Developer01
79267e6bd9 GD Picture und Verweise 2025-11-17 12:50:52 +01:00
Developer01
cf63fd8c39 Update GDPIcture 2025-11-17 12:42:17 +01:00
Developer01
ec3a677ca8 MS Jobs Sichtbeleg 2025-11-11 17:42:08 +01:00
Developer01
48406884ca Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2025-09-15 08:46:37 +02:00
204aaaeb4e Korrektur 2025-09-12 12:55:41 +02:00
ec378ba3b4 Modules.Interfaces: Version 2.3.7.0 2025-09-12 11:12:38 +02:00
35b19cde82 Modules.Interfaces: Fehlende Elemente der Codeliste UNTDID 7161 (Charge codes) nachgetragen, passend zur Version 2.3.x 2025-09-12 11:11:52 +02:00
Developer01
f7c0a29676 v3.1. Änderung Sichtbeleg Version 1 vor Abstimmung WISAG 2025-09-05 10:59:39 +02:00
9ae5465c48 Modules.Jobs: Version 3.0.3.0 2025-09-02 11:22:03 +02:00
82139fc30d Modules.Jobs: 4000 Zeichen-Grenze 2025-09-02 11:20:14 +02:00
f4ba4d9e1d Modules.Interface: Listen-Items Handling (Item_Type = 4) 2025-08-20 14:21:50 +02:00
0aabc12f49 Modules.Jobs: Version 3.0.2.0 2025-08-19 12:39:00 +02:00
adbd0fe99b Modules.Jobs: Kürzen der ITEM_VALUE-Werte entfernt. Tabelle muss VARCHAR(max) vorsehen. 2025-08-19 12:37:38 +02:00
2d6a2df48a Modules.Jobs: Version 3.0.1.0 2025-08-08 11:48:03 +02:00
e7ccb74828 Modules.Interfaces: Version 2.3.6.0 2025-08-08 11:47:33 +02:00
05355c93a5 Readonly Property 2025-08-08 11:46:52 +02:00
2007bb91f3 Modules.Interfaces & Modules.Jobs: Weitergabe der ErrorCodes in den Exceptions, um sie im WebService auswerten zu können. 2025-08-08 11:46:21 +02:00
d7d2ecf8a0 Modules.Jobs: Replace Case-Insensitiv 2025-08-04 14:13:20 +02:00
447c7ea600 Modules.Jobs: Version 3.0.0.0 2025-08-04 13:07:19 +02:00
32bb14db06 Modules.Jobs: Strings-Vergleiche sollten unbedingt mit string.equals() erfolgen! 2025-08-04 13:06:04 +02:00
a5226a8101 Modules.Interfaces: Try/Catch und logging 2025-07-25 13:01:45 +02:00
b534c4c799 Modules.Interfaces: Version 2.3.5.0 2025-07-23 11:51:47 +02:00
dc80138311 Modules.Jobs: Version 2.9.9.0 2025-07-23 11:51:14 +02:00
477bb511c4 Modules.Interfaces & Modules.Jobs: ZUGFeRD 2.3.x-Logik angepasst. Auswertung der XML-Tabelle korrigiert, das Dictionary wird erst später erstellt. 2025-07-23 11:50:40 +02:00
0b66b80591 Modules.Jobs: Version 2.9.8.0 2025-07-07 10:50:23 +02:00
5fd924d413 Modules.Interfaces: Version 2.3.4.0 2025-07-07 10:49:50 +02:00
e8ebc30225 Modules.Interface + Modules.Jobs: ITEM_TYPE = 4 / Description enthält jetzt BT-Feld-Info / Kommentare / Abfrage BT-Felder 2025-07-07 10:49:15 +02:00
262805d112 Modules.Interface: Datumsformat immer 8-stellig (yyyyMMdd) aufbereiten 2025-07-04 14:02:27 +02:00
623807c55d Modules.Interfaces: Version 2.3.3 2025-07-04 13:39:29 +02:00
aee7997cb3 Modules.Interfaces: Date/DateTime (yyyy-MM-dd) und Decimal/Numeric-Werte mit CultureInfo.Invariant.Culture speichern. 2025-07-04 13:23:57 +02:00
82a95faaaf Modules.Jobs: Version 2.9.7.0 2025-07-01 10:11:38 +02:00
af7534df48 Modules.Interfaces: Version 2.3.2.0 2025-07-01 10:11:05 +02:00
fa2c2a6417 Modules.Jobs: Keine Hochkomma-Ersetzung mehr bei Bulk-Insert 2025-07-01 10:09:32 +02:00
390a524736 Modules.Interfaces: Belegarten in ZUGFeRD 2.3.x korrigiert und fehlende nachgetragen.
Vorbereitung BT-Felder-Anzeige
2025-06-27 10:48:48 +02:00
0ed996100d Leere Strings (item_type = 0) nicht mehr in die DB schreiben
Kommentare korrigiert
2025-06-26 14:47:30 +02:00
2e0ae13a77 Modules.Jobs: Version 2.9.6.0 2025-06-12 10:46:39 +02:00
267e038725 Modules.Jobs: Prüfe ob Value überhaupt einen Wert hat, sonst wird auch keine Datei erstellt 2025-06-12 10:41:31 +02:00
2673755b14 Jobs: base64 / varbinary 2025-06-05 13:51:24 +02:00
5052ce4f14 Modules.Jobs: Version 2.9.5.0 2025-06-05 10:50:45 +02:00
717909d7e8 Modules.Jobs: MIME-Typen (pdf, xlsx, odt) - Fehlerhandling ergänzt, wenn Dateien nicht erstellt werden können. 2025-06-05 10:49:49 +02:00
04a408ab97 Jobs: MIME-Types + File-Extension + xlsx-Dateien 2025-06-03 15:23:22 +02:00
face3c76fb Modules.Database: Version 2.3.6.0 2025-06-03 08:48:26 +02:00
2d3a1cd25c Korrektur von MS in master nachgezogen 2025-06-03 08:47:17 +02:00
43e95a20b9 Modules.Jobs: Version 2.9.4.0 2025-06-02 11:50:32 +02:00
05d0bd60ab Modules.Interfaces: Version 2.3.1.0 2025-06-02 11:49:43 +02:00
7e70c059b6 Auslesen von embedded Files aus einer XML-Datei 2025-06-02 11:47:15 +02:00
Developer01
0261d237b6 Sichtbeleg Anapssung 2025-05-26 10:48:46 +02:00
ea7fe74e89 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2025-05-23 12:48:13 +02:00
Developer01
f7f4b05df5 ActiveDirectoryInterfaces Split Distinguished Name 2025-05-21 14:00:44 +02:00
Developer01
766737b4b5 Interfaces V 2.3 2025-05-21 13:11:13 +02:00
Developer01
ffa8850bf1 Modules FileParams 2025-05-21 08:08:32 +02:00
Developer01
2991b52c17 MS Parameter renaming 2025-05-16 11:54:14 +02:00
df04b0a706 Modules.Jobs: Version 2.9.3.0 2025-05-16 10:32:51 +02:00
ce65276084 Modules.Base: version 1.3.9.0 2025-05-16 10:31:48 +02:00
17d5acee9d Neue Datum-Konvertierungsfunktion 2025-05-16 10:31:06 +02:00
c7afa2f754 Modules.Interfaces: Version 2.2.9.0 2025-05-15 13:36:35 +02:00
4d5ab64904 Peppol in UBL2.1 umbenannt 2025-05-15 13:35:58 +02:00
f4c3e9b3e1 Modules.Interfaces: Version 2.2.8.0 2025-05-14 15:34:55 +02:00
9d76b17b1d Integration ZUGFeRD 2.3.3 XSD Schema 2025-05-14 15:34:14 +02:00
2ec92511cb Modules.Jobs: Version 2.9.2.0 2025-05-13 14:50:02 +02:00
8e1b9d21f3 Modules.Interfaces - Version 2.2.7.0 2025-05-13 14:49:26 +02:00
7ac596b930 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2025-05-13 14:48:51 +02:00
cf9650be50 Peppol 3017 / UBL Logik 2025-05-13 14:48:09 +02:00
Developer01
fa00f2ab54 MS Administration 2025-05-08 09:20:28 +02:00
Developer01
5774eb7686 MS Modules windream integriert 2025-04-29 16:20:42 +02:00
Developer01
ceb618dc57 windream 1.9.6.2 2025-04-28 12:57:12 +02:00
Developer01
66328bb243 MS 2025-04-28 12:54:55 +02:00
Developer01
ecfe669938 MS 2025-04-28 12:53:37 +02:00
OlgunR
5af75cc553 logging 2025-04-28 12:07:09 +02:00
Developer01
c402467b38 Ressources adapt 2025-04-28 10:56:40 +02:00
Developer01
a420c1a618 MS Jobs sichtbeelg 2025-04-25 14:57:24 +02:00
Developer01
7ef808d221 MS Merge GDPicture 2025-04-24 17:32:00 +02:00
Developer01
d09d728f7f Jobs Update GDPicture 2025-04-24 17:31:00 +02:00
7602f2c870 Nuget Update - GDPicture 2025-04-24 10:45:43 +02:00
Developer01
c74b778227 MS PRopertyValues Interfaces 2025-04-10 22:28:58 +02:00
Developer01
11b7a196dd MS PropertyValues RowCount angepasst, weil Positions immer 1 war...Unklar warum! 2025-04-08 17:29:27 +02:00
Developer01
4c113f19e8 Interfaces Update GD Picture 2025-04-08 15:31:40 +02:00
Developer01
a6d3781781 MS Helpers 2025-04-08 15:28:11 +02:00
Developer01
d4ce8e2891 Baget GDPicture 2025-03-28 15:27:18 +01:00
Developer01
8c829d490f MS Baget 2025-03-26 15:27:35 +01:00
Developer01
6fb82c20ee Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2025-03-14 14:43:19 +01:00
Developer01
7c473b9a27 MS Module Base StringFunctions
Modules.Jibs Sichtbeleg Anpassung
2025-03-14 14:43:11 +01:00
b5c470e1b9 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2025-02-26 15:03:48 +01:00
4ab924907a Modules.Interfaces: Version 2.2.5.0 2025-02-25 13:49:07 +01:00
32f87e25f5 Modules.Interfaces: PropertyValue kann NULL sein, wenn der Knoten leer ist, aber Nothing (vb) ist nicht gleich NULL (c#) 2025-02-25 13:46:58 +01:00
Developer01
3d388362ec Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2025-02-25 11:39:29 +01:00
Developer01
bbd97acfc5 MS Messaging Logging 2025-02-25 11:39:20 +01:00
35d8021278 Modules.Interfaces: version 2.2.4.0 2025-02-25 10:48:25 +01:00
7e9ed47ad9 Modules.Interfaces: Leere Knoten können zu einer Exception führen. 2025-02-25 10:47:14 +01:00
13ff63d6e0 Modules.Jobs: Version 2.8.1.0 2025-02-18 11:14:03 +01:00
6bcb4dd609 Modules.Interfaces: Version 2.2.3.0 2025-02-18 11:13:09 +01:00
f3b370c26f Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2025-02-18 11:04:35 +01:00
Developer01
bf8a2971ec Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2025-02-18 11:00:58 +01:00
Developer01
67e6e68394 MS Database SQL GDPicture angepasst 2025-02-18 11:00:39 +01:00
7100503c4f PEPPOL 3017 wird zunächst per default deaktiviert. 2025-02-18 11:00:29 +01:00
6c78d6bcc2 Modules.Jobs: Meldungen ergänzt, Warnings bearbeitet 2025-02-13 10:58:10 +01:00
Developer01
54ee51b0de MS MergeCommit 2025-02-12 14:11:10 +01:00
Developer01
70765af22b MS Sichtbeleg 2025-02-12 14:09:53 +01:00
c803b4532d Modules.Jobs: Version 2.6.5.0 2025-02-11 15:35:38 +01:00
47b54562c8 Modules.Interfaces: Version 2.2.2.0 2025-02-11 15:35:03 +01:00
5290d442f9 Modules: Speichern des Dateityps des Belegs in den EDMI_ITEM_DATA 2025-02-11 15:34:13 +01:00
83c2374b90 Modules.Jobs: Letztes Commit ist evtl. überflüssig 2025-02-11 11:09:04 +01:00
Developer01
99f954d406 MS Jobs 2.7.0 xRechnung Sichtbeleg 2025-02-11 10:15:26 +01:00
Developer01
6515e1811b MS Sichtbeleg 2025-02-07 14:42:54 +01:00
Developer01
6a051f7a92 MergeCommit 2025-01-29 14:28:30 +01:00
Developer01
70febee15d MS 2025-01-29 14:27:45 +01:00
e420931351 Modules.Jobs - New Class für XRechnung Sichtbeleg Erstellung 2025-01-29 13:46:04 +01:00
b7c172c382 Modules.Interfaces: Neues DB-Feld ItemType hinzugefügt 2025-01-28 14:36:52 +01:00
3e2606a582 Modules.Interfaces & Modules.Jobs: Verarbeitung von XML-Belegen im ZUGFeRD Service implementiert 2025-01-28 14:21:01 +01:00
Developer01
954df832ed MS 2025-01-22 07:57:37 +01:00
Developer01
ccba559f73 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2025-01-21 14:46:44 +01:00
Developer01
b572639805 Ms windream Constante Vektor auf 4100 angepasst 2025-01-21 14:46:35 +01:00
bb7ed1bdd8 Zugferd/Jobs: Falls DB-Fehler beim Löschen passiert, wird jetzt darauf reagiert. 2025-01-14 13:51:06 +01:00
9957465f59 Modules.Jobs: Version 2.6.3.0 2025-01-10 10:39:02 +01:00
eab2fb0880 Modules.Interfaces: Version 2.2.1.0 2025-01-10 10:38:18 +01:00
80d4efd8ba ZUGFeRD Service: Neue Config Schalter 2025-01-10 10:37:24 +01:00
b0bc5113ef Modules.Config: Version 1.3.0.0 2025-01-09 10:15:03 +01:00
976da9a153 Modules.Config: Abfrage von Lizenzen zentral über eine Funktion, die auch die Version berücksichtigt. 2025-01-09 10:13:48 +01:00
3ddb98c3d8 Modules.Interfaces: Alte GDPicture-dlls aus Projekt entfernt 2024-11-29 11:13:09 +01:00
4d7cb6ad4f Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2024-11-29 10:39:33 +01:00
c9c6cc668d Modules.Interfaces: Version 2.2.0.0 2024-11-29 10:39:28 +01:00
d24ed1884f DDModules.Interfaces: GDPicture 14.2.90 per Nuget eingebunden 2024-11-29 10:38:41 +01:00
50e1cd0f1c ZUGFeRD-Service: Peppol (Schemata) 2024-11-29 10:38:06 +01:00
Developer01
34ffec6272 MS Database 35.2 GDPicture and Connectionselect Active = 1 2024-11-20 13:06:44 +01:00
Developer01
a17eccfb99 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2024-11-19 13:21:59 +01:00
Developer01
daadc7771a MS Windream GetSearchDocuments DocIDIndexname Optional 2024-11-19 13:21:48 +01:00
f64ad40572 Modules.Interfaces: Version 2.1.0.0 2024-10-18 12:08:56 +02:00
ce7213146d ZUGFeRD 2.3 / FacturX 1.0.07 implementiert
RechnungsWährung = EUR statt 48
2024-10-18 12:07:15 +02:00
Developer01
6b92832dce MS StageCommit Version 2024-09-23 16:51:20 +02:00
Developer01
41af4b0506 Update GDPicture 2024-09-23 16:50:38 +02:00
78667a83f1 Modules.Messaging: Version 1.9.6.0 2024-07-24 13:40:56 +02:00
9683ec9643 Modules.Messaging: EMail-Adressen validieren 2024-07-24 13:39:38 +02:00
622538225c Modules.Interfaces: Version 2.0.7.0 2024-07-10 14:16:57 +02:00
b0d02497eb Modules.Jobs: Version 2.6.2.0 2024-07-10 14:16:22 +02:00
c52c00ac04 Modules.Jobs: XML_PATH aus Tabelle in Objekt laden, und Wert weiterreichen und in Ablehnungsmail verwenden 2024-07-10 14:15:41 +02:00
237cad3a7a Modules.Interfaces: XML_PATH aus Tabelle in Objekt laden, und Wert weiterreichen 2024-07-10 14:13:25 +02:00
53768edb23 Modules.Logging: Version 2.6.4.0 2024-07-10 08:59:27 +02:00
9ed521738b Modules.Logging: Error-Logs schreiben wieder message ins log 2024-07-10 08:58:21 +02:00
acb7db6f9d Modules.Interfaces: Version 2.0.6.0 2024-07-08 14:32:56 +02:00
e911d97966 ZUGFRD-8: Positionstext darf maximal 900 Zeichen lang sein. 2024-07-08 14:29:52 +02:00
60ce9ab4f8 Modules.Messaging: Version 1.9.5.0 2024-07-04 12:40:26 +02:00
96c8ad7bf6 Port 465 (SMTP) muss mit ConnectSSL-Methode geöffnet werden. 2024-07-04 12:39:29 +02:00
1aed9a51f7 Modules.Jobs: Version 2.6.1.0 2024-06-28 11:41:12 +02:00
5a9a30d6f1 Modules.Jobs: Manchmal geht die DB-Connection verloren. Dann darf aber die Datei auch nicht verschoben werden, die gerade bearbeitet wurde. 2024-06-28 11:40:12 +02:00
30a6356565 Modules.Interfaces: Version 2.0.5.0 2024-06-26 11:28:08 +02:00
3046b7d203 Anpassung der Schema-Klassen 2.1.1 und 2.2, so dass die Liefantennummer und die Kundennummer, wie in Schema 2.0 gelesen werden. 2024-06-26 11:26:14 +02:00
09b52f441b Wir wollen die Nummer, nicht den Text. 2024-06-19 12:40:46 +02:00
5fb0b2b817 Modules.Jobs: Version 2.6.0.0 2024-06-19 11:40:49 +02:00
03b374ba17 Original-Dateiname aus TBEMLP_HISTORY_ATTACHMENT auslesen für Ablehnungsmails 2024-06-19 11:39:56 +02:00
d54001d73b Rejection_Code nach TBEMLP_HISTORY und TBEMLP_HISTORY_STATE schreiben 2024-06-19 10:35:12 +02:00
948c499b9d Modules.Interfaces: 2.0.4.0 2024-06-12 08:58:32 +02:00
b7f7cd7e91 Fehlende Werte-Zuweisungen nachgetragen 2024-06-12 08:57:53 +02:00
516f5040f6 Modules.Interfaces: Version 2.0.3.0 2024-06-11 13:50:09 +02:00
80712801b3 Korrekturen an den Schema Klassen 2024-06-11 13:49:32 +02:00
82a4ddee1a Modules.Interfaces: Version 2.0.2.0 2024-06-11 09:53:31 +02:00
3d01f24c1f Austausch der ZUGFeRD-2.x-Schemata. Ab sofort werden die Extended Versionen verwendet 2024-06-11 09:52:43 +02:00
7c93fa62fb Modules.Interfaces: Version 2.0.1.0 2024-06-10 09:51:40 +02:00
a478636ded Modules.Jobs: Version 2.5.9.0 2024-06-10 09:50:41 +02:00
3987634848 Jobs: Write Used XML Schema to Database 2024-06-10 09:49:25 +02:00
a1609ee3c7 Interface: Save Used XML Schema in Document 2024-06-10 09:48:43 +02:00
1784f69041 Neue 2.1.1-Schema Klasse (FACTUR-X_EXTENDED) 2024-06-07 13:23:49 +02:00
6d60327489 MS/MP Debug 2024-06-07 10:02:52 +02:00
fb801297c5 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2024-06-07 09:19:26 +02:00
99b2a5a53b MS Interfaces 2.0 Logging InvoiceSeller 2024-06-07 09:19:20 +02:00
c0d2e25437 Modules.Jobs: Version 2.5.8.0 2024-06-06 11:06:21 +02:00
93a3051027 BULK-Insert im ZUGFeRD Service 2024-06-06 11:05:05 +02:00
15e67f1e4c Messaging MailSender CreationDate entfernt 2024-05-29 14:14:51 +02:00
35aa5a8975 MS GD Picture Downgrade 2024-04-29 13:19:00 +02:00
7254ca24c8 MS LOkal Merge 2024-04-26 09:00:06 +02:00
32346c075a MS Interfaces Update GDPicture 2024-04-26 08:59:22 +02:00
f07fe32131 Jobs: Version 2.5.7.0 2024-04-24 13:40:00 +02:00
c8d0cb184a Jobs: ErrorCodePraefix 2024-04-24 13:38:53 +02:00
ed0fc3539d Jobs: Version 2.5.6.0 2024-04-23 11:39:41 +02:00
95a40c9f4d Jobs: Procedure-Aufruf mit SQL-Transaction 2024-04-23 11:38:53 +02:00
4814758a49 Interfaces: Version 1.12.2.0 2024-04-17 16:04:26 +02:00
cb0f32f809 Jobs: Version 2.5.5.0 2024-04-17 16:03:29 +02:00
6be92ae0f2 Modules: Parameter mit ' durch " ersetzen 2024-04-17 16:01:47 +02:00
c79707f1e1 ZUGFeRD Service: Ablehnungsmails 2024-04-16 16:57:45 +02:00
76ce9c075d Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2024-04-10 10:48:53 +02:00
42b08eba7a Modules.Jobs: Version 2.5.4.0 2024-03-20 13:07:38 +01:00
c83d24a086 Rejection Mails
Calling DB Procedure to created Rejection Mails
2024-03-20 13:04:42 +01:00
36e8c8a9b9 MS 2024-03-20 11:18:24 +01:00
c30f11b82e Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2024-03-20 10:34:25 +01:00
e22b108514 MS Mesaging 1.9.3.0 SessionState 2024-03-20 10:32:54 +01:00
8d672b4b49 Base: Warnings bearbeitet 2024-02-02 10:14:27 +01:00
ec876ca518 Zugferd Interface: Warnings bearbeitet 2024-02-02 10:13:57 +01:00
cf2e2161cf Base Module: Extension Methods ergänzt 2024-02-02 10:08:00 +01:00
180642bfb9 Jobs: Version 2.5.3.0 2024-01-31 13:09:31 +01:00
2350620223 Zugferd: E-Mail-Text 2024-01-31 13:08:27 +01:00
Jonathan Jenne
21ec149baa Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2024-01-31 10:15:41 +01:00
Jonathan Jenne
6e5706acba Rename License project again 2024-01-31 10:15:31 +01:00
Jonathan Jenne
9ac9895ed4 Integrate copy-binary-ps1 script 2024-01-31 10:05:28 +01:00
3a1678e742 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2024-01-26 13:50:42 +01:00
c968831209 Language-References removed 2024-01-26 13:50:38 +01:00
Jonathan Jenne
c3fccc3c20 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2024-01-26 10:41:31 +01:00
Jonathan Jenne
97c1fb4803 Base: Add deploy script 2024-01-26 10:41:28 +01:00
Jonathan Jenne
808cdea86a Add copy-binary script 2024-01-26 10:41:18 +01:00
Jonathan Jenne
c048b6ad6b Add README.md 2024-01-26 10:41:06 +01:00
a5b9579b79 Jobs: Version 2.5.2.0 2024-01-26 10:31:09 +01:00
c2d87c3e25 Zugferd: EMAIL_INVALID_DOCUMENT-Text extended 2024-01-26 10:30:05 +01:00
Jonathan Jenne
0a6a2093d5 Merge 2024-01-25 16:36:28 +01:00
c4df4a2f5c MS Jobs 2.4.0.1 2024-01-25 16:13:03 +01:00
Jonathan Jenne
d040da3277 Jobs: Version 2.5.1.0 2024-01-23 13:48:56 +01:00
Jonathan Jenne
64e92f7a39 Jobs/GraphQL: Add ACTIVE to model 2024-01-23 13:48:33 +01:00
Jonathan Jenne
1d2aecf4fb Interfaces: Remove firebird 2024-01-23 13:40:29 +01:00
Jonathan Jenne
b38a88d5f9 Jobs: Remove firebird 2024-01-23 13:40:22 +01:00
Jonathan Jenne
e85379dcf5 Jobs: Rewrite GraphQL Job 2024-01-23 13:33:44 +01:00
Jonathan Jenne
9f9feff2fd Jobs: Version 2.4.1.0 2024-01-22 11:57:56 +01:00
Jonathan Jenne
8362e1885d Jobs: truncate table before 'clearbeforefill' 2024-01-22 11:57:45 +01:00
Jonathan Jenne
f3eef04a09 Interfaces: Version 1.12.1.0 2024-01-22 11:33:45 +01:00
Jonathan Jenne
b55e045cca Interfaces/GraphQL: add logging, fix finding certificates 2024-01-22 11:33:21 +01:00
Jonathan Jenne
a3e1d34a7a Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2024-01-18 15:54:48 +01:00
Jonathan Jenne
a53c5154b0 jobs: version 2.4.0.0 2024-01-18 15:54:36 +01:00
Jonathan Jenne
6e5b192fb6 graphql: create history table before running 2024-01-18 15:54:25 +01:00
efdbed58df Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2024-01-15 10:29:18 +01:00
Jonathan Jenne
dc6ad9afac Remove Base.Test Project 2024-01-15 10:28:18 +01:00
38f330b94b Interfaces/Zugferd: Extension With ToUpper() and Substring(1) 2024-01-15 10:26:34 +01:00
Jonathan Jenne
9f11b2b7bc Interfaces/ZUGFeRD: check if any extension exists 2024-01-15 09:17:50 +01:00
Jonathan Jenne
4a2b64f73d Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2024-01-05 12:45:52 +01:00
Jonathan Jenne
12eef1de61 Database: Version 2.3.4.0 2024-01-05 12:45:26 +01:00
Jonathan Jenne
bdceababcf Database: log transaction mode, add datatable async functions 2024-01-05 12:45:17 +01:00
07d26cf70c Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2024-01-05 08:23:19 +01:00
0810983f86 WINDREAM CheckFileExistsinWM falsches Log 2024-01-05 08:23:04 +01:00
Jonathan Jenne
9deeb35ad7 clean up 2024-01-03 15:19:29 +01:00
Jonathan Jenne
63ddbaeacf Jobs: Version 2.3.0.1 2023-12-20 15:30:01 +01:00
Jonathan Jenne
71e9fe7cd2 Jobs: Improve logging 2023-12-20 15:29:27 +01:00
Jonathan Jenne
726c3481e5 Jobs: Fix logging 2023-12-20 15:16:27 +01:00
Jonathan Jenne
30c602a9bf clean up 2023-12-20 15:09:10 +01:00
Jonathan Jenne
5b2ba2eff2 Jobs: Version 2.3.0.0 2023-12-20 15:09:06 +01:00
Jonathan Jenne
04577f3b61 Jobs: add check for file age 2023-12-20 15:08:04 +01:00
Jonathan Jenne
8da8bd18a7 Improve logging with auth type none 2023-11-16 10:18:53 +01:00
Jonathan Jenne
8ab32a4d2b Jobs: Fix references 2023-11-15 15:13:53 +01:00
Jonathan Jenne
130281b602 Add References UML 2023-11-14 10:10:14 +01:00
Jonathan Jenne
02272f980f Add PDFConverter 2023-11-14 10:10:05 +01:00
Jonathan Jenne
e402cdaf5c Remove Language 2023-10-13 11:07:55 +02:00
Jonathan Jenne
348d054e16 fix process file handling 2023-10-12 14:01:40 +02:00
Jonathan Jenne
011b78472b einmal mit profis 2023-10-12 13:29:51 +02:00
Jonathan Jenne
4f3d8e0c7d Fix zugferd count in process files 2023-10-12 13:06:10 +02:00
Jonathan Jenne
7b01ef788a check for missing mailsession 2023-10-11 15:35:04 +02:00
Jonathan Jenne
a64823ae5e Zugferd: fix 2023-10-10 15:53:55 +02:00
Jonathan Jenne
c187bdbe5e Refactor: Processfiles 2023-10-09 16:05:50 +02:00
Jonathan Jenne
3c149a32e9 Config: Version 1.2.2.0 2023-10-04 13:59:16 +02:00
Jonathan Jenne
2153e83426 fix 2023-10-04 13:58:26 +02:00
Jonathan Jenne
278dda42a8 fix 2023-10-04 13:41:12 +02:00
Jonathan Jenne
1556f8bc45 fix 2023-10-04 13:40:09 +02:00
Jonathan Jenne
b3b3e80509 fix ConfigUtils 2023-10-04 13:39:13 +02:00
Jonathan Jenne
441f65915f Config: improve config migration 2023-10-04 13:21:03 +02:00
Jonathan Jenne
aa27dd8c1c Interfaces/Zugferd: fix missing regex group 2023-09-29 13:15:31 +02:00
Jonathan Jenne
20ec64c21d BAse: add missing constants 2023-09-29 13:15:00 +02:00
Jonathan Jenne
7a6537d529 Config: add MigrateAppConfig 2023-09-29 13:14:39 +02:00
Jonathan Jenne
e2d67ab6d7 Logging: Version 2.6.3.0 2023-09-18 09:21:07 +02:00
Jonathan Jenne
79e10ef2f6 Logging: Remove obsolete log target 2023-09-18 09:20:57 +02:00
Jonathan Jenne
da8ba360ca ZUGFERD: 2.1.0.0 2023-09-18 09:20:42 +02:00
Jonathan Jenne
fac8762888 ZUGFERD: Fix GetMessageIdFromFileName to work with new Email Profiler filenames 2023-09-18 09:19:08 +02:00
Jonathan Jenne
ddffb9c4f8 Messaging: Rework mail fetcher to build client adhoc 2023-09-15 09:24:48 +02:00
Jonathan Jenne
b16050cfc6 Database: fix missing message on exception 2023-09-14 15:40:45 +02:00
Jonathan Jenne
a415f90906 Messaging: Fix Mail Session 2023-09-14 15:40:23 +02:00
Jonathan Jenne
e8974376c5 Messaging: First working version of OAuth2 2023-09-06 10:24:46 +02:00
Jonathan Jenne
6f33261101 Fix filesystem refs 2023-09-05 10:47:37 +02:00
Jonathan Jenne
af90bb9efe Add Base.Test, Remove Filesystem 2023-09-05 10:37:52 +02:00
Jonathan Jenne
e12b087c94 Base: Add Filesystem Classes 2023-09-05 10:37:19 +02:00
Jonathan Jenne
3cb625c921 Filesystem: remove project 2023-09-05 10:37:02 +02:00
Jonathan Jenne
70bb33f823 Base: move Files 2023-09-05 10:25:49 +02:00
Jonathan Jenne
e63d1ea557 Logging: Improve json logging 2023-09-01 13:56:37 +02:00
Jonathan Jenne
2b80e8fa97 Jobs: Remove obsolete history function 2023-09-01 13:56:12 +02:00
Jonathan Jenne
9cab65f941 Jobs: Prepare Service Refactor, fix nullref error with emaildata, remove obsolete loops 2023-09-01 13:55:55 +02:00
Jonathan Jenne
4c8bdb27fd Jobs: add filename property MD5HashException, Add meaningful message to MissingValueException 2023-09-01 13:44:00 +02:00
Jonathan Jenne
b604ffcba2 Jobs: Only support one watch directory 2023-09-01 13:43:19 +02:00
Jonathan Jenne
6ef1e97deb Jobs: Add filename placeholder to EMAIL_MD5_ERROR 2023-09-01 13:42:53 +02:00
Jonathan Jenne
60bcf26379 Jobs: Add default Values to email data 2023-09-01 13:42:26 +02:00
Jonathan Jenne
a4a3dc4536 Restructure Base 2023-09-01 13:41:40 +02:00
Jonathan Jenne
86d61e720f Base: Version 1.3.5.0 2023-08-22 08:40:09 +02:00
Jonathan Jenne
002931d6dd Filesystem: Version 1.5.2.0 2023-08-22 08:39:40 +02:00
Jonathan Jenne
77d8a0825f Messaging: WIP MailFetcher, MailSession 2023-08-22 08:38:46 +02:00
Jonathan Jenne
f6046aec54 Base: migrate functions from other modules, add new functions 2023-08-22 08:38:21 +02:00
Jonathan Jenne
72f7211d63 Jobs/Zugferd: Improve structure 2023-08-22 08:37:15 +02:00
Jonathan Jenne
7fea3dc1ff Fix GetVersionedFileName 2023-08-22 08:35:47 +02:00
Jonathan Jenne
ec309b5afb Database: Version 2.3.3.2 2023-07-31 14:25:02 +02:00
Jonathan Jenne
681c561a7d add property MaskedConnectionString 2023-07-31 14:24:47 +02:00
Jonathan Jenne
22a30533c2 Base: Version 1.3.4.0 2023-07-27 16:11:17 +02:00
Jonathan Jenne
de418bcca4 Base: add drawrectangle, getshorthash 2023-07-27 16:10:49 +02:00
Jonathan Jenne
7b2b37a870 Base: Add WindowsEx, ScreenEx 2023-07-27 15:47:02 +02:00
Jonathan Jenne
28538bcf41 Fix references to Firebird tables 2023-07-27 15:46:30 +02:00
Jonathan Jenne
d73fa2a1c5 Jobs: Version 2.0.0.0 2023-07-25 15:27:17 +02:00
Jonathan Jenne
2288bc3fb9 Jobs/ZUGFeRD: Remove Firebird Database 2023-07-25 15:26:41 +02:00
Jonathan Jenne
05a590b169 Patterns: Add warning when control was not found 2023-07-24 10:43:55 +02:00
Jonathan Jenne
03f81938ae Fix connection mismatch for getdatatable / getscalarvalue 2023-07-24 10:43:11 +02:00
Jonathan Jenne
89ee1caf36 Base: Version 1.3.3.0 2023-07-24 10:42:04 +02:00
Jonathan Jenne
73f95de4c8 Base: handle non-existing column in NotNull 2023-07-24 10:41:36 +02:00
Jonathan Jenne
5ec049ff61 add mime type checks 2023-07-24 10:33:45 +02:00
Jonathan Jenne
56b0fedbe2 Jobs: Fix typo in EmailStrings 2023-06-27 09:21:51 +02:00
Jonathan Jenne
902231ff86 Base: Version 1.3.2.0 2023-06-26 16:33:55 +02:00
Jonathan Jenne
e5b5c259d7 Base: Add ToURLQueryString function for dictionay 2023-06-26 16:33:36 +02:00
Jonathan Jenne
c5b6498f1b Jobs: Version 1.15.1.0 2023-06-26 16:32:09 +02:00
Jonathan Jenne
39a406bfaf Fix incorrect error message with more than one valid zugferd invoice 2023-06-26 14:50:07 +02:00
Jonathan Jenne
222176dfca Jobs: Version 1.15.0.0 2023-06-22 10:53:08 +02:00
Jonathan Jenne
2517db3d68 Interfaces: Version 1.12.0.0 2023-06-22 10:53:00 +02:00
Jonathan Jenne
c9437f4a5c Database: Remove TableCache 2023-06-22 10:51:52 +02:00
Jonathan Jenne
524c429de4 ZUGFeRD: Validate errors in xml and throw ValidationException 2023-06-22 10:51:43 +02:00
Jonathan Jenne
0da1eb55a9 Interfaces: Version 1.11.0.0 2023-06-21 13:10:16 +02:00
Jonathan Jenne
18b0d4cdaf Jobs: Fix zugferd email string typo 2023-06-21 13:09:32 +02:00
Jonathan Jenne
a05156a1a6 Interfaces: Rewrite ValidateZugferdDocument, add validation for invalid decimals 2023-06-21 13:09:11 +02:00
Jonathan Jenne
a19123dd03 Base: Version 1.3.1.0 2023-06-16 11:23:59 +02:00
Jonathan Jenne
1c5cc2e6fc Base: fix typo 2023-06-16 11:23:52 +02:00
Jonathan Jenne
7625f2d2e3 Base: fix typo 2023-06-16 10:35:14 +02:00
Jonathan Jenne
f2e275c8bd Base: add RetoreWindowSize 2023-06-16 10:32:50 +02:00
Jonathan Jenne
e156cc9d88 Interfaces: 1.10.5.1 2023-06-16 09:21:42 +02:00
Jonathan Jenne
cfef91059a Filesystem: 1.5.1.1 2023-06-16 09:21:08 +02:00
Jonathan Jenne
a4916ba25f EDMIAPI: Version 1.6.1.1 2023-06-16 09:20:48 +02:00
Jonathan Jenne
18374ba93d Database: Version 2.3.3.1 2023-06-16 09:20:23 +02:00
Jonathan Jenne
977f79b6a6 Base: Version 1.3.0.0 2023-06-16 09:20:01 +02:00
Jonathan Jenne
8c1a1af140 edmiapi: Improve error logging 2023-06-16 09:19:24 +02:00
Jonathan Jenne
36b38f0bd8 database: improve error loggging 2023-06-16 09:19:10 +02:00
Jonathan Jenne
c9c56ad720 Interfaces: Improve error logging 2023-06-16 09:18:48 +02:00
Jonathan Jenne
ab280ccabe File: attempt to fix GetVersionedFilenameWithFilecheck 2023-06-16 09:18:10 +02:00
Jonathan Jenne
b1114545a7 Add a lot of functions to Base 2023-06-16 09:16:49 +02:00
Jonathan Jenne
00cff028c9 Base: Add ScreenEx 2023-05-26 15:05:00 +02:00
Jonathan Jenne
76cba215fe Interfaces/Job: Add check for currencyId format in ZUGFeRD documents 2023-05-26 15:04:44 +02:00
Jonathan Jenne
f491d4dd24 Language: Add comments 2023-05-23 12:04:31 +02:00
Jonathan Jenne
e65a6fa1a4 Filesystem: Add GetHash / GetHashFromString methods 2023-05-23 12:04:10 +02:00
Jonathan Jenne
726bdd1b2d Base: Version 1.2.1.0 2023-05-23 12:03:38 +02:00
Jonathan Jenne
fd2ad3f056 Base: Rename classes 2023-05-23 12:03:22 +02:00
Jonathan Jenne
a856f5f1b3 Database: Version 2.3.3.0 2023-05-16 08:48:03 +02:00
Jonathan Jenne
5ced396e3f Base: Version 1.2.0.0 2023-05-16 08:47:35 +02:00
Jonathan Jenne
10d8e7749a Database: Fix Logging of errors with sql queries 2023-05-16 08:47:24 +02:00
Jonathan Jenne
cd3646dca0 Base: Add Language Module 2023-05-15 16:02:39 +02:00
0c1b070a90 Currency Wrapper windream 2023-04-26 15:18:11 +02:00
da9dd6dcd7 MS 2023-04-25 17:14:41 +02:00
dd4a4aad95 MS 2023-04-25 13:24:16 +02:00
Jonathan Jenne
98fd711ea0 Windream: Version 1.9.2.0 2023-04-11 10:05:42 +02:00
Jonathan Jenne
0008d0f3ba Use windream filecheck for VersionWMFilename 2023-04-11 10:05:28 +02:00
Jonathan Jenne
fb2e8a6f6c Filesystem: Version 1.5.1 2023-04-03 16:33:41 +02:00
Jonathan Jenne
2d2c09bdf4 Filesystem: restrict getversionedfilename to 100 tries 2023-04-03 16:33:14 +02:00
Jonathan Jenne
1c49054844 Add logging 2023-03-30 15:34:35 +02:00
Jonathan Jenne
c871b06cc2 EDMI.API: Version 1.6.1.0 2023-03-30 12:00:25 +02:00
Jonathan Jenne
1a860c9270 EDMI.API: DatabaseWithFallback does not use connection in some circumstances 2023-03-30 12:00:07 +02:00
Jonathan Jenne
88ac9e70b2 Windream: Version 1.9.1.0 2023-03-28 13:43:46 +02:00
Jonathan Jenne
6885bd2954 Windream: Handle unc paths in NormalizePath 2023-03-28 13:43:33 +02:00
Jonathan Jenne
4a221a9e1d Version 1.10.5.0 2023-03-02 14:21:00 +01:00
Jonathan Jenne
11ab322138 Interfaces/Zugferd: Fix errors in Zugferd 2.1.1 Schema 2023-03-02 14:20:26 +01:00
Jonathan Jenne
9cea30235d Interfaces: Version 1.10.4.0 2023-02-28 14:56:39 +01:00
Jonathan Jenne
f3afadc3b7 Interfaces: fix Zugferd exceptions 2023-02-28 14:56:01 +01:00
Jonathan Jenne
89fbc4e4ae Interfaces: Version 1.10.3.0 2023-02-28 14:12:56 +01:00
Jonathan Jenne
adf692629a Interfaces: Improve logging 2023-02-28 14:12:28 +01:00
Jonathan Jenne
f6f421ddd8 Interfaces: Version 1.10.2.0 2023-02-28 13:50:17 +01:00
Jonathan Jenne
2ced2f192f Jobs: Version 1.14.1.0 2023-02-28 13:50:03 +01:00
Jonathan Jenne
a80b943dc5 Interfaces/Jobs: add new method FilterPropertyMap 2023-02-28 13:49:16 +01:00
Jonathan Jenne
214edf22a5 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2023-02-28 11:42:55 +01:00
Jonathan Jenne
5ac3aaab54 Jobs: Version 1.14.0.0 2023-02-28 11:42:49 +01:00
Jonathan Jenne
1ab246fc46 Jobs/ZUGFeRD: Write Zugferd Specification to database 2023-02-28 11:42:20 +01:00
Jonathan Jenne
9fe177abd3 Interfaces: Add FileTooBig Error, Add note about future refactoring of GetPropertyValue 2023-02-23 16:23:26 +01:00
ed7aea5b72 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2023-02-22 12:03:53 +01:00
8e1c459a61 MS Config OverrideLang 2023-02-22 12:03:41 +01:00
Jonathan Jenne
f6acae9185 Language: Version 1.7.1 2023-02-22 11:07:43 +01:00
Jonathan Jenne
fd0876a1cb Language: Add FieldOrDefault method 2023-02-22 11:07:34 +01:00
Jonathan Jenne
ad5443adae Filesystem: fix typo 2023-02-02 13:30:37 +01:00
Jonathan Jenne
39a0c8b8ec Jobs: Version 1.13.0.0 2023-02-02 13:13:12 +01:00
Jonathan Jenne
46ce5342a0 Filesystem: Version 1.5.0 2023-02-02 13:12:41 +01:00
Jonathan Jenne
1013dd3c30 Jobs: Use TestFileSizeIsLessThanMaxFileSize 2023-02-02 13:11:41 +01:00
Jonathan Jenne
41bba8b214 Filesystem: Add TestFileSizeIsLessThanMaxFileSize 2023-02-02 13:11:16 +01:00
Jonathan Jenne
4ee519d8c6 Messaging: Remove Tls13 setting 2023-01-24 14:43:26 +01:00
Jonathan Jenne
d9690d270b Downgrade to 4.6.2 2023-01-24 14:35:09 +01:00
Jonathan Jenne
1c86b8091b Messaging: version 1.9.1 2023-01-23 09:27:59 +01:00
Jonathan Jenne
8738fd8300 Messaging: Make tls version configurable 2023-01-23 09:27:52 +01:00
Jonathan Jenne
27e3462b6e Jobs: Version 1.12.1.0 2023-01-12 14:37:50 +01:00
Jonathan Jenne
1d0688e995 Interfaces: Version 1.10.1.0 2023-01-12 14:37:39 +01:00
Jonathan Jenne
c1018d176e ZUGFeRD: Update for new version 2023-01-12 14:33:54 +01:00
3183b0ed31 MS 2023-01-03 16:03:51 +01:00
b33720c61e MS 2023-01-03 16:03:15 +01:00
Jonathan Jenne
baa661cb14 Jobs: Version 1.12.0.1 2022-12-23 13:29:46 +01:00
Jonathan Jenne
e5ec777d61 Jobs: Fix typo in importzugferdfiles 2022-12-23 13:29:01 +01:00
Jonathan Jenne
4dfe32ba33 Jobs: Fix typo in EmailStrings 2022-12-23 13:28:41 +01:00
Jonathan Jenne
65d58a2274 Zugferd: prepare loading different specs per document schema version 2022-12-21 14:02:44 +01:00
Jonathan Jenne
902c835c37 Jobs/zugferd: add fallback for missing values in GetEmailDataForMessageId 2022-12-21 10:17:31 +01:00
Jonathan Jenne
79cad24b3f Interfaces/zugferd: fix parameter error which leads to falsely allowing mails with two zugferd invoices 2022-12-21 10:16:50 +01:00
Jonathan Jenne
a9567a9d18 Jobs/zugferd: Include subject in rejection messages 2022-12-21 10:14:19 +01:00
Jonathan Jenne
0d207a25a5 Logging: Version 2.6.2.0 2022-12-16 13:52:43 +01:00
Jonathan Jenne
19f33dbb2c Fix json target 2022-12-16 13:52:33 +01:00
Jonathan Jenne
0ed5a164e8 Interfaces: Version 1.10.0.0 2022-12-16 09:30:52 +01:00
Jonathan Jenne
36dd27b26c Jobs: Version 1.12.0.0 2022-12-16 09:30:10 +01:00
Jonathan Jenne
3df54fa62c Jobs/Interfaces: add options for enabling / disabling zugferd schemas 2022-12-16 09:29:34 +01:00
Jonathan Jenne
67cdc580fa Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2022-12-16 09:08:42 +01:00
Jonathan Jenne
c082222c80 Messaging: Add binding class 2022-12-16 09:04:14 +01:00
Jonathan Jenne
33a95ba46d Version 2.6.1.0 2022-12-16 09:03:41 +01:00
Jonathan Jenne
a00ad5a9c0 Logging: WIP Json logging 2022-12-16 09:03:21 +01:00
Jonathan Jenne
db1d3fb197 Interfaces: Version 1.9.1.0 2022-12-16 08:37:29 +01:00
Jonathan Jenne
d5e98c5de4 Interfaces: Prepare language attribute in ADUser 2022-12-16 08:36:56 +01:00
Jonathan Jenne
e717dffa54 Filesystem: Version 1.4.1.0 2022-12-16 08:35:37 +01:00
Jonathan Jenne
eae009e82d Filesystem: Add new method GetVersionedFilenameWithFileCheck 2022-12-16 08:35:06 +01:00
Jonathan Jenne
d74e0f304a Database: Version 2.3.1.0 2022-12-16 08:34:33 +01:00
Jonathan Jenne
2816b644da Database: Log all command parameters 2022-12-16 08:34:19 +01:00
Jonathan Jenne
b927e07141 Windream: Version 1.7.1 2022-12-16 08:33:39 +01:00
Jonathan Jenne
f5107a3d21 Windream: Fix normalized paths 2022-12-16 08:33:09 +01:00
75df258abf Ms 2022-12-15 15:57:50 +01:00
Jonathan Jenne
1ea73d9234 Windream: improve logging 2022-12-09 13:40:10 +01:00
Jonathan Jenne
d44ab2f087 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2022-12-09 13:31:08 +01:00
Jonathan Jenne
bd6d483867 Windream: Fix NewFolder 2022-12-09 13:31:01 +01:00
7b7b17b657 MS Push Windream 2022-12-09 13:30:44 +01:00
Jonathan Jenne
3883c0dad7 Messaging: Add general WCF code 2022-11-30 09:34:26 +01:00
Jonathan Jenne
078282c579 ZooFlow: Update to Nlog 5 - Version 1.3.0.0 2022-11-25 13:07:32 +01:00
Jonathan Jenne
e91af7de7c Windream: Update to Nlog 5 - Version 1.7.0.0 2022-11-25 13:06:23 +01:00
Jonathan Jenne
fb5527036a Windows: Update to Nlog 5 - Version 1.5.0.0 2022-11-25 13:05:44 +01:00
Jonathan Jenne
211c394b2f Patterns: Update to Nlog 5 - Version 1.3.0.0 2022-11-25 13:05:11 +01:00
Jonathan Jenne
5f52434d67 Messaging: Update to Nlog 5 - Version 1.8.0.0 2022-11-25 13:04:38 +01:00
Jonathan Jenne
e2494e5117 Logging: Update to Nlog 5 - Version 2.6.0.0 2022-11-25 13:03:58 +01:00
Jonathan Jenne
dd5a1c0766 License: Update to Nlog 5 - Version 1.1.0.0 2022-11-25 13:03:02 +01:00
Jonathan Jenne
a69fecd75d Language: Update to Nlog 5 - Version 1.7.0.0 2022-11-25 13:01:54 +01:00
Jonathan Jenne
7b249fb9cb Jobs: Update to Nlog 5 - Version 1.11.0.0 2022-11-25 13:01:12 +01:00
Jonathan Jenne
c5973c86c9 Interfaces: Update to Nlog 5 - Version 1.9.0.0 2022-11-25 13:00:27 +01:00
Jonathan Jenne
680b496b90 Filesystem: Update to Nlog 5 - Version 1.4.0.0 2022-11-25 12:59:51 +01:00
Jonathan Jenne
c9ef17e533 Encryption: Update to Nlog 5 - Version 1.2.0.0 2022-11-25 12:59:05 +01:00
Jonathan Jenne
780238625c EDMI.API: Update to Nlog 5 - Version 1.6.0.0 2022-11-25 12:57:18 +01:00
Jonathan Jenne
5794018c5e Database: Update to Nlog 5 - Version 2.3.0.0 2022-11-25 12:56:42 +01:00
Jonathan Jenne
b329492521 Config: Update to Nlog 5 - Version 1.2.0.0 2022-11-25 12:56:24 +01:00
Jonathan Jenne
22b3918a03 Base: Update to Nlog 5 - Version 1.1.0.0 2022-11-25 12:56:10 +01:00
Jonathan Jenne
15d6cac420 Logging: write log when debug flag is changed 2022-11-25 12:09:41 +01:00
Jonathan Jenne
a469ff9a23 1.10.0.4 2022-11-25 11:33:10 +01:00
Jonathan Jenne
55fc875d3a Jobs/GraphQL: Actually insert the status value 2022-11-25 11:28:35 +01:00
Jonathan Jenne
1d04027c5f Jobs: Version 1.10.0.3 2022-11-25 11:05:06 +01:00
Jonathan Jenne
e3c500938b Jobs: fix typo, use truncate instead of delete 2022-11-25 11:04:36 +01:00
Jonathan Jenne
dbbacd2623 Jobs: Version 1.10.0.2 2022-11-25 10:56:30 +01:00
Jonathan Jenne
7d86d583de Jobs: Fix typo 2022-11-25 10:56:07 +01:00
Jonathan Jenne
5c4b302aa7 Jobs: Version 1.10.0.1 2022-11-25 10:29:51 +01:00
Jonathan Jenne
1d8a0faeee Database: Version 2.2.7.6 2022-11-25 10:29:18 +01:00
Jonathan Jenne
ca92abbee5 Jobs: WIP GraphQL Job, fix logic errors, improve logging 2022-11-25 10:28:52 +01:00
Jonathan Jenne
8267ecb72d Database: Fix logging 2022-11-25 10:28:20 +01:00
Jonathan Jenne
86ca1011df Jobs: Version 1.10.0.0 2022-11-24 14:28:39 +01:00
Jonathan Jenne
b1aba0a80d Jobs: Add exception for unsupported zugferd documents 2022-11-24 14:26:42 +01:00
Jonathan Jenne
a8862709d8 Jobs: Update to use Job Runner Table 2022-11-24 14:24:59 +01:00
Jonathan Jenne
36fe39ee66 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2022-11-24 11:24:37 +01:00
Jonathan Jenne
ddc11b62a5 Database: Small stuff 2022-11-24 11:24:26 +01:00
Jonathan Jenne
7ba516fcd1 Interfaces: Version 1.8.1.0 2022-11-24 11:20:31 +01:00
Jonathan Jenne
05a92c3181 Language: Version 1.6.2.0 2022-11-24 11:20:00 +01:00
Jonathan Jenne
7d63718e96 Interfaces/ActiveDirectory: Improve logging 2022-11-24 11:19:22 +01:00
Jonathan Jenne
8af67ef883 Language: Improve StringEx 2022-11-24 11:14:20 +01:00
6ed636bca0 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2022-11-17 17:09:16 +01:00
5f8e1a8608 MS windream Mod 2022-11-17 17:09:07 +01:00
Jonathan Jenne
e424402d63 Interfaces: Version 1.8.0.0 2022-11-16 16:34:46 +01:00
Jonathan Jenne
9d6dd695e4 Jobs: 1.9.0.0 2022-11-16 16:34:10 +01:00
Jonathan Jenne
0410e11b59 ZUGFeRD: WIP Allow blocking factur-x and xrechnung invoice files with config flags 2022-11-16 16:33:35 +01:00
Jonathan Jenne
f4adba98eb Interfaces: Version 1.7.5.0 2022-11-14 11:46:08 +01:00
Jonathan Jenne
1dba028deb Interfaces: Add errortype unknownerror 2022-11-14 11:45:20 +01:00
Jonathan Jenne
3a26343083 Merge branch 'Database_SqlConnection' 2022-11-02 16:20:43 +01:00
Jonathan Jenne
1e732a036a Revert all modules to .NET 4.6.1 2022-11-02 14:35:43 +01:00
Jonathan Jenne
41165a470d Language: Version 1.6.1.0 2022-11-02 13:36:52 +01:00
Jonathan Jenne
8128987be4 Language: Add EscapeForSQL string extension method 2022-11-02 13:36:29 +01:00
Jonathan Jenne
6ebd3b82b6 Messaging: Improve logging 2022-11-02 13:36:00 +01:00
Jonathan Jenne
d18ebfe912 Jobs: 1.8.7.0 2022-11-02 13:35:04 +01:00
Jonathan Jenne
b614b3f140 Jobs: escape attachment paths 2022-11-02 13:34:33 +01:00
262 changed files with 215484 additions and 12436 deletions

183
.github/upgrades/dotnet-upgrade-plan.md vendored Normal file
View File

@@ -0,0 +1,183 @@
# .NET 8.0 Upgrade Plan
## Execution Steps
Execute steps below sequentially one by one in the order they are listed.
1. Validate that an .NET 8.0 SDK required for this upgrade is installed on the machine and if not, help to get it installed.
2. Ensure that the SDK version specified in global.json files is compatible with the .NET 8.0 upgrade.
3. Upgrade Logging\Logging.vbproj.
4. Upgrade Encryption\Encryption.vbproj.
5. Upgrade Base\Base.vbproj.
6. Upgrade ZooFlow\ZooFlow.vbproj.
7. Upgrade Interfaces\Interfaces.vbproj.
8. Upgrade Database\Database.vbproj.
9. Upgrade Config\Config.vbproj.
10. Upgrade Filesystem\Filesystem.vbproj.
11. Upgrade Messaging\Messaging.vbproj.
12. Upgrade Windream\Windream.vbproj.
13. Upgrade Windows\Windows.vbproj.
14. Upgrade Patterns\Patterns.vbproj.
15. Upgrade License\License.vbproj.
16. Upgrade Jobs\Jobs.vbproj.
17. Upgrade EDMIAPI\EDMI.API.vbproj.
## Settings
This section contains settings and data used by execution steps.
### Excluded projects
Keine Projekte ausgeschlossen.
### Aggregate NuGet packages modifications across all projects
NuGet packages used across all selected projects or their dependencies that need version update in projects that reference them.
| Package Name | Current Version | New Version | Description |
|:-------------------------------------------|:---------------:|:-----------:|:----------------------------------------------------------------------------|
| DigitalData.Modules.Logging | 2.6.5 | | No supported .NET 8 compatible package available; evaluate replacement. |
| EntityFramework | 6.4.4 | 6.5.1 | Required newer EF 6.5.1 for .NET 8 compatibility and LTS support. |
| EntityFramework.Firebird | 6.4.0 | 10.1.0 | Update to Firebird 10.1.0 for .NET 8 compatibility. |
| GdPicture | 14.3.18 | 14.2.100 | Use 14.2.100 as recommended compatible build. |
| Microsoft.Identity.Client | 4.55.0 | 4.79.2 | Security vulnerability fix and current MSAL LTS recommendation. |
| Microsoft.IdentityModel.Abstractions | 6.22.0 | 8.15.0 | Move to latest IdentityModel LTS version. |
| Microsoft.VisualBasic | 10.3.0 | | Functionality provided by .NET 8 framework reference; remove package. |
| Newtonsoft.Json | 13.0.3 | 13.0.4 | Bring Newtonsoft.Json to supported patch level. |
| S22.Imap | 3.6.0.0 | | No supported .NET 8 compatible package available; evaluate alternative. |
| System.Buffers | 4.6.0 | | Functionality provided by .NET 8 framework reference; remove package. |
| System.Data.Odbc | 6.0.1 | 8.0.1 | Update to provider version aligned with .NET 8. |
| System.Memory | 4.6.0 | | Functionality provided by .NET 8 framework reference; remove package. |
| System.Numerics.Vectors | 4.6.0 | | Functionality provided by .NET 8 framework reference; remove package. |
| System.Runtime.CompilerServices.Unsafe | 6.1.0 | 6.1.2 | Align with latest patch to match .NET 8 dependencies. |
| System.Threading.Tasks.Extensions | 4.5.4 | | Functionality provided by .NET 8 framework reference; remove package. |
| System.ValueTuple | 4.5.0 | | Functionality provided by .NET 8 framework reference; remove package. |
### Project upgrade details
#### Logging/Logging.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0`.
- Convert the project file to SDK-style format.
#### Encryption/Encryption.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0`.
- Convert the project file to SDK-style format.
#### Base/Base.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0-windows`.
- Convert the project file to SDK-style format.
#### ZooFlow/ZooFlow.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0-windows`.
- Convert the project file to SDK-style format.
#### Interfaces/Interfaces.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0`.
- Convert the project file to SDK-style format.
NuGet packages changes:
- Update `GdPicture` from `14.3.18` to `14.2.100` (compatibility recommendation).
- Update `Newtonsoft.Json` from `13.0.3` to `13.0.4`.
- Update `System.Runtime.CompilerServices.Unsafe` from `6.1.0` to `6.1.2`.
- Remove `Microsoft.VisualBasic`, `System.Buffers`, `System.Memory`, `System.Numerics.Vectors`, `System.Threading.Tasks.Extensions`, and `System.ValueTuple` because their APIs are provided by the .NET 8 framework.
#### Database/Database.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0`.
- Convert the project file to SDK-style format.
NuGet packages changes:
- Update `EntityFramework.Firebird` from `6.4.0` to `10.1.0`.
- Update `EntityFramework` from `6.4.4` to `6.5.1`.
- Update `System.Data.Odbc` from `6.0.1` to `8.0.1`.
#### Config/Config.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0-windows`.
- Convert the project file to SDK-style format.
NuGet packages changes:
- Update `EntityFramework.Firebird` from `6.4.0` to `10.1.0`.
- Update `EntityFramework` from `6.4.4` to `6.5.1`.
- Update `System.Data.Odbc` from `6.0.1` to `8.0.1`.
#### Filesystem/Filesystem.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0`.
- Convert the project file to SDK-style format.
#### Messaging/Messaging.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0-windows`.
- Convert the project file to SDK-style format.
NuGet packages changes:
- `DigitalData.Modules.Logging` 2.6.5 has no supported .NET 8 version; evaluate migrating to an updated logging package.
- `S22.Imap` 3.6.0.0 has no supported .NET 8 version; evaluate replacement.
- Update `Microsoft.Identity.Client` from `4.55.0` to `4.79.2` (security fix).
- Update `Microsoft.IdentityModel.Abstractions` from `6.22.0` to `8.15.0`.
#### Windream/Windream.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0`.
- Convert the project file to SDK-style format.
NuGet packages changes:
- `DigitalData.Modules.Logging` 2.6.5 has no supported .NET 8 version; evaluate migrating to an updated logging package.
#### Windows/Windows.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0-windows`.
- Convert the project file to SDK-style format.
NuGet packages changes:
- `DigitalData.Modules.Logging` 2.6.5 has no supported .NET 8 version; evaluate migrating to an updated logging package.
#### Patterns/Patterns.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0-windows`.
- Convert the project file to SDK-style format.
NuGet packages changes:
- `DigitalData.Modules.Logging` 2.6.5 has no supported .NET 8 version; evaluate migrating to an updated logging package.
#### License/License.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0`.
- Convert the project file to SDK-style format.
#### Jobs/Jobs.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0`.
- Convert the project file to SDK-style format.
NuGet packages changes:
- Update `GdPicture` from `14.3.18` to `14.2.100`.
- Update `Newtonsoft.Json` from `13.0.3` to `13.0.4`.
- Update `System.Runtime.CompilerServices.Unsafe` from `6.1.0` to `6.1.2`.
- Remove `Microsoft.VisualBasic`, `System.Buffers`, `System.Memory`, `System.Numerics.Vectors`, `System.Threading.Tasks.Extensions`, and `System.ValueTuple` because their APIs are provided by the .NET 8 framework.
#### EDMIAPI/EDMI.API.vbproj modifications
Project properties changes:
- Target framework should be changed from `.NETFramework,Version=v4.6.2` to `net8.0`.
- Convert the project file to SDK-style format.

View File

@@ -1,130 +1,73 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>net8.0-windows</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>DigitalData.Modules.Base</RootNamespace> <RootNamespace>DigitalData.Modules.Base</RootNamespace>
<AssemblyName>DigitalData.Modules.Base</AssemblyName> <AssemblyName>DigitalData.Modules.Base</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType> <MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <UseWindowsForms>true</UseWindowsForms>
<Deterministic>true</Deterministic> <ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<TargetFrameworkProfile /> <ImplicitUsings>enable</ImplicitUsings>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
<AssemblyTitle>Modules.Base</AssemblyTitle>
<Description>basisfunktionalitäten für DigitalData Anwendungen</Description>
<Company>Digital Data GmbH</Company>
<Product>Modules.</Product>
<Copyright>Copyright © 2025</Copyright>
<AssemblyVersion>1.3.9.0</AssemblyVersion>
<FileVersion>1.3.9.0</FileVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.Modules.Base.xml</DocumentationFile> <DocumentationFile>DigitalData.Modules.Base.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug> <DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.Modules.Base.xml</DocumentationFile> <DocumentationFile>DigitalData.Modules.Base.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <PackageReference Include="NLog" Version="5.0.5" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <PackageReference Include="NuGet.CommandLine" Version="6.13.2" />
<HintPath>..\packages\NLog.4.7.15\lib\net45\NLog.dll</HintPath> <PackageReference Include="Microsoft.AspNetCore.SystemWebAdapters" Version="2.2.1" />
</Reference> <PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.1" />
<Reference Include="System" /> <PackageReference Include="CoreWCF.Primitives" Version="1.8.0" />
<Reference Include="System.Configuration" /> <PackageReference Include="CoreWCF.ConfigurationManager" Version="1.8.0" />
<Reference Include="System.Data" /> <PackageReference Include="CoreWCF.Http" Version="1.8.0" />
<Reference Include="System.IO.Compression" /> <PackageReference Include="CoreWCF.WebHttp" Version="1.8.0" />
<Reference Include="System.Runtime.Serialization" /> <PackageReference Include="CoreWCF.NetTcp" Version="1.8.0" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" /> <Import Include="System.Data" />
<Import Include="System.Diagnostics" /> <Import Include="DigitalData.Modules.Logging" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="BaseClass.vb" /> <Compile Update="My Project\Application.Designer.vb">
<Compile Include="ECM\ECM.vb" />
<Compile Include="IDB\Attributes.vb" />
<Compile Include="IDB\Database.vb" />
<Compile Include="IDB\FileStore.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon> <DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
</Compile> </Compile>
<Compile Include="My Project\Resources.Designer.vb"> <Compile Update="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
</Compile> </Compile>
<Compile Include="My Project\Settings.Designer.vb"> <Compile Update="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<Compile Include="Performance.vb" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx"> <None Update="My Project\Application.myapp">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator> <Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput> <LastGenOutput>Application.Designer.vb</LastGenOutput>
</None> </None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="README.txt" /> <Content Include="README.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Logging\Logging.vbproj"> <ProjectReference Include="..\Logging\Logging.vbproj" />
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project> </Project>

7
Base/Base/BaseUtils.vb Normal file
View File

@@ -0,0 +1,7 @@
Friend Class BaseUtils
Friend Shared Function FormatHash(pChecksum)
Return BitConverter.
ToString(pChecksum).
Replace("-", String.Empty)
End Function
End Class

17
Base/DatabaseEx.vb Normal file
View File

@@ -0,0 +1,17 @@
Public Class DatabaseEx
''' <summary>
''' TODO: Deprecate
''' 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`
''' </summary>
''' <typeparam name="T">The type of the value</typeparam>
''' <param name="pRow">The DataRow that contains the value</param>
''' <param name="pColumn">The column name</param>
''' <param name="pDefaultValue">The default value</param>
''' <returns>The original value or the default value</returns>
Public Shared Function NotNull(Of T)(ByVal pRow As DataRow, pColumn As String, pDefaultValue As T) As T
Return ObjectEx.NotNull(pRow.Item(pColumn), pDefaultValue)
End Function
End Class

View File

@@ -1,7 +1,8 @@
Public Class ECM Public Class ECM
Public Enum Product Public Enum Product
ProcessManager taskFLOW
GlobalIndexer easyFLOW
ClipboardWatcher fileFLOW
signFLOW
End Enum End Enum
End Class End Class

View File

@@ -0,0 +1,70 @@
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

View File

@@ -0,0 +1,148 @@
Imports System.IO
Imports System.Security.Cryptography
Imports System.Text.Encoding
Imports DigitalData.Modules.Logging
''' <summary>
''' https://stackoverflow.com/questions/10168240/encrypting-decrypting-a-string-in-c-sharp
''' </summary>
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

View File

@@ -0,0 +1,85 @@
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(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
<DebuggerStepThrough>
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
<DebuggerStepThrough>
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

78
Base/FileEx.vb Normal file
View File

@@ -0,0 +1,78 @@
Imports System.IO
Imports System.Security.Cryptography
Public Class FileEx
''' <summary>
''' Reads the file at `FilePath` and computes a SHA256 Hash from its contents
''' </summary>
''' <param name="pFilePath"></param>
''' <returns></returns>
Public Shared Function GetChecksumFromFileContents(pFilePath As String) As String
Try
Using oFileStream = IO.File.OpenRead(pFilePath)
Using oStream As New BufferedStream(oFileStream, 1200000)
Dim oChecksum() As Byte = SHA256.Create.ComputeHash(oStream)
Return BaseUtils.FormatHash(oChecksum)
End Using
End Using
Catch ex As Exception
Return Nothing
End Try
End Function
Public Shared Function GetHashFromFileContents(pFilePath As String) As String
Return GetChecksumFromFileContents(pFilePath)
End Function
''' <summary>
''' Returns a Dictionary path in the form of [Base]\[Year]\[Month]\[Day]
''' </summary>
''' <param name="pBaseDirectory">The basedirectory</param>
''' <param name="pDate">The date to be used</param>
''' <returns>The final directory path</returns>
Public Shared Function GetDateDirectory(pBaseDirectory As String, pDate As Date) As String
Dim oDateDirectory = StringEx.GetDateString(pDate)
Dim oFinalDirectory As String = Path.Combine(pBaseDirectory, oDateDirectory)
Return oFinalDirectory
End Function
''' <summary>
''' Returns a Dictionary path in the form of [Base]\[Year]\[Month]\[Day] based on the current date
''' </summary>
''' <param name="pBaseDirectory">The basedirectory</param>
''' <returns>The final directory path</returns>
Public Shared Function GetDateDirectory(pBaseDirectory As String) As String
Return GetDateDirectory(pBaseDirectory, Now)
End Function
''' <summary>
''' Creates a Dictionary in the form of [Base]\[Year]\[Month]\[Day]
''' </summary>
''' <param name="pBaseDirectory">The basedirectory</param>
''' <param name="pDate">The date to be used</param>
''' <returns>The created path. If the directory cannot be created, Nothing.</returns>
Public Shared Function CreateDateDirectory(pBaseDirectory As String, pDate As Date) As String
Dim oDateDirectory = StringEx.GetDateString(pDate)
Dim oFinalDirectory As String = Path.Combine(pBaseDirectory, oDateDirectory)
If Directory.Exists(oFinalDirectory) = False Then
Try
Directory.CreateDirectory(oFinalDirectory)
Catch ex As Exception
Return Nothing
End Try
End If
Return oFinalDirectory
End Function
''' <summary>
''' Creates a Dictionary in the form of [Base]\[Year]\[Month]\[Day] based on the current date
''' </summary>
''' <param name="pBaseDirectory">The basedirectory</param>
''' <returns>The created path. If the directory cannot be created, Nothing.</returns>
Public Shared Function CreateDateDirectory(pBaseDirectory As String) As String
Return CreateDateDirectory(pBaseDirectory, Now)
End Function
End Class

View File

@@ -0,0 +1,131 @@
Imports System.IO
Imports DigitalData.Modules.Base.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
''' <summary>
''' This may fire twice for a single save operation,
''' see: https://blogs.msdn.microsoft.com/oldnewthing/20140507-00/?p=1053/
''' </summary>
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

View File

@@ -0,0 +1,61 @@
Imports System.IO
''' <summary>
''' Built-in filters for FileWatcher that are useful for correctly detecting changes on Office documents (currently Office 2016)
''' </summary>
Public Class FileWatcherFilters
''' <summary>
''' Base Filter that all filters must inherit from
''' Provides two functions that may be overridden and some useful file extension lists
''' </summary>
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
''' <summary>
''' Simple Filter that filters changes made on temporary files
''' </summary>
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
''' <summary>
''' Filter to detect changes on Office files
''' </summary>
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

View File

@@ -0,0 +1,10 @@
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

494
Base/FilesystemEx.vb Normal file
View File

@@ -0,0 +1,494 @@
Imports DigitalData.Modules.Logging
Imports System.IO
Imports System.Security.Cryptography
Imports System.Text
Imports System.Text.RegularExpressions
Public Class FilesystemEx
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
' This prevents an infinite loop when no file can be created in a location
Private Const MAX_FILE_VERSION = 100
Private Const VERSION_SEPARATOR As Char = "~"c
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
''' <summary>
''' Reads the file at `FilePath` and computes a SHA256 Hash from its contents
''' </summary>
''' <param name="FilePath"></param>
''' <returns></returns>
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
Public Function GetHash(FilePath As String) As String
Return GetChecksum(FilePath)
End Function
Public Function GetHashFromString(pStringToCheck As String) As String
Return GetChecksumFromString(pStringToCheck)
End Function
Private Function FormatHash(pChecksum)
Return BitConverter.
ToString(pChecksum).
Replace("-", String.Empty)
End Function
''' <summary>
''' Adds file version string to given filename `Destination` if that file already exists.
''' </summary>
''' <param name="pFilePath">Filepath to check</param>
''' <returns>Versioned string</returns>
Public Function GetVersionedFilename(pFilePath As String) As String
Return GetVersionedFilenameWithFilecheck(pFilePath, Function(pPath As String) IO.File.Exists(pPath))
End Function
''' <summary>
''' Adds file version string to given filename `Destination` if that file already exists.
''' </summary>
''' <param name="pFilePath">Filepath to check</param>
''' <param name="pFileExistsAction">Custom action to check for file existence</param>
''' <returns>Versioned string</returns>
Public Function GetVersionedFilenameWithFilecheck(pFilePath As String, pFileExistsAction As Func(Of String, Boolean)) As String
Try
Dim oFileName As String = pFilePath
Dim oFinalFileName = oFileName
Dim oDestinationDir = Path.GetDirectoryName(oFileName)
Dim oExtension = Path.GetExtension(oFileName)
Dim oFileNameWithoutExtension = Path.GetFileNameWithoutExtension(oFileName)
Dim oSplitResult = GetVersionedString(oFileNameWithoutExtension)
oFileNameWithoutExtension = oSplitResult.Item1
Dim oFileVersion As Integer = 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 pFilePath.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 = CInt(Math.Floor(oFileNameWithoutExtension.Length / 2.0))
Dim oNewFileNameWithoutExtension = oFileNameWithoutExtension.Substring(0, oNewLength)
_Logger.Info("New Filename will be: {0}", oNewFileNameWithoutExtension)
oFileNameWithoutExtension = oNewFileNameWithoutExtension
End If
' while file exists, increment version.
' version cannot go above MAX_FILE_VERSION, to prevent infinite loop
Do
oFinalFileName = Path.Combine(oDestinationDir, GetFilenameWithVersion(oFileNameWithoutExtension, oFileVersion, oExtension))
_Logger.Debug("Intermediate Filename is {0}", oFinalFileName)
_Logger.Debug("File version: {0}", oFileVersion)
oFileVersion += 1
Loop While pFileExistsAction(oFinalFileName) = True And oFileVersion < MAX_FILE_VERSION
If oFileVersion >= MAX_FILE_VERSION Then
Throw New OverflowException($"Tried '{MAX_FILE_VERSION}' times to version filename before giving up. Sorry.")
End If
_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!", pFilePath)
_Logger.Error(ex)
Return pFilePath
End Try
End Function
''' <summary>
''' Split String at version separator to:
''' check if string is already versioned,
''' get the string version of an already versioned string
''' </summary>
''' <example>
''' 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
''' </example>
''' <param name="pString">The string to versioned</param>
''' <returns>Tuple of string and version</returns>
Public Function GetVersionedString(pString As String) As Tuple(Of String, Integer)
Dim oSplitString = pString.Split(VERSION_SEPARATOR).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
_Logger.Debug("Versioned: String [{0}], Version [{1}]", pString, oStringVersion)
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, FileVersion As Integer, Extension As String) As String
If FileVersion <= 1 Then
Return $"{FileNameWithoutExtension}{Extension}"
Else
Return $"{FileNameWithoutExtension}{VERSION_SEPARATOR}{FileVersion}{Extension}"
End If
End Function
''' <summary>
''' Removes files in a directory filtered by filename, extension and last write date
''' </summary>
''' <param name="Path">The directory in which files will be deleted</param>
''' <param name="FileKeepTime">Only delete files which are older than x days. Must be between 0 and 1000 days.</param>
''' <param name="FileBaseName">A filename filter which will be checked</param>
''' <param name="FileExtension">A file extension which will be checked</param>
''' <param name="ContinueOnError">Should the function continue with deleting when a file could not be deleted?</param>
''' <returns>True if all files were deleted or if no files were deleted, otherwise false</returns>
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 += 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
<DebuggerStepThrough>
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
<DebuggerStepThrough>
Public Sub MoveTo(FilePath As String, NewFileName As String, Directory As String)
IO.File.Move(FilePath, Path.Combine(Directory, NewFileName))
End Sub
''' <summary>
''' Copied from https://docs.microsoft.com/en-us/dotnet/standard/io/how-to-copy-directories
''' </summary>
''' <param name="SourceDirName"></param>
''' <param name="DestDirName"></param>
''' <param name="CopySubDirs"></param>
Public Sub CopyDirectory(ByVal SourceDirName As String, ByVal DestDirName As String, ByVal CopySubDirs As Boolean)
Dim oDirectory As 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
''' <summary>
''' Tries to create a directory and returns its path.
''' Returns a temp path if `DirectoryPath` can not be created or written to.
''' </summary>
''' <param name="DirectoryPath">The directory to create</param>
''' <param name="TestWriteAccess">Should a write access test be performed?</param>
''' <returns>The used path</returns>
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
''' <summary>
''' Checks if a file is locked, ie. in use by another process.
''' </summary>
''' <remarks>
''' 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
''' </remarks>
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
''' <summary>
''' Checks the size of the supplied file.
''' </summary>
''' <param name="pFilePath"></param>
''' <param name="pMaxFileSizeInMegaBytes"></param>
''' <returns></returns>
Public Function TestFileSizeIsLessThanMaxFileSize(pFilePath As String, pMaxFileSizeInMegabytes As Integer) As Boolean
Dim oFileInfo As New FileInfo(pFilePath)
_Logger.Info("Checking Filesize of {0}", oFileInfo.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 oFileInfo.Length > oMaxSize Then
_Logger.Debug("Filesize is bigger than threshold.")
Return False
Else
_Logger.Debug("Filesize is smaller than threshold. All fine.")
Return True
End If
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

43
Base/GraphicsEx.vb Normal file
View File

@@ -0,0 +1,43 @@
Imports System.Drawing
Public Class GraphicsEx
''' <summary>
''' Returns the brightness of a color as a number between 0 and 1
''' </summary>
''' <param name="pColor">The color to check</param>
''' <returns>Low values for dark colors, high values for bright colors.</returns>
Public Shared Function GetBrightness(pColor As Color) As Single
Return (pColor.R * 0.299F + pColor.G * 0.587F + pColor.B * 0.114F) / 256.0F
End Function
''' <summary>
''' Returns a foreground/text color of either black or white, depending on the brightness of `pOtherColor`
''' </summary>
''' <param name="pOtherColor">The Background color whose brightness is determined</param>
''' <returns>A text color which is either white or black</returns>
Public Shared Function GetContrastedColor(pOtherColor As Color) As Color
If GetBrightness(pOtherColor) < 0.55 Then
Return Color.White
Else
Return Color.Black
End If
End Function
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

View File

@@ -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

43
Base/IDB/Constants.vb Normal file
View File

@@ -0,0 +1,43 @@
Namespace IDB
Public Class Constants
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
Public Class Database
Public Enum NamedDatabase
ECM
IDB
End Enum
End Class
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 Class
End Namespace

View File

@@ -1,11 +0,0 @@
Namespace IDB
Public Class Database
Public Enum NamedDatabase
ECM
IDB
End Enum
End Class
End Namespace

View File

@@ -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

55
Base/LanguageEx.vb Normal file
View File

@@ -0,0 +1,55 @@
Imports System.Globalization
Imports System.Threading
Imports DigitalData.Modules.Logging
''' <summary>
''' Functions relating to i18n, Cultures, Translations
''' </summary>
Public Class LanguageEx
''' <summary>
''' Sets the Language of the current thread by setting CurrentCulture and CurrentUICulture
''' </summary>
''' <param name="pLogger">A Logger instance</param>
''' <param name="pUserLanguage">A language code in the form of 'de-DE'</param>
''' <param name="pUserDateFormat">A custom date pattern</param>
Public Shared Sub SetApplicationLanguage(pLogger As Logger, pUserLanguage As String, Optional pUserDateFormat As String = Nothing)
Try
pLogger.Debug("Setting application language..")
Dim Culture As New CultureInfo(pUserLanguage)
If String.IsNullOrEmpty(pUserDateFormat) = False Then
Culture.DateTimeFormat.ShortDatePattern = pUserDateFormat
End If
pLogger.Debug("Culture object for language [{0}] created", pUserLanguage)
' The following line provides localization for data formats.
Thread.CurrentThread.CurrentCulture = Culture
' The following line provides localization for the application's user interface.
Thread.CurrentThread.CurrentUICulture = Culture
' Set this culture as the default culture for all threads in this application.
' Note: The following properties are supported in the .NET Framework 4.5+
CultureInfo.DefaultThreadCurrentCulture = Culture
CultureInfo.DefaultThreadCurrentUICulture = Culture
pLogger.Debug("Application language set to [{0}]", Culture.Name)
Catch ex As Exception
pLogger.Warn("Could not set application language!")
pLogger.Error(ex)
End Try
End Sub
''' <summary>
''' Logs the culture settings of the current thread
''' </summary>
''' <param name="pLogger">A Logger instance</param>
Public Shared Sub LogApplicationLanguage(pLogger As Logger)
pLogger.Debug("=== Application Language ===")
pLogger.Debug("Thread.CurrentThread.CurrentCulture: [{0}]", Thread.CurrentThread.CurrentCulture)
pLogger.Debug("Thread.CurrentThread.CurrentUICulture: [{0}]", Thread.CurrentThread.CurrentUICulture)
pLogger.Debug("CultureInfo.DefaultThreadCurrentCulture: [{0}]", CultureInfo.DefaultThreadCurrentCulture)
pLogger.Debug("CultureInfo.DefaultThreadCurrentUICulture: [{0}]", CultureInfo.DefaultThreadCurrentUICulture)
End Sub
End Class

685
Base/MimeEx.vb Normal file
View File

@@ -0,0 +1,685 @@
Imports DigitalData.Modules.Logging
Public Class MimeEx
Inherits BaseClass
Public Sub New(pLogConfig As LogConfig)
MyBase.New(pLogConfig)
End Sub
Public Function GetMimeType(ByVal extension As String) As String
If extension Is Nothing Then
Throw New ArgumentNullException("extension")
End If
If Not extension.StartsWith(".") Then
extension = "." & extension
End If
Dim value = Nothing
If Not _mappings.Value.TryGetValue(extension, value) Then
Return "application/octet-stream"
End If
Return value
End Function
Public Function GetExtension(ByVal mimeType As String) As String
If mimeType Is Nothing Then
Throw New ArgumentNullException("mimeType")
End If
If mimeType.StartsWith(".") Then
Throw New ArgumentException("Requested mime type is not valid: " & mimeType)
End If
Dim value = Nothing
If _mappings.Value.TryGetValue(mimeType, value) Then
Return value
End If
Throw New ArgumentException("Requested mime type is not registered: " & mimeType)
End Function
Private ReadOnly _mappings As New Lazy(Of IDictionary(Of String, String))(AddressOf BuildMappings)
Private Function BuildMappings() As IDictionary(Of String, String)
Dim dictionary As New Dictionary(Of String, String)(StringComparer.InvariantCultureIgnoreCase) From {
{".323", "text/h323"},
{".3g2", "video/3gpp2"},
{".3gp", "video/3gpp"},
{".3gp2", "video/3gpp2"},
{".3gpp", "video/3gpp"},
{".7z", "application/x-7z-compressed"},
{".aa", "audio/audible"},
{".AAC", "audio/aac"},
{".aaf", "application/octet-stream"},
{".aax", "audio/vnd.audible.aax"},
{".ac3", "audio/ac3"},
{".aca", "application/octet-stream"},
{".accda", "application/msaccess.addin"},
{".accdb", "application/msaccess"},
{".accdc", "application/msaccess.cab"},
{".accde", "application/msaccess"},
{".accdr", "application/msaccess.runtime"},
{".accdt", "application/msaccess"},
{".accdw", "application/msaccess.webapplication"},
{".accft", "application/msaccess.ftemplate"},
{".acx", "application/internet-property-stream"},
{".AddIn", "text/xml"},
{".ade", "application/msaccess"},
{".adobebridge", "application/x-bridge-url"},
{".adp", "application/msaccess"},
{".ADT", "audio/vnd.dlna.adts"},
{".ADTS", "audio/aac"},
{".afm", "application/octet-stream"},
{".ai", "application/postscript"},
{".aif", "audio/x-aiff"},
{".aifc", "audio/aiff"},
{".aiff", "audio/aiff"},
{".air", "application/vnd.adobe.air-application-installer-package+zip"},
{".amc", "application/x-mpeg"},
{".application", "application/x-ms-application"},
{".art", "image/x-jg"},
{".asa", "application/xml"},
{".asax", "application/xml"},
{".ascx", "application/xml"},
{".asd", "application/octet-stream"},
{".asf", "video/x-ms-asf"},
{".ashx", "application/xml"},
{".asi", "application/octet-stream"},
{".asm", "text/plain"},
{".asmx", "application/xml"},
{".aspx", "application/xml"},
{".asr", "video/x-ms-asf"},
{".asx", "video/x-ms-asf"},
{".atom", "application/atom+xml"},
{".au", "audio/basic"},
{".avi", "video/x-msvideo"},
{".axs", "application/olescript"},
{".bas", "text/plain"},
{".bcpio", "application/x-bcpio"},
{".bin", "application/octet-stream"},
{".bmp", "image/bmp"},
{".c", "text/plain"},
{".cab", "application/octet-stream"},
{".caf", "audio/x-caf"},
{".calx", "application/vnd.ms-office.calx"},
{".cat", "application/vnd.ms-pki.seccat"},
{".cc", "text/plain"},
{".cd", "text/plain"},
{".cdda", "audio/aiff"},
{".cdf", "application/x-cdf"},
{".cer", "application/x-x509-ca-cert"},
{".chm", "application/octet-stream"},
{".class", "application/x-java-applet"},
{".clp", "application/x-msclip"},
{".cmx", "image/x-cmx"},
{".cnf", "text/plain"},
{".cod", "image/cis-cod"},
{".config", "application/xml"},
{".contact", "text/x-ms-contact"},
{".coverage", "application/xml"},
{".cpio", "application/x-cpio"},
{".cpp", "text/plain"},
{".crd", "application/x-mscardfile"},
{".crl", "application/pkix-crl"},
{".crt", "application/x-x509-ca-cert"},
{".cs", "text/plain"},
{".csdproj", "text/plain"},
{".csh", "application/x-csh"},
{".csproj", "text/plain"},
{".css", "text/css"},
{".csv", "text/csv"},
{".cur", "application/octet-stream"},
{".cxx", "text/plain"},
{".dat", "application/octet-stream"},
{".datasource", "application/xml"},
{".dbproj", "text/plain"},
{".dcr", "application/x-director"},
{".def", "text/plain"},
{".deploy", "application/octet-stream"},
{".der", "application/x-x509-ca-cert"},
{".dgml", "application/xml"},
{".dib", "image/bmp"},
{".dif", "video/x-dv"},
{".dir", "application/x-director"},
{".disco", "text/xml"},
{".divx", "video/divx"},
{".dll", "application/x-msdownload"},
{".dll.config", "text/xml"},
{".dlm", "text/dlm"},
{".doc", "application/msword"},
{".docm", "application/vnd.ms-word.document.macroEnabled.12"},
{".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"},
{".dot", "application/msword"},
{".dotm", "application/vnd.ms-word.template.macroEnabled.12"},
{".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"},
{".dsp", "application/octet-stream"},
{".dsw", "text/plain"},
{".dtd", "text/xml"},
{".dtsConfig", "text/xml"},
{".dv", "video/x-dv"},
{".dvi", "application/x-dvi"},
{".dwf", "drawing/x-dwf"},
{".dwp", "application/octet-stream"},
{".dxr", "application/x-director"},
{".eml", "message/rfc822"},
{".emz", "application/octet-stream"},
{".eot", "application/octet-stream"},
{".eps", "application/postscript"},
{".etl", "application/etl"},
{".etx", "text/x-setext"},
{".evy", "application/envoy"},
{".exe", "application/octet-stream"},
{".exe.config", "text/xml"},
{".fdf", "application/vnd.fdf"},
{".fif", "application/fractals"},
{".filters", "application/xml"},
{".fla", "application/octet-stream"},
{".flr", "x-world/x-vrml"},
{".flv", "video/x-flv"},
{".fsscript", "application/fsharp-script"},
{".fsx", "application/fsharp-script"},
{".generictest", "application/xml"},
{".gif", "image/gif"},
{".group", "text/x-ms-group"},
{".gsm", "audio/x-gsm"},
{".gtar", "application/x-gtar"},
{".gz", "application/x-gzip"},
{".h", "text/plain"},
{".hdf", "application/x-hdf"},
{".hdml", "text/x-hdml"},
{".hhc", "application/x-oleobject"},
{".hhk", "application/octet-stream"},
{".hhp", "application/octet-stream"},
{".hlp", "application/winhlp"},
{".hpp", "text/plain"},
{".hqx", "application/mac-binhex40"},
{".hta", "application/hta"},
{".htc", "text/x-component"},
{".htm", "text/html"},
{".html", "text/html"},
{".htt", "text/webviewhtml"},
{".hxa", "application/xml"},
{".hxc", "application/xml"},
{".hxd", "application/octet-stream"},
{".hxe", "application/xml"},
{".hxf", "application/xml"},
{".hxh", "application/octet-stream"},
{".hxi", "application/octet-stream"},
{".hxk", "application/xml"},
{".hxq", "application/octet-stream"},
{".hxr", "application/octet-stream"},
{".hxs", "application/octet-stream"},
{".hxt", "text/html"},
{".hxv", "application/xml"},
{".hxw", "application/octet-stream"},
{".hxx", "text/plain"},
{".i", "text/plain"},
{".ico", "image/x-icon"},
{".ics", "application/octet-stream"},
{".idl", "text/plain"},
{".ief", "image/ief"},
{".iii", "application/x-iphone"},
{".inc", "text/plain"},
{".inf", "application/octet-stream"},
{".inl", "text/plain"},
{".ins", "application/x-internet-signup"},
{".ipa", "application/x-itunes-ipa"},
{".ipg", "application/x-itunes-ipg"},
{".ipproj", "text/plain"},
{".ipsw", "application/x-itunes-ipsw"},
{".iqy", "text/x-ms-iqy"},
{".isp", "application/x-internet-signup"},
{".ite", "application/x-itunes-ite"},
{".itlp", "application/x-itunes-itlp"},
{".itms", "application/x-itunes-itms"},
{".itpc", "application/x-itunes-itpc"},
{".IVF", "video/x-ivf"},
{".jar", "application/java-archive"},
{".java", "application/octet-stream"},
{".jck", "application/liquidmotion"},
{".jcz", "application/liquidmotion"},
{".jfif", "image/pjpeg"},
{".jnlp", "application/x-java-jnlp-file"},
{".jpb", "application/octet-stream"},
{".jpe", "image/jpeg"},
{".jpeg", "image/jpeg"},
{".jpg", "image/jpeg"},
{".js", "application/x-javascript"},
{".json", "application/json"},
{".jsx", "text/jscript"},
{".jsxbin", "text/plain"},
{".latex", "application/x-latex"},
{".library-ms", "application/windows-library+xml"},
{".lit", "application/x-ms-reader"},
{".loadtest", "application/xml"},
{".lpk", "application/octet-stream"},
{".lsf", "video/x-la-asf"},
{".lst", "text/plain"},
{".lsx", "video/x-la-asf"},
{".lzh", "application/octet-stream"},
{".m13", "application/x-msmediaview"},
{".m14", "application/x-msmediaview"},
{".m1v", "video/mpeg"},
{".m2t", "video/vnd.dlna.mpeg-tts"},
{".m2ts", "video/vnd.dlna.mpeg-tts"},
{".m2v", "video/mpeg"},
{".m3u", "audio/x-mpegurl"},
{".m3u8", "audio/x-mpegurl"},
{".m4a", "audio/m4a"},
{".m4b", "audio/m4b"},
{".m4p", "audio/m4p"},
{".m4r", "audio/x-m4r"},
{".m4v", "video/x-m4v"},
{".mac", "image/x-macpaint"},
{".mak", "text/plain"},
{".man", "application/x-troff-man"},
{".manifest", "application/x-ms-manifest"},
{".map", "text/plain"},
{".master", "application/xml"},
{".mda", "application/msaccess"},
{".mdb", "application/x-msaccess"},
{".mde", "application/msaccess"},
{".mdp", "application/octet-stream"},
{".me", "application/x-troff-me"},
{".mfp", "application/x-shockwave-flash"},
{".mht", "message/rfc822"},
{".mhtml", "message/rfc822"},
{".mid", "audio/mid"},
{".midi", "audio/mid"},
{".mix", "application/octet-stream"},
{".mk", "text/plain"},
{".mmf", "application/x-smaf"},
{".mno", "text/xml"},
{".mny", "application/x-msmoney"},
{".mod", "video/mpeg"},
{".mov", "video/quicktime"},
{".movie", "video/x-sgi-movie"},
{".mp2", "video/mpeg"},
{".mp2v", "video/mpeg"},
{".mp3", "audio/mpeg"},
{".mp4", "video/mp4"},
{".mp4v", "video/mp4"},
{".mpa", "video/mpeg"},
{".mpe", "video/mpeg"},
{".mpeg", "video/mpeg"},
{".mpf", "application/vnd.ms-mediapackage"},
{".mpg", "video/mpeg"},
{".mpp", "application/vnd.ms-project"},
{".mpv2", "video/mpeg"},
{".mqv", "video/quicktime"},
{".ms", "application/x-troff-ms"},
{".msg", "application/vnd.ms-outlook"},
{".msi", "application/octet-stream"},
{".mso", "application/octet-stream"},
{".mts", "video/vnd.dlna.mpeg-tts"},
{".mtx", "application/xml"},
{".mvb", "application/x-msmediaview"},
{".mvc", "application/x-miva-compiled"},
{".mxp", "application/x-mmxp"},
{".nc", "application/x-netcdf"},
{".nsc", "video/x-ms-asf"},
{".nws", "message/rfc822"},
{".ocx", "application/octet-stream"},
{".oda", "application/oda"},
{".odb", "application/vnd.oasis.opendocument.database"},
{".odc", "application/vnd.oasis.opendocument.chart"},
{".odf", "application/vnd.oasis.opendocument.formula"},
{".odg", "application/vnd.oasis.opendocument.graphics"},
{".odh", "text/plain"},
{".odi", "application/vnd.oasis.opendocument.image"},
{".odl", "text/plain"},
{".odm", "application/vnd.oasis.opendocument.text-master"},
{".odp", "application/vnd.oasis.opendocument.presentation"},
{".ods", "application/vnd.oasis.opendocument.spreadsheet"},
{".odt", "application/vnd.oasis.opendocument.text"},
{".ogv", "video/ogg"},
{".one", "application/onenote"},
{".onea", "application/onenote"},
{".onepkg", "application/onenote"},
{".onetmp", "application/onenote"},
{".onetoc", "application/onenote"},
{".onetoc2", "application/onenote"},
{".orderedtest", "application/xml"},
{".osdx", "application/opensearchdescription+xml"},
{".otg", "application/vnd.oasis.opendocument.graphics-template"},
{".oth", "application/vnd.oasis.opendocument.text-web"},
{".otp", "application/vnd.oasis.opendocument.presentation-template"},
{".ots", "application/vnd.oasis.opendocument.spreadsheet-template"},
{".ott", "application/vnd.oasis.opendocument.text-template"},
{".oxt", "application/vnd.openofficeorg.extension"},
{".p10", "application/pkcs10"},
{".p12", "application/x-pkcs12"},
{".p7b", "application/x-pkcs7-certificates"},
{".p7c", "application/pkcs7-mime"},
{".p7m", "application/pkcs7-mime"},
{".p7r", "application/x-pkcs7-certreqresp"},
{".p7s", "application/pkcs7-signature"},
{".pbm", "image/x-portable-bitmap"},
{".pcast", "application/x-podcast"},
{".pct", "image/pict"},
{".pcx", "application/octet-stream"},
{".pcz", "application/octet-stream"},
{".pdf", "application/pdf"},
{".pfb", "application/octet-stream"},
{".pfm", "application/octet-stream"},
{".pfx", "application/x-pkcs12"},
{".pgm", "image/x-portable-graymap"},
{".pic", "image/pict"},
{".pict", "image/pict"},
{".pkgdef", "text/plain"},
{".pkgundef", "text/plain"},
{".pko", "application/vnd.ms-pki.pko"},
{".pls", "audio/scpls"},
{".pma", "application/x-perfmon"},
{".pmc", "application/x-perfmon"},
{".pml", "application/x-perfmon"},
{".pmr", "application/x-perfmon"},
{".pmw", "application/x-perfmon"},
{".png", "image/png"},
{".pnm", "image/x-portable-anymap"},
{".pnt", "image/x-macpaint"},
{".pntg", "image/x-macpaint"},
{".pnz", "image/png"},
{".pot", "application/vnd.ms-powerpoint"},
{".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12"},
{".potx", "application/vnd.openxmlformats-officedocument.presentationml.template"},
{".ppa", "application/vnd.ms-powerpoint"},
{".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12"},
{".ppm", "image/x-portable-pixmap"},
{".pps", "application/vnd.ms-powerpoint"},
{".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"},
{".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"},
{".ppt", "application/vnd.ms-powerpoint"},
{".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"},
{".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"},
{".prf", "application/pics-rules"},
{".prm", "application/octet-stream"},
{".prx", "application/octet-stream"},
{".ps", "application/postscript"},
{".psc1", "application/PowerShell"},
{".psd", "application/octet-stream"},
{".psess", "application/xml"},
{".psm", "application/octet-stream"},
{".psp", "application/octet-stream"},
{".pub", "application/x-mspublisher"},
{".pwz", "application/vnd.ms-powerpoint"},
{".qht", "text/x-html-insertion"},
{".qhtm", "text/x-html-insertion"},
{".qt", "video/quicktime"},
{".qti", "image/x-quicktime"},
{".qtif", "image/x-quicktime"},
{".qtl", "application/x-quicktimeplayer"},
{".qxd", "application/octet-stream"},
{".ra", "audio/x-pn-realaudio"},
{".ram", "audio/x-pn-realaudio"},
{".rar", "application/octet-stream"},
{".ras", "image/x-cmu-raster"},
{".rat", "application/rat-file"},
{".rc", "text/plain"},
{".rc2", "text/plain"},
{".rct", "text/plain"},
{".rdlc", "application/xml"},
{".resx", "application/xml"},
{".rf", "image/vnd.rn-realflash"},
{".rgb", "image/x-rgb"},
{".rgs", "text/plain"},
{".rm", "application/vnd.rn-realmedia"},
{".rmi", "audio/mid"},
{".rmp", "application/vnd.rn-rn_music_package"},
{".roff", "application/x-troff"},
{".rpm", "audio/x-pn-realaudio-plugin"},
{".rqy", "text/x-ms-rqy"},
{".rtf", "application/rtf"},
{".rtx", "text/richtext"},
{".ruleset", "application/xml"},
{".s", "text/plain"},
{".safariextz", "application/x-safari-safariextz"},
{".scd", "application/x-msschedule"},
{".sct", "text/scriptlet"},
{".sd2", "audio/x-sd2"},
{".sdp", "application/sdp"},
{".sea", "application/octet-stream"},
{".searchConnector-ms", "application/windows-search-connector+xml"},
{".setpay", "application/set-payment-initiation"},
{".setreg", "application/set-registration-initiation"},
{".settings", "application/xml"},
{".sgimb", "application/x-sgimb"},
{".sgml", "text/sgml"},
{".sh", "application/x-sh"},
{".shar", "application/x-shar"},
{".shtml", "text/html"},
{".sit", "application/x-stuffit"},
{".sitemap", "application/xml"},
{".skin", "application/xml"},
{".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12"},
{".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"},
{".slk", "application/vnd.ms-excel"},
{".sln", "text/plain"},
{".slupkg-ms", "application/x-ms-license"},
{".smd", "audio/x-smd"},
{".smi", "application/octet-stream"},
{".smx", "audio/x-smd"},
{".smz", "audio/x-smd"},
{".snd", "audio/basic"},
{".snippet", "application/xml"},
{".snp", "application/octet-stream"},
{".sol", "text/plain"},
{".sor", "text/plain"},
{".spc", "application/x-pkcs7-certificates"},
{".spl", "application/futuresplash"},
{".src", "application/x-wais-source"},
{".srf", "text/plain"},
{".SSISDeploymentManifest", "text/xml"},
{".ssm", "application/streamingmedia"},
{".sst", "application/vnd.ms-pki.certstore"},
{".stl", "application/vnd.ms-pki.stl"},
{".sv4cpio", "application/x-sv4cpio"},
{".sv4crc", "application/x-sv4crc"},
{".svc", "application/xml"},
{".svg", "image/svg+xml"},
{".swf", "application/x-shockwave-flash"},
{".t", "application/x-troff"},
{".tar", "application/x-tar"},
{".tcl", "application/x-tcl"},
{".testrunconfig", "application/xml"},
{".testsettings", "application/xml"},
{".tex", "application/x-tex"},
{".texi", "application/x-texinfo"},
{".texinfo", "application/x-texinfo"},
{".tgz", "application/x-compressed"},
{".thmx", "application/vnd.ms-officetheme"},
{".thn", "application/octet-stream"},
{".tif", "image/tiff"},
{".tiff", "image/tiff"},
{".tlh", "text/plain"},
{".tli", "text/plain"},
{".toc", "application/octet-stream"},
{".tr", "application/x-troff"},
{".trm", "application/x-msterminal"},
{".trx", "application/xml"},
{".ts", "video/vnd.dlna.mpeg-tts"},
{".tsv", "text/tab-separated-values"},
{".ttf", "application/octet-stream"},
{".tts", "video/vnd.dlna.mpeg-tts"},
{".txt", "text/plain"},
{".u32", "application/octet-stream"},
{".uls", "text/iuls"},
{".user", "text/plain"},
{".ustar", "application/x-ustar"},
{".vb", "text/plain"},
{".vbdproj", "text/plain"},
{".vbk", "video/mpeg"},
{".vbproj", "text/plain"},
{".vbs", "text/vbscript"},
{".vcf", "text/x-vcard"},
{".vcproj", "application/xml"},
{".vcs", "text/plain"},
{".vcxproj", "application/xml"},
{".vddproj", "text/plain"},
{".vdp", "text/plain"},
{".vdproj", "text/plain"},
{".vdx", "application/vnd.ms-visio.viewer"},
{".vml", "text/xml"},
{".vscontent", "application/xml"},
{".vsct", "text/xml"},
{".vsd", "application/vnd.visio"},
{".vsi", "application/ms-vsi"},
{".vsix", "application/vsix"},
{".vsixlangpack", "text/xml"},
{".vsixmanifest", "text/xml"},
{".vsmdi", "application/xml"},
{".vspscc", "text/plain"},
{".vss", "application/vnd.visio"},
{".vsscc", "text/plain"},
{".vssettings", "text/xml"},
{".vssscc", "text/plain"},
{".vst", "application/vnd.visio"},
{".vstemplate", "text/xml"},
{".vsto", "application/x-ms-vsto"},
{".vsw", "application/vnd.visio"},
{".vsx", "application/vnd.visio"},
{".vtx", "application/vnd.visio"},
{".wav", "audio/wav"},
{".wave", "audio/wav"},
{".wax", "audio/x-ms-wax"},
{".wbk", "application/msword"},
{".wbmp", "image/vnd.wap.wbmp"},
{".wcm", "application/vnd.ms-works"},
{".wdb", "application/vnd.ms-works"},
{".wdp", "image/vnd.ms-photo"},
{".webarchive", "application/x-safari-webarchive"},
{".webm", "video/webm"},
{".webp", "image/webp"},
{".webtest", "application/xml"},
{".wiq", "application/xml"},
{".wiz", "application/msword"},
{".wks", "application/vnd.ms-works"},
{".WLMP", "application/wlmoviemaker"},
{".wlpginstall", "application/x-wlpg-detect"},
{".wlpginstall3", "application/x-wlpg3-detect"},
{".wm", "video/x-ms-wm"},
{".wma", "audio/x-ms-wma"},
{".wmd", "application/x-ms-wmd"},
{".wmf", "application/x-msmetafile"},
{".wml", "text/vnd.wap.wml"},
{".wmlc", "application/vnd.wap.wmlc"},
{".wmls", "text/vnd.wap.wmlscript"},
{".wmlsc", "application/vnd.wap.wmlscriptc"},
{".wmp", "video/x-ms-wmp"},
{".wmv", "video/x-ms-wmv"},
{".wmx", "video/x-ms-wmx"},
{".wmz", "application/x-ms-wmz"},
{".wpl", "application/vnd.ms-wpl"},
{".wps", "application/vnd.ms-works"},
{".wri", "application/x-mswrite"},
{".wrl", "x-world/x-vrml"},
{".wrz", "x-world/x-vrml"},
{".wsc", "text/scriptlet"},
{".wsdl", "text/xml"},
{".wvx", "video/x-ms-wvx"},
{".x", "application/directx"},
{".xaf", "x-world/x-vrml"},
{".xaml", "application/xaml+xml"},
{".xap", "application/x-silverlight-app"},
{".xbap", "application/x-ms-xbap"},
{".xbm", "image/x-xbitmap"},
{".xdr", "text/plain"},
{".xht", "application/xhtml+xml"},
{".xhtml", "application/xhtml+xml"},
{".xla", "application/vnd.ms-excel"},
{".xlam", "application/vnd.ms-excel.addin.macroEnabled.12"},
{".xlc", "application/vnd.ms-excel"},
{".xld", "application/vnd.ms-excel"},
{".xlk", "application/vnd.ms-excel"},
{".xll", "application/vnd.ms-excel"},
{".xlm", "application/vnd.ms-excel"},
{".xls", "application/vnd.ms-excel"},
{".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"},
{".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"},
{".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},
{".xlt", "application/vnd.ms-excel"},
{".xltm", "application/vnd.ms-excel.template.macroEnabled.12"},
{".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"},
{".xlw", "application/vnd.ms-excel"},
{".xml", "text/xml"},
{".xmta", "application/xml"},
{".xof", "x-world/x-vrml"},
{".XOML", "text/plain"},
{".xpm", "image/x-xpixmap"},
{".xps", "application/vnd.ms-xpsdocument"},
{".xrm-ms", "text/xml"},
{".xsc", "application/xml"},
{".xsd", "text/xml"},
{".xsf", "text/xml"},
{".xsl", "text/xml"},
{".xslt", "text/xml"},
{".xsn", "application/octet-stream"},
{".xss", "application/xml"},
{".xtp", "application/octet-stream"},
{".xwd", "image/x-xwindowdump"},
{".z", "application/x-compress"},
{".zip", "application/x-zip-compressed"},
{"application/fsharp-script", ".fsx"},
{"application/msaccess", ".adp"},
{"application/msword", ".doc"},
{"application/octet-stream", ".bin"},
{"application/onenote", ".one"},
{"application/postscript", ".eps"},
{"application/vnd.ms-excel", ".xls"},
{"application/vnd.ms-powerpoint", ".ppt"},
{"application/vnd.ms-works", ".wks"},
{"application/vnd.visio", ".vsd"},
{"application/x-director", ".dir"},
{"application/x-shockwave-flash", ".swf"},
{"application/x-x509-ca-cert", ".cer"},
{"application/xhtml+xml", ".xhtml"},
{"application/xml", ".xml"},
{"audio/aac", ".AAC"},
{"audio/aiff", ".aiff"},
{"audio/basic", ".snd"},
{"audio/mid", ".midi"},
{"audio/wav", ".wav"},
{"audio/x-mpegurl", ".m3u"},
{"audio/x-pn-realaudio", ".ra"},
{"audio/x-smd", ".smd"},
{"image/bmp", ".bmp"},
{"image/jpeg", ".jpg"},
{"image/pict", ".pic"},
{"image/png", ".png"},
{"image/tiff", ".tiff"},
{"image/x-macpaint", ".mac"},
{"image/x-quicktime", ".qti"},
{"message/rfc822", ".eml"},
{"text/html", ".html"},
{"text/plain", ".txt"},
{"text/scriptlet", ".wsc"},
{"text/xml", ".xml"},
{"video/3gpp", ".3gp"},
{"video/3gpp2", ".3gp2"},
{"video/mp4", ".mp4"},
{"video/mpeg", ".mpg"},
{"video/quicktime", ".mov"},
{"video/vnd.dlna.mpeg-tts", ".m2t"},
{"video/x-dv", ".dv"},
{"video/x-la-asf", ".lsf"},
{"video/x-ms-asf", ".asf"},
{"x-world/x-vrml", ".xof"}
}
Dim dictionary2 As Dictionary(Of String, String) = dictionary
Dim list As List(Of KeyValuePair(Of String, String)) = dictionary2.ToList()
For Each item As KeyValuePair(Of String, String) In list
If Not dictionary2.ContainsKey(item.Value) Then
dictionary2.Add(item.Value, item.Key)
End If
Next
Return dictionary2
End Function
End Class

174
Base/ModuleExtensions.vb Normal file
View File

@@ -0,0 +1,174 @@
Imports System.Runtime.CompilerServices
Imports System.Web
Public Module ModuleExtensions
Const UnixEraStartTicks As Long = 621355968000000000
' ======================================================
' === DATETIME
' ======================================================
<Extension()>
Public Function GetUnixTimestamp(pDate As Date) As Long
Dim UnixEraTicks = pDate.Ticks - UnixEraStartTicks
Return UnixEraTicks \ 10000
End Function
<Extension()>
Public Function DateFromUnix(pTimestamp As Long) As Date
Return New Date(UnixEraStartTicks + pTimestamp * 10000)
End Function
' ======================================================
' === LIST
' ======================================================
<Extension()>
Public Function JoinToString(pList As IEnumerable(Of String), pSeparator As Char)
Return String.Join(pSeparator, pList)
End Function
' ======================================================
' === STRING
' ======================================================
''' <summary>
''' Truncates a string to the specified length if it exceeds that length.
''' </summary>
''' <param name="pString">The string</param>
''' <param name="pLength">The maximum string length</param>
''' <returns>The truncated string</returns>
<Extension()>
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
''' <summary>
''' Replaces single quotes in text for SQL Commands.
''' </summary>
''' <param name="pString">The string</param>
''' <returns>The escaped string.</returns>
<Extension()>
Public Function EscapeForSQL(pString As String) As String
Return ObjectEx.NotNull(pString, String.Empty).Replace("'", "''")
End Function
''' <summary>
''' Converts a string to boolean. Accepts true and 1 as truthy values
''' </summary>
''' <param name="pString">The input string</param>
''' <returns>True if input is true or 1, otherwise false.</returns>
<Extension()>
Public Function ToBoolean(pString As String) As Boolean
If String.IsNullOrEmpty(pString) Then Return False
Return (pString.Trim().ToLower() = "true") OrElse (pString.Trim() = "1")
End Function
''' <summary>
''' Checks if a string is null or empty
''' </summary>
''' <param name="pString">The input string</param>
''' <returns>True string is null or empty, otherwise false.</returns>
<Extension()>
Public Function IsNullOrEmpty(pString As String) As Boolean
Return String.IsNullOrEmpty(pString)
End Function
''' <summary>
''' Checks if a string is NOT null or empty
''' </summary>
''' <param name="pString">The input string</param>
''' <returns>True string is null or empty, otherwise false.</returns>
<Extension()>
Public Function IsNotNullOrEmpty(pString As String) As Boolean
If String.IsNullOrEmpty(pString) Then
Return False
Else
Return True
End If
End Function
' ======================================================
' === DICTIONARY
' ======================================================
<Extension()>
Public Function ToURLQueryString(pDictionary As IDictionary(Of String, String)) As String
Dim oQueryString = HttpUtility.ParseQueryString(String.Empty)
For Each oItem As KeyValuePair(Of String, String) In pDictionary
oQueryString.Add(oItem.Key, oItem.Value)
Next
Return oQueryString.ToString()
End Function
' ======================================================
' === DATATABLE
' ======================================================
<Extension()>
Public Function ItemEx(Of T)(pRow As DataRow, pFieldName As String, Optional pDefaultValue As T = Nothing) As T
Try
If TableContainsColumn(pRow.Table, pFieldName) = False Then Return pDefaultValue
Return ObjectEx.NotNull(pRow.Item(pFieldName), pDefaultValue)
Catch ex As Exception
Return Nothing
End Try
End Function
<Extension()>
Public Function ItemEx(Of T)(pRow As DataRow, pFieldIndex As Integer, Optional pDefaultValue As T = Nothing) As T
Try
If TableContainsColumn(pRow.Table, pFieldIndex) = False Then Return pDefaultValue
Return ObjectEx.NotNull(pRow.Item(pFieldIndex), pDefaultValue)
Catch ex As Exception
Return Nothing
End Try
End Function
<Extension()>
Public Function FieldOrDefault(Of T)(pRow As DataRow, pFieldName As String, Optional pDefaultValue As T = Nothing) As T
Return ItemEx(pRow, pFieldName, pDefaultValue)
End Function
<Extension()>
Public Function FieldOrDefault(Of T)(pRow As DataRow, pFieldIndex As Integer, Optional pDefaultValue As T = Nothing) As T
Return ItemEx(pRow, pFieldIndex, pDefaultValue)
End Function
<Extension()>
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
Private Function TableContainsColumn(pTable As DataTable, pColumnName As String) As Boolean
Try
If pTable Is Nothing Then Return False
If String.IsNullOrEmpty(pColumnName) Then Return False
Return pTable.Columns.Contains(pColumnName)
Catch ex As Exception
Return False
End Try
End Function
Private Function TableContainsColumn(pTable As DataTable, pColumnIndex As Integer) As Boolean
Try
If pTable Is Nothing Then Return False
If String.IsNullOrEmpty(pColumnIndex) Then Return False
Return pTable.Columns.Count > pColumnIndex
Catch ex As Exception
Return False
End Try
End Function
End Module

View File

@@ -1,35 +1,9 @@
Imports System Imports System
Imports System.Reflection Imports System.Reflection
Imports System.Runtime.InteropServices Imports System.Runtime.InteropServices
<Assembly: AssemblyTrademark("1.3.9.0")>
' 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
<Assembly: AssemblyTitle("Base")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Base")>
<Assembly: AssemblyCopyright("Copyright © 2022")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird. 'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird.
<Assembly: Guid("f097830c-82fe-4cd0-8df6-e458522c1ddd")> <Assembly: Guid("f097830c-82fe-4cd0-8df6-e458522c1ddd")>
' 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:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.1")>
<Assembly: AssemblyFileVersion("1.0.0.1")>

View File

@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary> '''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary> '''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0"), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase Inherits Global.System.Configuration.ApplicationSettingsBase

237
Base/NativeMethods.vb Normal file
View File

@@ -0,0 +1,237 @@
Imports System.Runtime.InteropServices
Imports System.Text
Imports DigitalData.Modules.Base.ScreenEx
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
<DllImport("Shell32", CharSet:=CharSet.Auto, SetLastError:=True)>
Public Shared Function ShellExecuteEx(ByRef lpExecInfo As ShellExecuteInfo) As Boolean
End Function
<DllImport("user32", EntryPoint:="SetClipboardViewer")>
Public Shared Function SetClipboardViewer(ByVal hWnd As IntPtr) As IntPtr
End Function
<DllImport("user32.dll")>
Public Shared Function GetDC(ByVal hwnd As IntPtr) As IntPtr
End Function
<DllImport("user32.dll")>
Public Shared Function ReleaseDC(ByVal hwnd As IntPtr, ByVal hdc As IntPtr) As IntPtr
End Function
<DllImport("User32.dll")>
Public Shared Function ReleaseCapture() As Boolean
End Function
<DllImport("user32.dll")>
Public Shared Function GetWindowRect(ByVal hWnd As HandleRef, ByRef lpRect As RectangleAPI) As Boolean
End Function
<DllImport("user32.dll")>
Public Shared Function AttachThreadInput(ByVal idAttach As IntPtr, ByVal idAttachTo As IntPtr, fAttach As Boolean) As Boolean
End Function
<DllImport("user32.dll")>
Public Shared Function GetFocus() As IntPtr
End Function
<DllImport("user32.dll")>
Public Shared Function WindowFromPoint(ByVal p As PointAPI) As IntPtr
End Function
<DllImport("user32.dll")>
Public Shared Function GetForegroundWindow() As IntPtr
End Function
<DllImport("user32.dll")>
Public Shared Function GetWindowThreadProcessId(ByVal hwnd As IntPtr, ByRef lpdwProcessID As Integer) As Integer
End Function
<DllImport("user32.dll")>
Public Shared Function GetClassName(ByVal hwnd As Integer, ByVal lpClassName As StringBuilder, ByVal nMaxCount As Integer) As Integer
End Function
<DllImport("kernel32.dll")>
Public Shared Function OpenProcess(ByVal dwDesiredAccess As UInteger, ByVal bInheritHandle As Boolean, ByVal dwProcessId As UInteger) As IntPtr
End Function
<DllImport("kernel32.dll")>
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
<DllImport("user32.dll", SetLastError:=True)>
Public Shared Function GetWindowThreadProcessId(ByVal hWnd As IntPtr, <Out> ByRef lpdwProcessId As UInteger) As UInteger
End Function
<DllImport("kernel32.dll")>
Public Shared Function VirtualFreeEx(ByVal hProcess As IntPtr, ByVal lpAddress As IntPtr, ByVal dwSize As UIntPtr, ByVal dwFreeType As UInteger) As Boolean
End Function
<DllImport("kernel32.dll")>
Public Shared Function CloseHandle(ByVal hObject As IntPtr) As Boolean
End Function
<DllImport("kernel32.dll")>
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
<DllImport("kernel32.dll")>
Public Shared Function UnmapViewOfFile(ByVal lpBaseAddress As IntPtr) As Boolean
End Function
<DllImport("kernel32.dll", SetLastError:=True)>
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
<DllImport("user32.dll")>
Public Shared Function SendMessage(ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr
End Function
<DllImport("kernel32.dll")>
Public Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr,
<Out> ByVal lpBuffer As Byte(), ByVal nSize As UIntPtr, ByVal lpNumberOfBytesRead As IntPtr) As Boolean
End Function
<DllImport("Kernel32.dll", EntryPoint:="RtlMoveMemory", SetLastError:=False)>
Public Shared Sub MoveMemoryFromByte(ByVal dest As IntPtr, ByRef src As Byte, ByVal size As Integer)
End Sub
<DllImport("Kernel32.dll", EntryPoint:="RtlMoveMemory", SetLastError:=False)>
Public Shared Sub MoveMemoryToByte(ByRef dest As Byte, ByVal src As IntPtr, ByVal size As Integer)
End Sub
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)>
Public Shared Function RegisterWindowMessage(ByVal lpString As String) As Integer
End Function
<DllImport("user32.dll", ExactSpelling:=True, SetLastError:=True)>
Public Shared Function GetCursorPos(ByRef lpPoint As PointAPI) As <MarshalAs(UnmanagedType.Bool)> Boolean
End Function
<DllImport("User32.dll", SetLastError:=True)>
Friend Shared Function MonitorFromWindow(ByVal hwnd As IntPtr,
ByVal dwFlags As Integer) As IntPtr
End Function
<DllImport("Shcore.dll", SetLastError:=True)>
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
<DllImport("gdi32.dll")>
Friend Shared Function GetDeviceCaps(ByVal hdc As IntPtr, ByVal nIndex As Integer) As Integer
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
<StructLayout(LayoutKind.Sequential)>
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
<MarshalAs(UnmanagedType.LPTStr)> Public lpVerb As String
<MarshalAs(UnmanagedType.LPTStr)> Public lpFile As String
<MarshalAs(UnmanagedType.LPTStr)> Public lpParameters As String
<MarshalAs(UnmanagedType.LPTStr)> Public lpDirectory As String
Dim nShow As Integer
Dim hInstApp As IntPtr
Dim lpIDList As IntPtr
<MarshalAs(UnmanagedType.LPTStr)> Public lpClass As String
Public hkeyClass As IntPtr
Public dwHotKey As Integer
Public hIcon As IntPtr
Public hProcess As IntPtr
End Structure
<System.Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)>
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

46
Base/ObjectEx.vb Normal file
View File

@@ -0,0 +1,46 @@
Public Class ObjectEx
''' <summary>
''' Checks a value for three different `null` values,
''' Nothing, Empty String, DBNull
'''
''' Returns the original value if the value is not null, or `defaultValue`
''' </summary>
''' <typeparam name="T">The type of the value</typeparam>
''' <param name="value">The value</param>
''' <param name="defaultValue">The default Value</param>
''' <returns>The original value or the default value</returns>
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
''' <summary>
''' Converts a String value to the given Enum
''' </summary>
''' <typeparam name="T">The Enum Type</typeparam>
''' <param name="value">The string value to convert</param>
Public Shared Function ToEnum(Of T)(value As String) As T
Return [Enum].Parse(GetType(T), value)
End Function
''' <summary>
''' Converts an Integer value to the given Enum
''' </summary>
''' <typeparam name="T">The Enum Type</typeparam>
''' <param name="value">The integer value to convert</param>
Public Shared Function ToEnum(Of T)(value As Integer) As T
Return [Enum].ToObject(GetType(T), value)
End Function
''' <summary>
''' Converts a Long value to the given Enum
''' </summary>
''' <typeparam name="T">The Enum Type</typeparam>
''' <param name="value">The long value to convert</param>
Public Shared Function ToEnum(Of T)(value As Long) As T
Return [Enum].ToObject(GetType(T), value)
End Function
End Class

View File

@@ -1,44 +0,0 @@
Imports System.IO
Imports System.Reflection
Imports System.Runtime.InteropServices
Imports System.Security.Cryptography
Imports DigitalData.Modules.Logging
Public Class Performance
Public Sub New(pLogConfig As LogConfig, pAppDataPath As String)
Dim savedHash = String.Empty
Dim assemblyLocation = Assembly.GetEntryAssembly().Location
Dim hashPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "hash.txt")
If Not File.Exists(hashPath) Then
File.Create(hashPath)
Else
savedHash = File.ReadAllText(hashPath)
End If
Dim hash = String.Concat(SHA1.Create().ComputeHash(File.ReadAllBytes(assemblyLocation)).Select(Function(x) x.ToString("x2")))
If hash.Equals(savedHash) Then
Return
End If
Dim dotNetRuntimePath = RuntimeEnvironment.GetRuntimeDirectory()
Dim ngenPath = Path.Combine(dotNetRuntimePath, "ngen.exe")
Dim process = New Process With {
.StartInfo = New ProcessStartInfo With {
.FileName = ngenPath,
.Arguments = $"install ""{assemblyLocation}"" /nologo",
.CreateNoWindow = True,
.UseShellExecute = True,
.Verb = "runas"
}
}
Try
process.Start()
process.WaitForExit()
File.WriteAllText(hashPath, hash)
Catch
' ...
End Try
End Sub
End Class

163
Base/ScreenEx.vb Normal file
View File

@@ -0,0 +1,163 @@
Imports System
Imports System.Drawing
Imports System.Runtime.InteropServices
Imports System.Windows.Forms
Imports DigitalData.Modules.Base.NativeMethods
Public Class ScreenEx
Public Const DEFAULT_WINDOW_HEIGHT = 480
Public Const DEFAULT_WINDOW_WIDTH = 640
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 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 Enum DeviceCap
VERTRES = 10
DESKTOPVERTRES = 117
End Enum
Public Shared Function GetLocationWithinScreen(pLocation As Point) As Point?
For Each screen As Screen In Screen.AllScreens
If screen.Bounds.Contains(pLocation) Then
Return New Point(pLocation.X - screen.Bounds.Left, pLocation.Y - screen.Bounds.Top)
End If
Next
Return Nothing
End Function
Public Shared Sub RestoreFormPosition(pForm As Form, pPosition As Point)
Dim oLocationWithinScreen As Point? = GetLocationWithinScreen(pPosition)
If oLocationWithinScreen Is Nothing Then
Dim oPrimaryScreen = Screen.PrimaryScreen
pForm.StartPosition = FormStartPosition.CenterScreen
Else
pForm.StartPosition = FormStartPosition.Manual
pForm.Location = pPosition
End If
End Sub
Public Shared Sub RestoreFormState(pForm As Form, pFormState As FormWindowState)
If pFormState = FormWindowState.Maximized Then
pForm.WindowState = FormWindowState.Normal
pForm.WindowState = FormWindowState.Maximized
ElseIf pFormState = FormWindowState.Minimized Then
pForm.WindowState = FormWindowState.Normal
pForm.WindowState = FormWindowState.Minimized
Else
pForm.WindowState = FormWindowState.Normal
End If
End Sub
Public Shared Sub RestoreFormState(pForm As Form, pFormState As String)
Dim oFormState As FormWindowState
If Not [Enum].TryParse(pFormState, oFormState) Then
oFormState = FormWindowState.Normal
End If
RestoreFormState(pForm, oFormState)
End Sub
Public Shared Sub RestoreFormSize(pForm As Form, pFormSize As Size)
Dim oFormSize As Size
If pFormSize.Height < 1 Or pFormSize.Width < 1 Or pFormSize.IsEmpty Then
oFormSize = New Size(DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT)
Else
oFormSize = pFormSize
End If
pForm.Size = oFormSize
End Sub
''' <summary>
''' Checks if a point is Visible on any screen
''' </summary>
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
''' <summary>
''' Checks if Size is not negative
''' </summary>
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
''' <summary>
''' Checks if Location is not negative
''' </summary>
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 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
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, DeviceCap.VERTRES)
Dim PhysicalScreenHeight As Integer = GetDeviceCaps(desktop, DeviceCap.DESKTOPVERTRES)
Dim oScreenScalingFactor As Single = CSng(PhysicalScreenHeight) / CSng(LogicalScreenHeight)
Return oScreenScalingFactor
End Function
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

141
Base/StringEx.vb Normal file

File diff suppressed because one or more lines are too long

64
Base/StringFunctions.vb Normal file
View File

@@ -0,0 +1,64 @@
Imports System.Globalization
Imports DigitalData.Modules.Logging
Public Class StringFunctions
Public Shared Function SplitText_Length(ByVal input As String, ByVal maxLength As Integer) As List(Of String)
Dim result As New List(Of String)
For i As Integer = 0 To input.Length - 1 Step maxLength
' Textabschnitt extrahieren
Dim chunk As String = input.Substring(i, Math.Min(maxLength, input.Length - i))
result.Add(chunk)
Next
Return result
End Function
Public Shared Function SplitTextByNewLine(text As String) As List(Of String)
If String.IsNullOrEmpty(text) Then
Return New List(Of String)()
End If
' Zerlege den Text anhand von Zeilenumbrüchen
Dim lines As List(Of String) = text.Split({vbCrLf, vbLf, vbCr}, StringSplitOptions.None).ToList()
Return lines
End Function
Public Shared Function DatetimeStringToGermanStringConverter(pDatetimeString As String, pLogger As Logger) As String
If pDatetimeString.IsNullOrEmpty() = True Then
' Wenn nichts kommt, kommt nichts zurueck
Return String.Empty
End If
Dim formatList As List(Of String) = New List(Of String) From {
"yyyyMMdd",
"MM/dd/yyyy", "M/d/yyyy", "MM/d/yyyy", "M/dd/yyyy",
"yyyy-MM-dd", "yyyy-M-d", "yyyy-MM-d", "yyyy-M-dd",
"dd.MM.yyyy", "d.M.yyyy", "d.MM.yyyy", "dd.M.yyyy"
}
Dim dateStringResult As Date = Date.MinValue
Dim oConvertResult As Boolean = False
For Each formatStringItem In formatList
Try
dateStringResult = DateTime.ParseExact(pDatetimeString, formatStringItem, CultureInfo.InvariantCulture)
oConvertResult = True
Exit For
Catch ex As FormatException
oConvertResult = False
pLogger?.Debug("DatetimeStringToGermanStringConverter() - Could not parse date string {0} ({1})", pDatetimeString, formatStringItem)
End Try
Next
If oConvertResult = True Then
' In deutsches Format umwandeln (dd.MM.yyyy)
Dim germanDateFormat As String = dateStringResult.ToString("dd.MM.yyyy")
Return germanDateFormat
Else
' Wenn nichts konvertiert werden konnte, geben wir den ursprünglichen Wert zurück
Return pDatetimeString
End If
End Function
End Class

35
Base/WindowsEx.vb Normal file
View File

@@ -0,0 +1,35 @@
Imports System.ComponentModel
Imports System.Runtime.InteropServices
Imports DigitalData.Modules.Base.NativeMethods
Public Class WindowsEx
Private ReadOnly _LogConfig As LogConfig
Private ReadOnly _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

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.7.15" targetFramework="net461" />
</packages>

22
Config/App.config Normal file
View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="FirebirdSql.Data.FirebirdClient" type="EntityFramework.Firebird.FbProviderServices, EntityFramework.Firebird" />
</providers>
<defaultConnectionFactory type="EntityFramework.Firebird.FbConnectionFactory, EntityFramework.Firebird" />
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -1,131 +1,58 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>net8.0-windows</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{44982F9B-6116-44E2-85D0-F39650B1EF99}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>DigitalData.Modules.Config</RootNamespace> <RootNamespace>DigitalData.Modules.Config</RootNamespace>
<AssemblyName>DigitalData.Modules.Config</AssemblyName> <AssemblyName>DigitalData.Modules.Config</AssemblyName>
<FileAlignment>512</FileAlignment> <MyType>Empty</MyType>
<MyType>Windows</MyType> <ImplicitUsings>enable</ImplicitUsings>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
<AssemblyTitle>Modules.Config</AssemblyTitle>
<Description>Stellt Module für die Konfiguration von Produkten bereit</Description>
<Company>Digital Data GmbH, Heuchelheim</Company>
<Product>Modules.Config</Product>
<Copyright>Copyright © 2025</Copyright>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<FileVersion>1.3.0.0</FileVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.Modules.Config.xml</DocumentationFile> <DocumentationFile>DigitalData.Modules.Config.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug> <DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.Modules.Config.xml</DocumentationFile> <DocumentationFile>DigitalData.Modules.Config.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <PackageReference Include="EntityFramework" Version="6.5.1" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <PackageReference Include="EntityFramework.Firebird" Version="10.1.0" />
<HintPath>..\packages\NLog.4.7.15\lib\net45\NLog.dll</HintPath> <PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="10.3.2" />
</Reference> <PackageReference Include="NLog" Version="5.0.5" />
<Reference Include="System" /> <PackageReference Include="System.Data.Odbc" Version="8.0.1" />
<Reference Include="System.Configuration" /> <PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.1" />
<Reference Include="System.Data" /> <PackageReference Include="CoreWCF.Primitives" Version="1.8.0" />
<Reference Include="System.IO.Compression" /> <PackageReference Include="CoreWCF.ConfigurationManager" Version="1.8.0" />
<Reference Include="System.Runtime.Serialization" /> <PackageReference Include="CoreWCF.Http" Version="1.8.0" />
<Reference Include="System.ServiceModel" /> <PackageReference Include="CoreWCF.WebHttp" Version="1.8.0" />
<Reference Include="System.Transactions" /> <PackageReference Include="CoreWCF.NetTcp" Version="1.8.0" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Import Include="Microsoft.VisualBasic" /> <Import Include="DigitalData.Modules.Logging" />
<Import Include="System" /> <Import Include="DigitalData.Modules.Base" />
<Import Include="System.Collections" /> <Import Include="DigitalData.Modules.Database" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="ConfigAttributes.vb" /> <Compile Remove="My Project\Application.Designer.vb" />
<Compile Include="ConfigManager.vb" /> <Compile Remove="My Project\Resources.Designer.vb" />
<Compile Include="ConfigSample.vb" /> <Compile Remove="My Project\Settings.Designer.vb" />
<Compile Include="ConfigUtils.vb" /> <EmbeddedResource Remove="My Project\Resources.resx" />
<Compile Include="My Project\AssemblyInfo.vb" /> <None Remove="My Project\Application.myapp" />
<Compile Include="My Project\Application.Designer.vb"> <None Remove="My Project\Settings.settings" />
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx"> <ProjectReference Include="..\Logging\Logging.vbproj" />
<Generator>VbMyResourcesResXFileCodeGenerator</Generator> <ProjectReference Include="..\Base\Base.vbproj" />
<LastGenOutput>Resources.Designer.vb</LastGenOutput> <ProjectReference Include="..\Database\Database.vbproj" />
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Encryption\Encryption.vbproj">
<Project>{8a8f20fc-c46e-41ac-bee7-218366cfff99}</Project>
<Name>Encryption</Name>
</ProjectReference>
<ProjectReference Include="..\Filesystem\Filesystem.vbproj">
<Project>{991d0231-4623-496d-8bd0-9ca906029cbc}</Project>
<Name>Filesystem</Name>
</ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project> </Project>

54
Config/ConfigDbFunct.vb Normal file
View File

@@ -0,0 +1,54 @@
Imports NLog
Imports DigitalData.Modules.Database
Public Class ConfigDbFunct
''' <summary>
''' Ermittelt die aktuelle Lizenz für das gewünschte Produkt
''' aus der DB-Tabelle TBDD_3RD_PARTY_MODULES
''' </summary>
'''
''' <param name="pLogConfig">An instance of LogConfig</param>
''' <param name="pConnectionString">Initial connectionstring for connecting to DD_ECM database.</param>
''' <returns>LicenseKey, if found, otherwise String.Empty</returns>
Public Shared Function GetProductLicense(pProductName As String, pVersion As String, pLogConfig As Object, pConnectionString As String) As String
Dim oLogger As Logger = pLogConfig.GetLogger()
If (String.IsNullOrEmpty(pProductName)) Then
oLogger.Error("Parameter pProductName is null or empty")
Return String.Empty
End If
If (String.IsNullOrEmpty(pVersion)) Then
oLogger.Error("Parameter pVersion is null or empty")
Return String.Empty
End If
If (String.IsNullOrEmpty(pConnectionString)) Then
oLogger.Error("Parameter pConnectionString is null or empty")
Return String.Empty
End If
Try
Dim oDecryptedConnectionString As String = MSSQLServer.DecryptConnectionString(pConnectionString)
Dim oDatabase As MSSQLServer = New MSSQLServer(pLogConfig, oDecryptedConnectionString)
Dim oSql As String = "SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = '" + pProductName + "' AND ACTIVE = 1 AND VERSION = '" + pVersion + "'"
oLogger.Debug(String.Format("oSql in GetProductLicense: {0}", oSql))
Return String.Empty
Dim oLicenseString As String = oDatabase.GetScalarValue(oSql)
Return oLicenseString
Catch ex As Exception
oLogger.Error("Exception occured in ConfigDbFunct.GetProductLicense()")
oLogger.Error(ex)
End Try
Return String.Empty
End Function
End Class

View File

@@ -1,18 +1,22 @@
Imports System.IO Imports System.IO
Imports System.Reflection Imports System.Reflection
Imports System.Xml.Serialization Imports System.Xml.Serialization
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Config
Imports DigitalData.Modules.Encryption Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Config.ConfigAttributes Imports ConnectionStringAttribute = DigitalData.Modules.Config.ConfigAttributes.ConnectionStringAttribute
Imports ConnectionStringAppServerAttribute = DigitalData.Modules.Config.ConfigAttributes.ConnectionStringAppServerAttribute
Imports ConnectionStringTestAttribute = DigitalData.Modules.Config.ConfigAttributes.ConnectionStringTestAttribute
Imports EDMIAppServerAttribute = DigitalData.Modules.Config.ConfigAttributes.EDMIAppServerAttribute
Imports GlobalSettingAttribute = DigitalData.Modules.Config.ConfigAttributes.GlobalSettingAttribute
Public Class ConfigManager(Of T) Public Class ConfigManager(Of T)
Private Const USER_CONFIG_NAME As String = "UserConfig.xml" Public Const USER_CONFIG_NAME As String = "UserConfig.xml"
Private Const COMPUTER_CONFIG_NAME As String = "ComputerConfig.xml" Public Const COMPUTER_CONFIG_NAME As String = "ComputerConfig.xml"
Private Const APP_CONFIG_NAME As String = "AppConfig.xml" Public Const APP_CONFIG_NAME As String = "AppConfig.xml"
Private ReadOnly _LogConfig As LogConfig Private ReadOnly _LogConfig As LogConfig
Private ReadOnly _Logger As Logger Private ReadOnly _Logger As Logger
Private ReadOnly _File As Filesystem.File Private ReadOnly _File As FilesystemEx
Private ReadOnly _UserDirectory As String Private ReadOnly _UserDirectory As String
Private ReadOnly _UserConfigPath As String Private ReadOnly _UserConfigPath As String
@@ -26,6 +30,7 @@ Public Class ConfigManager(Of T)
Private ReadOnly _Blueprint As T Private ReadOnly _Blueprint As T
Private ReadOnly _BlueprintType As Type Private ReadOnly _BlueprintType As Type
Private ReadOnly _Serializer As XmlSerializer Private ReadOnly _Serializer As XmlSerializer
Private _Config As T
Private ReadOnly _ExcludedAttributes = New List(Of Type) From { Private ReadOnly _ExcludedAttributes = New List(Of Type) From {
GetType(ConnectionStringAttribute), GetType(ConnectionStringAttribute),
@@ -61,6 +66,10 @@ Public Class ConfigManager(Of T)
''' </summary> ''' </summary>
''' <returns></returns> ''' <returns></returns>
Public ReadOnly Property Config As T Public ReadOnly Property Config As T
Get
Return _Config
End Get
End Property
''' <summary> ''' <summary>
''' Path to the current user config. ''' Path to the current user config.
@@ -102,18 +111,21 @@ Public Class ConfigManager(Of T)
''' <param name="ApplicationStartupPath">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</param> ''' <param name="ApplicationStartupPath">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</param>
''' <param name="ForceUserConfig">Override values from ComputerConfig with UserConfig</param> ''' <param name="ForceUserConfig">Override values from ComputerConfig with UserConfig</param>
Public Sub New(LogConfig As LogConfig, UserConfigPath As String, ComputerConfigPath As String, Optional ApplicationStartupPath As String = "", Optional ForceUserConfig As Boolean = False) Public Sub New(LogConfig As LogConfig, UserConfigPath As String, ComputerConfigPath As String, Optional ApplicationStartupPath As String = "", Optional ForceUserConfig As Boolean = False)
If LogConfig Is Nothing Then Throw New ArgumentNullException(NameOf(LogConfig))
If String.IsNullOrWhiteSpace(UserConfigPath) Then Throw New ArgumentException("UserConfigPath must be provided", NameOf(UserConfigPath))
_LogConfig = LogConfig _LogConfig = LogConfig
_Logger = LogConfig.GetLogger() _Logger = LogConfig.GetLogger()
_File = New Filesystem.File(_LogConfig) _File = New FilesystemEx(_LogConfig)
_Blueprint = Activator.CreateInstance(Of T) _Blueprint = Activator.CreateInstance(Of T)()
_BlueprintType = _Blueprint.GetType _BlueprintType = _Blueprint.GetType()
_Serializer = New XmlSerializer(_BlueprintType) _Serializer = New XmlSerializer(_BlueprintType)
_UserDirectory = _File.CreateDirectory(UserConfigPath) _UserDirectory = _File.CreateDirectory(UserConfigPath)
_UserConfigPath = Path.Combine(_UserDirectory, USER_CONFIG_NAME) _UserConfigPath = Path.Combine(_UserDirectory, USER_CONFIG_NAME)
If ComputerConfigPath <> String.Empty Then If Not String.IsNullOrWhiteSpace(ComputerConfigPath) Then
If IO.File.Exists(ComputerConfigPath) Then If IO.File.Exists(ComputerConfigPath) Then
_ComputerDirectory = _File.CreateDirectory(ComputerConfigPath, False) _ComputerDirectory = _File.CreateDirectory(ComputerConfigPath, False)
Else Else
@@ -122,8 +134,8 @@ Public Class ConfigManager(Of T)
_ComputerConfigPath = Path.Combine(_ComputerDirectory, COMPUTER_CONFIG_NAME) _ComputerConfigPath = Path.Combine(_ComputerDirectory, COMPUTER_CONFIG_NAME)
End If End If
If ApplicationStartupPath <> String.Empty Then _AppConfigDirectory = ApplicationStartupPath
_Logger.Info($"AppConfig is being used: [{ApplicationStartupPath}]") If Not String.IsNullOrWhiteSpace(ApplicationStartupPath) Then
_AppConfigPath = Path.Combine(ApplicationStartupPath, APP_CONFIG_NAME) _AppConfigPath = Path.Combine(ApplicationStartupPath, APP_CONFIG_NAME)
End If End If

View File

@@ -1,17 +1,79 @@
Imports DigitalData.Modules.Logging Imports System.IO
Imports NLog
Public Class ConfigUtils Public Class ConfigUtils
Private _Logger As Logger Private ReadOnly _Logger As Logger
Private _File As Filesystem.File ' Private ReadOnly _File As FilesystemEx
Private Const MIGRATE_DIRECTORY As String = "Migrate" Private Const MIGRATE_DIRECTORY As String = "Migrate"
Public Sub New(Logger As NLog.Logger)
Public Sub New(LogConfig As LogConfig) _Logger = Logger
_Logger = LogConfig.GetLogger() ' _File = New FilesystemEx(LogConfig)
_File = New Filesystem.File(LogConfig)
End Sub End Sub
''' <summary>
''' Migrate a config file when the ProductName has changed
''' </summary>
''' <param name="pUserBasePath">The user config base path, should be Application.UserAppDataPath</param>
''' <param name="pProductName">The current or new product name</param>
''' <param name="pOldProductName">The old product name</param>
''' <returns></returns>
Public Function MigrateUserAppDataConfig(pUserBasePath As String, pProductName As String, pOldProductName As String)
Return MigrateAppDataConfig(pUserBasePath, ConfigManager(Of ConfigSample).USER_CONFIG_NAME, pProductName, pOldProductName)
End Function
''' <summary>
''' Migrate a config file when the ProductName has changed
''' </summary>
''' <param name="pCommonBasePath">The config base path, should be Application.CommonAppDataPath</param>
''' <param name="pProductName">The current or new product name</param>
''' <param name="pOldProductName">The old product name</param>
''' <returns></returns>
Public Function MigrateCommonAppDataConfig(pCommonBasePath As String, pProductName As String, pOldProductName As String)
Return MigrateAppDataConfig(pCommonBasePath, ConfigManager(Of ConfigSample).COMPUTER_CONFIG_NAME, pProductName, pOldProductName)
End Function
''' <summary>
''' Migrate a config file when the ProductName has changed
''' </summary>
''' <param name="pBasePath">The config base path, can be Application.UserAppDataPath or Application.CommonAppDataPath</param>
''' <param name="pProductName">The current or new product name</param>
''' <param name="pOldProductName">The old product name</param>
''' <returns></returns>
Private Function MigrateAppDataConfig(pBasePath As String, pConfigName As String, pProductName As String, pOldProductName As String)
Dim oNewDirPath = pBasePath
Dim oOldDirPath = oNewDirPath.Replace(pProductName, pOldProductName)
Dim oNewFilePath = Path.Combine(oNewDirPath, pConfigName)
Dim oOldFilePath = Path.Combine(oOldDirPath, pConfigName)
' If there is already a new config, exit.
If File.Exists(oNewFilePath) Then
Return True
End If
' If there is no old config, exit.
If Not File.Exists(oOldFilePath) Then
Return True
End If
Try
If Not Directory.Exists(oNewDirPath) Then
Directory.CreateDirectory(oNewDirPath)
End If
_Logger.Info("Migrating Config from [{0}] to [{1}]", pOldProductName, pProductName)
File.Move(oOldFilePath, oNewFilePath)
Return True
Catch ex As Exception
_Logger.Warn("Error while Migrating Config")
_Logger.Error(ex)
Return False
End Try
End Function
Public Function TestMigrationNeeded(TargetDirectory As String) As Boolean Public Function TestMigrationNeeded(TargetDirectory As String) As Boolean
If IO.Directory.Exists(TargetDirectory) Then If IO.Directory.Exists(TargetDirectory) Then
Return False Return False
@@ -21,99 +83,97 @@ Public Class ConfigUtils
End Function End Function
Public Sub MigrateConfig(SourceDirectory As String, TargetDirectory As String, Optional FilePattern As String = "*.*") Public Sub MigrateConfig(SourceDirectory As String, TargetDirectory As String, Optional FilePattern As String = "*.*")
If IO.Directory.Exists(TargetDirectory) Then 'If IO.Directory.Exists(TargetDirectory) Then
_Logger.Warn("Config Migration aborted because new config directory [{0}] already exists!", TargetDirectory) ' _Logger.Warn("Config Migration aborted because new config directory [{0}] already exists!", TargetDirectory)
Exit Sub ' Exit Sub
End If 'End If
_Logger.Debug("Creating TargetDirectory [{0}]", TargetDirectory) '_Logger.Debug("Creating TargetDirectory [{0}]", TargetDirectory)
' Create target directory '' Create target directory
Try 'Try
IO.Directory.CreateDirectory(TargetDirectory) ' IO.Directory.CreateDirectory(TargetDirectory)
Catch ex As Exception 'Catch ex As Exception
_Logger.Warn("Config Migration aborted because new config directory [{0}] could not be created!", TargetDirectory) ' _Logger.Warn("Config Migration aborted because new config directory [{0}] could not be created!", TargetDirectory)
_Logger.Error(ex) ' _Logger.Error(ex)
Exit Sub ' Exit Sub
End Try 'End Try
' Create Migration directory '' Create Migration directory
Dim oMigrationDirectory = IO.Path.Combine(SourceDirectory, MIGRATE_DIRECTORY) 'Dim oMigrationDirectory = IO.Path.Combine(SourceDirectory, MIGRATE_DIRECTORY)
_Logger.Debug("Creating MigrationDirectory [{0}]", oMigrationDirectory) '_Logger.Debug("Creating MigrationDirectory [{0}]", oMigrationDirectory)
Try 'Try
IO.Directory.CreateDirectory(oMigrationDirectory) ' IO.Directory.CreateDirectory(oMigrationDirectory)
Catch ex As Exception 'Catch ex As Exception
_Logger.Warn("Config Migration aborted because migration directory [{0}] could not be created!", oMigrationDirectory) ' _Logger.Warn("Config Migration aborted because migration directory [{0}] could not be created!", oMigrationDirectory)
_Logger.Error(ex) ' _Logger.Error(ex)
Exit Sub ' Exit Sub
End Try 'End Try
' Copy individual files from top level directory '' Copy individual files from top level directory
For Each oPath In IO.Directory.EnumerateFiles(SourceDirectory, FilePattern) 'For Each oPath In IO.Directory.EnumerateFiles(SourceDirectory, FilePattern)
Dim oFileInfo = New IO.FileInfo(oPath) ' Dim oFileInfo = New IO.FileInfo(oPath)
_Logger.NewBlock($"File {oFileInfo.Name}") ' _Logger.Debug("Processing file [{0}]", oFileInfo.Name)
_Logger.Debug("Processing file [{0}]", oFileInfo.Name)
_Logger.Debug("Copying [{0}] to TargetDirectory..", oFileInfo.Name) ' _Logger.Debug("Copying [{0}] to TargetDirectory..", oFileInfo.Name)
' Copy to target directory ' ' Copy to target directory
Try ' Try
IO.File.Copy(oPath, IO.Path.Combine(TargetDirectory, oFileInfo.Name)) ' IO.File.Copy(oPath, IO.Path.Combine(TargetDirectory, oFileInfo.Name))
Catch ex As Exception ' Catch ex As Exception
_Logger.Warn("Could not move old config file {0} to new config location {1}", oFileInfo.Name, TargetDirectory) ' _Logger.Warn("Could not move old config file {0} to new config location {1}", oFileInfo.Name, TargetDirectory)
_Logger.Error(ex) ' _Logger.Error(ex)
End Try ' End Try
_Logger.Debug("Moving [{0}] to MigrationDirectory..", oFileInfo.Name) ' _Logger.Debug("Moving [{0}] to MigrationDirectory..", oFileInfo.Name)
' Move to migration directory ' ' Move to migration directory
Try ' Try
IO.File.Move(oPath, IO.Path.Combine(oMigrationDirectory, oFileInfo.Name)) ' IO.File.Move(oPath, IO.Path.Combine(oMigrationDirectory, oFileInfo.Name))
Catch ex As Exception ' Catch ex As Exception
_Logger.Warn("Could not move old config file {0} to migration directory {1}", oFileInfo.Name, oMigrationDirectory) ' _Logger.Warn("Could not move old config file {0} to migration directory {1}", oFileInfo.Name, oMigrationDirectory)
_Logger.Error(ex) ' _Logger.Error(ex)
End Try ' End Try
Next 'Next
For Each oDirectoryPath In IO.Directory.EnumerateDirectories(SourceDirectory, "*", IO.SearchOption.TopDirectoryOnly) 'For Each oDirectoryPath In IO.Directory.EnumerateDirectories(SourceDirectory, "*", IO.SearchOption.TopDirectoryOnly)
Dim oDirInfo As New IO.DirectoryInfo(oDirectoryPath) ' Dim oDirInfo As New IO.DirectoryInfo(oDirectoryPath)
_Logger.NewBlock($"Directory {oDirInfo.Name}") ' _Logger.Debug("Processing directory [{0}]", oDirInfo.Name)
_Logger.Debug("Processing directory [{0}]", oDirInfo.Name)
' Don't copy TargetDirectory if subpath of SourceDirectory or if MigrationDirectory ' ' Don't copy TargetDirectory if subpath of SourceDirectory or if MigrationDirectory
If oDirInfo.FullName = TargetDirectory Or oDirInfo.FullName = oMigrationDirectory Then ' If oDirInfo.FullName = TargetDirectory Or oDirInfo.FullName = oMigrationDirectory Then
_Logger.Debug("Directory [{0}] should not be copied. Skipping.", oDirInfo.Name) ' _Logger.Debug("Directory [{0}] should not be copied. Skipping.", oDirInfo.Name)
Continue For ' Continue For
End If ' End If
' Copy directory to TargetDirectory ' ' Copy directory to TargetDirectory
Dim oNewDirectoryPath = IO.Path.Combine(TargetDirectory, oDirInfo.Name) ' Dim oNewDirectoryPath = IO.Path.Combine(TargetDirectory, oDirInfo.Name)
_Logger.Debug("Copying [{0}] to TargetDirectory..", oDirInfo.Name) ' _Logger.Debug("Copying [{0}] to TargetDirectory..", oDirInfo.Name)
Try ' Try
_File.CopyDirectory(oDirInfo.FullName, oNewDirectoryPath, True) ' _File.CopyDirectory(oDirInfo.FullName, oNewDirectoryPath, True)
Catch ex As Exception ' Catch ex As Exception
_Logger.Warn("Could not move directory [{0}] to new path [{1}]", oDirInfo.FullName, oNewDirectoryPath) ' _Logger.Warn("Could not move directory [{0}] to new path [{1}]", oDirInfo.FullName, oNewDirectoryPath)
_Logger.Error(ex) ' _Logger.Error(ex)
End Try ' End Try
_Logger.Debug("Copying [{0}] to MigrationDirectory..", oDirInfo.Name) ' _Logger.Debug("Copying [{0}] to MigrationDirectory..", oDirInfo.Name)
' Copy directory to MigrationDirectory ' ' Copy directory to MigrationDirectory
Dim oMigrationDirectoryPath = IO.Path.Combine(oMigrationDirectory, oDirInfo.Name) ' Dim oMigrationDirectoryPath = IO.Path.Combine(oMigrationDirectory, oDirInfo.Name)
Try ' Try
_File.CopyDirectory(oDirInfo.FullName, oMigrationDirectoryPath, True) ' _File.CopyDirectory(oDirInfo.FullName, oMigrationDirectoryPath, True)
Catch ex As Exception ' Catch ex As Exception
_Logger.Error(ex) ' _Logger.Error(ex)
_Logger.Warn("Could not move directory [{0}] to migration directory [{1}]", oDirInfo.FullName, oMigrationDirectoryPath) ' _Logger.Warn("Could not move directory [{0}] to migration directory [{1}]", oDirInfo.FullName, oMigrationDirectoryPath)
End Try ' End Try
_Logger.Debug("Deleting [{0}]..", oDirInfo.Name) ' _Logger.Debug("Deleting [{0}]..", oDirInfo.Name)
' Delete directory ' ' Delete directory
Try ' Try
IO.Directory.Delete(oDirInfo.FullName, True) ' IO.Directory.Delete(oDirInfo.FullName, True)
Catch ex As Exception ' Catch ex As Exception
_Logger.Error(ex) ' _Logger.Error(ex)
_Logger.Warn("Could not delete directory [{0}]", oDirInfo.FullName) ' _Logger.Warn("Could not delete directory [{0}]", oDirInfo.FullName)
End Try ' End Try
Next 'Next
End Sub End Sub
End Class End Class

View File

@@ -1,13 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On

View File

@@ -1,35 +1,9 @@
Imports System Imports System
Imports System.Reflection Imports System.Reflection
Imports System.Runtime.InteropServices 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
<Assembly: AssemblyTitle("Modules.Config")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Modules.Config")>
<Assembly: AssemblyCopyright("Copyright © 2022")>
<Assembly: AssemblyTrademark("")> <Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird. 'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
<Assembly: Guid("6e67fba4-81d1-44bb-81f4-16ad52822192")> <Assembly: Guid("6e67fba4-81d1-44bb-81f4-16ad52822192")>
' 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:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.1.4.1")>
<Assembly: AssemblyFileVersion("1.1.4.1")>

View File

@@ -1,63 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
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.
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
'''<summary>
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
End Module
End Namespace

View File

@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,73 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
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

View File

@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -1,70 +0,0 @@
Imports Config
Imports NLog
''' <summary>
''' 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
''' </summary>
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

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.7.15" targetFramework="net461" />
</packages>

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>false</MySubMain> <MySubMain>true</MySubMain>
<MainForm>Form1</MainForm>
<SingleInstance>false</SingleInstance> <SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode> <ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles> <EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode> <AuthenticationMode>0</AuthenticationMode>
<ApplicationType>1</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit> <SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData> </MyApplicationData>

View File

@@ -2,6 +2,7 @@
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports System.ComponentModel Imports System.ComponentModel
Imports System.Data
''' <summary> ''' <summary>
''' MODULE: Firebird ''' MODULE: Firebird

View File

@@ -1,16 +1,23 @@
Imports System.ComponentModel Imports System.ComponentModel
Imports System.Data.Common Imports System.Data
Imports System.Data.SqlClient Imports System.Data.SqlClient
Imports DigitalData.Modules.Encryption Imports DigitalData.Modules.Encryption
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Base
Imports System.Threading
Public Class MSSQLServer Public Class MSSQLServer
Implements IDatabase Implements IDatabase
Public Property DBInitialized As Boolean = False Implements IDatabase.DBInitialized Public Property DBInitialized As Boolean = False Implements IDatabase.DBInitialized
Public Property CurrentConnectionString As String = "" Implements IDatabase.CurrentConnectionString Public Property CurrentConnectionString As String = "" Implements IDatabase.CurrentConnectionString
Public ReadOnly Property MaskedConnectionString As String
Get
If CurrentConnectionString = "" Then
Return ""
Else
Return MaskConnectionString(CurrentConnectionString)
End If
End Get
End Property
Private ReadOnly QueryTimeout As Integer Private ReadOnly QueryTimeout As Integer
Private ReadOnly Logger As Logger Private ReadOnly Logger As Logger
@@ -103,33 +110,34 @@ Public Class MSSQLServer
End Try End Try
End Function End Function
<DebuggerStepThrough()> Private Function MaybeGetTransaction(pConnection As SqlConnection, pTransactionMode As TransactionMode, pTransaction As SqlTransaction) As SqlTransaction
Private Function MaybeGetTransaction(Connection As SqlConnection, Mode As TransactionMode, Transaction As SqlTransaction) As SqlTransaction If pConnection Is Nothing Then
If Connection Is Nothing Then Throw New ArgumentNullException("Connection", "Could not get transaction because connection is null!")
Throw New ArgumentNullException("Connection")
End If End If
If Mode = TransactionMode.NoTransaction Then Logger.Debug("Transaction Mode: [{0}]", pTransactionMode.ToString)
If pTransactionMode = TransactionMode.NoTransaction Then
Return Nothing Return Nothing
ElseIf Mode = TransactionMode.ExternalTransaction Then ElseIf pTransactionMode = TransactionMode.ExternalTransaction Then
Return Transaction Return pTransaction
Else Else
Return Connection.BeginTransaction() Return pConnection.BeginTransaction()
End If End If
End Function End Function
<DebuggerStepThrough()> Private Function MaybeCommitTransaction(pTransaction As SqlTransaction, pTransactionMode As TransactionMode) As Boolean
Private Function MaybeCommitTransaction(Transaction As SqlTransaction, TransactionMode As TransactionMode) As Boolean Select Case pTransactionMode
Select Case TransactionMode
Case TransactionMode.NoTransaction Case TransactionMode.NoTransaction
Return True Return True
Case TransactionMode.ExternalTransaction Case TransactionMode.ExternalTransaction
Return True Return True
Case TransactionMode.WithTransaction Case TransactionMode.WithTransaction
Try Try
Transaction.Commit() pTransaction.Commit()
Return True Return True
Catch ex As Exception Catch ex As Exception
Logger.Warn("Error while committing transaction!")
Logger.Error(ex) Logger.Error(ex)
Return False Return False
End Try End Try
@@ -141,7 +149,24 @@ Public Class MSSQLServer
Public Function GetConnectionStringForId(pConnectionId As Integer) As String Public Function GetConnectionStringForId(pConnectionId As Integer) As String
Return Get_ConnectionStringforID(pConnectionId) Return Get_ConnectionStringforID(pConnectionId)
End Function End Function
Public Function GetGDPictureString() As String
Using oConnection As SqlConnection = GetSQLConnection()
Dim oSQL = Queries.DD_ECM.ThirdPartyModules.GdPictureLicense
Dim oGDPicture = GetScalarValueWithConnectionObject(oSQL, oConnection)
If oGDPicture = String.Empty Then
oSQL = Queries.DD_ECM.ThirdPartyModules.GdPictureLicense_REGULAR
oGDPicture = GetScalarValueWithConnectionObject(oSQL, oConnection)
End If
Return oGDPicture
End Using
End Function
Public Function GetDDCatalog() As DataTable
Using oConnection As SqlConnection = GetSQLConnection()
Dim oSQL = Queries.DD_ECM.DD_SELECTS.TBDD_CATALOG
Dim oDT_CATALOG As DataTable = GetDatatable(oSQL)
Return oDT_CATALOG
End Using
End Function
Public Function Get_ConnectionStringforID(pConnectionId As Integer) As String Public Function Get_ConnectionStringforID(pConnectionId As Integer) As String
Dim oConnectionString As String = String.Empty Dim oConnectionString As String = String.Empty
@@ -206,10 +231,13 @@ Public Class MSSQLServer
Dim oDecryptedConnectionString = DecryptConnectionString(pConnectionString) Dim oDecryptedConnectionString = DecryptConnectionString(pConnectionString)
Dim oConnection As New SqlConnection(oDecryptedConnectionString) Dim oConnection As New SqlConnection(oDecryptedConnectionString)
OpenSQLConnection(oConnection) OpenSQLConnection(oConnection)
oConnection.Close() oConnection?.Close()
Return True Return True
Catch ex As Exception Catch ex As Exception
Logger.Error("Error while testing connection!")
Logger.Error(ex) Logger.Error(ex)
Return False Return False
End Try End Try
End Function End Function
@@ -217,14 +245,21 @@ Public Class MSSQLServer
''' <summary> ''' <summary>
''' This Function intentionally has no try..catch block to have any errors caught outside ''' This Function intentionally has no try..catch block to have any errors caught outside
''' </summary> ''' </summary>
''' <param name="Connection"></param> ''' <param name="pConnection"></param>
''' <returns></returns> ''' <returns></returns>
Private Function OpenSQLConnection(Connection As SqlConnection) As SqlConnection Private Function OpenSQLConnection(pConnection As SqlConnection) As SqlConnection
If Connection.State = ConnectionState.Closed Then Try
Connection.Open() If pConnection.State = ConnectionState.Closed Then
End If pConnection.Open()
End If
Return Connection Return pConnection
Catch ex As Exception
Logger.Error("Error while opening Connection!")
Logger.Error(ex)
Throw ex
End Try
End Function End Function
<DebuggerStepThrough()> <DebuggerStepThrough()>
@@ -242,6 +277,7 @@ Public Class MSSQLServer
Return oConnection Return oConnection
Catch ex As Exception Catch ex As Exception
Logger.Error("Connection could not be created or opened!")
Logger.Error(ex) Logger.Error(ex)
Return Nothing Return Nothing
@@ -253,14 +289,16 @@ Public Class MSSQLServer
Try Try
If pConnectionString Is Nothing OrElse pConnectionString.Length = 0 Then If pConnectionString Is Nothing OrElse pConnectionString.Length = 0 Then
Logger.Warn("Connection String is empty!") Logger.Warn("Connection String is empty!")
Throw New ArgumentNullException("pConnectionString") Throw New ArgumentNullException("pConnectionString", "Could not mask connection string because connectiong string is empty!")
End If End If
Dim oBuilder As New SqlConnectionStringBuilder() With {.ConnectionString = pConnectionString} Dim oBuilder As New SqlConnectionStringBuilder() With {.ConnectionString = pConnectionString}
Dim oConnectionString = pConnectionString.Replace(oBuilder.Password, "XXXXX") Dim oConnectionString = pConnectionString.Replace(oBuilder.Password, "XXXXX")
Return oConnectionString Return oConnectionString
Catch ex As Exception Catch ex As Exception
Logger.Error("ConnectionString is invalid and could not be masked!")
Logger.Error(ex) Logger.Error(ex)
Return "Invalid ConnectionString" Return "Invalid ConnectionString"
End Try End Try
End Function End Function
@@ -288,15 +326,11 @@ Public Class MSSQLServer
End Function End Function
Public Function GetDatatable(pSqlCommand As String, pTransaction As SqlTransaction, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable Public Function GetDatatable(pSqlCommand As String, pTransaction As SqlTransaction, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable
Using oSqlConnection = GetSQLConnection() Return GetDatatableWithConnectionObject(pSqlCommand, pTransaction.Connection, TransactionMode.ExternalTransaction, pTransaction, pTimeout)
Return GetDatatableWithConnectionObject(pSqlCommand, oSqlConnection, TransactionMode.ExternalTransaction, pTransaction, pTimeout)
End Using
End Function End Function
Public Function GetDatatable(pSqlCommandObject As SqlCommand, pTransaction As SqlTransaction, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable Public Function GetDatatable(pSqlCommandObject As SqlCommand, pTransaction As SqlTransaction, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable
Using oSqlConnection = GetSQLConnection() Return GetDatatableWithConnectionObject(pSqlCommandObject, pTransaction.Connection, TransactionMode.ExternalTransaction, pTransaction, pTimeout)
Return GetDatatableWithConnectionObject(pSqlCommandObject, oSqlConnection, TransactionMode.ExternalTransaction, pTransaction, pTimeout)
End Using
End Function End Function
Public Async Function GetDatatableAsync(pSqlCommand As String, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Task(Of DataTable) Public Async Function GetDatatableAsync(pSqlCommand As String, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Task(Of DataTable)
@@ -319,6 +353,20 @@ Public Class MSSQLServer
End Using End Using
End Function End Function
Public Async Function GetDatatableWithConnectionObjectAsync(pSqlCommand As String, pSqlConnection As SqlConnection,
Optional pTransactionMode As TransactionMode = TransactionMode.WithTransaction,
Optional pTransaction As SqlTransaction = Nothing,
Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Task(Of DataTable)
Return Await Task.Run(Function() GetDatatableWithConnectionObject(pSqlCommand, pSqlConnection, pTransactionMode, pTransaction, pTimeout))
End Function
Public Async Function GetDatatableWithConnectionObjectAsync(pSqlCommandObject As SqlCommand, pSqlConnection As SqlConnection,
Optional pTransactionMode As TransactionMode = TransactionMode.WithTransaction,
Optional pTransaction As SqlTransaction = Nothing,
Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Task(Of DataTable)
Return Await Task.Run(Function() GetDatatableWithConnectionObject(pSqlCommandObject, pSqlConnection, pTransactionMode, pTransaction, pTimeout))
End Function
Public Function GetDatatableWithConnectionObject(pSqlCommand As String, pSqlConnection As SqlConnection, Public Function GetDatatableWithConnectionObject(pSqlCommand As String, pSqlConnection As SqlConnection,
Optional pTransactionMode As TransactionMode = TransactionMode.WithTransaction, Optional pTransactionMode As TransactionMode = TransactionMode.WithTransaction,
Optional pTransaction As SqlTransaction = Nothing, Optional pTransaction As SqlTransaction = Nothing,
@@ -340,13 +388,13 @@ Public Class MSSQLServer
pSqlCommandObject.CommandTimeout = pTimeout pSqlCommandObject.CommandTimeout = pTimeout
Using oAdapter As New SqlDataAdapter(pSqlCommandObject) Using oAdapter As New SqlDataAdapter(pSqlCommandObject)
Logger.Debug("GetDatatableWithConnectionObject: Running Query [{0}]", pSqlCommandObject.CommandText) Logger.Debug("GetDatatableWithConnectionObject: Running Query [{0}] and Parameters [{1}]", pSqlCommandObject.CommandText, GetParameterListAsString(pSqlCommandObject))
oAdapter.Fill(oTable) oAdapter.Fill(oTable)
End Using End Using
Catch ex As Exception Catch ex As Exception
Logger.Error("GetDatatableWithConnectionObject: Error in GetDatatableWithConnection while executing command: [{0}]", pSqlCommandObject.CommandText)
Logger.Error(ex) Logger.Error(ex)
Logger.Warn("GetDatatableWithConnectionObject: Error in GetDatatableWithConnection while executing command: [{0}]", pSqlCommandObject)
Throw ex Throw ex
Finally Finally
MaybeCommitTransaction(oTransaction, pTransactionMode) MaybeCommitTransaction(oTransaction, pTransactionMode)
@@ -381,15 +429,11 @@ Public Class MSSQLServer
Public Function ExecuteNonQuery(pSQLCommand As String, pTransaction As SqlTransaction, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Boolean Public Function ExecuteNonQuery(pSQLCommand As String, pTransaction As SqlTransaction, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Boolean
Using oConnection = GetSQLConnection() Return ExecuteNonQueryWithConnectionObject(pSQLCommand, pTransaction.Connection, TransactionMode.ExternalTransaction, pTransaction, pTimeout)
Return ExecuteNonQueryWithConnectionObject(pSQLCommand, pTransaction.Connection, TransactionMode.ExternalTransaction, pTransaction, pTimeout)
End Using
End Function End Function
Public Function ExecuteNonQuery(pSQLCommandObject As SqlCommand, pTransaction As SqlTransaction, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Boolean Public Function ExecuteNonQuery(pSQLCommandObject As SqlCommand, pTransaction As SqlTransaction, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Boolean
Using oConnection = GetSQLConnection() Return ExecuteNonQueryWithConnectionObject(pSQLCommandObject, pTransaction.Connection, TransactionMode.ExternalTransaction, pTransaction, pTimeout)
Return ExecuteNonQueryWithConnectionObject(pSQLCommandObject, pTransaction.Connection, TransactionMode.ExternalTransaction, pTransaction, pTimeout)
End Using
End Function End Function
Public Async Function ExecuteNonQueryAsync(pSQLCommand As String, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Task(Of Boolean) Public Async Function ExecuteNonQueryAsync(pSQLCommand As String, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Task(Of Boolean)
@@ -427,7 +471,7 @@ Public Class MSSQLServer
Dim oTransaction As SqlTransaction = MaybeGetTransaction(pSqlConnection, pTransactionMode, pTransaction) Dim oTransaction As SqlTransaction = MaybeGetTransaction(pSqlConnection, pTransactionMode, pTransaction)
Try Try
Logger.Debug("ExecuteNonQueryWithConnectionObject: Running Command [{0}]", pSqlCommandObject.CommandText) Logger.Debug("ExecuteNonQueryWithConnectionObject: Running Command [{0}] and Parameters [{1}]", pSqlCommandObject.CommandText, GetParameterListAsString(pSqlCommandObject))
pSqlCommandObject.Connection = pSqlConnection pSqlCommandObject.Connection = pSqlConnection
pSqlCommandObject.Transaction = oTransaction pSqlCommandObject.Transaction = oTransaction
@@ -436,8 +480,10 @@ Public Class MSSQLServer
Return True Return True
Catch ex As Exception Catch ex As Exception
Dim omsg = $"Unexpected Error in ExecuteNonQueryWithConnectionObject while executing command: [{pSqlCommandObject.CommandText}]"
Logger.Warn(omsg)
Logger.Error(ex) Logger.Error(ex)
Logger.Warn("ExecuteNonQueryWithConnectionObject: Error in ExecuteNonQueryWithConnectionObject while executing command: [{0}]-[{1}]", SqlCommand, SqlConnection.ConnectionString)
Return False Return False
Finally Finally
MaybeCommitTransaction(oTransaction, pTransactionMode) MaybeCommitTransaction(oTransaction, pTransactionMode)
@@ -469,15 +515,11 @@ Public Class MSSQLServer
End Function End Function
Public Function GetScalarValue(pSQLCommand As String, pTransaction As SqlTransaction, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Object Public Function GetScalarValue(pSQLCommand As String, pTransaction As SqlTransaction, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Object
Using oConnection = GetSQLConnection() Return GetScalarValueWithConnectionObject(pSQLCommand, pTransaction.Connection, TransactionMode.ExternalTransaction, pTransaction, pTimeout)
Return GetScalarValueWithConnectionObject(pSQLCommand, oConnection, TransactionMode.ExternalTransaction, pTransaction, pTimeout)
End Using
End Function End Function
Public Function GetScalarValue(pSQLCommandObject As SqlCommand, pTransaction As SqlTransaction, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Object Public Function GetScalarValue(pSQLCommandObject As SqlCommand, pTransaction As SqlTransaction, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Object
Using oConnection = GetSQLConnection() Return GetScalarValueWithConnectionObject(pSQLCommandObject, pTransaction.Connection, TransactionMode.ExternalTransaction, pTransaction, pTimeout)
Return GetScalarValueWithConnectionObject(pSQLCommandObject, oConnection, TransactionMode.ExternalTransaction, pTransaction, pTimeout)
End Using
End Function End Function
Public Async Function GetScalarValueAsync(pSQLCommand As String, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Task(Of Object) Public Async Function GetScalarValueAsync(pSQLCommand As String, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As Task(Of Object)
@@ -517,6 +559,9 @@ Public Class MSSQLServer
Dim oResult As Object = Nothing Dim oResult As Object = Nothing
Try Try
Logger.Debug("GetScalarValueWithConnectionObject: Running Query [{0}] with Parameters [{1}]", pSqlCommandObject.CommandText, GetParameterListAsString(pSqlCommandObject))
pSqlCommandObject.Connection = pSqlConnection pSqlCommandObject.Connection = pSqlConnection
pSqlCommandObject.CommandTimeout = pTimeout pSqlCommandObject.CommandTimeout = pTimeout
pSqlCommandObject.Transaction = oTransaction pSqlCommandObject.Transaction = oTransaction
@@ -524,7 +569,7 @@ Public Class MSSQLServer
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
Logger.Warn("GetDatatableWithConnectionObject: Error in GetDatatableWithConnection while executing command: [{0}]", pSqlCommandObject) Logger.Error("GetDatatableWithConnectionObject: Error in GetDatatableWithConnection while executing command: [{0}]", pSqlCommandObject.CommandText)
Finally Finally
MaybeCommitTransaction(oTransaction, pTransactionMode) MaybeCommitTransaction(oTransaction, pTransactionMode)
@@ -559,7 +604,7 @@ Public Class MSSQLServer
End Using End Using
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
Logger.Warn($"GetScalarValue failed SQLCommand [{pSqlCommand}]") Logger.Error($"GetScalarValue failed SQLCommand [{pSqlCommand}]")
Return Nothing Return Nothing
End Try End Try
@@ -591,7 +636,7 @@ Public Class MSSQLServer
End Using End Using
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
Logger.Warn($"NewExecuteNonQueryAsync failed SQLCommand [{SqlCommand}]") Logger.Error($"NewExecuteNonQueryAsync failed SQLCommand [{SqlCommand}]")
End Try End Try
End Sub End Sub
@@ -601,4 +646,18 @@ Public Class MSSQLServer
Dim res = command.EndExecuteNonQuery(result) Dim res = command.EndExecuteNonQuery(result)
Logger.Info("Finished executing Async database operation: {0}", command.CommandText) Logger.Info("Finished executing Async database operation: {0}", command.CommandText)
End Sub End Sub
Private Function GetParameterListAsString(pSQLCommand As SqlCommand) As String
Dim oList = pSQLCommand.Parameters.
Cast(Of SqlParameter).
Select(Function(p) $"({p.ParameterName}={p.Value})").
ToList()
Dim oParamString = String.Join(",", oList)
If oParamString.Length > 1000 Then
oParamString = oParamString.Substring(1, 1000)
End If
Return oParamString
End Function
End Class End Class

View File

@@ -1,19 +1,18 @@
Imports System.Data.Odbc Imports System.Data.Odbc
Imports DigitalData.Modules.Logging Imports System.Data
Imports NLog
Public Class ODBC Public Class ODBC
Private _Logger As Logger Private _Logger As Logger
Private _LogConfig As LogConfig
Private _connectionDatasource As String Private _connectionDatasource As String
Private _connectionUsername As String Private _connectionUsername As String
Private _connectionPassword As String Private _connectionPassword As String
Private _connectionString As String Private _connectionString As String
Public Sub New(LogConfig As LogConfig, Datasource As String, User As String, Password As String) Public Sub New(Datasource As String, User As String, Password As String)
Try Try
_LogConfig = LogConfig _Logger = LogManager.GetCurrentClassLogger()
_Logger = _LogConfig.GetLogger()
_connectionDatasource = Datasource _connectionDatasource = Datasource
_connectionPassword = Password _connectionPassword = Password

View File

@@ -1,6 +1,6 @@
Imports DigitalData.Modules.Encryption Imports DigitalData.Modules.Encryption
Imports DigitalData.Modules.Logging
Imports Oracle.ManagedDataAccess.Client Imports Oracle.ManagedDataAccess.Client
Imports System.Data
Public Class Oracle Public Class Oracle
Implements IDatabase Implements IDatabase
@@ -127,7 +127,7 @@ Public Class Oracle
End Try End Try
End Function End Function
Public Function GetDatatable(pSQLCommand As String, pTimeout As Integer) As DataTable Implements IDatabase.GetDatatable Public Function GetDatatable(pSQLCommand As String, Optional pTimeout As Integer = Constants.DEFAULT_TIMEOUT) As DataTable Implements IDatabase.GetDatatable
Try Try
Using oConnection = GetConnection(CurrentConnectionString) Using oConnection = GetConnection(CurrentConnectionString)
Dim oSQLCommand As OracleCommand Dim oSQLCommand As OracleCommand
@@ -151,8 +151,8 @@ Public Class Oracle
End Try End Try
End Function End Function
Private Function GetDatatable(pSQLCommand As String) As DataTable Implements IDatabase.GetDatatable Public Function GetDatatable(SqlCommand As SqlClient.SqlCommand, Optional Timeout As Integer = 120) As DataTable Implements IDatabase.GetDatatable
Return GetDatatable(pSQLCommand, _Timeout) Throw New NotImplementedException()
End Function End Function
Public Function ExecuteNonQuery(pSQLCommand As String, pTimeout As Integer) As Boolean Implements IDatabase.ExecuteNonQuery Public Function ExecuteNonQuery(pSQLCommand As String, pTimeout As Integer) As Boolean Implements IDatabase.ExecuteNonQuery
@@ -250,4 +250,6 @@ Public Class Oracle
Return "Invalid ConnectionString" Return "Invalid ConnectionString"
End Try End Try
End Function End Function
End Class End Class

View File

@@ -20,4 +20,4 @@
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>

View File

@@ -1,167 +1,56 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>net8.0</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{EAF0EA75-5FA7-485D-89C7-B2D843B03A96}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>DigitalData.Modules.Database</RootNamespace> <RootNamespace>DigitalData.Modules.Database</RootNamespace>
<AssemblyName>DigitalData.Modules.Database</AssemblyName> <AssemblyName>DigitalData.Modules.Database</AssemblyName>
<FileAlignment>512</FileAlignment> <MyType>Empty</MyType>
<MyType>Windows</MyType> <ImplicitUsings>enable</ImplicitUsings>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
<NuGetPackageImportStamp> <AssemblyTitle>Modules.Database</AssemblyTitle>
</NuGetPackageImportStamp> <Description>Stellt Funktionen für den Datenbankzugriff zur Verfügung</Description>
<Company>Digital Data</Company>
<Product>Modules.Database</Product>
<Copyright>Copyright © 2025</Copyright>
<AssemblyVersion>2.3.6.0</AssemblyVersion>
<FileVersion>2.3.6.0</FileVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.Modules.Database.xml</DocumentationFile> <DocumentationFile>DigitalData.Modules.Database.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug> <DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.Modules.Database.xml</DocumentationFile> <DocumentationFile>DigitalData.Modules.Database.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <PackageReference Include="EntityFramework" Version="6.5.1" />
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath> <PackageReference Include="EntityFramework.Firebird" Version="10.1.0" />
</Reference> <PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="10.3.2" />
<Reference Include="EntityFramework.Firebird, Version=6.4.0.0, Culture=neutral, PublicKeyToken=42d22d092898e5f8, processorArchitecture=MSIL"> <PackageReference Include="NLog" Version="5.0.5" />
<HintPath>..\packages\EntityFramework.Firebird.6.4.0\lib\net452\EntityFramework.Firebird.dll</HintPath> <PackageReference Include="System.Data.Odbc" Version="8.0.1" />
</Reference> <PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.1" />
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <PackageReference Include="CoreWCF.Primitives" Version="1.8.0" />
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath> <PackageReference Include="CoreWCF.ConfigurationManager" Version="1.8.0" />
</Reference> <PackageReference Include="CoreWCF.Http" Version="1.8.0" />
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=7.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL"> <PackageReference Include="CoreWCF.WebHttp" Version="1.8.0" />
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath> <PackageReference Include="CoreWCF.NetTcp" Version="1.8.0" />
</Reference> <PackageReference Include="Oracle.ManagedDataAccess" Version="23.4.0" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.15\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="Oracle.ManagedDataAccess">
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Data.Odbc, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.Odbc.6.0.1\lib\net461\System.Data.Odbc.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Import Include="Microsoft.VisualBasic" /> <Import Include="DigitalData.Modules.Logging" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="ConnectionString.vb" /> <Compile Remove="My Project\Application.Designer.vb" />
<Compile Include="Constants.vb" /> <Compile Remove="My Project\Resources.Designer.vb" />
<Compile Include="Dispatcher.vb" /> <Compile Remove="My Project\Settings.Designer.vb" />
<Compile Include="Exceptions.vb" /> <EmbeddedResource Remove="My Project\Resources.resx" />
<Compile Include="Adapters\Firebird.vb" /> <None Remove="My Project\Application.myapp" />
<Compile Include="Helpers.vb" /> <None Remove="My Project\Settings.settings" />
<Compile Include="IDatabase.vb" />
<Compile Include="Adapters\ODBC.vb" />
<Compile Include="Adapters\Oracle.vb" />
<Compile Include="Adapters\MSSQLServer.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Queries.vb" />
<Compile Include="TableCache.vb" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx"> <ProjectReference Include="..\Logging\Logging.vbproj" />
<Generator>VbMyResourcesResXFileCodeGenerator</Generator> <ProjectReference Include="..\Encryption\Encryption.vbproj" />
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Encryption\Encryption.vbproj">
<Project>{8a8f20fc-c46e-41ac-bee7-218366cfff99}</Project>
<Name>Encryption</Name>
</ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>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}".</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
</Project> </Project>

View File

@@ -1,5 +1,6 @@
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports Oracle.ManagedDataAccess.Client Imports Oracle.ManagedDataAccess.Client
Imports System.Data
Public Class Dispatcher Public Class Dispatcher
Public ReadOnly Property Connections As New List(Of DispatcherConnection) Public ReadOnly Property Connections As New List(Of DispatcherConnection)

View File

@@ -1,10 +0,0 @@
Public Class Helpers
Public Shared Function MaybeEscapeSQLCommand(pSQLCommand As String) As String
End Function
End Class

View File

@@ -1,4 +1,5 @@
Imports System.Data.Common Imports System.Data.Common
Imports System.Data
Imports System.Data.SqlClient Imports System.Data.SqlClient
Public Interface IDatabase Public Interface IDatabase

View File

@@ -1,13 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>false</MySubMain>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>1</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

View File

@@ -1,35 +1,9 @@
Imports System Imports System
Imports System.Reflection Imports System.Reflection
Imports System.Runtime.InteropServices Imports System.Runtime.InteropServices
<Assembly: AssemblyTrademark("2.3.6.0")>
' 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
<Assembly: AssemblyTitle("Modules.Database")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Database")>
<Assembly: AssemblyCopyright("Copyright © 2022")>
<Assembly: AssemblyTrademark("2.2.7.5")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird. 'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
<Assembly: Guid("b5cdfd4f-609f-41e1-adf0-663de9636ff5")> <Assembly: Guid("b5cdfd4f-609f-41e1-adf0-663de9636ff5")>
' 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:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.2.7.5")>
<Assembly: AssemblyFileVersion("2.2.7.5")>

View File

@@ -1,63 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
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.
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
'''<summary>
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
End Module
End Namespace

View File

@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,73 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
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

View File

@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -1,11 +1,15 @@
Public Class Queries Public Class Queries
Public Class DD_ECM Public Class DD_ECM
Public Class ThirdPartyModules Public Class ThirdPartyModules
Public Const GdPictureLicense As String = "SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE'" Public Const GdPictureLicense As String = "SELECT COALESCE(MAX(LICENSE),'') FROM TBDD_3RD_PARTY_MODULES WHERE ACTIVE = 1 AND NAME = 'GDPICTURE' AND [VERSION] = '11.2024'"
Public Const GdPictureLicense_REGULAR As String = "SELECT COALESCE(MAX(LICENSE),'') FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE' AND ACTIVE = 1"
End Class
Public Class DD_SELECTS
Public Const TBDD_CATALOG As String = "SELECT * FROM TBDD_CATALOG"
End Class End Class
Public Class Connections Public Class Connections
Public Const AllConnections As String = "SELECT * FROM TBDD_CONNECTION" Public Const AllConnections As String = "SELECT * FROM TBDD_CONNECTION AND AKTIV = 1"
End Class End Class
End Class End Class
End Class End Class

View File

@@ -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

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.4.4" targetFramework="net461" />
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net461" />
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net461" />
<package id="NLog" version="4.7.15" targetFramework="net461" />
<package id="System.Data.Odbc" version="6.0.1" targetFramework="net461" />
</packages>

View File

@@ -1,9 +1,10 @@
Imports System.IO Imports System.Data
Imports System.IO
Imports System.ServiceModel Imports System.ServiceModel
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.EDMI.API.Constants Imports DigitalData.Modules.EDMI.API.Constants
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
Imports DigitalData.Modules.EDMI.API.Rights Imports DigitalData.Modules.EDMI.API.Rights
Imports DigitalData.Modules.Language.Utils
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Public Class Client Public Class Client
@@ -550,10 +551,10 @@ Public Class Client
.Id = oRow.Item("AttributeId"), .Id = oRow.Item("AttributeId"),
.Title = oRow.Item("AttributeTitle"), .Title = oRow.Item("AttributeTitle"),
.Type = oRow.Item("AttributeType"), .Type = oRow.Item("AttributeType"),
.ValueBigInt = NotNull(oRow.Item("ValueBigInt"), Nothing), .ValueBigInt = oRow.ItemEx(Of Object)("ValueBigInt", Nothing),
.ValueDate = NotNull(oRow.Item("ValueDate"), Nothing), .ValueDate = oRow.ItemEx(Of Object)("ValueDate", Nothing),
.ValueDecimal = NotNull(oRow.Item("ValueDecimal"), Nothing), .ValueDecimal = oRow.ItemEx(Of Object)("ValueDecimal", Nothing),
.ValueText = NotNull(oRow.Item("ValueText"), Nothing) .ValueText = oRow.ItemEx(Of Object)("ValueText", Nothing)
} }
oAttributes.Add(oAttribute) oAttributes.Add(oAttribute)
@@ -932,11 +933,11 @@ Public Class Client
Private Function GetUserLanguage(pOverrideLanguage As String) As String Private Function GetUserLanguage(pOverrideLanguage As String) As String
Return NotNull(pOverrideLanguage, Threading.Thread.CurrentThread.CurrentUICulture.Name) Return ObjectEx.NotNull(pOverrideLanguage, Threading.Thread.CurrentThread.CurrentUICulture.Name)
End Function End Function
Private Function GetUserName(pOverrideName) As String Private Function GetUserName(pOverrideName) As String
Return NotNull(pOverrideName, Environment.UserName) Return ObjectEx.NotNull(pOverrideName, Environment.UserName)
End Function End Function
#End Region #End Region

View File

@@ -3109,18 +3109,6 @@ Namespace EDMIServiceReference
MyBase.New MyBase.New
End Sub 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) Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
MyBase.New(binding, remoteAddress) MyBase.New(binding, remoteAddress)
End Sub End Sub

View File

@@ -1,9 +1,9 @@
Imports DigitalData.Modules.Database Imports System.Data
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.EDMI.API Imports DigitalData.Modules.EDMI.API
Imports DigitalData.Modules.EDMI.API.Constants Imports DigitalData.Modules.EDMI.API.Constants
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language.Utils
Public Class DatabaseWithFallback Public Class DatabaseWithFallback
Private ReadOnly _Logger As Logger Private ReadOnly _Logger As Logger
@@ -191,25 +191,30 @@ Public Class DatabaseWithFallback
' If there is no client, we assume there is no service (configured) ' If there is no client, we assume there is no service (configured)
If _Client Is Nothing Then If _Client Is Nothing Then
_Logger.Debug("Client is empty, falling back to direct database access.")
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId) Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
End If End If
' If ForceFallback flag is set, we go to database immediately ' If ForceFallback flag is set, we go to database immediately
If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then If pForceFallback Or _ClientConfig.ForceDirectDatabaseAccess Then
_Logger.Debug("ForceFallback is True, falling back to direct database access.")
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId) Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType, pConnectionId)
End If End If
' If the table is not cached, we try going through the service ' If the table is not cached, we try going through the service
If Not IsTableCached(pDataTableName) Then If Not IsTableCached(pDataTableName) Then
_Logger.Debug("Datatable is not chached, fetching data from service.")
Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId) Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId)
End If End If
' If there is a proper ConnectionId, we try going through the service ' If there is a proper ConnectionId, we try going through the service
If pConnectionId > 0 Then If pConnectionId > 0 Then
_Logger.Debug("ConnectionId is set, fetching data from service.")
Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId) Return GetDatatableFromService(pFallbackSQL, pFallbackType, pConnectionId)
End If End If
Try Try
_Logger.Debug("Datatable is chached, fetching data from cache.")
oTableResult = _Client.GetDatatableByName(pDataTableName, pFilterExpression, pSortByColumn) oTableResult = _Client.GetDatatableByName(pDataTableName, pFilterExpression, pSortByColumn)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
@@ -332,26 +337,25 @@ Public Class DatabaseWithFallback
End Function End Function
Private Function GetDatatableFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable Private Function GetDatatableFromDatabase(pSQLCommand As String, pDatabaseType As Constants.DatabaseType, pConnectionId As Integer) As DataTable
Try Try
Dim oResult As ExecuteNonQueryResponse = Nothing _Logger.Debug("Fetching data from database [{0}] with Connection Id [{0}]", pDatabaseType.ToString, pConnectionId)
Select Case DatabaseType
Case Constants.DatabaseType.ECM
Return _DatabaseECM.GetDatatable(pSQLCommand)
Select Case pDatabaseType
Case Constants.DatabaseType.IDB Case Constants.DatabaseType.IDB
Return _DatabaseIDB.GetDatatable(pSQLCommand) Return _DatabaseIDB.GetDatatable(pSQLCommand)
Case Else Case Else
Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(pConnectionId) If pConnectionId > 0 Then
If oConnectionString = String.Empty Then _Logger.Debug("Retrieving Connection String from Connection Id [{0}]", pConnectionId)
Return _DatabaseECM.GetDatatable(pSQLCommand) Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(pConnectionId)
Else
Return _DatabaseECM.GetDatatableWithConnection(pSQLCommand, oConnectionString) Return _DatabaseECM.GetDatatableWithConnection(pSQLCommand, oConnectionString)
Else
Return _DatabaseECM.GetDatatable(pSQLCommand)
End If End If
End Select End Select
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Return Nothing Return Nothing
@@ -397,20 +401,19 @@ Public Class DatabaseWithFallback
Private Function GetScalarValueFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Object Private Function GetScalarValueFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Object
Try Try
Select Case DatabaseType Select Case DatabaseType
Case Constants.DatabaseType.ECM
Return _DatabaseECM.GetScalarValue(pSQLCommand)
Case Constants.DatabaseType.IDB Case Constants.DatabaseType.IDB
Return _DatabaseIDB.GetScalarValue(pSQLCommand) Return _DatabaseIDB.GetScalarValue(pSQLCommand)
Case Else Case Else
Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(pConnectionId) If pConnectionId > 0 Then
If oConnectionString = String.Empty Then Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(pConnectionId)
Return _DatabaseECM.GetScalarValue(pSQLCommand)
Else
Return _DatabaseECM.GetScalarValueWithConnection(pSQLCommand, oConnectionString) Return _DatabaseECM.GetScalarValueWithConnection(pSQLCommand, oConnectionString)
Else
Return _DatabaseECM.GetScalarValue(pSQLCommand)
End If End If
End Select End Select
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Return Nothing Return Nothing
@@ -455,21 +458,19 @@ Public Class DatabaseWithFallback
Private Function ExecuteNonQueryFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Boolean Private Function ExecuteNonQueryFromDatabase(pSQLCommand As String, DatabaseType As Constants.DatabaseType, pConnectionId As Integer) As Boolean
Try Try
Select Case DatabaseType Select Case DatabaseType
Case Constants.DatabaseType.ECM
Return _DatabaseECM.ExecuteNonQuery(pSQLCommand)
Case Constants.DatabaseType.IDB Case Constants.DatabaseType.IDB
Return _DatabaseIDB.ExecuteNonQuery(pSQLCommand) Return _DatabaseIDB.ExecuteNonQuery(pSQLCommand)
Case Else Case Else
Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(pConnectionId) If pConnectionId > 0 Then
If oConnectionString = String.Empty Then Dim oConnectionString = _DatabaseECM.Get_ConnectionStringforID(pConnectionId)
Return _DatabaseECM.ExecuteNonQuery(pSQLCommand)
Else
Return _DatabaseECM.ExecuteNonQueryWithConnection(pSQLCommand, oConnectionString) Return _DatabaseECM.ExecuteNonQueryWithConnection(pSQLCommand, oConnectionString)
Else
Return _DatabaseECM.ExecuteNonQuery(pSQLCommand)
End If End If
End Select End Select
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Return False Return False

View File

@@ -1,120 +1,61 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>net8.0-windows7.0</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{25017513-0D97-49D3-98D7-BA76D9B251B0}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>DigitalData.Modules.EDMI.API</RootNamespace> <RootNamespace>DigitalData.Modules.EDMI.API</RootNamespace>
<AssemblyName>DigitalData.Modules.EDMI.API</AssemblyName> <AssemblyName>DigitalData.Modules.EDMI.API</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType> <MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <UseWindowsForms>true</UseWindowsForms>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
<AssemblyTitle>EDMIAPI</AssemblyTitle>
<Company>Digital Data</Company>
<Product>EDMIAPI</Product>
<Copyright>Copyright © 2023</Copyright>
<AssemblyVersion>1.6.1.1</AssemblyVersion>
<FileVersion>1.6.1.1</FileVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.Modules.EDMI.API.xml</DocumentationFile> <DocumentationFile>DigitalData.Modules.EDMI.API.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug> <DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.Modules.EDMI.API.xml</DocumentationFile> <DocumentationFile>DigitalData.Modules.EDMI.API.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <PackageReference Include="NLog" Version="5.0.5" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.1" />
<HintPath>..\packages\NLog.4.7.15\lib\net45\NLog.dll</HintPath> <PackageReference Include="System.ServiceModel.Duplex" Version="6.0.0" />
</Reference> <PackageReference Include="System.ServiceModel.Primitives" Version="8.0.0" />
<Reference Include="System" /> <PackageReference Include="System.ServiceModel.Http" Version="8.0.0" />
<Reference Include="System.Configuration" /> <PackageReference Include="System.ServiceModel.NetTcp" Version="8.0.0" />
<Reference Include="System.Data" /> <PackageReference Include="System.ServiceModel.Security" Version="6.0.0" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Import Include="Microsoft.VisualBasic" /> <Compile Update="Connected Services\EDMIServiceReference\Reference.vb">
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="Client\Connection.vb" />
<Compile Include="Client\NewFile.vb" />
<Compile Include="Client\Options.vb" />
<Compile Include="Client\Rights.vb" />
<Compile Include="Client\Channel.vb" />
<Compile Include="Client\ServerAddressStruct.vb" />
<Compile Include="Modules\BaseMethod.vb" />
<Compile Include="Modules\Globix\ImportFile.vb" />
<Compile Include="Helpers.vb" />
<Compile Include="Modules\IDB\CheckOutFile.vb" />
<Compile Include="Modules\IDB\CheckInFile.vb" />
<Compile Include="Modules\IDB\ImportFile.vb" />
<Compile Include="Modules\IDB\NewFile.vb" />
<Compile Include="Modules\IDB\SetAttributeValue.vb" />
<Compile Include="Modules\IDB\SetObjectState.vb" />
<Compile Include="Modules\IDB\UpdateFile.vb" />
<Compile Include="Modules\ZooFlow\GetFileObject.vb" />
<Compile Include="Connected Services\EDMIServiceReference\Reference.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</Compile> </Compile>
<Compile Include="Client.vb" /> <Compile Update="My Project\Application.Designer.vb">
<Compile Include="Constants.vb" />
<Compile Include="DatabaseWithFallback.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon> <DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile> </Compile>
<Compile Include="My Project\Resources.Designer.vb"> <Compile Update="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
</Compile> </Compile>
<Compile Include="My Project\Settings.Designer.vb"> <Compile Update="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx"> <EmbeddedResource Update="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator> <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput> <LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace> <CustomToolNamespace>My.Resources</CustomToolNamespace>
@@ -122,158 +63,153 @@
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" /> <None Update="Connected Services\EDMIServiceReference\Arrays.xsd">
<None Include="Connected Services\EDMIServiceReference\Arrays.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.CheckInOutFileResponse.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.CheckInOutFileResponse.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentInfoResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentInfoResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.ExecuteNonQueryResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.ExecuteNonQueryResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.GetAttributeValueResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.GetAttributeValueResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.GetClientConfigResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.GetClientConfigResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.GetDatatableResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.GetDatatableResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.GetFileObjectResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.GetFileObjectResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.GetScalarValueResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.GetScalarValueResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.Globix_ImportFileResponse.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.Globix_ImportFileResponse.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.ImportFileResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.ImportFileResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.NewFileResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.NewFileResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.NonQueryResult1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.NonQueryResult1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.RightsAccessRight1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.RightsAccessRight1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.ScalarResult1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.ScalarResult1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.SetAttributeValueResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.SetAttributeValueResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.TestObjectIdExistsResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.TestObjectIdExistsResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.UpdateFileResponse1.datasource"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.UpdateFileResponse1.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.ZooFlow.State.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Modules.ZooFlow.State.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Exceptions.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Exceptions.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Messages.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Messages.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.Base.GetClientConfig.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.Base.GetClientConfig.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.Database.ExecuteNonQuery.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.Database.ExecuteNonQuery.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.Database.GetDatatable.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.Database.GetDatatable.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.Database.GetScalarValue.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.Database.GetScalarValue.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.Database.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.Database.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.GlobalIndexer.ImportFile.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.CheckInOutFile.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.CheckInOutFile.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.GetAttributeValue.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.GetAttributeValue.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.GetFileObject.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.GetFileObject.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.ImportFile.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.ImportFile.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.NewFile.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.NewFile.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.SetAttributeValue.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.SetAttributeValue.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.UpdateFile.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.UpdateFile.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Methods.IDB.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.wsdl" /> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.xsd">
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService1.xsd"> <None Update="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService1.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\Message.xsd"> <None Update="Connected Services\EDMIServiceReference\Message.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\service.wsdl" /> <None Update="Connected Services\EDMIServiceReference\service.xsd">
<None Include="Connected Services\EDMIServiceReference\service.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\System.Data.xsd"> <None Update="Connected Services\EDMIServiceReference\System.Data.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\System.IO.xsd"> <None Update="Connected Services\EDMIServiceReference\System.IO.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="Connected Services\EDMIServiceReference\System.xsd"> <None Update="Connected Services\EDMIServiceReference\System.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="My Project\Application.myapp"> <None Update="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator> <Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput> <LastGenOutput>Application.Designer.vb</LastGenOutput>
</None> </None>
<None Include="My Project\DataSources\System.Data.DataTable.datasource" /> <None Update="My Project\Settings.settings">
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace> <CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput> <LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None> </None>
<None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<WCFMetadata Include="Connected Services\" /> <WCFMetadata Include="Connected Services\" />
@@ -282,42 +218,15 @@
<WCFMetadataStorage Include="Connected Services\EDMIServiceReference\" /> <WCFMetadataStorage Include="Connected Services\EDMIServiceReference\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Connected Services\EDMIServiceReference\configuration91.svcinfo" /> <None Update="Connected Services\EDMIServiceReference\Reference.svcmap">
</ItemGroup>
<ItemGroup>
<None Include="Connected Services\EDMIServiceReference\configuration.svcinfo" />
</ItemGroup>
<ItemGroup>
<None Include="Connected Services\EDMIServiceReference\Reference.svcmap">
<Generator>WCF Proxy Generator</Generator> <Generator>WCF Proxy Generator</Generator>
<LastGenOutput>Reference.vb</LastGenOutput> <LastGenOutput>Reference.vb</LastGenOutput>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Base\Base.vbproj"> <ProjectReference Include="..\Base\Base.vbproj" />
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project> <ProjectReference Include="..\Config\Config.vbproj" />
<Name>Base</Name> <ProjectReference Include="..\Database\Database.vbproj" />
</ProjectReference> <ProjectReference Include="..\Logging\Logging.vbproj" />
<ProjectReference Include="..\Config\Config.vbproj">
<Project>{44982f9b-6116-44e2-85d0-f39650b1ef99}</Project>
<Name>Config</Name>
</ProjectReference>
<ProjectReference Include="..\Database\Database.vbproj">
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
<Name>Database</Name>
</ProjectReference>
<ProjectReference Include="..\Filesystem\Filesystem.vbproj">
<Project>{991d0231-4623-496d-8bd0-9ca906029cbc}</Project>
<Name>Filesystem</Name>
</ProjectReference>
<ProjectReference Include="..\Language\Language.vbproj">
<Project>{d3c8cfed-d6f6-43a8-9bdf-454145d0352f}</Project>
<Name>Language</Name>
</ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project> </Project>

View File

@@ -1,16 +1,17 @@
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference Imports DigitalData.Modules.Base
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Public Class Helpers Public Class Helpers
Private ReadOnly LogConfig As LogConfig Private ReadOnly LogConfig As LogConfig
Private ReadOnly Logger As Logger Private ReadOnly Logger As Logger
Private ReadOnly FileEx As Filesystem.File Private ReadOnly FileEx As FilesystemEx
Public Sub New(pLogConfig As LogConfig) Public Sub New(pLogConfig As LogConfig)
LogConfig = pLogConfig LogConfig = pLogConfig
Logger = pLogConfig.GetLogger() Logger = pLogConfig.GetLogger()
FileEx = New Filesystem.File(pLogConfig) FileEx = New FilesystemEx(pLogConfig)
End Sub End Sub
Public Function GetFileProperties(pFilePath As String, pDateImportedAt As Date) As FileProperties Public Function GetFileProperties(pFilePath As String, pDateImportedAt As Date) As FileProperties

View File

@@ -1,4 +1,5 @@
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference Imports DigitalData.Modules.Base
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Namespace Modules Namespace Modules
@@ -6,14 +7,14 @@ Namespace Modules
Friend ReadOnly LogConfig As LogConfig Friend ReadOnly LogConfig As LogConfig
Friend ReadOnly Logger As Logger Friend ReadOnly Logger As Logger
Friend ReadOnly Channel As IEDMIServiceChannel Friend ReadOnly Channel As IEDMIServiceChannel
Friend ReadOnly FileEx As Filesystem.File Friend ReadOnly FileEx As FilesystemEx
Friend ReadOnly Helpers As Helpers Friend ReadOnly Helpers As Helpers
Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel) Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel)
LogConfig = pLogConfig LogConfig = pLogConfig
Logger = pLogConfig.GetLogger() Logger = pLogConfig.GetLogger()
Channel = pChannel Channel = pChannel
FileEx = New Filesystem.File(pLogConfig) FileEx = New FilesystemEx(pLogConfig)
Helpers = New Helpers(pLogConfig) Helpers = New Helpers(pLogConfig)
End Sub End Sub
End Class End Class

View File

@@ -1,6 +1,5 @@
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Filesystem
Namespace Modules.IDB Namespace Modules.IDB
Public Class NewFile Public Class NewFile

View File

@@ -1,35 +1,9 @@
Imports System Imports System
Imports System.Reflection Imports System.Reflection
Imports System.Runtime.InteropServices Imports System.Runtime.InteropServices
<Assembly: AssemblyTrademark("1.6.1.1")>
' 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
<Assembly: AssemblyTitle("EDMIAPI")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("EDMIAPI")>
<Assembly: AssemblyCopyright("Copyright © 2022")>
<Assembly: AssemblyTrademark("1.5.4.0")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird. 'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
<Assembly: Guid("a4ecd56e-dc85-471e-b190-f3f2e3f4b7b0")> <Assembly: Guid("a4ecd56e-dc85-471e-b190-f3f2e3f4b7b0")>
' 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:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.5.4.0")>
<Assembly: AssemblyFileVersion("1.5.4.0")>

View File

@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary> '''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary> '''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0"), _ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
@@ -39,7 +39,7 @@ Namespace My.Resources
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get Get
If Object.ReferenceEquals(resourceMan, Nothing) Then 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) Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.Modules.EDMI.API.Resources", GetType(Resources).Assembly)
resourceMan = temp resourceMan = temp
End If End If
Return resourceMan Return resourceMan

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase Inherits Global.System.Configuration.ApplicationSettingsBase
@@ -63,7 +63,7 @@ Namespace My
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.DigitalData.Modules.EDMI.API.My.MySettings Friend ReadOnly Property Settings() As Global.DigitalData.Modules.EDMI.API.My.MySettings
Get Get
Return Global.DigitalData.Modules.EDMI.API.My.MySettings.Default Return Global.DigitalData.Modules.EDMI.API.My.MySettings.Default

View File

@@ -46,4 +46,4 @@
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.7.15" targetFramework="net461" />
</packages>

View File

@@ -1,9 +1,10 @@
Imports System.IO Imports System.IO
Imports System.IO.Compression Imports System.IO.Compression
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports NLog
Public Class Compression Public Class Compression
Private ReadOnly _logger As Logger Private ReadOnly _logger As NLog.Logger
Public Sub New(LogConfig As LogConfig) Public Sub New(LogConfig As LogConfig)
_logger = LogConfig.GetLogger() _logger = LogConfig.GetLogger()

View File

@@ -1,7 +1,7 @@
Imports System.IO Imports System.IO
Imports System.Security.Cryptography Imports System.Security.Cryptography
Imports System.Text.Encoding Imports System.Text.Encoding
Imports DigitalData.Modules.Logging Imports NLog
''' <summary> ''' <summary>
''' https://stackoverflow.com/questions/10168240/encrypting-decrypting-a-string-in-c-sharp ''' https://stackoverflow.com/questions/10168240/encrypting-decrypting-a-string-in-c-sharp

View File

@@ -1,123 +1,49 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>net8.0</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8A8F20FC-C46E-41AC-BEE7-218366CFFF99}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>DigitalData.Modules.Encryption</RootNamespace> <RootNamespace>DigitalData.Modules.Encryption</RootNamespace>
<AssemblyName>DigitalData.Modules.Encryption</AssemblyName> <AssemblyName>DigitalData.Modules.Encryption</AssemblyName>
<FileAlignment>512</FileAlignment> <MyType>Empty</MyType>
<MyType>Windows</MyType> <ImplicitUsings>enable</ImplicitUsings>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <AssemblyTitle>DDModules.DDEncryption</AssemblyTitle>
<Deterministic>true</Deterministic> <Description>Stellt Funktionen zur Entschlüsselung bereit</Description>
<Company>Digital Data Gmbh, Heuchelheim</Company>
<Product>DDModules.Encryption</Product>
<Copyright>Copyright © 2021</Copyright>
<AssemblyVersion>1.3.1.0</AssemblyVersion>
<FileVersion>1.3.1.0</FileVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.Modules.Encryption.xml</DocumentationFile> <DocumentationFile>DigitalData.Modules.Encryption.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug> <DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.Modules.Encryption.xml</DocumentationFile> <DocumentationFile>DigitalData.Modules.Encryption.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <PackageReference Include="NLog" Version="5.0.5" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.1" />
<HintPath>..\packages\NLog.4.7.15\lib\net45\NLog.dll</HintPath> <PackageReference Include="CoreWCF.Primitives" Version="1.8.0" />
</Reference> <PackageReference Include="CoreWCF.ConfigurationManager" Version="1.8.0" />
<Reference Include="System" /> <PackageReference Include="CoreWCF.Http" Version="1.8.0" />
<Reference Include="System.Configuration" /> <PackageReference Include="CoreWCF.WebHttp" Version="1.8.0" />
<Reference Include="System.Data" /> <PackageReference Include="CoreWCF.NetTcp" Version="1.8.0" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Import Include="Microsoft.VisualBasic" /> <Import Include="DigitalData.Modules.Logging" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Compression.vb" /> <Compile Remove="My Project\Application.Designer.vb" />
<Compile Include="Encryption.vb" /> <Compile Remove="My Project\Resources.Designer.vb" />
<Compile Include="EncryptionLegacy.vb" /> <Compile Remove="My Project\Settings.Designer.vb" />
<Compile Include="My Project\AssemblyInfo.vb" /> <EmbeddedResource Remove="My Project\Resources.resx" />
<Compile Include="My Project\Application.Designer.vb"> <None Remove="My Project\Application.myapp" />
<AutoGen>True</AutoGen> <None Remove="My Project\Settings.settings" />
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx"> <ProjectReference Include="..\Logging\Logging.vbproj" />
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project> </Project>

View File

@@ -1,13 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>false</MySubMain>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>1</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

View File

@@ -1,35 +1,9 @@
Imports System Imports System
Imports System.Reflection Imports System.Reflection
Imports System.Runtime.InteropServices 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
<Assembly: AssemblyTitle("Encryption")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Encryption")>
<Assembly: AssemblyCopyright("Copyright © 2021")>
<Assembly: AssemblyTrademark("")> <Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird. 'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird.
<Assembly: Guid("e92901a1-8e87-482d-b63f-f20292d38f1e")> <Assembly: Guid("e92901a1-8e87-482d-b63f-f20292d38f1e")>
' 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:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.1.0.0")>
<Assembly: AssemblyFileVersion("1.1.0.0")>

View File

@@ -1,63 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
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.
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
'''<summary>
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
End Module
End Namespace

View File

@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,73 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
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

View File

@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.7.15" targetFramework="net461" />
</packages>

View File

@@ -121,6 +121,33 @@ Public Class File
Dim oVersionSeparator As Char = "~"c Dim oVersionSeparator As Char = "~"c
' Split Filename without extension at version separator to:
' - Check if file is already versioned
' - Get the file version of an already versioned file
'
' Example:
' 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
'Dim oFileNameWithoutExtension = Path.GetFileNameWithoutExtension(oFileName)
'Dim oSplitFilename = oFileNameWithoutExtension.Split(oVersionSeparator).ToList()
' if file is already versioned, extract file version
' else just use the filename and set version to 1
'If oSplitFilename.Count > 1 Then
' Dim oVersion As Integer = 1
' Try
' oVersion = Integer.Parse(oSplitFilename.Last())
' oFileNameWithoutExtension = String.Join("", oSplitFilename.Take(oSplitFilename.Count - 1))
' Catch ex As Exception
' ' oFilenameWithoutExtension does NOT change
' oFileNameWithoutExtension = oFileNameWithoutExtension
' Finally
' oFileVersion = oVersion
' End Try
'Else
' oFileVersion = 1
'End If
Dim oFileNameWithoutExtension = Path.GetFileNameWithoutExtension(oFileName) Dim oFileNameWithoutExtension = Path.GetFileNameWithoutExtension(oFileName)
Dim oSplitResult = GetVersionedString(oFileNameWithoutExtension, oVersionSeparator) Dim oSplitResult = GetVersionedString(oFileNameWithoutExtension, oVersionSeparator)
@@ -130,8 +157,7 @@ Public Class File
' Shorten the filename (only filename, without extension or version) ' 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. ' 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 oFileName.Length > MAX_FILE_PATH_LENGTH Then
If Destination.Length > MAX_FILE_PATH_LENGTH Then
_Logger.Info("Filename is too long. Filename will be cut to prevent further errors.") _Logger.Info("Filename is too long. Filename will be cut to prevent further errors.")
_Logger.Info("Original Filename is: {0}", oFileNameWithoutExtension) _Logger.Info("Original Filename is: {0}", oFileNameWithoutExtension)
Dim oNewLength As Integer = Math.Round(oFileNameWithoutExtension.Length / 2) Dim oNewLength As Integer = Math.Round(oFileNameWithoutExtension.Length / 2)

View File

@@ -1,132 +1,49 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>net8.0</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{991D0231-4623-496D-8BD0-9CA906029CBC}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>DigitalData.Modules.Filesystem</RootNamespace> <RootNamespace>DigitalData.Modules.Filesystem</RootNamespace>
<AssemblyName>DigitalData.Modules.Filesystem</AssemblyName> <AssemblyName>DigitalData.Modules.Filesystem</AssemblyName>
<FileAlignment>512</FileAlignment> <MyType>Empty</MyType>
<MyType>Windows</MyType> <ImplicitUsings>enable</ImplicitUsings>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <AssemblyTitle>Modules.Filesystem</AssemblyTitle>
<Description>Stellt Funktionen für das Filesystem und Container zur Verfügung</Description>
<Company>Digital Data</Company>
<Product>Modules.Filesystem</Product>
<Copyright>Copyright © 2022</Copyright>
<AssemblyVersion>1.3.3.0</AssemblyVersion>
<FileVersion>1.3.3.0</FileVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.Modules.Filesystem.xml</DocumentationFile> <DocumentationFile>DigitalData.Modules.Filesystem.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug> <DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.Modules.Filesystem.xml</DocumentationFile> <DocumentationFile>DigitalData.Modules.Filesystem.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <PackageReference Include="NLog" Version="5.0.5" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <PackageReference Include="NuGet.CommandLine" Version="6.13.2" />
<HintPath>..\packages\NLog.4.7.15\lib\net45\NLog.dll</HintPath> <PackageReference Include="protobuf-net" Version="2.4.0" />
</Reference> <PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.1" />
<Reference Include="protobuf-net, Version=2.4.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL"> <PackageReference Include="CoreWCF.Primitives" Version="1.8.0" />
<HintPath>..\packages\protobuf-net.2.4.0\lib\net40\protobuf-net.dll</HintPath> <PackageReference Include="CoreWCF.ConfigurationManager" Version="1.8.0" />
</Reference> <PackageReference Include="CoreWCF.Http" Version="1.8.0" />
<Reference Include="System" /> <PackageReference Include="CoreWCF.WebHttp" Version="1.8.0" />
<Reference Include="System.Configuration" /> <PackageReference Include="CoreWCF.NetTcp" Version="1.8.0" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Import Include="Microsoft.VisualBasic" /> <Compile Remove="My Project\Application.Designer.vb" />
<Import Include="System" /> <Compile Remove="My Project\Resources.Designer.vb" />
<Import Include="System.Collections" /> <Compile Remove="My Project\Settings.Designer.vb" />
<Import Include="System.Collections.Generic" /> <EmbeddedResource Remove="My Project\Resources.resx" />
<Import Include="System.Data" /> <None Remove="My Project\Application.myapp" />
<Import Include="System.Diagnostics" /> <None Remove="My Project\Settings.settings" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="FileContainer\DocumentObject.vb" /> <ProjectReference Include="..\Encryption\Encryption.vbproj" />
<Compile Include="FileContainer\FileContainer.vb" /> <ProjectReference Include="..\Logging\Logging.vbproj" />
<Compile Include="File.vb" />
<Compile Include="FileContainer\FileContainerInner.vb" />
<Compile Include="FileWatcher\FileWatcher.vb" />
<Compile Include="FileWatcher\FileWatcherFilters.vb" />
<Compile Include="FileWatcher\FileWatcherProperties.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Encryption\Encryption.vbproj">
<Project>{8a8f20fc-c46e-41ac-bee7-218366cfff99}</Project>
<Name>Encryption</Name>
</ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project> </Project>

View File

@@ -1,13 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>false</MySubMain>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>1</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

View File

@@ -1,35 +1,9 @@
Imports System Imports System
Imports System.Reflection Imports System.Reflection
Imports System.Runtime.InteropServices Imports System.Runtime.InteropServices
<Assembly: AssemblyTrademark("1.3.1.0")>
' 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
<Assembly: AssemblyTitle("Modules.Filesystem")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Filesystem")>
<Assembly: AssemblyCopyright("Copyright © 2022")>
<Assembly: AssemblyTrademark("1.3.1.1")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird. 'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
<Assembly: Guid("2787495c-e65f-4730-be0c-af87bede4b11")> <Assembly: Guid("2787495c-e65f-4730-be0c-af87bede4b11")>
' 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:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.3.1.1")>
<Assembly: AssemblyFileVersion("1.3.1.1")>

View File

@@ -1,63 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
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.
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
'''<summary>
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
End Module
End Namespace

View File

@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,73 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
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

View File

@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.7.15" targetFramework="net461" />
<package id="protobuf-net" version="2.4.0" targetFramework="net461" />
</packages>

View File

@@ -37,23 +37,22 @@ Public Class ActiveDirectoryInterface
_logger.Info("Using RootPath {0}", _rootPath) _logger.Info("Using RootPath {0}", _rootPath)
End Sub End Sub
Public Function SyncUsersForGroup(GroupName As String, Firebird As Firebird, MSSQL As MSSQLServer) As List(Of ADUser) Public Function SyncUsersForGroup(GroupName As String, MSSQL As MSSQLServer) As List(Of ADUser)
Try Try
Return SyncUsersForGroup(GroupName, New List(Of AttributeMapping), Firebird, MSSQL) Return SyncUsersForGroup(GroupName, New List(Of AttributeMapping), MSSQL)
Catch ex As Exception Catch ex As Exception
_logger.Error(ex) _logger.Error(ex)
Return Nothing Return Nothing
End Try End Try
End Function 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) Public Function SyncUsersForGroup(GroupName As String, AttributeMappings As List(Of AttributeMapping), MSSQL As MSSQLServer, Optional Filter As String = DEFAULT_USER_FILTER) As List(Of ADUser)
Dim oUsers As New List(Of ADUser) Dim oUsers As New List(Of ADUser)
Dim oSyncedUsers As New List(Of ADUser) Dim oSyncedUsers As New List(Of ADUser)
Dim oGroupId As Int64 = Nothing Dim oGroupId As Int64 = Nothing
Dim oFirebirdSync As New SyncUsers.SyncUsersFirebird(_logConfig, Firebird)
Dim oSQLSync As New SyncUsers.SyncUsersMSSQL(_logConfig, MSSQL) Dim oSQLSync As New SyncUsers.SyncUsersMSSQL(_logConfig, MSSQL)
Dim oSyncedUsersFirebird, oSyncedUsersMSSQL As List(Of ADUser) Dim oSyncedUsersMSSQL As List(Of ADUser)
Try Try
_logger.Debug("Fetching users from ActiveDirectory") _logger.Debug("Fetching users from ActiveDirectory")
@@ -64,16 +63,6 @@ Public Class ActiveDirectoryInterface
Return Nothing Return Nothing
End Try 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 ' Do the actual sync into MSSQL
If MSSQL IsNot Nothing Then If MSSQL IsNot Nothing Then
oSyncedUsersMSSQL = oSQLSync.SyncUsers(GroupName, oUsers, AttributeMappings) oSyncedUsersMSSQL = oSQLSync.SyncUsers(GroupName, oUsers, AttributeMappings)
@@ -81,7 +70,7 @@ Public Class ActiveDirectoryInterface
_logger.Debug("Synced {0} users to MSSQLServer", oSyncedUsersMSSQL.Count) _logger.Debug("Synced {0} users to MSSQLServer", oSyncedUsersMSSQL.Count)
End If End If
Else Else
_logger.Debug("SyncUsersForGroup: _mssql is nothing. ") _logger.Debug("SyncUsersForGroup: _mssql is nothing.")
End If End If
Return oUsers Return oUsers
@@ -193,6 +182,8 @@ Public Class ActiveDirectoryInterface
.FirebirdSyskey = oMap.FirebirdSyskey, .FirebirdSyskey = oMap.FirebirdSyskey,
.MSSQLColumn = oMap.MSSQLColumn .MSSQLColumn = oMap.MSSQLColumn
}) })
Else
_logger.Debug("Attribute [{0}] is empty.", oMap.AttributeName)
End If End If
Next Next
Else Else
@@ -229,10 +220,23 @@ Public Class ActiveDirectoryInterface
Return oUsers Return oUsers
End Try End Try
End Function End Function
Private Function GetPartFromFirstOU(dnString As String) As String
Dim keyword As String = "OU="
Dim index As Integer = dnString.IndexOf(keyword)
Public Function FindUserWithFilter(User As UserPrincipalEx, Filter As String) As Boolean If index <> -1 Then
Return dnString.Substring(index)
Else
Return "No_Result_from_GetPartFromFirstOU"
End If
End Function
Public Function FindUserWithFilter(pUser As UserPrincipalEx, pFilter As String) As Boolean
Try Try
Dim oRootPath = String.Join(","c, User.DistinguishedName.Split(","c).Skip(1)) 'Dim oRootPath = String.Join(","c, pUser.DistinguishedName.Split(","c).Skip(1))
Dim oRootPath = GetPartFromFirstOU(pUser.DistinguishedName)
_logger.Debug("FindUserWithFilter: pUser.DistinguishedName: [{0}]", pUser.DistinguishedName)
_logger.Debug("FindUserWithFilter: oRootPath from User.DistinguishedName: [{0}]", oRootPath)
Dim oPlaceholder = "@SAMACCOUNTNAME" Dim oPlaceholder = "@SAMACCOUNTNAME"
Dim oProtocol = "LDAP://" Dim oProtocol = "LDAP://"
Dim oEntry As New DirectoryEntry(oProtocol & oRootPath) With { Dim oEntry As New DirectoryEntry(oProtocol & oRootPath) With {
@@ -240,22 +244,25 @@ Public Class ActiveDirectoryInterface
.Password = Nothing, .Password = Nothing,
.AuthenticationType = AuthenticationTypes.Secure .AuthenticationType = AuthenticationTypes.Secure
} }
_logger.Debug("FindUserWithFilter: got oDirectoryEntry (Path): [{0}]", oProtocol & oRootPath)
If Filter = String.Empty Then If pFilter = String.Empty Then
_logger.Debug("FindUserWithFilter: Filter was empty, returning True for User [{0}]", User.SamAccountName) _logger.Debug("FindUserWithFilter: Filter was empty, returning True for User [{0}]", pUser.SamAccountName)
Return True Return True
End If End If
If Filter.Contains(oPlaceholder) Then If pFilter.Contains(oPlaceholder) Then
Filter = Filter.Replace(oPlaceholder, User.SamAccountName) pFilter = pFilter.Replace(oPlaceholder, pUser.SamAccountName)
_logger.Debug("FindUserWithFilter: Filter.Contains(oPlaceholder) [{0}]", pFilter)
Else Else
_logger.Warn("FindUserWithFilter: Placeholder [{0}] was not found in filter. Results may not be correct.") _logger.Warn("FindUserWithFilter: Placeholder [{0}] was not found in filter. Results may not be correct.")
End If End If
Dim oSearcher As New DirectorySearcher(oEntry, Filter) Dim oSearcher As New DirectorySearcher(oEntry, pFilter)
_logger.Debug("FindUserWithFilter: oSearcher created! Now executing DirectoryServices.SearchResult with .FindOne ...")
Dim oResult As SearchResult = oSearcher.FindOne() Dim oResult As SearchResult = oSearcher.FindOne()
If oResult IsNot Nothing AndAlso oResult.Path.Replace(oProtocol, String.Empty) = User.DistinguishedName Then If oResult IsNot Nothing AndAlso oResult.Path.Replace(oProtocol, String.Empty) = pUser.DistinguishedName Then
_logger.Debug("FindUserWithFilter: We have an oResult - oResult.Path: [{0}]", oResult.Path)
Return True Return True
Else Else
Return False Return False

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