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
- BooleanExpr.cs
- activationcontext.cs
- CodeDomDecompiler.cs
- NotificationContext.cs
- Int32Converter.cs
- DesignerAttribute.cs
- GorillaCodec.cs
- ServiceDebugElement.cs
- OrderByBuilder.cs
- IgnoreFlushAndCloseStream.cs
- Point.cs
- ProfessionalColors.cs
- RewritingPass.cs
- RegistryConfigurationProvider.cs
- smtpconnection.cs
- DefaultSerializationProviderAttribute.cs
- PeekCompletedEventArgs.cs
- ToolStripCodeDomSerializer.cs
- autovalidator.cs
- TableLayoutRowStyleCollection.cs
- CodePrimitiveExpression.cs
- XmlEventCache.cs
- SspiSafeHandles.cs
- Random.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- _BaseOverlappedAsyncResult.cs
- TextParagraph.cs
- DTCTransactionManager.cs
- VisualProxy.cs
- HMACMD5.cs
- CachedBitmap.cs
- WindowsRebar.cs
- FieldNameLookup.cs
- LineBreakRecord.cs
- SymmetricAlgorithm.cs
- ObjectAnimationUsingKeyFrames.cs
- PropertyPathWorker.cs
- CompositeDataBoundControl.cs
- RowsCopiedEventArgs.cs
- GridErrorDlg.cs
- DetailsViewDeleteEventArgs.cs
- WindowsTokenRoleProvider.cs
- SimpleHandlerBuildProvider.cs
- DbModificationCommandTree.cs
- HostExecutionContextManager.cs
- HtmlTableCell.cs
- BitmapEffectvisualstate.cs
- FrameDimension.cs
- SqlBulkCopy.cs
- DirectoryObjectSecurity.cs
- DigestTraceRecordHelper.cs
- UnsafeNativeMethods.cs
- HostTimeoutsElement.cs
- TabControlAutomationPeer.cs
- TypeUtil.cs
- ToolStripRenderer.cs
- WebResourceUtil.cs
- LateBoundBitmapDecoder.cs
- ObjectReferenceStack.cs
- Span.cs
- BrowserCapabilitiesCompiler.cs
- NotificationContext.cs
- CommandHelpers.cs
- CallbackValidator.cs
- AlgoModule.cs
- AssemblyName.cs
- SQLInt64.cs
- XmlSchemaException.cs
- DbProviderServices.cs
- ArrayList.cs
- DesignerValidationSummaryAdapter.cs
- filewebresponse.cs
- oledbmetadatacollectionnames.cs
- SplineKeyFrames.cs
- XmlNamespaceManager.cs
- SystemGatewayIPAddressInformation.cs
- CompilerCollection.cs
- IndexedGlyphRun.cs
- TextEditorSpelling.cs
- Models.cs
- UnSafeCharBuffer.cs
- WebHeaderCollection.cs
- HostingEnvironmentWrapper.cs
- OrthographicCamera.cs
- DateTimeUtil.cs
- ProtectedConfiguration.cs
- XPathSingletonIterator.cs
- ColorAnimation.cs
- NetworkInformationException.cs
- HorizontalAlignConverter.cs
- AbstractSvcMapFileLoader.cs
- DataGridViewRowPrePaintEventArgs.cs
- TimeoutValidationAttribute.cs
- XmlDataCollection.cs
- DbParameterCollectionHelper.cs
- BinHexDecoder.cs
- EndEvent.cs
- DataColumnPropertyDescriptor.cs
- MenuItemStyle.cs
- SimpleTextLine.cs