Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- EmptyEnumerable.cs
- HttpWriter.cs
- MenuBindingsEditor.cs
- datacache.cs
- UdpChannelFactory.cs
- RSAPKCS1SignatureDeformatter.cs
- SettingsPropertyValue.cs
- CannotUnloadAppDomainException.cs
- RMEnrollmentPage3.cs
- DataGridCommandEventArgs.cs
- _OSSOCK.cs
- C14NUtil.cs
- BrowserInteropHelper.cs
- ResourceContainerWrapper.cs
- Timer.cs
- DataGridViewTextBoxEditingControl.cs
- InstrumentationTracker.cs
- ToolStripContentPanelDesigner.cs
- ActivityExecutionContext.cs
- PackageDigitalSignature.cs
- TrackingLocationCollection.cs
- TextRangeEditLists.cs
- TemplateBindingExpressionConverter.cs
- LocationSectionRecord.cs
- DataGridViewHeaderCell.cs
- PanelStyle.cs
- ITextView.cs
- AvTraceDetails.cs
- CodeTypeDelegate.cs
- QueryStringConverter.cs
- PageParser.cs
- ItemMap.cs
- Util.cs
- CompilationUtil.cs
- BasicDesignerLoader.cs
- DataServiceRequestOfT.cs
- PropertyPathConverter.cs
- EntityViewGenerator.cs
- VisualTarget.cs
- DbDataAdapter.cs
- CodeAttributeArgumentCollection.cs
- HitTestParameters3D.cs
- Message.cs
- ImageClickEventArgs.cs
- TCPListener.cs
- Pen.cs
- PropertyValueChangedEvent.cs
- TraceSection.cs
- FilterElement.cs
- sqlpipe.cs
- ChannelSinkStacks.cs
- MasterPage.cs
- TabItem.cs
- AsymmetricKeyExchangeDeformatter.cs
- AlternateView.cs
- MouseButtonEventArgs.cs
- Line.cs
- ReceiveActivityDesignerTheme.cs
- LineServicesCallbacks.cs
- DbProviderManifest.cs
- BitmapEffectInputData.cs
- SqlClientWrapperSmiStreamChars.cs
- XmlResolver.cs
- prompt.cs
- ScaleTransform.cs
- FlowLayoutSettings.cs
- Thickness.cs
- WebSysDisplayNameAttribute.cs
- ScriptingWebServicesSectionGroup.cs
- UIElementIsland.cs
- XhtmlTextWriter.cs
- TemplateKeyConverter.cs
- BaseResourcesBuildProvider.cs
- PointValueSerializer.cs
- LockCookie.cs
- WCFModelStrings.Designer.cs
- cookie.cs
- ScrollChrome.cs
- Roles.cs
- MarkerProperties.cs
- BrowserTree.cs
- TagPrefixCollection.cs
- OdbcStatementHandle.cs
- FixedPosition.cs
- TypeForwardedToAttribute.cs
- JsonGlobals.cs
- SpellerHighlightLayer.cs
- HiddenField.cs
- GrammarBuilderWildcard.cs
- SessionEndingEventArgs.cs
- TlsnegoTokenProvider.cs
- FontWeightConverter.cs
- SrgsNameValueTag.cs
- ConvertEvent.cs
- BlurBitmapEffect.cs
- InputReport.cs
- DataGridViewButtonColumn.cs
- CompoundFileReference.cs
- InheritedPropertyChangedEventArgs.cs
- KeyTimeConverter.cs