private void WriteAttributes()
        {
            // Title
            if (this.titleDao == null)
            {
                this.titleDao = new BinaryFileStringDao(this, TimeSeriesDatabase.MaxTitleLength);
            }
            this.titleDao.Create(this.dto.Title);

            // Start time
            if (this.startTimeDao == null)
            {
                this.startTimeDao = new BinaryFileDateTimeDao(this);
            }
            this.startTimeDao.Create(this.dto.StartTime);
        }
Example #2
0
        public void Read()
        {
            // Save the position of the fix-up
            Position = Reader.BaseStream.Position;

            // Position (in the database)
            this.fixupPosition = Reader.ReadInt64();

            // Name
            if (this.nameDao == null)
            {
                this.nameDao = new BinaryFileStringDao(this, this.maxNameSize);
            }
            this.name = this.nameDao.Read();

            Debug.Assert(name.Length > 0);
        }
Example #3
0
        public void Write()
        {
            if (Position != BinaryFileDao.UnknownOffset)
            {
                Writer.Seek((int)Position, SeekOrigin.Begin);
            }
            else
            {
                // Save the location of the fixup item
                Position = Writer.BaseStream.Position;
            }

            // Position (in the database)
            Writer.Write(fixupPosition);

            // Name
            if (this.nameDao == null)
            {
                this.nameDao = new BinaryFileStringDao(this, this.maxNameSize);
            }
            this.nameDao.Update(this.name);
        }