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
- AlternateView.cs
- mediaeventshelper.cs
- StylusButton.cs
- PersonalizablePropertyEntry.cs
- DbDeleteCommandTree.cs
- ThemeableAttribute.cs
- FileBasedResourceGroveler.cs
- GroupByExpressionRewriter.cs
- FixedSOMSemanticBox.cs
- CSharpCodeProvider.cs
- DataTemplateKey.cs
- MenuItemCollection.cs
- BuildManager.cs
- FontEmbeddingManager.cs
- TransportDefaults.cs
- CompositeFontInfo.cs
- JapaneseCalendar.cs
- FileSystemInfo.cs
- ChtmlSelectionListAdapter.cs
- UpdatePanelTriggerCollection.cs
- dataprotectionpermission.cs
- Helper.cs
- ToolStripSplitButton.cs
- QueryAccessibilityHelpEvent.cs
- InputMethod.cs
- WebCategoryAttribute.cs
- ReturnType.cs
- ComPersistableTypeElement.cs
- NamedElement.cs
- CacheVirtualItemsEvent.cs
- StylusButton.cs
- COM2ColorConverter.cs
- Decoder.cs
- PackWebResponse.cs
- SafeFileHandle.cs
- DataGridColumnCollection.cs
- BevelBitmapEffect.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- TreeViewHitTestInfo.cs
- LambdaCompiler.cs
- XmlElementList.cs
- DynamicFilterExpression.cs
- BigInt.cs
- Dynamic.cs
- initElementDictionary.cs
- ChangeDirector.cs
- Expander.cs
- Label.cs
- ConditionedDesigner.cs
- ExpressionVisitor.cs
- ErrorStyle.cs
- MultiTrigger.cs
- DependencyPropertyDescriptor.cs
- WindowsGraphics2.cs
- LocalIdCollection.cs
- MetadataCache.cs
- ActivityStatusChangeEventArgs.cs
- TypeReference.cs
- TableParaClient.cs
- DefaultProxySection.cs
- DurableDispatcherAddressingFault.cs
- SecurityKeyType.cs
- ExecutionProperties.cs
- RewritingPass.cs
- TypeSchema.cs
- FileLogRecordHeader.cs
- DefaultWorkflowLoaderService.cs
- panel.cs
- RemoteWebConfigurationHost.cs
- SQLDecimal.cs
- FtpCachePolicyElement.cs
- TextSchema.cs
- hwndwrapper.cs
- Delay.cs
- IndexedEnumerable.cs
- SolidBrush.cs
- coordinator.cs
- FloaterParagraph.cs
- TaskFormBase.cs
- DataGridCellClipboardEventArgs.cs
- MultiSelector.cs
- SqlConnectionString.cs
- WeakHashtable.cs
- ConnectionPoolManager.cs
- JpegBitmapEncoder.cs
- TreeViewHitTestInfo.cs
- HttpRawResponse.cs
- QilStrConcat.cs
- XmlSignatureManifest.cs
- ChangeProcessor.cs
- FocusTracker.cs
- TraceListeners.cs
- DynamicObjectAccessor.cs
- DataGridViewBand.cs
- DbProviderServices.cs
- EventToken.cs
- _ScatterGatherBuffers.cs
- PrintControllerWithStatusDialog.cs
- ExceptionHandlerDesigner.cs
- ACL.cs