Imports System.IO
Imports System.Runtime.Serialization
Imports System.ServiceModel

Namespace Messages
    <MessageContract>
    Public Class DocumentImportRequest
        <MessageBodyMember>
        Public Contents() As Byte
        <MessageBodyMember>
        Public ObjectStoreId As Long
        <MessageBodyMember>
        Public FileName As String
        <MessageBodyMember>
        Public DocumentType As String
        <MessageBodyMember>
        Public RetentionDays As Long = 0
    End Class

    <MessageContract>
    Public Class DocumentImportResponse
        <MessageBodyMember>
        Public ObjectId As Long
    End Class

    <MessageContract>
    Public Class DocumentStreamRequest
        <MessageBodyMember>
        Public ObjectId As Long
    End Class

    <MessageContract>
    Public Class DocumentStreamResponse
        <MessageHeader(MustUnderstand:=True)>
        Public FileName As String

        <MessageBodyMember(Order:=1)>
        Public FileContents As Stream
    End Class

    <MessageContract>
    <KnownType(GetType(DBNull))>
    Public Class DocumentListResponse
        <MessageBodyMember>
        Public Datatable As DataTable
    End Class

End Namespace



