Ejemplo n.º 1
0
        /// <summary>
        /// Add new task object to the content block.
        /// </summary>
        /// <param name="repeattask"></param>
        /// <returns></returns>
        private long AddTask(TValue repeattask)
        {
            byte[] bytes = this.ValueConverter.ToByte(repeattask);

            int contentbytelen = bytes.Length;

            lock (_object)
            {
                Int64 currentposition = this.ContentStream.Length;

                ContentStream.Position = currentposition;

                ContentStream.WriteByte(startbyteone);
                ContentStream.WriteByte(startbytetwo);

                ContentStream.Write(BitConverter.GetBytes(contentbytelen), 0, 4);

                ContentStream.Write(bytes, 0, contentbytelen);
                return(currentposition);
            }
        }
Ejemplo n.º 2
0
        public override void WriteByte(byte value)
        {
            CreateStream();

            ContentStream.WriteByte(value);
        }