Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- PathFigureCollection.cs
- WmlLiteralTextAdapter.cs
- ObjectNotFoundException.cs
- Flowchart.cs
- XmlEnumAttribute.cs
- BuiltInExpr.cs
- Tablet.cs
- ColumnMapTranslator.cs
- EditorResources.cs
- RootProfilePropertySettingsCollection.cs
- SymbolType.cs
- MessageQueueCriteria.cs
- UriTemplateHelpers.cs
- DependencyObject.cs
- AppearanceEditorPart.cs
- PageAsyncTaskManager.cs
- SystemInfo.cs
- CannotUnloadAppDomainException.cs
- TreeNodeBinding.cs
- EntityDesignerUtils.cs
- ComponentEditorForm.cs
- SynchronizedInputPattern.cs
- QilExpression.cs
- ImageCodecInfoPrivate.cs
- SqlCacheDependencySection.cs
- SettingsAttributes.cs
- Sql8ConformanceChecker.cs
- MappedMetaModel.cs
- BindingExpressionBase.cs
- ListControlBuilder.cs
- ButtonFlatAdapter.cs
- Application.cs
- COM2EnumConverter.cs
- BitmapMetadataBlob.cs
- RuntimeResourceSet.cs
- UIElement.cs
- DragDrop.cs
- DirectoryRedirect.cs
- XslAstAnalyzer.cs
- ChannelOptions.cs
- QueueSurrogate.cs
- ListView.cs
- WebReferencesBuildProvider.cs
- ListBoxAutomationPeer.cs
- ValueConversionAttribute.cs
- ParseHttpDate.cs
- JournalEntryStack.cs
- InvalidOleVariantTypeException.cs
- MarkupProperty.cs
- PrintDialog.cs
- AppDomainInfo.cs
- DurableErrorHandler.cs
- DiscardableAttribute.cs
- VisualTreeUtils.cs
- DataColumnChangeEvent.cs
- ThousandthOfEmRealDoubles.cs
- securitycriticaldataClass.cs
- ExtractorMetadata.cs
- SecurityTokenRequirement.cs
- DuplexChannel.cs
- ParameterElement.cs
- SafeLibraryHandle.cs
- MD5Cng.cs
- TemplateBindingExpressionConverter.cs
- QilInvokeLateBound.cs
- AlternateViewCollection.cs
- DataObjectAttribute.cs
- ObjectAssociationEndMapping.cs
- MarkerProperties.cs
- GetWorkflowTree.cs
- SafeSystemMetrics.cs
- TCPListener.cs
- AnnotationResource.cs
- DtdParser.cs
- RuleSetBrowserDialog.cs
- WebPartConnectionsConfigureVerb.cs
- UmAlQuraCalendar.cs
- ToolBarButtonDesigner.cs
- TreeSet.cs
- ObservableCollectionDefaultValueFactory.cs
- ObservableCollection.cs
- WebRequestModuleElementCollection.cs
- ContentElementCollection.cs
- PrintDocument.cs
- Normalizer.cs
- ClientRoleProvider.cs
- ClientTargetCollection.cs
- ToolStripHighContrastRenderer.cs
- RecognizedWordUnit.cs
- AttributeParameterInfo.cs
- InfoCardKeyedHashAlgorithm.cs
- XmlSerializerOperationBehavior.cs
- mansign.cs
- Help.cs
- SystemTcpStatistics.cs
- EpmSyndicationContentSerializer.cs
- Constraint.cs
- CategoryNameCollection.cs
- ConfigXmlAttribute.cs
- UniqueConstraint.cs