Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new empty memory mapped accessor with given size in bytes.
        /// </summary>
        public MappedAccessor <T> CreateVariable <T>(long sizeInBytes,
                                                     ReadFromDelegate <T> readFrom, WriteToDelegate <T> writeTo)
        {
            var accessor = this.DoCreateVariable <T>(_nextPosition, sizeInBytes, readFrom, writeTo);

            _accessors.Add(accessor);

            _nextPosition = _nextPosition + sizeInBytes;

            return(accessor);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new memory mapped file based on the given stream and the given size in bytes.
 /// </summary>
 protected abstract MappedAccessor <T> DoCreateVariable <T>(long nextPosition, long sizeInBytes,
                                                            ReadFromDelegate <T> readFrom, WriteToDelegate <T> writeTo);