SensorShare.AnnotationBase.WriteBaseData C# (CSharp) Method

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
        protected MemoryStream WriteBaseData()
        {
            MemoryStream ms = new MemoryStream();
             // ID
             byte[] tempBytes = ID.ToByteArray();
             ms.Write(tempBytes, 0, 16);
             // ServerID
             tempBytes = server_id.ToByteArray();
             ms.Write(tempBytes, 0, 16);
             //AuthorID
             tempBytes = AuthorID.ToByteArray();
             ms.Write(tempBytes, 0, 16);
             // Date
             tempBytes = BitConverter.GetBytes(this.BinaryDate);
             ms.Write(tempBytes, 0, sizeof(Int64));
             // Type
             tempBytes = BitConverter.GetBytes((Int32)this.Type);
             ms.Write(tempBytes, 0, sizeof(AnnotationType));
             // Author
             TextHelper.StreamString(ms, this.Author);
             return ms;
        }