EDMI: Add generic ImportFile Method
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user