Clean up
This commit is contained in:
parent
c43903154c
commit
13c7816c16
@ -10,8 +10,6 @@ Public Class ClassCurrent
|
|||||||
|
|
||||||
Public Shared Property CURRENT_EMAIL_GUID As Integer
|
Public Shared Property CURRENT_EMAIL_GUID As Integer
|
||||||
Public Shared Property CURRENT_PROFILE_GUID As Integer
|
Public Shared Property CURRENT_PROFILE_GUID As Integer
|
||||||
Public Shared Property DTCONFIG As DataTable
|
|
||||||
Public Shared Property DT_ECM_BASE_CONFIG As DataTable
|
|
||||||
|
|
||||||
Public Shared Property DT_POLL_PROCESS As DataTable
|
Public Shared Property DT_POLL_PROCESS As DataTable
|
||||||
Public Shared Property DT_STEPS As DataTable
|
Public Shared Property DT_STEPS As DataTable
|
||||||
@ -35,7 +33,6 @@ Public Class ClassCurrent
|
|||||||
Public Shared Property CURRENT_POLL_TYPE As String
|
Public Shared Property CURRENT_POLL_TYPE As String
|
||||||
|
|
||||||
Public Shared Property POLL_STEP_GUID As Integer
|
Public Shared Property POLL_STEP_GUID As Integer
|
||||||
Public Shared Property POLL_STEP_PROCESS_ID As Integer
|
|
||||||
Public Shared Property POLL_KEYWORDS As String
|
Public Shared Property POLL_KEYWORDS As String
|
||||||
Public Shared Property KEYWORDS_SPLIT As String()
|
Public Shared Property KEYWORDS_SPLIT As String()
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,7 @@ Public Class MailContainer
|
|||||||
''' The subject, truncated to SUBJECT_MAX_LENGTH characters
|
''' The subject, truncated to SUBJECT_MAX_LENGTH characters
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public ReadOnly Property Subject As String
|
Public ReadOnly Property Subject As String
|
||||||
|
Public ReadOnly Property SubjectOriginal As String
|
||||||
|
|
||||||
Public ReadOnly Property SenderDomain As String
|
Public ReadOnly Property SenderDomain As String
|
||||||
Public ReadOnly Property SenderAddress As String
|
Public ReadOnly Property SenderAddress As String
|
||||||
@ -34,9 +35,10 @@ Public Class MailContainer
|
|||||||
ImapId = pImapId
|
ImapId = pImapId
|
||||||
|
|
||||||
MessageIdOriginal = pMail.MessageID
|
MessageIdOriginal = pMail.MessageID
|
||||||
MessageId = StringEx.GetHash(pMail.MessageID)
|
MessageId = StringEx.GetShortHash(pMail.MessageID)
|
||||||
|
|
||||||
Subject = ObjectEx.NotNull(pMail.Subject.Truncate(SUBJECT_MAX_LENGTH), String.Empty)
|
Subject = ObjectEx.NotNull(pMail.Subject.Truncate(SUBJECT_MAX_LENGTH), String.Empty)
|
||||||
|
SubjectOriginal = ObjectEx.NotNull(pMail.Subject, String.Empty)
|
||||||
|
|
||||||
SenderAddress = GetSenderAddress(pMail)
|
SenderAddress = GetSenderAddress(pMail)
|
||||||
SenderDomain = GetSenderDomain(pMail)
|
SenderDomain = GetSenderDomain(pMail)
|
||||||
|
|||||||
@ -30,7 +30,7 @@ Public Class clsWorkEmail
|
|||||||
''' Primary Mail Identifier.
|
''' Primary Mail Identifier.
|
||||||
''' Is a hash of the MessageId, used to be the MessageId itself.
|
''' Is a hash of the MessageId, used to be the MessageId itself.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Private Property CURRENT_MAIL_MESSAGE_ID As String = ""
|
'Private Property CURRENT_MAIL_MESSAGE_ID As String = ""
|
||||||
|
|
||||||
Private CurrentMailProcessName As String
|
Private CurrentMailProcessName As String
|
||||||
|
|
||||||
@ -69,11 +69,6 @@ Public Class clsWorkEmail
|
|||||||
_Logger.Error(ex)
|
_Logger.Error(ex)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Public Shared Function RemoveIllegalFileNameChars(input As String, Optional replacement As String = "") As String
|
|
||||||
Dim regexSearch = New String(Path.GetInvalidFileNameChars()) & New String(Path.GetInvalidPathChars())
|
|
||||||
Dim r = New Regex(String.Format("[{0}]", Regex.Escape(regexSearch)))
|
|
||||||
Return r.Replace(input, replacement)
|
|
||||||
End Function
|
|
||||||
Public Function WorkEmailMessage(pMailMessage As IMail, poUID As Long) As Boolean
|
Public Function WorkEmailMessage(pMailMessage As IMail, poUID As Long) As Boolean
|
||||||
Try
|
Try
|
||||||
For Each m As MailBox In pMailMessage.From
|
For Each m As MailBox In pMailMessage.From
|
||||||
@ -99,7 +94,7 @@ Public Class clsWorkEmail
|
|||||||
' 28.07.23
|
' 28.07.23
|
||||||
' The SHA256 Hash is now truncated to half the size
|
' The SHA256 Hash is now truncated to half the size
|
||||||
' which should be a good balance between uniqueness and length
|
' which should be a good balance between uniqueness and length
|
||||||
CURRENT_MAIL_MESSAGE_ID = StringEx.GetShortHash(pMailMessage.MessageID)
|
'CURRENT_MAIL_MESSAGE_ID = StringEx.GetShortHash(pMailMessage.MessageID)
|
||||||
|
|
||||||
'If String.IsNullOrEmpty(CURRENT_MAIL_MESSAGE_ID) Then
|
'If String.IsNullOrEmpty(CURRENT_MAIL_MESSAGE_ID) Then
|
||||||
' CURRENT_MAIL_MESSAGE_ID = Guid.NewGuid.ToString()
|
' CURRENT_MAIL_MESSAGE_ID = Guid.NewGuid.ToString()
|
||||||
@ -125,7 +120,7 @@ Public Class clsWorkEmail
|
|||||||
|
|
||||||
_Logger.Info($"Working on email from : {CURRENT_MAIL_FROM}...")
|
_Logger.Info($"Working on email from : {CURRENT_MAIL_FROM}...")
|
||||||
|
|
||||||
Dim osql = $"Select COALESCE(MAX(GUID),0) FROM TBEMLP_HISTORY WHERE EMAIL_MSGID = '{CURRENT_MAIL_MESSAGE_ID}'"
|
Dim osql = $"Select COALESCE(MAX(GUID),0) FROM TBEMLP_HISTORY WHERE EMAIL_MSGID = '{CurrentMail.MessageId}'"
|
||||||
Dim oHistoryID = _DB_MSSQL.GetScalarValue(osql)
|
Dim oHistoryID = _DB_MSSQL.GetScalarValue(osql)
|
||||||
|
|
||||||
If oHistoryID > 0 Then
|
If oHistoryID > 0 Then
|
||||||
@ -157,7 +152,7 @@ Public Class clsWorkEmail
|
|||||||
If CURRENT_ATTMT_COUNT = 0 Then
|
If CURRENT_ATTMT_COUNT = 0 Then
|
||||||
_Logger.Info("### Mail contained no Attachments!! ###")
|
_Logger.Info("### Mail contained no Attachments!! ###")
|
||||||
Dim oBody = EmailStrings.EMAIL_NO_FERDS
|
Dim oBody = EmailStrings.EMAIL_NO_FERDS
|
||||||
If AddToEmailQueueMSSQL(CURRENT_MAIL_MESSAGE_ID, oBody, "No Attachments", _EmailAccountID) = True Then
|
If AddToEmailQueueMSSQL(CurrentMail.MessageId, oBody, "No Attachments", _EmailAccountID) = True Then
|
||||||
CURRENT_ImapObject.DeleteMessageByUID(poUID)
|
CURRENT_ImapObject.DeleteMessageByUID(poUID)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -419,6 +414,7 @@ Public Class clsWorkEmail
|
|||||||
|
|
||||||
Private Function SAVE2TEMP(pCurrentMail As MailContainer) As Boolean
|
Private Function SAVE2TEMP(pCurrentMail As MailContainer) As Boolean
|
||||||
Dim oTempFilename As String
|
Dim oTempFilename As String
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim oTempPath As String = Path.Combine(Path.GetTempPath, "DD_EmailProfiler")
|
Dim oTempPath As String = Path.Combine(Path.GetTempPath, "DD_EmailProfiler")
|
||||||
_Logger.Debug($"oTempPath is: {oTempPath} ...")
|
_Logger.Debug($"oTempPath is: {oTempPath} ...")
|
||||||
@ -439,24 +435,12 @@ Public Class clsWorkEmail
|
|||||||
' Subject can be SUBJECT_MAX_LENGTH chars at most,
|
' Subject can be SUBJECT_MAX_LENGTH chars at most,
|
||||||
' otherwise we run into errors with the path being too long
|
' otherwise we run into errors with the path being too long
|
||||||
'Dim oSubjectFilename = CURRENT_MAIL_MESSAGE.Subject.Truncate(SUBJECT_MAX_LENGTH) & ".eml"
|
'Dim oSubjectFilename = CURRENT_MAIL_MESSAGE.Subject.Truncate(SUBJECT_MAX_LENGTH) & ".eml"
|
||||||
Dim oSubjectFilename = CURRENT_MAIL_MESSAGE_ID & ".eml"
|
Dim oSubjectFilename = pCurrentMail.MessageId & ".eml"
|
||||||
|
|
||||||
_Logger.Debug($"Filename (beforeclean) is: {oSubjectFilename}")
|
oSubjectFilename = StringEx.RemoveInvalidCharacters(oSubjectFilename)
|
||||||
oSubjectFilename = RemoveIllegalFileNameChars(oSubjectFilename)
|
|
||||||
oTempFilename = Path.Combine(oTempPath, oSubjectFilename)
|
oTempFilename = Path.Combine(oTempPath, oSubjectFilename)
|
||||||
_Logger.Debug($"Filepath (afterclean) is: {oTempFilename}")
|
_Logger.Debug($"Filepath is: {oTempFilename}")
|
||||||
|
|
||||||
|
|
||||||
'If File.Exists(oTempFilename) = True Then
|
|
||||||
' Do While File.Exists(oTempFilename)
|
|
||||||
' oCounter += 1
|
|
||||||
|
|
||||||
' oTempFilename = Path.Combine(oTempPath, oCounter & "_" & CURRENT_MAIL_MESSAGE.Subject.Replace(" ", "") & ".eml")
|
|
||||||
' oTempFilename = String.Join("", oTempFilename.Split(Path.GetInvalidPathChars()))
|
|
||||||
' oTempFilename = oTempFilename.Replace("/", "")
|
|
||||||
' oTempFilename = oTempFilename.Replace("\", "")
|
|
||||||
' Loop
|
|
||||||
'End If
|
|
||||||
pCurrentMail.Mail.Save(oTempFilename)
|
pCurrentMail.Mail.Save(oTempFilename)
|
||||||
CurrentTempMailPath = oTempFilename
|
CurrentTempMailPath = oTempFilename
|
||||||
|
|
||||||
@ -513,7 +497,7 @@ Public Class clsWorkEmail
|
|||||||
|
|
||||||
' 'oTempFilename &= "\" & CURRENT_MAIL_MESSAGE.Subject.Replace(" ", "") & ".eml"
|
' 'oTempFilename &= "\" & CURRENT_MAIL_MESSAGE.Subject.Replace(" ", "") & ".eml"
|
||||||
'End If
|
'End If
|
||||||
oTempFilename = Path.Combine(oTempFilename, $"{CURRENT_MAIL_MESSAGE_ID}.eml")
|
oTempFilename = Path.Combine(oTempFilename, $"{pCurrentMail.MessageId}.eml")
|
||||||
|
|
||||||
'Dim cleanPath As String = String.Join("", oTempFilename.Split(Path.GetInvalidPathChars()))
|
'Dim cleanPath As String = String.Join("", oTempFilename.Split(Path.GetInvalidPathChars()))
|
||||||
If File.Exists(oTempFilename) = False Then
|
If File.Exists(oTempFilename) = False Then
|
||||||
@ -557,7 +541,7 @@ Public Class clsWorkEmail
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
Private Function EXTRACT_BODY(pCurrentMail As MailContainer)
|
Private Function EXTRACT_BODY(pCurrentMail As MailContainer)
|
||||||
Dim oDTFunctionRegex As DataTable = _DB_MSSQL.GetDatatable("SELECT * FROM TBDD_FUNCTION_REGEX WHERE UPPER(FUNCTION_NAME) IN (UPPER('EMAIL_PROFILER - RemoveHTMLText'),UPPER('EMAIL_PROFILER - RemoveHTMLText1'))")
|
Dim oTable As DataTable = _DB_MSSQL.GetDatatable("SELECT * FROM TBDD_FUNCTION_REGEX WHERE UPPER(FUNCTION_NAME) IN (UPPER('EMAIL_PROFILER - RemoveHTMLText'),UPPER('EMAIL_PROFILER - RemoveHTMLText1'))")
|
||||||
|
|
||||||
Dim oBodyText As String = ""
|
Dim oBodyText As String = ""
|
||||||
If Not IsNothing(pCurrentMail.Mail.Text) Then
|
If Not IsNothing(pCurrentMail.Mail.Text) Then
|
||||||
@ -565,16 +549,18 @@ Public Class clsWorkEmail
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Not IsNothing(CURRENT_MAIL_BODY_ALL) Then
|
If Not IsNothing(CURRENT_MAIL_BODY_ALL) Then
|
||||||
|
Dim oRow = oTable.Rows.Item(0)
|
||||||
|
|
||||||
' CURRENT_MAIL_BODY_ALL = oMsg_email.Body
|
' CURRENT_MAIL_BODY_ALL = oMsg_email.Body
|
||||||
Dim oPattern1 As String
|
Dim oPattern1 As String
|
||||||
Dim oPattern2 As String
|
Dim oPattern2 As String
|
||||||
Try
|
Try
|
||||||
oPattern1 = oDTFunctionRegex.Rows(0).Item("REGEX")
|
oPattern1 = oTable.Rows(0).Item("REGEX")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
oPattern1 = ""
|
oPattern1 = ""
|
||||||
End Try
|
End Try
|
||||||
Try
|
Try
|
||||||
oPattern2 = oDTFunctionRegex.Rows(1).Item("REGEX")
|
oPattern2 = oTable.Rows(1).Item("REGEX")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
oPattern2 = ""
|
oPattern2 = ""
|
||||||
End Try
|
End Try
|
||||||
@ -641,13 +627,14 @@ Public Class clsWorkEmail
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
_Logger.Debug(String.Format("MailBody-ANSWER1:...[{0}]", CURRENT_MAIL_BODY_ANSWER1))
|
_Logger.Debug(String.Format("MailBody-ANSWER1:...[{0}]", CURRENT_MAIL_BODY_ANSWER1))
|
||||||
_Logger.Debug(String.Format("MailBody-ANSWER2:...[{0}]", CURRENT_MAIL_BODY_Substr2))
|
_Logger.Debug(String.Format("MailBody-ANSWER2:...[{0}]", CURRENT_MAIL_BODY_Substr2))
|
||||||
|
|
||||||
If CURRENT_MAIL_BODY_ANSWER1 = String.Empty Then
|
If CURRENT_MAIL_BODY_ANSWER1 = String.Empty Then
|
||||||
_Logger.Warn("CURRENT_MAIL_BODY_ANSWER1 is String.Empty: So the answer will interpreted as empty!")
|
_Logger.Warn("CURRENT_MAIL_BODY_ANSWER1 is String.Empty: So the answer will interpreted as empty!")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
_Logger.Error(ex)
|
_Logger.Error(ex)
|
||||||
'clsLogger.Add("Unexpected Error in COPY2HDD: " & ex.Message & "MESSAGE_ID: " & CURRENT_MAIL_MESSAGE.MessageID, True)
|
'clsLogger.Add("Unexpected Error in COPY2HDD: " & ex.Message & "MESSAGE_ID: " & CURRENT_MAIL_MESSAGE.MessageID, True)
|
||||||
@ -701,7 +688,7 @@ Public Class clsWorkEmail
|
|||||||
Dim oFilename = StringEx.ConvertTextToSlug(oFilenameWithoutExtension) & oFileInfo.Extension
|
Dim oFilename = StringEx.ConvertTextToSlug(oFilenameWithoutExtension) & oFileInfo.Extension
|
||||||
|
|
||||||
'Dim oAttachmentFileName = $"{CURRENT_MAIL_MESSAGE_ID}~{pCurrentMail.SenderDomain}~{oFilename}"
|
'Dim oAttachmentFileName = $"{CURRENT_MAIL_MESSAGE_ID}~{pCurrentMail.SenderDomain}~{oFilename}"
|
||||||
Dim oAttachmentFileName = $"{CURRENT_MAIL_MESSAGE_ID}~Attachment{oAttachmentCount}{oFileInfo.Extension}"
|
Dim oAttachmentFileName = $"{pCurrentMail.MessageId}~Attm{oAttachmentCount}{oFileInfo.Extension}"
|
||||||
|
|
||||||
_Logger.Debug("Final Filename for Attachment: [{0}]", oAttachmentFileName)
|
_Logger.Debug("Final Filename for Attachment: [{0}]", oAttachmentFileName)
|
||||||
|
|
||||||
@ -718,7 +705,7 @@ Public Class clsWorkEmail
|
|||||||
If oFileLenth > 2 Then
|
If oFileLenth > 2 Then
|
||||||
_Logger.Info(String.Format("Attachment saved to [{0}]", oAttachmentFilePath))
|
_Logger.Info(String.Format("Attachment saved to [{0}]", oAttachmentFilePath))
|
||||||
'INSERT_HISTORY_FB(CURRENT_MAIL_MESSAGE_ID, oAttachment.SafeFileName)
|
'INSERT_HISTORY_FB(CURRENT_MAIL_MESSAGE_ID, oAttachment.SafeFileName)
|
||||||
InsertAttachmentHistoryEntry(pCurrentMail, CURRENT_MAIL_MESSAGE_ID, oAttachment.SafeFileName)
|
InsertAttachmentHistoryEntry(pCurrentMail, pCurrentMail.MessageId, oAttachment.SafeFileName)
|
||||||
oAttachmentCount += 1
|
oAttachmentCount += 1
|
||||||
Else
|
Else
|
||||||
_Logger.Warn($"##!! oFileLenth for AttachmentObjects is <2 !!##")
|
_Logger.Warn($"##!! oFileLenth for AttachmentObjects is <2 !!##")
|
||||||
@ -767,16 +754,27 @@ Public Class clsWorkEmail
|
|||||||
|
|
||||||
Private Function InsertHistoryEntry(pCurrentMail As MailContainer) As Boolean
|
Private Function InsertHistoryEntry(pCurrentMail As MailContainer) As Boolean
|
||||||
If MessageError = False Then
|
If MessageError = False Then
|
||||||
Dim ins = $"INSERT INTO TBEMLP_HISTORY (WORK_PROCESS,EMAIL_MSGID,EMAIL_SUBJECT,EMAIL_DATE,EMAIL_BODY,EMAIL_SUBSTRING1,EMAIL_SUBSTRING2,EMAIL_FROM,PROFILE_ID) VALUES " &
|
Dim ins = $"INSERT INTO TBEMLP_HISTORY (
|
||||||
$"('{CurrentMailProcessName}'," &
|
WORK_PROCESS,
|
||||||
$"'{CURRENT_MAIL_MESSAGE_ID}'," &
|
EMAIL_MSGID,
|
||||||
$"'{CURRENT_MAIL_SUBJECT}'," &
|
EMAIL_SUBJECT,
|
||||||
$"'{pCurrentMail.Mail.Date}'," &
|
EMAIL_DATE,
|
||||||
$"'{CURRENT_MAIL_BODY_ALL}'," &
|
EMAIL_BODY,
|
||||||
$"'{CURRENT_MAIL_BODY_ANSWER1}'," &
|
EMAIL_SUBSTRING1,
|
||||||
$"'{CURRENT_MAIL_BODY_Substr2}'," &
|
EMAIL_SUBSTRING2,
|
||||||
$"'{CURRENT_MAIL_FROM}'," &
|
EMAIL_FROM,
|
||||||
$"{CURRENT_PROFILE_GUID})"
|
PROFILE_ID
|
||||||
|
) VALUES (
|
||||||
|
'{CurrentMailProcessName}',
|
||||||
|
'{pCurrentMail.MessageId}',
|
||||||
|
'{pCurrentMail.SubjectOriginal}',
|
||||||
|
'{pCurrentMail.Mail.Date}',
|
||||||
|
'{CURRENT_MAIL_BODY_ALL}',
|
||||||
|
'{CURRENT_MAIL_BODY_ANSWER1}',
|
||||||
|
'{CURRENT_MAIL_BODY_Substr2}',
|
||||||
|
'{pCurrentMail.SenderAddress}',
|
||||||
|
{CURRENT_PROFILE_GUID}
|
||||||
|
)"
|
||||||
Return _DB_MSSQL.ExecuteNonQuery(ins)
|
Return _DB_MSSQL.ExecuteNonQuery(ins)
|
||||||
Else
|
Else
|
||||||
_Logger.Info("! No INSERT_HISTORY as MessageError = True")
|
_Logger.Info("! No INSERT_HISTORY as MessageError = True")
|
||||||
@ -794,8 +792,8 @@ Public Class clsWorkEmail
|
|||||||
Dim ins = $"INSERT INTO TBEMLP_HISTORY_ATTACHMENT (WORK_PROCESS,EMAIL_MSGID,EMAIL_FROM,EMAIL_SUBJECT,EMAIL_DATETIME,EMAIL_BODY,EMAIL_ATTMT) VALUES " &
|
Dim ins = $"INSERT INTO TBEMLP_HISTORY_ATTACHMENT (WORK_PROCESS,EMAIL_MSGID,EMAIL_FROM,EMAIL_SUBJECT,EMAIL_DATETIME,EMAIL_BODY,EMAIL_ATTMT) VALUES " &
|
||||||
$"('{CurrentMailProcessName}'," &
|
$"('{CurrentMailProcessName}'," &
|
||||||
$"'{pMessageId}'," &
|
$"'{pMessageId}'," &
|
||||||
$"'{CURRENT_MAIL_FROM}'," &
|
$"'{pCurrentMail.SenderAddress}'," &
|
||||||
$"'{CURRENT_MAIL_SUBJECT}'," &
|
$"'{pCurrentMail.SubjectOriginal}'," &
|
||||||
$"'{pCurrentMail.Mail.Date}'," &
|
$"'{pCurrentMail.Mail.Date}'," &
|
||||||
$"'{CURRENT_MAIL_BODY_ALL}'," &
|
$"'{CURRENT_MAIL_BODY_ALL}'," &
|
||||||
$"'{pFileName}')"
|
$"'{pFileName}')"
|
||||||
@ -815,7 +813,6 @@ Public Class clsWorkEmail
|
|||||||
_worked_email = False
|
_worked_email = False
|
||||||
For Each row As DataRow In DT_STEPS.Rows
|
For Each row As DataRow In DT_STEPS.Rows
|
||||||
POLL_STEP_GUID = row.Item("GUID")
|
POLL_STEP_GUID = row.Item("GUID")
|
||||||
POLL_STEP_PROCESS_ID = row.Item("PROCESS_ID")
|
|
||||||
POLL_KEYWORDS = row.Item("KEYWORDS_BODY")
|
POLL_KEYWORDS = row.Item("KEYWORDS_BODY")
|
||||||
KEYWORDS_SPLIT = POLL_KEYWORDS.Split(";")
|
KEYWORDS_SPLIT = POLL_KEYWORDS.Split(";")
|
||||||
|
|
||||||
|
|||||||
@ -109,10 +109,9 @@ Public Class MyService
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Protected Overrides Sub OnStop()
|
Protected Overrides Sub OnStop()
|
||||||
' Hier Code zum Ausführen erforderlicher Löschvorgänge zum Beenden des Dienstes einfügen.
|
|
||||||
Logger.Info("## Service was stopped manually. ##")
|
Logger.Info("## Service was stopped manually. ##")
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub Worker_Completed(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) 'Handles threadDateiimport.RunWorkerCompleted
|
Private Sub Worker_Completed(sender As Object, e As RunWorkerCompletedEventArgs)
|
||||||
'This event fires when the DoWork event completes
|
'This event fires when the DoWork event completes
|
||||||
Try
|
Try
|
||||||
Dim result As String = ""
|
Dim result As String = ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user