EDMI: Fix DoctypeId Parameter
This commit is contained in:
@@ -3,17 +3,18 @@ Imports DigitalData.Modules.Logging
|
||||
|
||||
|
||||
Public Class Helpers
|
||||
Private ReadOnly LogConfig As LogConfig
|
||||
Private ReadOnly Logger As Logger
|
||||
Private ReadOnly FileEx As Filesystem.File
|
||||
Private ReadOnly LogConfig As LogConfig
|
||||
Private ReadOnly Logger As Logger
|
||||
Private ReadOnly FileEx As Filesystem.File
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig)
|
||||
LogConfig = pLogConfig
|
||||
Logger = pLogConfig.GetLogger()
|
||||
FileEx = New Filesystem.File(pLogConfig)
|
||||
End Sub
|
||||
Public Sub New(pLogConfig As LogConfig)
|
||||
LogConfig = pLogConfig
|
||||
Logger = pLogConfig.GetLogger()
|
||||
FileEx = New Filesystem.File(pLogConfig)
|
||||
End Sub
|
||||
|
||||
Public Function GetFileProperties(pFilePath As String, pDateImportedAt As Date) As FileProperties
|
||||
Public Function GetFileProperties(pFilePath As String, pDateImportedAt As Date) As FileProperties
|
||||
Try
|
||||
Using oFileStream As New IO.FileStream(pFilePath, IO.FileMode.Open, IO.FileAccess.Read)
|
||||
Using oMemoryStream As New IO.MemoryStream()
|
||||
oFileStream.CopyTo(oMemoryStream)
|
||||
@@ -27,16 +28,21 @@ Public Class Helpers
|
||||
Dim oFileModifiedAt As Date = oFileInfo?.LastWriteTime
|
||||
Dim oFileHash As String = FileEx.GetChecksum(oFileInfo.FullName)
|
||||
|
||||
Return New FileProperties With {
|
||||
.FileName = oFileInfo.Name,
|
||||
.FileCreatedAt = oFileCreatedAt,
|
||||
.FileChangedAt = oFileModifiedAt,
|
||||
.FileContents = oContents,
|
||||
.FileImportedAt = pDateImportedAt,
|
||||
.FileChecksum = oFileHash,
|
||||
.FileInfoRaw = oFileInfo
|
||||
Return New FileProperties With {
|
||||
.FileName = oFileInfo.Name,
|
||||
.FileCreatedAt = oFileCreatedAt,
|
||||
.FileChangedAt = oFileModifiedAt,
|
||||
.FileContents = oContents,
|
||||
.FileImportedAt = pDateImportedAt,
|
||||
.FileChecksum = oFileHash,
|
||||
.FileInfoRaw = oFileInfo
|
||||
}
|
||||
End Using
|
||||
End Using
|
||||
End Using
|
||||
End Function
|
||||
End Class
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user