コード例 #1
0
        private void WriteDeferableContent(BamlDeferableContent node)
        {
            _blob.Write(ref _pos, (byte)RecordType.DeferableContentStart);
            _pos += 4;

            BeginScope(node);
        }
コード例 #2
0
        private void WriteDeferableContentEnd(BamlDeferableContent node)
        {
            int position = _recordToPosition[node];

            position++;             // Record type
            int size = _pos - (position + 4);

            _blob.Write(ref position, (int)size);
        }
コード例 #3
0
        private void ReadDeferableContent()
        {
            var node = new BamlDeferableContent();

            int contentByteSize = _accessor.ReadInt32();

            AddNode(node);

            long streamLength = _accessor.Position + contentByteSize;

            BeginScope(node, streamLength);
        }
コード例 #4
0
        private void BeginScope(BamlDeferableContent block, long streamLength)
        {
            var scope = new Scope()
            {
                Block   = block,
                Length  = streamLength,
                DefKeys = new List <DefKeyNode>(),
            };

            _scopeStack.Push(_currentScope);

            _currentScope = scope;

            _scopes.Add(scope);
        }
コード例 #5
0
        private void BeginScope(BamlDeferableContent block)
        {
            var scope = new Scope()
            {
                Block   = block,
                Current = block.FirstChild,
                DefKeys = new List <DefKeyNode>(),
            };

            _scopeStack.Push(_currentScope);

            _currentScope = scope;

            _scopes.Add(scope);
        }