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
- BCLDebug.cs
- PopOutPanel.cs
- ScriptControlManager.cs
- ConsumerConnectionPoint.cs
- thaishape.cs
- COM2ExtendedTypeConverter.cs
- OdbcConnectionFactory.cs
- GetImportedCardRequest.cs
- BamlLocalizableResourceKey.cs
- FlowDocumentFormatter.cs
- ProgressBar.cs
- GeometryGroup.cs
- BaseProcessor.cs
- ThreadStaticAttribute.cs
- XmlByteStreamReader.cs
- ToggleProviderWrapper.cs
- XmlSchemaAnnotated.cs
- RealProxy.cs
- EpmSyndicationContentDeSerializer.cs
- PropertyTabAttribute.cs
- EncryptedData.cs
- ElementNotAvailableException.cs
- ForceCopyBuildProvider.cs
- FixedFlowMap.cs
- VarRefManager.cs
- NativeMethods.cs
- TdsRecordBufferSetter.cs
- ISAPIWorkerRequest.cs
- BinaryMethodMessage.cs
- FieldNameLookup.cs
- SqlTypesSchemaImporter.cs
- DataAdapter.cs
- ActivityWithResult.cs
- AuthenticationManager.cs
- XmlTypeAttribute.cs
- DataViewSettingCollection.cs
- DeferredTextReference.cs
- DataGridViewRowsAddedEventArgs.cs
- ToolStripSeparatorRenderEventArgs.cs
- PropertyManager.cs
- IndentTextWriter.cs
- ListControlBuilder.cs
- RC2.cs
- ByteRangeDownloader.cs
- ResourceFallbackManager.cs
- ProxyGenerationError.cs
- ClientEventManager.cs
- TextDocumentView.cs
- MailAddress.cs
- GetPageNumberCompletedEventArgs.cs
- manifestimages.cs
- MediaElementAutomationPeer.cs
- GAC.cs
- AttachmentService.cs
- DesignerValidatorAdapter.cs
- WindowsToolbar.cs
- LinkButton.cs
- CodeDefaultValueExpression.cs
- ErrorEventArgs.cs
- ByteStorage.cs
- RightsManagementPermission.cs
- DynamicExpression.cs
- Metafile.cs
- ListViewInsertEventArgs.cs
- DefaultValueAttribute.cs
- ServiceObjectContainer.cs
- SqlUdtInfo.cs
- TreeViewAutomationPeer.cs
- QueryLifecycle.cs
- PaperSize.cs
- ZipIOBlockManager.cs
- ResourceExpressionBuilder.cs
- TranslateTransform3D.cs
- DiscoveryServerProtocol.cs
- FrameworkElementFactoryMarkupObject.cs
- InputReferenceExpression.cs
- CallTemplateAction.cs
- VectorCollection.cs
- SoapCodeExporter.cs
- DynamicDataRoute.cs
- XmlSchemaObject.cs
- Line.cs
- FontEmbeddingManager.cs
- OdbcCommand.cs
- StatusBarItem.cs
- HostedTcpTransportManager.cs
- LinqDataSourceContextEventArgs.cs
- WindowsEditBoxRange.cs
- QueueProcessor.cs
- WebPartMenu.cs
- QueryParameter.cs
- LinkAreaEditor.cs
- OracleFactory.cs
- ScriptBehaviorDescriptor.cs
- PathFigure.cs
- ColorTypeConverter.cs
- RuntimeIdentifierPropertyAttribute.cs
- IntSecurity.cs
- IApplicationTrustManager.cs
- ChtmlTextBoxAdapter.cs