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
- NullRuntimeConfig.cs
- SerialStream.cs
- DocumentStream.cs
- SystemIcmpV4Statistics.cs
- mediapermission.cs
- TypeDescriptionProviderAttribute.cs
- BrushValueSerializer.cs
- CapacityStreamGeometryContext.cs
- SortFieldComparer.cs
- Helper.cs
- ResourceReferenceKeyNotFoundException.cs
- ILGenerator.cs
- DbModificationClause.cs
- ArgumentOutOfRangeException.cs
- RadioButtonFlatAdapter.cs
- PassportAuthenticationModule.cs
- _NetworkingPerfCounters.cs
- ClickablePoint.cs
- RtType.cs
- MapPathBasedVirtualPathProvider.cs
- XmlTypeAttribute.cs
- VersionedStreamOwner.cs
- TextDpi.cs
- mda.cs
- ClientType.cs
- WebHeaderCollection.cs
- TypeElement.cs
- UITypeEditors.cs
- FragmentNavigationEventArgs.cs
- QueueSurrogate.cs
- WindowsComboBox.cs
- WebPartUserCapability.cs
- RichTextBox.cs
- FileChangesMonitor.cs
- COMException.cs
- CodeAttachEventStatement.cs
- CellNormalizer.cs
- Visual.cs
- OrderByLifter.cs
- _Semaphore.cs
- XmlSchemaAll.cs
- SiteMap.cs
- EdmItemError.cs
- WindowsStartMenu.cs
- ConfigurationConverterBase.cs
- RtfToXamlLexer.cs
- DateTimeFormat.cs
- CssTextWriter.cs
- SiteMapNodeCollection.cs
- StringStorage.cs
- FileReader.cs
- _WebProxyDataBuilder.cs
- WindowsNonControl.cs
- FixedDocumentSequencePaginator.cs
- TypeInitializationException.cs
- HotCommands.cs
- MessageQueueTransaction.cs
- BinaryUtilClasses.cs
- DesignDataSource.cs
- DesignTable.cs
- DiscoveryProxy.cs
- FormatterConverter.cs
- XmlWriterDelegator.cs
- TextServicesLoader.cs
- TypeTypeConverter.cs
- RelationshipEnd.cs
- EntityDataSourceContainerNameItem.cs
- QualifiedCellIdBoolean.cs
- NetworkCredential.cs
- RemoteWebConfigurationHostServer.cs
- EventWaitHandle.cs
- ObjectQueryExecutionPlan.cs
- SmiConnection.cs
- Size.cs
- FixedSOMTableCell.cs
- AuthStoreRoleProvider.cs
- NamedPermissionSet.cs
- Padding.cs
- SkewTransform.cs
- MetadataImporterQuotas.cs
- XamlToRtfWriter.cs
- LinqDataSourceDeleteEventArgs.cs
- EventRoute.cs
- TypeRefElement.cs
- EncoderExceptionFallback.cs
- RulePatternOps.cs
- ExceptionValidationRule.cs
- ForwardPositionQuery.cs
- InvalidContentTypeException.cs
- DataControlPagerLinkButton.cs
- ClientSideQueueItem.cs
- WMIGenerator.cs
- SoapFormatter.cs
- XpsManager.cs
- NavigationWindow.cs
- NavigationService.cs
- ISO2022Encoding.cs
- CacheVirtualItemsEvent.cs
- x509store.cs
- EventHandlerList.cs