internal StreamArray(short[] array, CellCoordinateType cell_coord, int count)
        {
            if (array == null)
            {
                throw new System.ArgumentNullException(nameof(array));
            }

            this.Array     = array;
            this.ChunkSize = cell_coord == CellCoordinateType.SidSrc ? 4 : 3;
            this.Count     = count;

            if (array.Length % this.ChunkSize != 0)
            {
                string msg = string.Format("Array length must be a multiple of {0}", this.ChunkSize);
                throw new VisioAutomation.Exceptions.InternalAssertionException(msg);
            }

            if (count * this.ChunkSize != array.Length)
            {
                string msg = string.Format("Array length does not match the number of cells {0} multiplied by the chunk size {1}", this.Count, this.ChunkSize);
                throw new VisioAutomation.Exceptions.InternalAssertionException("Count does not match the number of short elements in the array");
            }

            this.Count = count;
        }
Example #2
0
 public WriteRecordList(CellCoordinateType type)
 {
     this._items     = new List <WriteRecord>();
     this._coordtype = type;
 }
Example #3
0
 protected WriterBase(CellCoordinateType type)
 {
     this._records = new WriteRecordList(type);
 }