3 Commits

Author SHA1 Message Date
Jonathan Jenne
95173cdf15 EDMIBenchmark: clean up 2021-02-04 16:57:12 +01:00
Jonathan Jenne
fe6b1476bb Filesystem: Version 1.0.2 2021-02-04 16:56:48 +01:00
Jonathan Jenne
75b789ded8 Filesystem: Add GetChecksum 2021-02-04 16:54:57 +01:00
3 changed files with 17 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ Imports DevExpress.XtraEditors.Controls
Imports System.IO Imports System.IO
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
Imports DigitalData.GUIs.Common Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.ZooFlow.State
Public Class Form1 Public Class Form1
Private _LogConfig As LogConfig Private _LogConfig As LogConfig
@@ -159,12 +160,15 @@ Public Class Form1
} }
} }
Dim oEnv As New DigitalData.Modules.ZooFlow.Environment() With { Dim oEnv As New DigitalData.Modules.ZooFlow.Environment() With {
.Service = New DigitalData.Modules.ZooFlow.State.ServiceState() With { .Service = New ServiceState() With {
.IsActive = True, .IsActive = True,
.Address = "172.24.12.39:9000" .Address = "172.24.12.39:9000"
}, },
.Settings = New DigitalData.Modules.ZooFlow.State.SettingsState With { .Settings = New SettingsState With {
.GdPictureKey = "21182889975216572111813147150675976632" .GdPictureKey = "21182889975216572111813147150675976632"
},
.User = New UserState() With {
.UserId = 2
} }
} }
Dim oForm As New frmDocumentResultList(_LogConfig, oEnv, oParams) Dim oForm As New frmDocumentResultList(_LogConfig, oEnv, oParams)

View File

@@ -1,4 +1,5 @@
Imports System.IO Imports System.IO
Imports System.Security.Cryptography
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
@@ -65,6 +66,14 @@ Public Class File
Return oCleanName Return oCleanName
End Function End Function
Public Function GetChecksum(FilePath As String) As String
Using oStream As New BufferedStream(IO.File.OpenRead(FilePath), 1200000)
Dim oSHA As New SHA256Managed()
Dim oChecksum() As Byte = oSHA.ComputeHash(oStream)
Return BitConverter.ToString(oChecksum).Replace("-", String.Empty)
End Using
End Function
''' <summary> ''' <summary>
''' Adds fileversions to given filename `Destination` if that file already exists. ''' Adds fileversions to given filename `Destination` if that file already exists.
''' </summary> ''' </summary>

View File

@@ -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.1.1")> <Assembly: AssemblyVersion("1.0.2.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.2.0")>