Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / MS / Internal / IO / Packaging / fixedPageContentExtractor.cs / 1 / fixedPageContentExtractor.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // Given a DOM node for a fixed page, enumerates its text content. // // History: // 05/11/2004: [....]: Initial implementation //--------------------------------------------------------------------------- using System; using System.Xml; namespace MS.Internal.IO.Packaging { ////// Implements a sequence of (textContent, precedingDelimiter) pairs for /// a fixed page node. /// internal class FixedPageContentExtractor { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Initialize a FixedPageContentExtractor from a DOM node. /// internal FixedPageContentExtractor(XmlNode fixedPage) { _fixedPageInfo = new XmlFixedPageInfo(fixedPage); _nextGlyphRun = 0; } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods ////// Return the content of the next glyph run, with a boolean indication /// whether it is separated by a space form the preceding glyph run. /// internal string NextGlyphContent(out bool inline, out uint lcid) { // Right now, we use the simplest possible heuristic for // spacing glyph runs: All pairs of adjacent glyph runs are assumed // to be separated by a word break. inline = false; lcid = 0; // End of page? if (_nextGlyphRun >= _fixedPageInfo.GlyphRunCount) { return null; } // Retrieve inline, lcid and return value from the next glyph run info. GlyphRunInfo glyphRunInfo = _fixedPageInfo.GlyphRunAtPosition(_nextGlyphRun); lcid = glyphRunInfo.LanguageID; // Point to the next glyph run for the next call and return. ++_nextGlyphRun; return glyphRunInfo.UnicodeString; } #endregion Internal Methods //------------------------------------------------------ // // Internal Properties // //------------------------------------------------------ #region Internal Properties ////// Indicates whether no more content can be returned. /// internal bool AtEndOfPage { get { return _nextGlyphRun >= _fixedPageInfo.GlyphRunCount; } } #endregion Internal Properties //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private XmlFixedPageInfo _fixedPageInfo; private int _nextGlyphRun; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CompoundFileStreamReference.cs
- TypeElementCollection.cs
- Walker.cs
- NamedPipeAppDomainProtocolHandler.cs
- PolicyException.cs
- UnsafeNativeMethods.cs
- PKCS1MaskGenerationMethod.cs
- KeyTime.cs
- RegexStringValidator.cs
- SelectionItemPattern.cs
- XsltOutput.cs
- SspiNegotiationTokenProviderState.cs
- RuntimeConfig.cs
- DataObjectSettingDataEventArgs.cs
- ExpanderAutomationPeer.cs
- WebCodeGenerator.cs
- ServiceModelConfigurationSectionCollection.cs
- XmlSchemaSimpleTypeList.cs
- AccessorTable.cs
- HierarchicalDataBoundControlAdapter.cs
- CodeAccessPermission.cs
- DataObjectEventArgs.cs
- PolyQuadraticBezierSegment.cs
- SafeArrayRankMismatchException.cs
- FormsIdentity.cs
- ConnectionStringSettingsCollection.cs
- FormsAuthenticationCredentials.cs
- RegexWriter.cs
- TabRenderer.cs
- TrustDriver.cs
- OptimizedTemplateContentHelper.cs
- _NativeSSPI.cs
- SmiTypedGetterSetter.cs
- IntSecurity.cs
- DebugInfoExpression.cs
- TableRowCollection.cs
- LogAppendAsyncResult.cs
- SamlSecurityToken.cs
- RootAction.cs
- PriorityChain.cs
- WebBrowserNavigatedEventHandler.cs
- DiscoveryMessageSequence11.cs
- SwitchElementsCollection.cs
- ValidatorCompatibilityHelper.cs
- CrossSiteScriptingValidation.cs
- InkSerializer.cs
- ETagAttribute.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- DbMetaDataColumnNames.cs
- Lookup.cs
- UserInitiatedNavigationPermission.cs
- ToolStripItemEventArgs.cs
- CompatibleIComparer.cs
- DependencyProperty.cs
- DataKey.cs
- ping.cs
- SafeHandle.cs
- HttpApplication.cs
- SnapLine.cs
- PerfCounters.cs
- AccessText.cs
- ISFTagAndGuidCache.cs
- XamlWrappingReader.cs
- TextRangeEditTables.cs
- TypeConverterAttribute.cs
- VerticalAlignConverter.cs
- EditorBrowsableAttribute.cs
- codemethodreferenceexpression.cs
- HtmlInputReset.cs
- DataGridViewSelectedColumnCollection.cs
- ObjectListCommandCollection.cs
- SQLRoleProvider.cs
- LicenseProviderAttribute.cs
- CryptoProvider.cs
- _CookieModule.cs
- RuntimeEnvironment.cs
- Rect.cs
- AssociationTypeEmitter.cs
- Vector3DConverter.cs
- SqlCachedBuffer.cs
- SocketCache.cs
- Pen.cs
- TransformFinalBlockRequest.cs
- Int64AnimationUsingKeyFrames.cs
- HwndHostAutomationPeer.cs
- SetMemberBinder.cs
- ValidatorCollection.cs
- Rectangle.cs
- HeaderCollection.cs
- BordersPage.cs
- DropSource.cs
- ServiceTimeoutsElement.cs
- RangeValidator.cs
- FontInfo.cs
- PseudoWebRequest.cs
- SubclassTypeValidatorAttribute.cs
- GradientBrush.cs
- TemplateInstanceAttribute.cs
- OperandQuery.cs
- SectionUpdates.cs