Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Documents / RtfFormatStack.cs / 1 / RtfFormatStack.cs
//---------------------------------------------------------------------------- // // File: RtfFormatStack.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: Rtf format stack. // //--------------------------------------------------------------------------- using System.Collections; using MS.Internal; // Invariant namespace System.Windows.Documents { ////// RtfFormatStack /// internal class RtfFormatStack : ArrayList { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal RtfFormatStack() : base(20) { } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods internal void Push() { FormatState previousFormatState = Top(); FormatState formatState; formatState = previousFormatState != null ? new FormatState(previousFormatState) : new FormatState(); Add(formatState); } internal void Pop() { Invariant.Assert(Count != 0); if (Count > 0) { RemoveAt(Count - 1); } } internal FormatState Top() { return Count > 0 ? EntryAt(Count - 1) : null; } internal FormatState PrevTop(int fromTop) { int index = Count - 1 - fromTop; if (index < 0 || index >= Count) { return null; } return EntryAt(index); } internal FormatState EntryAt(int index) { return (FormatState)this[index]; } #endregion Internal Methods } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // File: RtfFormatStack.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: Rtf format stack. // //--------------------------------------------------------------------------- using System.Collections; using MS.Internal; // Invariant namespace System.Windows.Documents { ////// RtfFormatStack /// internal class RtfFormatStack : ArrayList { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal RtfFormatStack() : base(20) { } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods internal void Push() { FormatState previousFormatState = Top(); FormatState formatState; formatState = previousFormatState != null ? new FormatState(previousFormatState) : new FormatState(); Add(formatState); } internal void Pop() { Invariant.Assert(Count != 0); if (Count > 0) { RemoveAt(Count - 1); } } internal FormatState Top() { return Count > 0 ? EntryAt(Count - 1) : null; } internal FormatState PrevTop(int fromTop) { int index = Count - 1 - fromTop; if (index < 0 || index >= Count) { return null; } return EntryAt(index); } internal FormatState EntryAt(int index) { return (FormatState)this[index]; } #endregion Internal Methods } } // 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
- WebContentFormatHelper.cs
- UrlParameterReader.cs
- PlatformNotSupportedException.cs
- DataTableNewRowEvent.cs
- XmlValueConverter.cs
- DependencyObjectCodeDomSerializer.cs
- _AutoWebProxyScriptWrapper.cs
- TextViewDesigner.cs
- DnsPermission.cs
- RSACryptoServiceProvider.cs
- DateTimeFormatInfoScanner.cs
- Ray3DHitTestResult.cs
- PolyLineSegment.cs
- CompiledQueryCacheEntry.cs
- TableItemPattern.cs
- AppDomainAttributes.cs
- PtsPage.cs
- PrimaryKeyTypeConverter.cs
- WindowsToolbarItemAsMenuItem.cs
- DataTemplateKey.cs
- TrustSection.cs
- FileNotFoundException.cs
- QilTypeChecker.cs
- ServiceReference.cs
- GetWinFXPath.cs
- SvcMapFileLoader.cs
- OptimizerPatterns.cs
- HMACMD5.cs
- TableLayoutSettingsTypeConverter.cs
- StylusEditingBehavior.cs
- WebControl.cs
- XmlNodeChangedEventManager.cs
- ImportCatalogPart.cs
- DeferredTextReference.cs
- DrawTreeNodeEventArgs.cs
- KeyboardDevice.cs
- RegexCompilationInfo.cs
- WebPartDisplayModeCollection.cs
- KeyFrames.cs
- DependencyPropertyConverter.cs
- SafeEventLogReadHandle.cs
- DbProviderSpecificTypePropertyAttribute.cs
- SqlRecordBuffer.cs
- DirtyTextRange.cs
- controlskin.cs
- DeclarationUpdate.cs
- SystemSounds.cs
- BevelBitmapEffect.cs
- TransformerInfoCollection.cs
- EntityContainer.cs
- TableParaClient.cs
- _ConnectStream.cs
- SignatureDescription.cs
- FastPropertyAccessor.cs
- RegexWriter.cs
- XmlValidatingReader.cs
- SetIterators.cs
- NamespaceCollection.cs
- GiveFeedbackEvent.cs
- MatrixValueSerializer.cs
- BuildProvider.cs
- WindowsListViewItemStartMenu.cs
- DataGridViewEditingControlShowingEventArgs.cs
- SoapFault.cs
- ColorBlend.cs
- SubordinateTransaction.cs
- DecimalStorage.cs
- CompilerWrapper.cs
- Int16AnimationUsingKeyFrames.cs
- Schema.cs
- DebugHandleTracker.cs
- SymmetricSecurityProtocol.cs
- ResXBuildProvider.cs
- ImageBrush.cs
- XsdBuilder.cs
- MultipartContentParser.cs
- SoapEnumAttribute.cs
- ColumnReorderedEventArgs.cs
- Simplifier.cs
- LookupNode.cs
- GridViewRowPresenter.cs
- CodeDelegateInvokeExpression.cs
- WmiPutTraceRecord.cs
- COM2ExtendedUITypeEditor.cs
- AsymmetricKeyExchangeDeformatter.cs
- WsatConfiguration.cs
- SpecialFolderEnumConverter.cs
- IIS7WorkerRequest.cs
- RightsManagementEncryptionTransform.cs
- ItemsPanelTemplate.cs
- SEHException.cs
- ProtocolsSection.cs
- DuplexChannelFactory.cs
- glyphs.cs
- ListControlBuilder.cs
- DataControlField.cs
- querybuilder.cs
- MemoryResponseElement.cs
- ConditionalWeakTable.cs
- UIHelper.cs