MS
This commit is contained in:
commit
a950c09802
@ -58,7 +58,7 @@ Public Class Form1
|
|||||||
|
|
||||||
AddLogMessage($"Importing {oFileInfo.Name}... ({FormatBytes(oFileInfo.Length)})")
|
AddLogMessage($"Importing {oFileInfo.Name}... ({FormatBytes(oFileInfo.Length)})")
|
||||||
|
|
||||||
Dim oObjectId As Long = Await _Client.ImportFileAsync(oFileInfo.Name, "WichtigesDokument", 1, 0)
|
Dim oObjectId As Long = Await _Client.ImportFileAsync(oFileInfo.FullName, "WichtigesDokument", 1, 0)
|
||||||
AddLogMessage($"File with Id [{oObjectId}] imported!")
|
AddLogMessage($"File with Id [{oObjectId}] imported!")
|
||||||
oSW.Stop()
|
oSW.Stop()
|
||||||
AddLogMessage($"Import Time: {FormatTime(oSW.ElapsedMilliseconds)}")
|
AddLogMessage($"Import Time: {FormatTime(oSW.ElapsedMilliseconds)}")
|
||||||
|
|||||||
@ -6,6 +6,7 @@ Imports DigitalData.Modules.Config
|
|||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
Imports Newtonsoft.Json.Linq
|
Imports Newtonsoft.Json.Linq
|
||||||
Imports System.Net
|
Imports System.Net
|
||||||
|
Imports System.Text.RegularExpressions
|
||||||
|
|
||||||
Public Class frmMain
|
Public Class frmMain
|
||||||
Private _LogConfig As LogConfig
|
Private _LogConfig As LogConfig
|
||||||
@ -139,6 +140,8 @@ Public Class frmMain
|
|||||||
|
|
||||||
txtResult.Text = String.Empty
|
txtResult.Text = String.Empty
|
||||||
|
|
||||||
|
Dim oTotalTotal As Integer = 0
|
||||||
|
|
||||||
For Each oDatapool In _Datapools
|
For Each oDatapool In _Datapools
|
||||||
Dim oQuery As String = GRAPHQL_QUERY_SAP_DATA.Trim.Replace("__DATA_POOL__", oDatapool)
|
Dim oQuery As String = GRAPHQL_QUERY_SAP_DATA.Trim.Replace("__DATA_POOL__", oDatapool)
|
||||||
Dim oDataResponse = _Interface.GetData(oQuery, "SAPDaten")
|
Dim oDataResponse = _Interface.GetData(oQuery, "SAPDaten")
|
||||||
@ -161,7 +164,9 @@ Public Class frmMain
|
|||||||
ProgressBar1.Value = oCounter
|
ProgressBar1.Value = oCounter
|
||||||
|
|
||||||
For Each oItem As SAPDataItem In oData.sapdaten
|
For Each oItem As SAPDataItem In oData.sapdaten
|
||||||
Dim oSQL = $"INSERT INTO TBCUST_SYNC_API_SAPDATEN (BESCHREIBUNG, BUCHUNGSKREIS, KOSTENSTELLE, GUELTIG_BIS) VALUES ('{oItem.beschreibung}', '{oItem.buchungskreis}', '{oItem.kostenstelle}', '{oItem.gueltig_bis}')"
|
Dim oBeschreibung = Regex.Replace(oItem.beschreibung, "'", "''", RegexOptions.IgnoreCase)
|
||||||
|
|
||||||
|
Dim oSQL = $"INSERT INTO TBCUST_SYNC_API_SAPDATEN (BESCHREIBUNG, BUCHUNGSKREIS, KOSTENSTELLE, GUELTIG_BIS) VALUES ('{oBeschreibung}', '{oItem.buchungskreis}', '{oItem.kostenstelle}', '{oItem.gueltig_bis}')"
|
||||||
Dim oSuccess = _MSSQL.ExecuteNonQuery(oSQL)
|
Dim oSuccess = _MSSQL.ExecuteNonQuery(oSQL)
|
||||||
|
|
||||||
If oSuccess Then
|
If oSuccess Then
|
||||||
@ -177,7 +182,11 @@ Public Class frmMain
|
|||||||
txtResult.Text &= JsonConvert.SerializeObject(oObj, Formatting.Indented) & vbNewLine
|
txtResult.Text &= JsonConvert.SerializeObject(oObj, Formatting.Indented) & vbNewLine
|
||||||
|
|
||||||
Application.DoEvents()
|
Application.DoEvents()
|
||||||
|
|
||||||
|
oTotalTotal += oTotal
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
MsgBox($"Query finished! Lines inserted: [{oTotalTotal}]", MsgBoxStyle.Information, Text)
|
||||||
ElseIf cmbQuery.Text = "Custom" Then
|
ElseIf cmbQuery.Text = "Custom" Then
|
||||||
If txtOperation.Text = String.Empty Then
|
If txtOperation.Text = String.Empty Then
|
||||||
MsgBox("Please select an operation!", MsgBoxStyle.Exclamation, Text)
|
MsgBox("Please select an operation!", MsgBoxStyle.Exclamation, Text)
|
||||||
|
|||||||
6
GUIs.Test.JobTest/App.config
Normal file
6
GUIs.Test.JobTest/App.config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
63
GUIs.Test.JobTest/Form1.Designer.vb
generated
Normal file
63
GUIs.Test.JobTest/Form1.Designer.vb
generated
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class Form1
|
||||||
|
Inherits System.Windows.Forms.Form
|
||||||
|
|
||||||
|
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||||
|
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||||
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
Try
|
||||||
|
If disposing AndAlso components IsNot Nothing Then
|
||||||
|
components.Dispose()
|
||||||
|
End If
|
||||||
|
Finally
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Wird vom Windows Form-Designer benötigt.
|
||||||
|
Private components As System.ComponentModel.IContainer
|
||||||
|
|
||||||
|
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||||
|
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||||
|
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||||
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
|
Private Sub InitializeComponent()
|
||||||
|
Me.Button1 = New System.Windows.Forms.Button()
|
||||||
|
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
||||||
|
Me.SuspendLayout()
|
||||||
|
'
|
||||||
|
'Button1
|
||||||
|
'
|
||||||
|
Me.Button1.Location = New System.Drawing.Point(12, 25)
|
||||||
|
Me.Button1.Name = "Button1"
|
||||||
|
Me.Button1.Size = New System.Drawing.Size(75, 23)
|
||||||
|
Me.Button1.TabIndex = 0
|
||||||
|
Me.Button1.Text = "Button1"
|
||||||
|
Me.Button1.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'TextBox1
|
||||||
|
'
|
||||||
|
Me.TextBox1.Font = New System.Drawing.Font("Consolas", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.TextBox1.Location = New System.Drawing.Point(93, 25)
|
||||||
|
Me.TextBox1.Multiline = True
|
||||||
|
Me.TextBox1.Name = "TextBox1"
|
||||||
|
Me.TextBox1.Size = New System.Drawing.Size(695, 413)
|
||||||
|
Me.TextBox1.TabIndex = 1
|
||||||
|
'
|
||||||
|
'Form1
|
||||||
|
'
|
||||||
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.ClientSize = New System.Drawing.Size(800, 450)
|
||||||
|
Me.Controls.Add(Me.TextBox1)
|
||||||
|
Me.Controls.Add(Me.Button1)
|
||||||
|
Me.Name = "Form1"
|
||||||
|
Me.Text = "Form1"
|
||||||
|
Me.ResumeLayout(False)
|
||||||
|
Me.PerformLayout()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend WithEvents Button1 As Button
|
||||||
|
Friend WithEvents TextBox1 As TextBox
|
||||||
|
End Class
|
||||||
120
GUIs.Test.JobTest/Form1.resx
Normal file
120
GUIs.Test.JobTest/Form1.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<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" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</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" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
19
GUIs.Test.JobTest/Form1.vb
Normal file
19
GUIs.Test.JobTest/Form1.vb
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Imports DigitalData.Modules.Jobs
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
|
Public Class Form1
|
||||||
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||||
|
Dim oLogConfig As New LogConfig(LogConfig.PathType.CustomPath, Application.StartupPath, Nothing, "Digital Data", "JobTest")
|
||||||
|
oLogConfig.Debug = True
|
||||||
|
Dim oJob As New GraphQLJob(oLogConfig)
|
||||||
|
|
||||||
|
Dim oArgs As New GraphQLArgs() With {
|
||||||
|
.Enabled = True,
|
||||||
|
.Interval = 999,
|
||||||
|
.QueryConfigPath = "E:\GraphQL"
|
||||||
|
}
|
||||||
|
oJob.Start(oArgs)
|
||||||
|
|
||||||
|
MsgBox("Finished!", MsgBoxStyle.Critical)
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
133
GUIs.Test.JobTest/GUIs.Test.JobTest.vbproj
Normal file
133
GUIs.Test.JobTest/GUIs.Test.JobTest.vbproj
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{CEC6B41B-764B-4304-B4F8-BFEBA37A03FB}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<StartupObject>GUIs.Test.JobTest.My.MyApplication</StartupObject>
|
||||||
|
<RootNamespace>GUIs.Test.JobTest</RootNamespace>
|
||||||
|
<AssemblyName>GUIs.Test.JobTest</AssemblyName>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<MyType>WindowsForms</MyType>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DocumentationFile>GUIs.Test.JobTest.xml</DocumentationFile>
|
||||||
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<DefineDebug>false</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DocumentationFile>GUIs.Test.JobTest.xml</DocumentationFile>
|
||||||
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionExplicit>On</OptionExplicit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionCompare>Binary</OptionCompare>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionStrict>Off</OptionStrict>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionInfer>On</OptionInfer>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<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>
|
||||||
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
<Import Include="System" />
|
||||||
|
<Import Include="System.Collections" />
|
||||||
|
<Import Include="System.Collections.Generic" />
|
||||||
|
<Import Include="System.Data" />
|
||||||
|
<Import Include="System.Drawing" />
|
||||||
|
<Import Include="System.Diagnostics" />
|
||||||
|
<Import Include="System.Windows.Forms" />
|
||||||
|
<Import Include="System.Linq" />
|
||||||
|
<Import Include="System.Xml.Linq" />
|
||||||
|
<Import Include="System.Threading.Tasks" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Form1.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form1.Designer.vb">
|
||||||
|
<DependentUpon>Form1.vb</DependentUpon>
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<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>
|
||||||
|
<EmbeddedResource Include="Form1.resx">
|
||||||
|
<DependentUpon>Form1.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<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="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Modules.Jobs\Jobs.vbproj">
|
||||||
|
<Project>{39ec839a-3c30-4922-a41e-6b09d1dde5c3}</Project>
|
||||||
|
<Name>Jobs</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Modules.Logging\Logging.vbproj">
|
||||||
|
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
|
||||||
|
<Name>Logging</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
|
</Project>
|
||||||
38
GUIs.Test.JobTest/My Project/Application.Designer.vb
generated
Normal file
38
GUIs.Test.JobTest/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' This code was generated by a tool.
|
||||||
|
' Runtime Version:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
' the code is regenerated.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
|
||||||
|
' or if you encounter build errors in this file, go to the Project Designer
|
||||||
|
' (go to Project Properties or double-click the My Project node in
|
||||||
|
' Solution Explorer), and make changes on the Application tab.
|
||||||
|
'
|
||||||
|
Partial Friend Class MyApplication
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||||
|
Public Sub New()
|
||||||
|
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||||
|
Me.IsSingleInstance = false
|
||||||
|
Me.EnableVisualStyles = true
|
||||||
|
Me.SaveMySettingsOnExit = true
|
||||||
|
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||||
|
Protected Overrides Sub OnCreateMainForm()
|
||||||
|
Me.MainForm = Global.GUIs.Test.JobTest.Form1
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
11
GUIs.Test.JobTest/My Project/Application.myapp
Normal file
11
GUIs.Test.JobTest/My Project/Application.myapp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?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>true</MySubMain>
|
||||||
|
<MainForm>Form1</MainForm>
|
||||||
|
<SingleInstance>false</SingleInstance>
|
||||||
|
<ShutdownMode>0</ShutdownMode>
|
||||||
|
<EnableVisualStyles>true</EnableVisualStyles>
|
||||||
|
<AuthenticationMode>0</AuthenticationMode>
|
||||||
|
<ApplicationType>0</ApplicationType>
|
||||||
|
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||||
|
</MyApplicationData>
|
||||||
35
GUIs.Test.JobTest/My Project/AssemblyInfo.vb
Normal file
35
GUIs.Test.JobTest/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
Imports System
|
||||||
|
Imports System.Reflection
|
||||||
|
Imports System.Runtime.InteropServices
|
||||||
|
|
||||||
|
' Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
' die einer Assembly zugeordnet sind.
|
||||||
|
|
||||||
|
' Werte der Assemblyattribute überprüfen
|
||||||
|
|
||||||
|
<Assembly: AssemblyTitle("GUIs.Test.JobTest")>
|
||||||
|
<Assembly: AssemblyDescription("")>
|
||||||
|
<Assembly: AssemblyCompany("")>
|
||||||
|
<Assembly: AssemblyProduct("GUIs.Test.JobTest")>
|
||||||
|
<Assembly: AssemblyCopyright("Copyright © 2020")>
|
||||||
|
<Assembly: AssemblyTrademark("")>
|
||||||
|
|
||||||
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
|
'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird.
|
||||||
|
<Assembly: Guid("c570ded5-4cf0-4151-957f-deb8d39b2581")>
|
||||||
|
|
||||||
|
' 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.0")>
|
||||||
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
62
GUIs.Test.JobTest/My Project/Resources.Designer.vb
generated
Normal file
62
GUIs.Test.JobTest/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' This code was generated by a tool.
|
||||||
|
' Runtime Version:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
' the code is regenerated.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My.Resources
|
||||||
|
|
||||||
|
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
'class via a tool like ResGen or Visual Studio.
|
||||||
|
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
'with the /str option, or rebuild your VS project.
|
||||||
|
'''<summary>
|
||||||
|
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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>
|
||||||
|
''' Returns the cached ResourceManager instance used by this class.
|
||||||
|
'''</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("GUIs.Test.JobTest.Resources", GetType(Resources).Assembly)
|
||||||
|
resourceMan = temp
|
||||||
|
End If
|
||||||
|
Return resourceMan
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Overrides the current thread's CurrentUICulture property for all
|
||||||
|
''' resource lookups using this strongly typed resource class.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||||
|
Get
|
||||||
|
Return resourceCulture
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||||
|
resourceCulture = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
117
GUIs.Test.JobTest/My Project/Resources.resx
Normal file
117
GUIs.Test.JobTest/My Project/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?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>
|
||||||
73
GUIs.Test.JobTest/My Project/Settings.Designer.vb
generated
Normal file
73
GUIs.Test.JobTest/My Project/Settings.Designer.vb
generated
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' This code was generated by a tool.
|
||||||
|
' Runtime Version:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
' the code is regenerated.
|
||||||
|
' </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", "11.0.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 "My.Settings Auto-Save Functionality"
|
||||||
|
#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(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||||
|
If My.Application.SaveMySettingsOnExit Then
|
||||||
|
My.Settings.Save()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
#End If
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Public Shared ReadOnly Property [Default]() As MySettings
|
||||||
|
Get
|
||||||
|
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
If Not addedHandler Then
|
||||||
|
SyncLock addedHandlerLockObject
|
||||||
|
If Not addedHandler Then
|
||||||
|
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||||
|
addedHandler = True
|
||||||
|
End If
|
||||||
|
End SyncLock
|
||||||
|
End If
|
||||||
|
#End If
|
||||||
|
Return defaultInstance
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<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.GUIs.Test.JobTest.My.MySettings
|
||||||
|
Get
|
||||||
|
Return Global.GUIs.Test.JobTest.My.MySettings.Default
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
7
GUIs.Test.JobTest/My Project/Settings.settings
Normal file
7
GUIs.Test.JobTest/My Project/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?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>
|
||||||
@ -86,8 +86,10 @@ Public Class ConfigManager(Of T)
|
|||||||
_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
|
||||||
_ComputerDirectory = _File.CreateDirectory(ComputerConfigPath)
|
_ComputerDirectory = _File.CreateDirectory(ComputerConfigPath)
|
||||||
_ComputerConfigPath = Path.Combine(_ComputerDirectory, COMPUTER_CONFIG_NAME)
|
_ComputerConfigPath = Path.Combine(_ComputerDirectory, COMPUTER_CONFIG_NAME)
|
||||||
|
End If
|
||||||
|
|
||||||
If ApplicationStartupPath <> String.Empty Then
|
If ApplicationStartupPath <> String.Empty Then
|
||||||
_AppConfigPath = Path.Combine(ApplicationStartupPath, APP_CONFIG_NAME)
|
_AppConfigPath = Path.Combine(ApplicationStartupPath, APP_CONFIG_NAME)
|
||||||
|
|||||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("0.0.7.1")>
|
<Assembly: AssemblyVersion("0.0.7.2")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|||||||
@ -64,21 +64,16 @@ Public Class MSSQLServer
|
|||||||
|
|
||||||
Private Function GetSQLConnection() As SqlConnection
|
Private Function GetSQLConnection() As SqlConnection
|
||||||
Try
|
Try
|
||||||
|
Dim oBuilder As New SqlConnectionStringBuilder() With {.ConnectionString = CurrentSQLConnectionString}
|
||||||
Dim oConnection As New SqlConnection(CurrentSQLConnectionString)
|
Dim oConnection As New SqlConnection(CurrentSQLConnectionString)
|
||||||
oConnection.Open()
|
oConnection.Open()
|
||||||
Dim OMyConnection As New SqlClient.SqlConnection(CurrentSQLConnectionString) 'csb.ConnectionString)
|
|
||||||
Dim csb As New SqlClient.SqlConnectionStringBuilder
|
|
||||||
csb.ConnectionString = CurrentSQLConnectionString
|
|
||||||
Dim constr = OMyConnection.ConnectionString
|
|
||||||
Try
|
|
||||||
constr = constr.Replace(csb.Password, "XXXXX")
|
|
||||||
Catch ex As Exception
|
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim oConnectionString = CurrentSQLConnectionString.Replace(oBuilder.Password, "XXXXX")
|
||||||
|
_Logger.Debug($"Following Connectionstring is open: {oConnectionString}")
|
||||||
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
'If constr.Contains("Trusted_Connection=True") = False Then
|
|
||||||
' constr = constr.Replace(csb.Password, "XXXXX")
|
|
||||||
'End If
|
|
||||||
_Logger.Debug($"Following Connectionstring is open: {constr}")
|
|
||||||
Return oConnection
|
Return oConnection
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
_Logger.Error(ex)
|
_Logger.Error(ex)
|
||||||
|
|||||||
@ -81,7 +81,7 @@ Public Class Client
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Using oStream As New FileStream(FilePath, FileMode.Open)
|
Using oStream As New FileStream(FilePath, FileMode.Open)
|
||||||
Dim oContents As Byte() = {}
|
Dim oContents(oStream.Length) As Byte
|
||||||
Dim oBytesRead = Await oStream.ReadAsync(oContents, 0, oStream.Length)
|
Dim oBytesRead = Await oStream.ReadAsync(oContents, 0, oStream.Length)
|
||||||
Dim oData As New DocumentImportRequest() With {
|
Dim oData As New DocumentImportRequest() With {
|
||||||
.FileName = oFileInfo.Name,
|
.FileName = oFileInfo.Name,
|
||||||
|
|||||||
@ -80,9 +80,7 @@
|
|||||||
<Compile Include="EncryptionLegacy.vb" />
|
<Compile Include="EncryptionLegacy.vb" />
|
||||||
<Compile Include="FileContainer.vb" />
|
<Compile Include="FileContainer.vb" />
|
||||||
<Compile Include="Encryption.vb" />
|
<Compile Include="Encryption.vb" />
|
||||||
<Compile Include="File.vb">
|
<Compile Include="File.vb" />
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="FileContainerInner.vb" />
|
<Compile Include="FileContainerInner.vb" />
|
||||||
<Compile Include="FileWatcher.vb" />
|
<Compile Include="FileWatcher.vb" />
|
||||||
<Compile Include="FileWatcherFilters.vb" />
|
<Compile Include="FileWatcherFilters.vb" />
|
||||||
|
|||||||
@ -44,7 +44,7 @@ Public Class GraphQLInterface
|
|||||||
Dim oFoundCerts = oStore.Certificates.Find(X509FindType.FindByThumbprint, CertificateFingerprint, False)
|
Dim oFoundCerts = oStore.Certificates.Find(X509FindType.FindByThumbprint, CertificateFingerprint, False)
|
||||||
|
|
||||||
If oFoundCerts.Count = 0 Then
|
If oFoundCerts.Count = 0 Then
|
||||||
MsgBox($"Das Zertifikat mit dem Fingerprint [{CertificateFingerprint}] konnte nicht im Store [{oStore.Name}] gefunden werden!")
|
_logger.Warn("Certificate could not be found! Exiting.")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -122,6 +122,7 @@ Public Class GraphQLInterface
|
|||||||
oRequest.ContentLength = PostData.Length
|
oRequest.ContentLength = PostData.Length
|
||||||
oRequest.ClientCertificates.Add(_certificate)
|
oRequest.ClientCertificates.Add(_certificate)
|
||||||
oRequest.CookieContainer = GetCookies()
|
oRequest.CookieContainer = GetCookies()
|
||||||
|
|
||||||
oRequest.Proxy = Nothing
|
oRequest.Proxy = Nothing
|
||||||
|
|
||||||
If Proxy Is Nothing Then
|
If Proxy Is Nothing Then
|
||||||
|
|||||||
@ -1,9 +1,5 @@
|
|||||||
Public Class GraphQLArgs
|
Public Class GraphQLArgs
|
||||||
Inherits JobArgs
|
Inherits JobArgs
|
||||||
|
|
||||||
Public CertificateFile As String
|
Public QueryConfigPath As String
|
||||||
Public CertificatePassword As String
|
|
||||||
Public Email As String
|
|
||||||
Public Password As String
|
|
||||||
Public BaseUrl As String
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
27
Modules.Jobs/EDMI/GraphQL/GraphQLConfig.vb
Normal file
27
Modules.Jobs/EDMI/GraphQL/GraphQLConfig.vb
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
Imports System.Collections.Generic
|
||||||
|
|
||||||
|
Public Class GraphQLConfig
|
||||||
|
Public Property BaseUrl As String = ""
|
||||||
|
Public Property Email As String = ""
|
||||||
|
Public Property Password As String = ""
|
||||||
|
Public Property CertificateFingerprint As String = ""
|
||||||
|
Public Property Queries As New List(Of Query)
|
||||||
|
|
||||||
|
Public Class Query
|
||||||
|
Public Property Name As String
|
||||||
|
Public Property ConnectionString As String = ""
|
||||||
|
Public Property ClearBeforeFill As Boolean = False
|
||||||
|
Public Property QueryString As String = ""
|
||||||
|
Public Property OperationName As String = ""
|
||||||
|
Public Property DestinationTable As String = ""
|
||||||
|
|
||||||
|
Public Property MappingBasePath As String = ""
|
||||||
|
Public Property MappingFields As New List(Of FieldMapping)
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class FieldMapping
|
||||||
|
Public SourcePath As String = ""
|
||||||
|
Public DestinationColumn As String = ""
|
||||||
|
Public Value As String = ""
|
||||||
|
End Class
|
||||||
|
End Class
|
||||||
@ -1,7 +1,12 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports DigitalData.Modules.Interfaces
|
Imports DigitalData.Modules.Interfaces
|
||||||
Imports DigitalData.Modules.Jobs
|
Imports DigitalData.Modules.Jobs
|
||||||
|
Imports DigitalData.Modules.Config
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
|
Imports Newtonsoft.Json.Linq
|
||||||
|
Imports System.Collections.Generic
|
||||||
|
Imports System.Linq
|
||||||
|
Imports System.Text.RegularExpressions
|
||||||
|
|
||||||
Public Class GraphQLJob
|
Public Class GraphQLJob
|
||||||
Inherits JobBase
|
Inherits JobBase
|
||||||
@ -12,37 +17,31 @@ Public Class GraphQLJob
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Start(Args As GraphQLArgs) Implements IJob(Of GraphQLArgs).Start
|
Public Sub Start(Args As GraphQLArgs) Implements IJob(Of GraphQLArgs).Start
|
||||||
Dim oInterface As New GraphQLInterface(
|
Try
|
||||||
_LogConfig, Args.BaseUrl, Args.Email, Args.Password, Args.CertificateFile, Args.CertificatePassword)
|
Dim oConfigPath As String = Args.QueryConfigPath
|
||||||
|
Dim oConfigManager As New ConfigManager(Of GraphQLConfig)(_LogConfig, oConfigPath)
|
||||||
|
|
||||||
Dim oQuery = "query Nls{
|
Dim oInterface As GraphQLInterface
|
||||||
niederlassungen(offset: 0, limit: 5) {
|
|
||||||
niederlassungen {
|
|
||||||
mdnr
|
|
||||||
bezeichnung
|
|
||||||
sparte {
|
|
||||||
id
|
|
||||||
name
|
|
||||||
__typename
|
|
||||||
}
|
|
||||||
__typename
|
|
||||||
}
|
|
||||||
__typename
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
|
|
||||||
_Logger.Info("Logging in..")
|
With oConfigManager.Config
|
||||||
|
oInterface = New GraphQLInterface(_LogConfig, .BaseUrl, .Email, .Password, .CertificateFingerprint)
|
||||||
|
End With
|
||||||
|
|
||||||
' Login to get cookie
|
' Login to get cookie
|
||||||
|
_Logger.Debug("Logging in")
|
||||||
Dim oLoginResponse = oInterface.Login()
|
Dim oLoginResponse = oInterface.Login()
|
||||||
|
|
||||||
' save cookie for future requests
|
' save cookie for future requests
|
||||||
oInterface.SaveCookies(oLoginResponse.Cookies.Item(0))
|
oInterface.SaveCookies(oLoginResponse.Cookies.Item(0))
|
||||||
|
|
||||||
_Logger.Info("Getting the data..")
|
_Logger.Debug("Getting the data")
|
||||||
|
|
||||||
|
For Each oQuery As GraphQLConfig.Query In oConfigManager.Config.Queries
|
||||||
|
Dim oCurrentQuery = oQuery
|
||||||
|
Dim oDatabase As New Database.MSSQLServer(_LogConfig, oQuery.ConnectionString)
|
||||||
|
|
||||||
' get the data
|
' get the data
|
||||||
Dim oDataResponse = oInterface.GetData(oQuery, "Nls")
|
Dim oDataResponse = oInterface.GetData(oCurrentQuery.QueryString, oCurrentQuery.OperationName)
|
||||||
Dim oResult As String
|
Dim oResult As String
|
||||||
|
|
||||||
' write data to string
|
' write data to string
|
||||||
@ -52,16 +51,64 @@ Public Class GraphQLJob
|
|||||||
End Using
|
End Using
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
' TODO: save data to file
|
HandleResponse(oResult, oCurrentQuery, oDatabase)
|
||||||
_Logger.Info("Response is:")
|
Next
|
||||||
_Logger.Info(oResult)
|
|
||||||
|
|
||||||
_Logger.Info("Logging out..")
|
|
||||||
|
|
||||||
' logout
|
' logout
|
||||||
|
_Logger.Debug("Logging out")
|
||||||
Dim oLogoutResponse = oInterface.Logout()
|
Dim oLogoutResponse = oInterface.Logout()
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
Throw ex
|
||||||
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function HandleResponse(JsonString As String, QueryData As GraphQLConfig.Query, DB As Database.MSSQLServer)
|
||||||
|
Dim oObj As JObject = JObject.Parse(JsonString)
|
||||||
|
Dim oResultList = oObj.SelectToken(QueryData.MappingBasePath)
|
||||||
|
Dim oMappings = QueryData.MappingFields
|
||||||
|
|
||||||
|
_Logger.Info("Processing Queue [{0}] with [{1}] Items", QueryData.Name, oResultList.Count)
|
||||||
|
|
||||||
|
If QueryData.ClearBeforeFill Then
|
||||||
|
_Logger.Info("Clearing Table {0} before insert", QueryData.DestinationTable)
|
||||||
|
Try
|
||||||
|
DB.ExecuteNonQuery($"DELETE FROM {QueryData.DestinationTable}")
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each oResultItem In oResultList
|
||||||
|
Try
|
||||||
|
Dim oValues As New List(Of String)
|
||||||
|
Dim oKeys As New List(Of String)
|
||||||
|
|
||||||
|
For Each oMapping In oMappings
|
||||||
|
Dim oValue = oResultItem.SelectToken(oMapping.SourcePath).ToString()
|
||||||
|
|
||||||
|
oValues.Add(oValue)
|
||||||
|
oKeys.Add(oMapping.DestinationColumn)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim oColumnValues = oValues.
|
||||||
|
Select(Function(Value) Regex.Replace(Value, "'", "''")).
|
||||||
|
Select(Function(Value) $"'{Value}'").
|
||||||
|
ToList()
|
||||||
|
Dim oValueString = String.Join(",", oColumnValues)
|
||||||
|
|
||||||
|
Dim oColumns = String.Join(",", oKeys.ToArray)
|
||||||
|
Dim oSQL As String = $"INSERT INTO {QueryData.DestinationTable} ({oColumns}) VALUES ({oValueString})"
|
||||||
|
|
||||||
|
DB.ExecuteNonQuery(oSQL)
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return QueryData
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function ShouldStart(Arguments As GraphQLArgs) As Boolean Implements IJob(Of GraphQLArgs).ShouldStart
|
Public Function ShouldStart(Arguments As GraphQLArgs) As Boolean Implements IJob(Of GraphQLArgs).ShouldStart
|
||||||
Return Arguments.Enabled
|
Return Arguments.Enabled
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
Public Class JobConfig
|
Public Class JobConfig
|
||||||
Public Enabled As Boolean
|
Public Enabled As Boolean
|
||||||
|
Public StartImmediately As Boolean
|
||||||
Public CronExpression As String
|
Public CronExpression As String
|
||||||
Public Arguments As Dictionary(Of String, String)
|
Public Arguments As Dictionary(Of String, String)
|
||||||
End Class
|
End Class
|
||||||
@ -2,7 +2,7 @@
|
|||||||
Imports System.Text.RegularExpressions
|
Imports System.Text.RegularExpressions
|
||||||
|
|
||||||
Public Class JobConfigParser
|
Public Class JobConfigParser
|
||||||
Private Shared JobOptionsRegex As New Regex("(?<enabled>True|False)\|(?<cron>[\w\d\s,\?*-/]*)(?:\|(?<args>(?:\w*::[^,\n]+,?)*))?")
|
Private Shared JobOptionsRegex As New Regex("(?<enabled>True|False|Debug)\|(?<cron>[\w\d\s,\?*-/]*)(?:\|(?<args>(?:\w*::[^,\n]+,?)*))?")
|
||||||
Private Shared JobArgumentsRegex As New Regex("(?:(?:\w+::[^,\n]+,?)?)+")
|
Private Shared JobArgumentsRegex As New Regex("(?:(?:\w+::[^,\n]+,?)?)+")
|
||||||
Private Const ARGS_ITEM_DELIMITER As String = ","
|
Private Const ARGS_ITEM_DELIMITER As String = ","
|
||||||
Private Const ARGS_KEYVALUE_DELIMITER As String = "::"
|
Private Const ARGS_KEYVALUE_DELIMITER As String = "::"
|
||||||
@ -21,11 +21,11 @@ Public Class JobConfigParser
|
|||||||
Dim oSplitOptions As String() = ConfigString.Split(ARGS_LIST_DELIMITER)
|
Dim oSplitOptions As String() = ConfigString.Split(ARGS_LIST_DELIMITER)
|
||||||
|
|
||||||
If oSplitOptions.Length = 3 Then
|
If oSplitOptions.Length = 3 Then
|
||||||
oOptions.Enabled = CBool(oSplitOptions(0))
|
oOptions = ParseEnabled(oSplitOptions(0), oOptions)
|
||||||
oOptions.CronExpression = oSplitOptions(1)
|
oOptions.CronExpression = oSplitOptions(1)
|
||||||
oOptions.Arguments = ParseOptionalArguments(oSplitOptions(2))
|
oOptions.Arguments = ParseOptionalArguments(oSplitOptions(2))
|
||||||
ElseIf oSplitOptions.Length = 2 Then
|
ElseIf oSplitOptions.Length = 2 Then
|
||||||
oOptions.Enabled = CBool(oSplitOptions(0))
|
oOptions = ParseEnabled(oSplitOptions(0), oOptions)
|
||||||
oOptions.CronExpression = oSplitOptions(1)
|
oOptions.CronExpression = oSplitOptions(1)
|
||||||
oOptions.Arguments = New Dictionary(Of String, String)
|
oOptions.Arguments = New Dictionary(Of String, String)
|
||||||
Else
|
Else
|
||||||
@ -38,6 +38,22 @@ Public Class JobConfigParser
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function ParseEnabled(EnabledValue As String, Options As JobConfig) As JobConfig
|
||||||
|
Select Case EnabledValue
|
||||||
|
Case "True"
|
||||||
|
Options.Enabled = True
|
||||||
|
Options.StartImmediately = False
|
||||||
|
Case "Debug"
|
||||||
|
Options.Enabled = True
|
||||||
|
Options.StartImmediately = True
|
||||||
|
Case Else
|
||||||
|
Options.Enabled = False
|
||||||
|
Options.StartImmediately = False
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Return Options
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Shared Function ParseOptionalArguments(ArgsString As String) As Dictionary(Of String, String)
|
Private Shared Function ParseOptionalArguments(ArgsString As String) As Dictionary(Of String, String)
|
||||||
Dim oArgsDictionary As New Dictionary(Of String, String)
|
Dim oArgsDictionary As New Dictionary(Of String, String)
|
||||||
|
|
||||||
|
|||||||
@ -64,6 +64,10 @@
|
|||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Modules.Config\Config.vbproj">
|
||||||
|
<Project>{44982f9b-6116-44e2-85d0-f39650b1ef99}</Project>
|
||||||
|
<Name>Config</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\Modules.Filesystem\Filesystem.vbproj">
|
<ProjectReference Include="..\Modules.Filesystem\Filesystem.vbproj">
|
||||||
<Project>{991d0231-4623-496d-8bd0-9ca906029cbc}</Project>
|
<Project>{991d0231-4623-496d-8bd0-9ca906029cbc}</Project>
|
||||||
<Name>Filesystem</Name>
|
<Name>Filesystem</Name>
|
||||||
@ -85,6 +89,7 @@
|
|||||||
<Compile Include="EDMI\ADSync\ADSyncArgs.vb" />
|
<Compile Include="EDMI\ADSync\ADSyncArgs.vb" />
|
||||||
<Compile Include="EDMI\ADSync\ADSyncJob.vb" />
|
<Compile Include="EDMI\ADSync\ADSyncJob.vb" />
|
||||||
<Compile Include="EDMI\GraphQL\GraphQLArgs.vb" />
|
<Compile Include="EDMI\GraphQL\GraphQLArgs.vb" />
|
||||||
|
<Compile Include="EDMI\GraphQL\GraphQLConfig.vb" />
|
||||||
<Compile Include="EDMI\GraphQL\GraphQLJob.vb" />
|
<Compile Include="EDMI\GraphQL\GraphQLJob.vb" />
|
||||||
<Compile Include="EDMI\ZUGFeRD\EmailData.vb" />
|
<Compile Include="EDMI\ZUGFeRD\EmailData.vb" />
|
||||||
<Compile Include="EDMI\ZUGFeRD\EmailFunctions.vb" />
|
<Compile Include="EDMI\ZUGFeRD\EmailFunctions.vb" />
|
||||||
@ -109,6 +114,9 @@
|
|||||||
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.6.4.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
|
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.6.4.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|||||||
@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.2.0.1")>
|
<Assembly: AssemblyVersion("1.3.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
||||||
|
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
|
||||||
<package id="NLog" version="4.7.0" targetFramework="net461" />
|
<package id="NLog" version="4.7.0" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -56,7 +56,13 @@ Imports NLog.Targets
|
|||||||
''' </remarks>
|
''' </remarks>
|
||||||
Public Class LogConfig
|
Public Class LogConfig
|
||||||
#Region "Private Properties"
|
#Region "Private Properties"
|
||||||
|
Private Const OPEN_FILE_CACHE_TIMEOUT As Integer = 5
|
||||||
|
Private Const OPEN_FILE_FLUSH_TIMEOUT As Integer = 5
|
||||||
|
Private Const AUTO_FLUSH As Boolean = True
|
||||||
|
|
||||||
Private Const KEEP_FILES_OPEN As Boolean = False
|
Private Const KEEP_FILES_OPEN As Boolean = False
|
||||||
|
Private Const KEEP_FILES_OPEN_DEBUG As Boolean = True
|
||||||
|
|
||||||
' MAX_ARCHIVES_FILES works like this (in version 4.5.8):
|
' MAX_ARCHIVES_FILES works like this (in version 4.5.8):
|
||||||
' 0 = keep ALL archives files
|
' 0 = keep ALL archives files
|
||||||
' 1 = only keep latest logfile and NO archive files
|
' 1 = only keep latest logfile and NO archive files
|
||||||
@ -427,7 +433,10 @@ Public Class LogConfig
|
|||||||
.Layout = LOG_FORMAT_DEBUG,
|
.Layout = LOG_FORMAT_DEBUG,
|
||||||
.MaxArchiveFiles = MAX_ARCHIVE_FILES_DEBUG_DETAIL,
|
.MaxArchiveFiles = MAX_ARCHIVE_FILES_DEBUG_DETAIL,
|
||||||
.ArchiveEvery = ARCHIVE_EVERY,
|
.ArchiveEvery = ARCHIVE_EVERY,
|
||||||
.KeepFileOpen = KEEP_FILES_OPEN
|
.KeepFileOpen = KEEP_FILES_OPEN_DEBUG,
|
||||||
|
.OpenFileCacheTimeout = OPEN_FILE_CACHE_TIMEOUT,
|
||||||
|
.AutoFlush = AUTO_FLUSH,
|
||||||
|
.OpenFileFlushTimeout = OPEN_FILE_FLUSH_TIMEOUT
|
||||||
}
|
}
|
||||||
|
|
||||||
Return debugLog
|
Return debugLog
|
||||||
|
|||||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.0.1.0")>
|
<Assembly: AssemblyVersion("2.0.2.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
<value>True|10/0 * * * * ?|Foo::Bar</value>
|
<value>True|10/0 * * * * ?|Foo::Bar</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="GRAPHQL_CONFIG" serializeAs="String">
|
<setting name="GRAPHQL_CONFIG" serializeAs="String">
|
||||||
<value>False|0 0 0/1 * * ?|CertPath::E:\jonathanjenne.pfx,CertPass::jonathanjenne,Username::j.jenne@digitaldata.works,Password::DigitalData01!,BaseUrl::http://data.api.wisag.de:8090</value>
|
<value>False|0 0 0/1 * * ?|QueryConfigFolder::E:\JenneJ\GraphQL</value>
|
||||||
</setting>
|
</setting>
|
||||||
</DigitalData.Services.JobRunner.My.MySettings>
|
</DigitalData.Services.JobRunner.My.MySettings>
|
||||||
</applicationSettings>
|
</applicationSettings>
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
Imports System.Collections.Specialized
|
Imports System.Collections.Specialized
|
||||||
Imports System.Text.RegularExpressions
|
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Modules.Jobs
|
Imports DigitalData.Modules.Jobs
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
@ -65,7 +64,7 @@ Public Class JobRunner
|
|||||||
{"Args", oJobConfig.Arguments}
|
{"Args", oJobConfig.Arguments}
|
||||||
}
|
}
|
||||||
|
|
||||||
Dim oJobDetail = JobBuilder.Create(Of T)().
|
Dim oJob = JobBuilder.Create(Of T)().
|
||||||
WithIdentity(oJobIdentity).
|
WithIdentity(oJobIdentity).
|
||||||
UsingJobData(oJobData).
|
UsingJobData(oJobData).
|
||||||
Build()
|
Build()
|
||||||
@ -77,11 +76,28 @@ Public Class JobRunner
|
|||||||
Build()
|
Build()
|
||||||
|
|
||||||
If oJobConfig.Enabled Then
|
If oJobConfig.Enabled Then
|
||||||
Await _scheduler.ScheduleJob(oJobDetail, oTrigger)
|
Await _scheduler.ScheduleJob(oJob, oTrigger)
|
||||||
_Logger.Info("Job {0} started.", JobName)
|
|
||||||
|
_Logger.Info("Job {0} scheduled.", JobName)
|
||||||
Else
|
Else
|
||||||
_Logger.Info("Job {0} is disabled.", JobName)
|
_Logger.Info("Job {0} is disabled.", JobName)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' If StartImmediately is True, start Job after 10 Seconds
|
||||||
|
If oJobConfig.StartImmediately Then
|
||||||
|
Dim oDebugJob = JobBuilder.Create(Of T)().
|
||||||
|
WithIdentity(oJobIdentity & "-DEBUG").
|
||||||
|
UsingJobData(oJobData).
|
||||||
|
Build()
|
||||||
|
|
||||||
|
Dim oDebugTrigger = TriggerBuilder.Create().
|
||||||
|
WithIdentity(oTriggerIdentity & "-DEBUG").
|
||||||
|
StartAt(DateBuilder.FutureDate(10, IntervalUnit.Second)).
|
||||||
|
Build()
|
||||||
|
|
||||||
|
_Logger.Info("Job {0} will start in 10 Seconds.", JobName)
|
||||||
|
Await _scheduler.ScheduleJob(oDebugJob, oDebugTrigger)
|
||||||
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Async Sub [Stop]()
|
Public Async Sub [Stop]()
|
||||||
@ -92,7 +108,7 @@ Public Class JobRunner
|
|||||||
Private Class LogProvider
|
Private Class LogProvider
|
||||||
Implements ILogProvider
|
Implements ILogProvider
|
||||||
|
|
||||||
Private _Logger As DigitalData.Modules.Logging.Logger
|
Private _Logger As Modules.Logging.Logger
|
||||||
|
|
||||||
Public Sub New(Logger As DigitalData.Modules.Logging.Logger)
|
Public Sub New(Logger As DigitalData.Modules.Logging.Logger)
|
||||||
MyBase.New()
|
MyBase.New()
|
||||||
|
|||||||
@ -147,6 +147,10 @@
|
|||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Modules.Config\Config.vbproj">
|
||||||
|
<Project>{44982f9b-6116-44e2-85d0-f39650b1ef99}</Project>
|
||||||
|
<Name>Config</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\Modules.Database\Database.vbproj">
|
<ProjectReference Include="..\Modules.Database\Database.vbproj">
|
||||||
<Project>{EAF0EA75-5FA7-485D-89C7-B2D843B03A96}</Project>
|
<Project>{EAF0EA75-5FA7-485D-89C7-B2D843B03A96}</Project>
|
||||||
<Name>Database</Name>
|
<Name>Database</Name>
|
||||||
|
|||||||
@ -11,10 +11,7 @@ Public Class GraphQLJob
|
|||||||
Dim oLogConfig As LogConfig = oJobData.Item("LogConfig")
|
Dim oLogConfig As LogConfig = oJobData.Item("LogConfig")
|
||||||
Dim oArgs As Dictionary(Of String, String) = oJobData.Item("Args")
|
Dim oArgs As Dictionary(Of String, String) = oJobData.Item("Args")
|
||||||
Dim oJobArgs = New GraphQLArgs With {
|
Dim oJobArgs = New GraphQLArgs With {
|
||||||
.CertificateFile = oArgs.Item("CertFile"),
|
.QueryConfigPath = oArgs.Item("QueryConfigFolder")
|
||||||
.CertificatePassword = oArgs.Item("CertPass"),
|
|
||||||
.Email = oArgs.Item("Username"),
|
|
||||||
.Password = oArgs.Item("Password")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Dim oGraphQLJob As New Modules.Jobs.GraphQLJob(oLogConfig)
|
Dim oGraphQLJob As New Modules.Jobs.GraphQLJob(oLogConfig)
|
||||||
|
|||||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
<Assembly: AssemblyVersion("1.0.2.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|||||||
@ -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", "16.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
|
||||||
@ -138,9 +138,7 @@ Namespace My
|
|||||||
|
|
||||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
Global.System.Configuration.DefaultSettingValueAttribute("False|0 0 0/1 * * ?|CertPath::E:\jonathanjenne.pfx,CertPass::jonathanjenne,Userna"& _
|
Global.System.Configuration.DefaultSettingValueAttribute("False|0 0 0/1 * * ?|QueryConfigFolder::E:\JenneJ\GraphQL")> _
|
||||||
"me::j.jenne@digitaldata.works,Password::DigitalData01!,BaseUrl::http://data.api."& _
|
|
||||||
"wisag.de:8090")> _
|
|
||||||
Public ReadOnly Property GRAPHQL_CONFIG() As String
|
Public ReadOnly Property GRAPHQL_CONFIG() As String
|
||||||
Get
|
Get
|
||||||
Return CType(Me("GRAPHQL_CONFIG"),String)
|
Return CType(Me("GRAPHQL_CONFIG"),String)
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
<Value Profile="(Default)">True|10/0 * * * * ?|Foo::Bar</Value>
|
<Value Profile="(Default)">True|10/0 * * * * ?|Foo::Bar</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="GRAPHQL_CONFIG" Type="System.String" Scope="Application">
|
<Setting Name="GRAPHQL_CONFIG" Type="System.String" Scope="Application">
|
||||||
<Value Profile="(Default)">False|0 0 0/1 * * ?|CertPath::E:\jonathanjenne.pfx,CertPass::jonathanjenne,Username::j.jenne@digitaldata.works,Password::DigitalData01!,BaseUrl::http://data.api.wisag.de:8090</Value>
|
<Value Profile="(Default)">False|0 0 0/1 * * ?|QueryConfigFolder::E:\JenneJ\GraphQL</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
||||||
Loading…
x
Reference in New Issue
Block a user