Beispiel #1
0
        public static NamespacedChunk CreateEmpty()
        {
            var chunk = new NamespacedChunk();

            chunk.CreateAnew(DataVersion.v1_13);
            return(chunk);
        }
Beispiel #2
0
        /// <summary>
        /// Create from a low-level NamespacedChunk.
        /// Do not use this unless you're sure of what you're doing.
        /// </summary>
        /// <param name="chunk"></param>
        /// <param name="access"></param>
        /// <param name="dispatcher"></param>
        public Chunk(NamespacedChunk chunk, AccessMode access = AccessMode.Write, BlockFactoryDispatcher dispatcher = null)
        {
            _namespaced      = true;
            _namespacedChunk = chunk;
            _access          = access;
            ReadOnly         = access == AccessMode.ReadOnly;

            if (!ReadOnly)
            {
                _namespacedTransaction = _namespacedChunk.CreateChangeBlockTransaction();
            }

            Factory = dispatcher;
        }
 internal NSCBlockTransaction(NamespacedChunk chunk)
 {
     _chunk = chunk;
     chunk.EnsureAllSections();
     InitializeData();
 }