WIP: Streaming files from service to client

This commit is contained in:
Jonathan Jenne
2020-04-14 16:25:16 +02:00
parent 52a6d103e6
commit a20c0eb4b0
19 changed files with 211 additions and 49 deletions

View File

@@ -507,6 +507,12 @@ Namespace EDMIServiceReference
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/ImportFile", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/ImportFileResponse")> _
Function ImportFileAsync(ByVal FileName As String, ByVal Contents() As Byte, ByVal AddedWho As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult2)
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdResponse")> _
Function GetFileByObjectId(ByVal ObjectId As Long) As System.IO.Stream
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdResponse")> _
Function GetFileByObjectIdAsync(ByVal ObjectId As Long) As System.Threading.Tasks.Task(Of System.IO.Stream)
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/NewFileIndex", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/NewFileIndexResponse")> _
Function NewFileIndex(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Syskey As String, ByVal LanguageCode As String, ByVal Value As String) As EDMIServiceReference.IndexResult
@@ -649,6 +655,14 @@ Namespace EDMIServiceReference
Return MyBase.Channel.ImportFileAsync(FileName, Contents, AddedWho)
End Function
Public Function GetFileByObjectId(ByVal ObjectId As Long) As System.IO.Stream Implements EDMIServiceReference.IEDMIService.GetFileByObjectId
Return MyBase.Channel.GetFileByObjectId(ObjectId)
End Function
Public Function GetFileByObjectIdAsync(ByVal ObjectId As Long) As System.Threading.Tasks.Task(Of System.IO.Stream) Implements EDMIServiceReference.IEDMIService.GetFileByObjectIdAsync
Return MyBase.Channel.GetFileByObjectIdAsync(ObjectId)
End Function
Public Function NewFileIndex(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Syskey As String, ByVal LanguageCode As String, ByVal Value As String) As EDMIServiceReference.IndexResult Implements EDMIServiceReference.IEDMIService.NewFileIndex
Return MyBase.Channel.NewFileIndex(DocObject, Syskey, LanguageCode, Value)
End Function