MS HTTPS, Log,
This commit is contained in:
@@ -34,7 +34,12 @@ Public Class clsWindream_allgemein
|
||||
''' </summary>
|
||||
''' <remarks></remarks>
|
||||
Sub New(MyLogger As LogConfig)
|
||||
Logger = MyLogger.GetLogger()
|
||||
Try
|
||||
Logger = MyLogger.GetLogger()
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
' wenn ein Fehler bei der Initialisierung auftrat
|
||||
If Not Init() Then
|
||||
' Nachricht ausgeben
|
||||
@@ -474,20 +479,26 @@ Public Class clsWindream_allgemein
|
||||
Return oSearch.execute
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Warn($"WM-SEARCH ({wdfLocation})")
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Function GetSearchDocumentsDT(ByVal wdfLocation As String, NameIndexDocID As String, NameIndexCreated As String) As DataTable
|
||||
Public Function GetSearchDocumentsDT(ByVal wdfLocation As String, NameIndexDocID As String, NameIndexCreated As String, WMSearchLocal As Boolean) As DataTable
|
||||
Dim dtresult As New DataTable
|
||||
dtresult.Columns.Add("DOC_ID", GetType(Integer))
|
||||
dtresult.Columns.Add("PATH", GetType(String))
|
||||
dtresult.Columns.Add("CREATED", GetType(DateAndTime))
|
||||
dtresult.Columns.Add("CREATED", GetType(String))
|
||||
Logger.Debug($"Executing WMSearch: {wdfLocation}...")
|
||||
Try
|
||||
Dim SearchName = wdfLocation.Substring(wdfLocation.LastIndexOf("\") + 1)
|
||||
Dim SearchPath = wdfLocation.Substring(0, wdfLocation.Length - SearchName.Length)
|
||||
Dim oWMSZPath = wdfLocation.Substring(2).ToLower
|
||||
Dim oWMSZPath
|
||||
If WMSearchLocal = False Then
|
||||
oWMSZPath = wdfLocation.Substring(2).ToLower
|
||||
Else
|
||||
oWMSZPath = wdfLocation.ToLower
|
||||
End If
|
||||
|
||||
Logger.Debug("oWMSZPath: " & oWMSZPath)
|
||||
Try
|
||||
@@ -495,6 +506,11 @@ Public Class clsWindream_allgemein
|
||||
Catch ex As Exception
|
||||
Dim msg As String = ex.Message
|
||||
Try
|
||||
If WMSearchLocal = True Then
|
||||
Logger.Error(ex)
|
||||
Return dtresult
|
||||
End If
|
||||
|
||||
Logger.Debug("Unexpected Error in Creating oController: " & msg)
|
||||
Logger.Debug("...NOW trying to implement \\windream\Objects ...")
|
||||
Dim WmSearch_wmobject = "\\windream\Objects" & oWMSZPath
|
||||
@@ -559,18 +575,18 @@ Public Class clsWindream_allgemein
|
||||
If WMObjects.Count > 0 Then
|
||||
|
||||
For Each dok As WMObject In WMObjects
|
||||
Dim path As String = dok.aPath
|
||||
Dim DOC_ID = dok.GetVariableValue(NameIndexDocID)
|
||||
Logger.Debug("Adding DocInfo for DocID: " & DOC_ID.ToString)
|
||||
dtresult.Rows.Add(DOC_ID, path, dok.GetVariableValue(NameIndexCreated))
|
||||
Dim oPath As String = dok.aPath
|
||||
Dim oDOC_ID = dok.GetVariableValue(NameIndexDocID)
|
||||
Dim oCreated = dok.GetVariableValue(NameIndexCreated)
|
||||
Logger.Debug($"Adding DocInfo {oDOC_ID.ToString}|{oPath}|{oCreated}")
|
||||
dtresult.Rows.Add(oDOC_ID, oPath, oCreated)
|
||||
Next
|
||||
dtresult.AcceptChanges()
|
||||
Else
|
||||
Logger.Info($"No results for WMSearch: {wdfLocation}!!")
|
||||
End If
|
||||
Return dtresult
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Warn($"WM-SEARCH ({wdfLocation})")
|
||||
Return dtresult
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user