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
- OperationContextScope.cs
- FormattedText.cs
- WebBrowserContainer.cs
- TimerElapsedEvenArgs.cs
- SourceChangedEventArgs.cs
- WorkflowServiceNamespace.cs
- CopyOfAction.cs
- EndpointReference.cs
- BuildTopDownAttribute.cs
- SiteMapHierarchicalDataSourceView.cs
- PageFunction.cs
- IndexingContentUnit.cs
- HwndSourceParameters.cs
- GlyphCollection.cs
- ScaleTransform.cs
- Int32.cs
- PropertyItemInternal.cs
- RegistryKey.cs
- HtmlHistory.cs
- SetIndexBinder.cs
- ExceptionRoutedEventArgs.cs
- ApplicationContext.cs
- HttpValueCollection.cs
- AnnotationComponentManager.cs
- sortedlist.cs
- PointLightBase.cs
- SecurityAppliedMessage.cs
- DiffuseMaterial.cs
- PTManager.cs
- Zone.cs
- ByeMessageCD1.cs
- ThaiBuddhistCalendar.cs
- Stopwatch.cs
- SwitchAttribute.cs
- Size3DConverter.cs
- PanelContainerDesigner.cs
- EnumerableRowCollectionExtensions.cs
- LogRecordSequence.cs
- SoapFault.cs
- WindowsIdentity.cs
- StorageEndPropertyMapping.cs
- WebPartManagerInternals.cs
- DataGridViewColumnHeaderCell.cs
- HtmlValidatorAdapter.cs
- VisualProxy.cs
- LayeredChannelFactory.cs
- LinkConverter.cs
- SystemInfo.cs
- QueryStringConverter.cs
- ProgressBarBrushConverter.cs
- RegistryPermission.cs
- SessionIDManager.cs
- TextDpi.cs
- PersonalizationDictionary.cs
- DesignTimeParseData.cs
- DataGridViewTopLeftHeaderCell.cs
- WebHttpBinding.cs
- ProcessHostServerConfig.cs
- WebPartZone.cs
- ExtensibleSyndicationObject.cs
- BindingElement.cs
- RowsCopiedEventArgs.cs
- InvalidWMPVersionException.cs
- ObjectParameter.cs
- OleDbError.cs
- ValidationSummary.cs
- SyndicationSerializer.cs
- ReachVisualSerializer.cs
- MethodExpr.cs
- NativeObjectSecurity.cs
- NoResizeHandleGlyph.cs
- GlyphsSerializer.cs
- GeneralTransformCollection.cs
- HMACSHA256.cs
- MultiPropertyDescriptorGridEntry.cs
- StatusBar.cs
- PersonalizationDictionary.cs
- DateTimeOffsetAdapter.cs
- UriWriter.cs
- DirectoryNotFoundException.cs
- HTTPRemotingHandler.cs
- Byte.cs
- MinMaxParagraphWidth.cs
- SimpleWorkerRequest.cs
- MarkedHighlightComponent.cs
- SerializationSectionGroup.cs
- PointAnimationUsingKeyFrames.cs
- DictionaryCustomTypeDescriptor.cs
- NameObjectCollectionBase.cs
- DataGridSortingEventArgs.cs
- DiscoveryMessageSequenceGenerator.cs
- GeneralEndpointIdentity.cs
- PointAnimationBase.cs
- GcHandle.cs
- ManualWorkflowSchedulerService.cs
- ReachSerializer.cs
- Package.cs
- InfoCardHelper.cs
- StorageFunctionMapping.cs
- BooleanToVisibilityConverter.cs