InlineContent Element

System.Object
  ContentType
    InlineContent
Client Declaration
  public class InlineContent
Represents the content data that is to be uploaded to, or retrieved from, a content-carrying object.

Element Structure

Elements
  • byte[] Binary: [request] [response] Required element specifying the content data to be uploaded or retrieved.

Base Element Inheritance

Attributes
  • UInt64 size:
    • [request] Optional (although recommended for performance reasons) expression specifying the size of the content data to be uploaded.
    • [response] Required expression specifying the size of the content data to be retrieved.
Attributes Specific to .NET Clients
  • Boolean sizeSpecified: Optional expression specifying whether size has a value (true) or not (false).

Code Example

// Read data stream from file containing the document content
InlineContent inlineContent = new InlineContent();
System.IO.Stream inputStream = System.IO.File.OpenRead("c:/test/demo.doc");
inlineContent.Binary = new byte[inputStream.Length];
inputStream.Read(inlineContent.Binary, 0, (int)inputStream.Length);
inputStream.Close();

// Create reference to Content pseudo-property
ContentData propContent = new ContentData();
propContent.Value = inlineContent;
propContent.propertyId = "Content";

XML Schema

xsd:complexType name="InlineContent">
   <xsd:complexContent>
      <xsd:extension base="wsi:ContentType">
         <xsd:sequence>
            <xsd:element name="Binary" type="xsd:base64Binary"/>
         </xsd:sequence>
      </xsd:extension>
   </xsd:complexContent>
</xsd:complexType>