Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Documents / RtfFormatStack.cs / 1305600 / 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
- EncryptedPackage.cs
- IconEditor.cs
- MimePart.cs
- SecurityTraceRecordHelper.cs
- ColorConvertedBitmap.cs
- ManipulationStartingEventArgs.cs
- _ListenerResponseStream.cs
- storepermission.cs
- AutoResizedEvent.cs
- DesignerSerializationVisibilityAttribute.cs
- ScrollChrome.cs
- PropertySourceInfo.cs
- FormatVersion.cs
- PrivilegedConfigurationManager.cs
- AnnotationDocumentPaginator.cs
- Win32PrintDialog.cs
- TextServicesDisplayAttribute.cs
- UserControlParser.cs
- ProcessHost.cs
- OLEDB_Util.cs
- DesignTimeParseData.cs
- CodeGeneratorAttribute.cs
- HotCommands.cs
- counter.cs
- CmsInterop.cs
- CacheChildrenQuery.cs
- COM2PropertyBuilderUITypeEditor.cs
- Expressions.cs
- TextAutomationPeer.cs
- DispatcherExceptionFilterEventArgs.cs
- ScriptComponentDescriptor.cs
- ThemeableAttribute.cs
- PointAnimationUsingKeyFrames.cs
- _FixedSizeReader.cs
- ThreadSafeList.cs
- baseaxisquery.cs
- XamlParser.cs
- ToolbarAUtomationPeer.cs
- WindowHideOrCloseTracker.cs
- WebServiceData.cs
- AutoGeneratedField.cs
- WebRequestModuleElementCollection.cs
- CodeMemberProperty.cs
- ClassHandlersStore.cs
- RegexReplacement.cs
- UnicodeEncoding.cs
- SymbolPair.cs
- MembershipUser.cs
- SettingsAttributes.cs
- GridViewAutomationPeer.cs
- Converter.cs
- BrowserCapabilitiesCodeGenerator.cs
- ListBindableAttribute.cs
- ReadOnlyTernaryTree.cs
- PingOptions.cs
- DataBindingCollectionConverter.cs
- SchemaInfo.cs
- SqlResolver.cs
- XmlBoundElement.cs
- GlobalizationSection.cs
- HtmlContainerControl.cs
- MethodRental.cs
- EntityTransaction.cs
- ChangesetResponse.cs
- GenericTypeParameterBuilder.cs
- TemplateControlCodeDomTreeGenerator.cs
- Bind.cs
- CommonXSendMessage.cs
- XmlDomTextWriter.cs
- RuntimeResourceSet.cs
- InvalidCommandTreeException.cs
- PropertyPathWorker.cs
- sqlnorm.cs
- StringUtil.cs
- BulletedListDesigner.cs
- SoapClientMessage.cs
- SerialStream.cs
- SchemaType.cs
- StylusButtonEventArgs.cs
- SortKey.cs
- WebBrowserUriTypeConverter.cs
- Point3DAnimationBase.cs
- ToolStrip.cs
- WebEncodingValidator.cs
- IntSecurity.cs
- Enlistment.cs
- LogReservationCollection.cs
- CodeGotoStatement.cs
- HttpWebResponse.cs
- CurrentChangingEventManager.cs
- ViewManager.cs
- OdbcReferenceCollection.cs
- EntityDesignerBuildProvider.cs
- Timer.cs
- WebPartTransformerAttribute.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- RequiredFieldValidator.cs
- GridViewCellAutomationPeer.cs
- ZeroOpNode.cs
- MarginCollapsingState.cs