private void Initialize(XamlReader wrappedReader, int bufferSize) { _providerFullEvent = new EventWaitHandle(false, EventResetMode.AutoReset); _dataReceivedEvent = new EventWaitHandle(false, EventResetMode.AutoReset); _incoming = new XamlNode[bufferSize]; _outgoing = new XamlNode[bufferSize]; _wrappedReader = wrappedReader; _wrappedReaderHasLineInfo = ((IXamlLineInfo)_wrappedReader).HasLineInfo; var xamlNodeAddDelegate = new XamlNodeAddDelegate(Add); XamlLineInfoAddDelegate lineInfoAddDelegate = null; if (_wrappedReaderHasLineInfo) { lineInfoAddDelegate = new XamlLineInfoAddDelegate(AddLineInfo); } _writer = new WriterDelegate(xamlNodeAddDelegate, lineInfoAddDelegate, _wrappedReader.SchemaContext); XamlNodeNextDelegate xamlNodeNextDelegate; if (_wrappedReaderHasLineInfo) { xamlNodeNextDelegate = new XamlNodeNextDelegate(Next_ProcessLineInfo); } else { xamlNodeNextDelegate = new XamlNodeNextDelegate(Next); } _internalReader = new ReaderDelegate(_wrappedReader.SchemaContext, xamlNodeNextDelegate, _wrappedReaderHasLineInfo); //Standin so it won't start null _currentNode = new XamlNode(XamlNode.InternalNodeType.StartOfStream); }
private void Initialize(XamlReader wrappedReader, int bufferSize) { XamlNodeNextDelegate delegate4; this._providerFullEvent = new EventWaitHandle(false, EventResetMode.AutoReset); this._dataReceivedEvent = new EventWaitHandle(false, EventResetMode.AutoReset); this._incoming = new XamlNode[bufferSize]; this._outgoing = new XamlNode[bufferSize]; this._wrappedReader = wrappedReader; this._wrappedReaderHasLineInfo = ((IXamlLineInfo)this._wrappedReader).HasLineInfo; XamlNodeAddDelegate add = new XamlNodeAddDelegate(this.Add); XamlLineInfoAddDelegate addlineInfoDelegate = null; if (this._wrappedReaderHasLineInfo) { addlineInfoDelegate = new XamlLineInfoAddDelegate(this.AddLineInfo); } this._writer = new WriterDelegate(add, addlineInfoDelegate, this._wrappedReader.SchemaContext); if (this._wrappedReaderHasLineInfo) { delegate4 = new XamlNodeNextDelegate(this.Next_ProcessLineInfo); } else { delegate4 = new XamlNodeNextDelegate(this.Next); } this._internalReader = new ReaderDelegate(this._wrappedReader.SchemaContext, delegate4, this._wrappedReaderHasLineInfo); this._currentNode = new XamlNode(XamlNode.InternalNodeType.StartOfStream); }
public ReaderDelegate(XamlSchemaContext schemaContext, XamlNodeNextDelegate next, bool hasLineInfo) : base(schemaContext) { this._nextDelegate = next; base._currentNode = new XamlNode(XamlNode.InternalNodeType.StartOfStream); base._currentLineInfo = null; base._hasLineInfo = hasLineInfo; }
private void Initialize(XamlReader wrappedReader, int bufferSize) { XamlNodeNextDelegate delegate4; this._providerFullEvent = new EventWaitHandle(false, EventResetMode.AutoReset); this._dataReceivedEvent = new EventWaitHandle(false, EventResetMode.AutoReset); this._incoming = new XamlNode[bufferSize]; this._outgoing = new XamlNode[bufferSize]; this._wrappedReader = wrappedReader; this._wrappedReaderHasLineInfo = ((IXamlLineInfo) this._wrappedReader).HasLineInfo; XamlNodeAddDelegate add = new XamlNodeAddDelegate(this.Add); XamlLineInfoAddDelegate addlineInfoDelegate = null; if (this._wrappedReaderHasLineInfo) { addlineInfoDelegate = new XamlLineInfoAddDelegate(this.AddLineInfo); } this._writer = new WriterDelegate(add, addlineInfoDelegate, this._wrappedReader.SchemaContext); if (this._wrappedReaderHasLineInfo) { delegate4 = new XamlNodeNextDelegate(this.Next_ProcessLineInfo); } else { delegate4 = new XamlNodeNextDelegate(this.Next); } this._internalReader = new ReaderDelegate(this._wrappedReader.SchemaContext, delegate4, this._wrappedReaderHasLineInfo); this._currentNode = new XamlNode(XamlNode.InternalNodeType.StartOfStream); }