Exemplo n.º 1
0
        // ======================================

        private void Add(XamlNodeType nodeType, object data)
        {
            if (nodeType != XamlNodeType.None)
            {
                XamlNode node = new XamlNode(nodeType, data);
                _nodeQueue.Enqueue(node);
                return;
            }
            Debug.Assert(XamlNode.IsEof_Helper(nodeType, data));
            _nodeQueue.Enqueue(_endOfStreamNode);
        }
Exemplo n.º 2
0
 private void Add(XamlNodeType nodeType, object data)
 {
     if (IsDisposed)
     {
         return;
     }
     if (nodeType != XamlNodeType.None)
     {
         AddToBuffer(new XamlNode(nodeType, data));
         return;
     }
     System.Diagnostics.Debug.Assert(XamlNode.IsEof_Helper(nodeType, data));
     AddToBuffer(new XamlNode(XamlNode.InternalNodeType.EndOfStream));
     _providerFullEvent.Set();
 }
Exemplo n.º 3
0
 private void Add(XamlNodeType nodeType, object data)
 {
     if (!_readMode)
     {
         if (nodeType != XamlNodeType.None)
         {
             XamlNode node = new XamlNode(nodeType, data);
             _nodeList.Add(node);
             return;
         }
         Debug.Assert(XamlNode.IsEof_Helper(nodeType, data));
         _readMode = true;
     }
     else
     {
         throw new XamlException(SR.Get(SRID.CannotWriteClosedWriter));
     }
 }