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
- XmlTextAttribute.cs
- BinaryMethodMessage.cs
- ObjectMemberMapping.cs
- OutputCache.cs
- DeobfuscatingStream.cs
- TypeUtil.cs
- Canvas.cs
- Function.cs
- RightsManagementPermission.cs
- TimeSpanValidator.cs
- XmlValidatingReaderImpl.cs
- ExpressionValueEditor.cs
- MetaForeignKeyColumn.cs
- FloatUtil.cs
- ToolStripContainer.cs
- XamlTemplateSerializer.cs
- BufferModeSettings.cs
- GreenMethods.cs
- ViewLoader.cs
- RemotingAttributes.cs
- BeginEvent.cs
- Typeface.cs
- DataTablePropertyDescriptor.cs
- EdmConstants.cs
- UInt32.cs
- TemplateNameScope.cs
- TextRunTypographyProperties.cs
- HostingEnvironmentWrapper.cs
- AtomicFile.cs
- ArgumentDesigner.xaml.cs
- WindowHideOrCloseTracker.cs
- ResXResourceReader.cs
- DelegateTypeInfo.cs
- GlobalEventManager.cs
- UnauthorizedAccessException.cs
- CaseCqlBlock.cs
- BmpBitmapEncoder.cs
- WSSecurityOneDotOneReceiveSecurityHeader.cs
- AddIn.cs
- WebServiceBindingAttribute.cs
- TerminateSequence.cs
- AppearanceEditorPart.cs
- Propagator.Evaluator.cs
- AssemblyAssociatedContentFileAttribute.cs
- BaseCollection.cs
- DirectoryNotFoundException.cs
- PenThreadPool.cs
- DetailsViewUpdatedEventArgs.cs
- SoapMessage.cs
- WebServiceData.cs
- LongTypeConverter.cs
- BindStream.cs
- ResourceReferenceKeyNotFoundException.cs
- PrintController.cs
- Events.cs
- BufferedReadStream.cs
- StreamGeometry.cs
- ResolveMatchesApril2005.cs
- Util.cs
- StickyNoteHelper.cs
- Script.cs
- ListViewEditEventArgs.cs
- CqlParserHelpers.cs
- ItemCheckEvent.cs
- WebControlAdapter.cs
- Rotation3D.cs
- LinearKeyFrames.cs
- BindingCollection.cs
- AppSettingsExpressionBuilder.cs
- SiteMapNodeItemEventArgs.cs
- ExtensionElement.cs
- OdbcConnectionString.cs
- ChannelCredentials.cs
- RequestResizeEvent.cs
- AssociatedControlConverter.cs
- BindableAttribute.cs
- SuppressIldasmAttribute.cs
- AnnotationResourceChangedEventArgs.cs
- InheritanceRules.cs
- AutomationEventArgs.cs
- PropertyRef.cs
- QuotaThrottle.cs
- GenerateTemporaryTargetAssembly.cs
- ContentElement.cs
- ZipIOExtraFieldZip64Element.cs
- SlotInfo.cs
- PeerName.cs
- BindingUtils.cs
- BaseHashHelper.cs
- QilReference.cs
- TlsnegoTokenAuthenticator.cs
- SecurityPermission.cs
- CodeIndexerExpression.cs
- codemethodreferenceexpression.cs
- SortedDictionary.cs
- WebPartCatalogCloseVerb.cs
- TreeNodeEventArgs.cs
- Propagator.Evaluator.cs
- StateDesigner.LayoutSelectionGlyph.cs
- ResourceExpressionEditorSheet.cs