Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Shared / MS / Internal / Xaml / Context / XamlFrame.cs / 1305600 / XamlFrame.cs
using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespace MS.Internal.Xaml.Context { abstract class XamlFrame { private int _depth; private XamlFrame _previous; protected XamlFrame() { _depth = -1; } // Copy constructor protected XamlFrame(XamlFrame source) { _depth = source._depth; } public virtual XamlFrame Clone() { // Clone should only be overridden for the classes that really need it // ObjectWriterFrame overrides this so we can reuse the context for // Templates. throw new NotImplementedException(); } // Reset the contents of the Frame so it can be reused in a stack without reallocating. // Depth and previous do not change when we reuse the Frame. public abstract void Reset(); public int Depth { get { Debug.Assert(_depth != -1, "Context Frame is uninitialized"); return _depth; } } public XamlFrame Previous { get { return _previous; } set { _previous = value; _depth = (_previous == null) ? 0 : _previous._depth + 1; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespace MS.Internal.Xaml.Context { abstract class XamlFrame { private int _depth; private XamlFrame _previous; protected XamlFrame() { _depth = -1; } // Copy constructor protected XamlFrame(XamlFrame source) { _depth = source._depth; } public virtual XamlFrame Clone() { // Clone should only be overridden for the classes that really need it // ObjectWriterFrame overrides this so we can reuse the context for // Templates. throw new NotImplementedException(); } // Reset the contents of the Frame so it can be reused in a stack without reallocating. // Depth and previous do not change when we reuse the Frame. public abstract void Reset(); public int Depth { get { Debug.Assert(_depth != -1, "Context Frame is uninitialized"); return _depth; } } public XamlFrame Previous { get { return _previous; } set { _previous = value; _depth = (_previous == null) ? 0 : _previous._depth + 1; } } } } // 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
- ListItemsCollectionEditor.cs
- TypeLibConverter.cs
- ipaddressinformationcollection.cs
- StringBuilder.cs
- WindowsListViewGroup.cs
- ListViewGroupConverter.cs
- RuleConditionDialog.Designer.cs
- ReadOnlyCollectionBase.cs
- Blend.cs
- PropertyRef.cs
- FontEditor.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- COM2PictureConverter.cs
- MultipartIdentifier.cs
- ComplexBindingPropertiesAttribute.cs
- _LoggingObject.cs
- IncrementalHitTester.cs
- MemberDescriptor.cs
- MimeWriter.cs
- ExpressionDumper.cs
- SecurityKeyUsage.cs
- WindowsListView.cs
- DateTimePickerDesigner.cs
- ConcurrentQueue.cs
- DataControlCommands.cs
- Queue.cs
- SiteOfOriginContainer.cs
- PropertyDescriptor.cs
- AssemblyCollection.cs
- _ListenerResponseStream.cs
- Visitors.cs
- LookupTables.cs
- NavigationProperty.cs
- SafeHGlobalHandleCritical.cs
- ApplicationSecurityManager.cs
- PasswordTextContainer.cs
- SqlRewriteScalarSubqueries.cs
- documentsequencetextcontainer.cs
- PrefixQName.cs
- RuntimeWrappedException.cs
- log.cs
- InfoCard.cs
- PropertyItem.cs
- IChannel.cs
- _NativeSSPI.cs
- _UncName.cs
- VirtualPath.cs
- Normalization.cs
- ProcessModelInfo.cs
- EasingQuaternionKeyFrame.cs
- XmlSerializableWriter.cs
- FlagsAttribute.cs
- VariableAction.cs
- SmtpNetworkElement.cs
- FormViewUpdatedEventArgs.cs
- HexParser.cs
- sqlstateclientmanager.cs
- ReferentialConstraintRoleElement.cs
- ComponentChangingEvent.cs
- SelectionRange.cs
- EditorPart.cs
- StorageMappingItemLoader.cs
- CodeTypeMemberCollection.cs
- httpstaticobjectscollection.cs
- SpeechRecognizer.cs
- SkipStoryboardToFill.cs
- FlowDocument.cs
- ColorTranslator.cs
- RawContentTypeMapper.cs
- ComplusEndpointConfigContainer.cs
- Track.cs
- XmlEventCache.cs
- NameValuePermission.cs
- MetabaseSettingsIis7.cs
- SocketSettings.cs
- PersonalizationProviderCollection.cs
- AsymmetricKeyExchangeFormatter.cs
- DirectoryObjectSecurity.cs
- CustomErrorsSectionWrapper.cs
- EntityType.cs
- DifferencingCollection.cs
- TextProviderWrapper.cs
- UnknownMessageReceivedEventArgs.cs
- MethodAccessException.cs
- Accessors.cs
- DynamicDataResources.Designer.cs
- Rect.cs
- CustomValidator.cs
- RenderDataDrawingContext.cs
- ConfigUtil.cs
- SafeEventLogWriteHandle.cs
- WebServiceReceiveDesigner.cs
- ListBoxItemWrapperAutomationPeer.cs
- CreatingCookieEventArgs.cs
- ObjectListItem.cs
- Utils.cs
- DataGridViewRowConverter.cs
- RSAPKCS1SignatureFormatter.cs
- StorageAssociationSetMapping.cs
- DiscoveryProxy.cs