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
- AdornerDecorator.cs
- BindingList.cs
- RenderData.cs
- MatchingStyle.cs
- ZipIOExtraFieldPaddingElement.cs
- InvalidAsynchronousStateException.cs
- HeaderPanel.cs
- FieldDescriptor.cs
- EDesignUtil.cs
- TailPinnedEventArgs.cs
- NCryptNative.cs
- BinarySecretKeyIdentifierClause.cs
- EncoderExceptionFallback.cs
- ExchangeUtilities.cs
- WebEvents.cs
- DeclaredTypeValidatorAttribute.cs
- UpdatePanel.cs
- DictionaryItemsCollection.cs
- DetailsViewCommandEventArgs.cs
- ProcessHostFactoryHelper.cs
- TemplateNameScope.cs
- WSSecurityJan2004.cs
- PropertyGridView.cs
- WindowsPrincipal.cs
- SafeEventLogWriteHandle.cs
- ProgressChangedEventArgs.cs
- GlyphRunDrawing.cs
- PrimaryKeyTypeConverter.cs
- DataSourceView.cs
- XmlSecureResolver.cs
- AppSettingsExpressionEditor.cs
- DataServices.cs
- MouseBinding.cs
- HtmlShim.cs
- _ListenerRequestStream.cs
- ReadOnlyHierarchicalDataSourceView.cs
- TextElementEnumerator.cs
- EntityModelSchemaGenerator.cs
- ClientScriptManagerWrapper.cs
- CodeAttributeDeclarationCollection.cs
- OneToOneMappingSerializer.cs
- BaseValidator.cs
- SiteMapNodeItemEventArgs.cs
- DBCommand.cs
- ServiceNameCollection.cs
- MSHTMLHost.cs
- Utility.cs
- ManagedWndProcTracker.cs
- AssemblyInfo.cs
- HtmlForm.cs
- ArraySortHelper.cs
- DescendantOverDescendantQuery.cs
- BeginCreateSecurityTokenRequest.cs
- VoiceObjectToken.cs
- CredentialSelector.cs
- HexParser.cs
- BaseDataList.cs
- AsnEncodedData.cs
- BooleanFunctions.cs
- MissingSatelliteAssemblyException.cs
- DriveNotFoundException.cs
- InfiniteIntConverter.cs
- sortedlist.cs
- WpfMemberInvoker.cs
- StrongBox.cs
- RadioButtonStandardAdapter.cs
- ExtensionQuery.cs
- WinEventWrap.cs
- XhtmlCssHandler.cs
- BitmapCodecInfoInternal.cs
- ReadContentAsBinaryHelper.cs
- SynchronizedDispatch.cs
- PageCodeDomTreeGenerator.cs
- RecognitionEventArgs.cs
- SqlIdentifier.cs
- EntityCommand.cs
- WrapPanel.cs
- SBCSCodePageEncoding.cs
- CollectionDataContractAttribute.cs
- HttpChannelBindingToken.cs
- DurableRuntimeValidator.cs
- SchemaSetCompiler.cs
- SettingsSavedEventArgs.cs
- WeakRefEnumerator.cs
- DNS.cs
- SynchronizationValidator.cs
- EntityContainerEmitter.cs
- NativeMethods.cs
- PeerCollaborationPermission.cs
- CaseCqlBlock.cs
- SecurityTokenAuthenticator.cs
- TargetControlTypeCache.cs
- RepeatInfo.cs
- SafeNativeMethodsCLR.cs
- FileFormatException.cs
- LinqDataSourceDeleteEventArgs.cs
- MenuRendererClassic.cs
- ZipFileInfoCollection.cs
- AuthorizationRuleCollection.cs
- ViewPort3D.cs