EDMI: Add generic ImportFile Method

This commit is contained in:
Jonathan Jenne
2022-03-29 11:05:59 +02:00
parent 3714308da1
commit 665a23d8a7
25 changed files with 838 additions and 364 deletions

View File

@@ -5,11 +5,9 @@ Imports DigitalData.Modules.Logging
Namespace Modules.Globix
Public Class ImportFile
Inherits BaseMethod
Private ReadOnly FileEx As Filesystem.File
Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel)
MyBase.New(pLogConfig, pChannel)
FileEx = New Filesystem.File(pLogConfig)
End Sub
Public Async Function RunAsync(pFilePath As String,
@@ -18,7 +16,7 @@ Namespace Modules.Globix
pObjectStoreName As String,
pObjectKind As String,
pIDBDoctypeId As Long,
pImportOptions As Options.ImportFileOptions) As Task(Of ImportFileResponse)
pImportOptions As Options.ImportFileOptions) As Task(Of Globix_ImportFileResponse)
Try
' Set default options
If pImportOptions Is Nothing Then
@@ -44,7 +42,7 @@ Namespace Modules.Globix
oFileStream.CopyTo(oMemoryStream)
Dim oContents = oMemoryStream.ToArray()
Dim oFileImportResponse = Await Channel.ImportFileAsync(New ImportFileRequest With {
Dim oFileImportResponse = Await Channel.Globix_ImportFileAsync(New Globix_ImportFileRequest With {
.IDBDoctypeId = pIDBDoctypeId,
.File = New FileProperties With {
.FileName = oFileInfo.Name,