Table of Contents

Interface ISysDocumentApi

Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime.dll

Provides methods for working with system documents.

public interface ISysDocumentApi : IDslApi

Implements

IDslApi

Extension Methods

ObjectExtension.ConvertToBsonValue(object), EnumExtensions.DeepClone<ISysDocumentApi>(ISysDocumentApi)

Methods

Load(string)

Load the document object by name.

SystemDocument Load(string name)

Parameters

name string

The document name.

Returns

SystemDocument

The document object.

OpenRead(string)

Open a document for reading.

Stream OpenRead(string name)

Parameters

name string

The document name.

Returns

Stream

A read-only stream.

OpenWrite(string)

Open a document for reading.

Stream OpenWrite(string name)

Parameters

name string

The document name.

Returns

Stream

A writable stream.

ReadAllBytes(string)

Reads the contents of the file into a byte array.

byte[] ReadAllBytes(string name)

Parameters

name string

The document name.

Returns

byte[]

The byte array.

ReadToStream(string, Stream)

Reads the contents of a blob to a stream.

void ReadToStream(string name, Stream stream)

Parameters

name string

The document name.

stream Stream

A readable stream

Store(string, Stream)

Stores document with a stream. If the document already exists, it will be overwritten.

void Store(string name, Stream stream)

Parameters

name string

The system document name.

stream Stream

The stream.