/// <summary>Ancillary function of NextContentUnit(). Create new chunk, taking _contextStack into /// account, and updating it if needed.</summary> private IndexingContentUnit BuildIndexingContentUnit(string text, uint lcid) { CHUNK_BREAKTYPE breakType = CHUNK_BREAKTYPE.CHUNK_NO_BREAK; // If a paragraph break is expected, reflect this in the new chunk. if (_expectingBlockStart) { breakType = CHUNK_BREAKTYPE.CHUNK_EOP; if (_returnCanonicalParagraphBreaks) { text = _paragraphSeparator + text; } } if (_indexingContentUnit == null) { _indexingContentUnit = new IndexingContentUnit(text, AllocateChunkID(), breakType, _propSpec, lcid); } else { // Optimization: reuse indexing content unit. _indexingContentUnit.InitIndexingContentUnit(text, AllocateChunkID(), breakType, _propSpec, lcid); } // Until proven separated (by the occurrence of a block tag), right neighbors are contiguous. _expectingBlockStart = false; return(_indexingContentUnit); }
// Token: 0x06006C2B RID: 27691 RVA: 0x001F1C98 File Offset: 0x001EFE98 internal void InitIndexingContentUnit(string contents, uint chunkID, CHUNK_BREAKTYPE breakType, ManagedFullPropSpec attribute, uint lcid) { this._contents = contents; base.ID = chunkID; base.BreakType = breakType; base.Attribute = attribute; base.Locale = lcid; }
///<summary>Build a contents chunk, passing the contents string and specifying whether it comes from a Glyphs element.</summary> ///<param name="contents">The value of the chunk's contents property.</param> ///<param name="chunkID">An arbitrary Uint32 to identify each chunk returned by IFilter.GetChunk.</param> ///<param name="breakType">The opening break for the chunk.</param> ///<param name="attribute">A description of the property represented by the chunk.</param> ///<param name="lcid">The locale ID for the chunk.</param> internal IndexingContentUnit( string contents, uint chunkID, CHUNK_BREAKTYPE breakType, ManagedFullPropSpec attribute, uint lcid) : base(chunkID, breakType, attribute, lcid, CHUNKSTATE.CHUNK_TEXT) { _contents = contents; }
// Token: 0x06006C67 RID: 27751 RVA: 0x001F38FC File Offset: 0x001F1AFC internal ManagedChunk(uint index, CHUNK_BREAKTYPE breakType, ManagedFullPropSpec attribute, uint lcid, CHUNKSTATE flags) { Invariant.Assert(breakType >= CHUNK_BREAKTYPE.CHUNK_NO_BREAK && breakType <= CHUNK_BREAKTYPE.CHUNK_EOC); Invariant.Assert(attribute != null); this._index = index; this._breakType = breakType; this._lcid = lcid; this._attribute = attribute; this._flags = flags; this._idChunkSource = this._index; }
/// <summary> /// A utility to be used when one wants to reuse /// one object to hold different values in succession. /// </summary> internal void InitIndexingContentUnit( string contents, uint chunkID, CHUNK_BREAKTYPE breakType, ManagedFullPropSpec attribute, uint lcid) { _contents = contents; ID = chunkID; BreakType = breakType; Attribute = attribute; Locale = lcid; }
///<summary>Build a contents chunk, passing the contents string.</summary> /// <param name="index">id</param> /// <param name="breakType">The opening break for the chunk.</param> /// <param name="attribute">attribute</param> /// <param name="lcid">The locale ID for the chunk.</param> /// <param name="flags">Indicates if it is text or value chunk.</param> /// <remarks> /// All the chunks returned by the XAML filter and the container filter are text chunks. /// Should a future filter implementation be capable of returning value chunks, a new constructor /// and a Flags property will have to be defined. /// </remarks> internal ManagedChunk(uint index, CHUNK_BREAKTYPE breakType, ManagedFullPropSpec attribute, uint lcid, CHUNKSTATE flags) { // Argument errors can only be due to internal inconsistencies, since no input data makes its way here. Invariant.Assert(breakType >= CHUNK_BREAKTYPE.CHUNK_NO_BREAK && breakType <= CHUNK_BREAKTYPE.CHUNK_EOC); Invariant.Assert(attribute != null); // Note that lcid values potentially cover the full range of uint values // (see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_8sj7.asp) // and so no useful validation can be made for lcid. _index = index; _breakType = breakType; _lcid = lcid; _attribute = attribute; _flags = flags; // Since pseudo-properties (a.k.a. internal values) are not supported by the XPS filters, // all chunks we return are expected to have idChunkSource equal to idChunk. // (See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/indexsrv/html/ixufilt_8ib8.asp) _idChunkSource = _index; }
// Token: 0x06006C48 RID: 27720 RVA: 0x001F3098 File Offset: 0x001F1298 private IndexingContentUnit BuildIndexingContentUnit(string text, uint lcid) { CHUNK_BREAKTYPE breakType = CHUNK_BREAKTYPE.CHUNK_NO_BREAK; if (this._expectingBlockStart) { breakType = CHUNK_BREAKTYPE.CHUNK_EOP; if (this._returnCanonicalParagraphBreaks) { text = "\u2029" + text; } } if (this._indexingContentUnit == null) { this._indexingContentUnit = new IndexingContentUnit(text, this.AllocateChunkID(), breakType, XamlFilter._propSpec, lcid); } else { this._indexingContentUnit.InitIndexingContentUnit(text, this.AllocateChunkID(), breakType, XamlFilter._propSpec, lcid); } this._expectingBlockStart = false; return(this._indexingContentUnit); }