C# Class SensorShare.AnnotationBase

The base class for annotations, providing the ID and Time
Inheritance: IAnnotation
Exibir arquivo Open project: MarkPaxton/SensorShare3 Class Usage Examples

Protected Properties

Property Type Description
author string
type AnnotationType

Public Methods

Method Description
AnnotationBase ( ) : System
AnnotationBase ( System.Guid id, System.Guid server_id, System.Guid author_id, System.DateTime time, string author ) : System
AnnotationBase ( System.Guid id, System.Guid server_id, System.Guid author_id, System.DateTime time, string author, AnnotationType type ) : System
AnnotationBase ( byte data ) : System
GetBytes ( ) : byte[]

Returns the annotation data as an array of bytes

Protected Methods

Method Description
ReadBaseData ( MemoryStream ms ) : MemoryStream

Read the data from a given MemoryStream and return that steam with the pointer at the end of the data

Will Seek the start of the MemoryStream given and leave it at the end of the bytes loaded. Exceptions must be caught upstream.

WriteBaseData ( ) : MemoryStream

Generate a MemoryStream containing the base into which to add the data for the rest of the annotation.

The MemoryStream is a new stream and therefore must be closed after use.

Method Details

AnnotationBase() public method

public AnnotationBase ( ) : System
return System

AnnotationBase() public method

public AnnotationBase ( System.Guid id, System.Guid server_id, System.Guid author_id, System.DateTime time, string author ) : System
id System.Guid
server_id System.Guid
author_id System.Guid
time System.DateTime
author string
return System

AnnotationBase() public method

public AnnotationBase ( System.Guid id, System.Guid server_id, System.Guid author_id, System.DateTime time, string author, AnnotationType type ) : System
id System.Guid
server_id System.Guid
author_id System.Guid
time System.DateTime
author string
type AnnotationType
return System

AnnotationBase() public method

public AnnotationBase ( byte data ) : System
data byte
return System

GetBytes() public method

Returns the annotation data as an array of bytes
public GetBytes ( ) : byte[]
return byte[]

ReadBaseData() protected method

Read the data from a given MemoryStream and return that steam with the pointer at the end of the data
Will Seek the start of the MemoryStream given and leave it at the end of the bytes loaded. Exceptions must be caught upstream.
protected ReadBaseData ( MemoryStream ms ) : MemoryStream
ms System.IO.MemoryStream
return System.IO.MemoryStream

WriteBaseData() protected method

Generate a MemoryStream containing the base into which to add the data for the rest of the annotation.
The MemoryStream is a new stream and therefore must be closed after use.
protected WriteBaseData ( ) : MemoryStream
return System.IO.MemoryStream

Property Details

author protected_oe property

protected string author
return string

type protected_oe property

protected AnnotationType type
return AnnotationType