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
- AnimatedTypeHelpers.cs
- SocketException.cs
- SqlBooleanMismatchVisitor.cs
- _SslSessionsCache.cs
- DeclaredTypeValidator.cs
- FrameworkReadOnlyPropertyMetadata.cs
- ZipArchive.cs
- _UriSyntax.cs
- CacheVirtualItemsEvent.cs
- ELinqQueryState.cs
- SecurityException.cs
- ReadOnlyDataSourceView.cs
- RoutedEventValueSerializer.cs
- ApplicationHost.cs
- Vector3dCollection.cs
- Stream.cs
- Int16Converter.cs
- OverflowException.cs
- LabelLiteral.cs
- XmlHierarchicalEnumerable.cs
- WorkflowLayouts.cs
- SocketStream.cs
- ListViewPagedDataSource.cs
- ActivationArguments.cs
- Comparer.cs
- ProxyManager.cs
- TextEditorParagraphs.cs
- DbConnectionPoolIdentity.cs
- RouteItem.cs
- MetadataItem.cs
- MetadataUtilsSmi.cs
- DbConnectionStringCommon.cs
- ListView.cs
- LinearKeyFrames.cs
- FormParameter.cs
- UIElement3DAutomationPeer.cs
- ClientFormsAuthenticationMembershipProvider.cs
- CompositeTypefaceMetrics.cs
- MsmqTransportReceiveParameters.cs
- Delegate.cs
- Speller.cs
- LocatorPart.cs
- ServiceProviders.cs
- TaskResultSetter.cs
- DesignTimeVisibleAttribute.cs
- Condition.cs
- SqlAliasesReferenced.cs
- DPAPIProtectedConfigurationProvider.cs
- InternalControlCollection.cs
- RowType.cs
- Form.cs
- LineServicesCallbacks.cs
- FrameworkElementFactoryMarkupObject.cs
- COM2EnumConverter.cs
- Propagator.cs
- MailAddressParser.cs
- DataGridViewColumnStateChangedEventArgs.cs
- SinglePageViewer.cs
- SvcFileManager.cs
- NotEqual.cs
- WebFaultClientMessageInspector.cs
- LeftCellWrapper.cs
- WebServiceReceive.cs
- OperationAbortedException.cs
- SettingsProperty.cs
- GrammarBuilderRuleRef.cs
- XmlSchemas.cs
- DSASignatureDeformatter.cs
- hresults.cs
- FramingEncoders.cs
- Section.cs
- ModuleBuilder.cs
- FixedFindEngine.cs
- SharedConnectionWorkflowTransactionService.cs
- PackagePart.cs
- ErrorWrapper.cs
- AddDataControlFieldDialog.cs
- CookieHandler.cs
- EFAssociationProvider.cs
- Comparer.cs
- OleServicesContext.cs
- WaitingCursor.cs
- PerformanceCounterPermissionEntry.cs
- WebBrowser.cs
- InternalConfigConfigurationFactory.cs
- DictionaryEntry.cs
- UniqueConstraint.cs
- ListViewCommandEventArgs.cs
- Statements.cs
- MachineKeyValidationConverter.cs
- WindowVisualStateTracker.cs
- UnsignedPublishLicense.cs
- ToolBarButton.cs
- SchemaCollectionCompiler.cs
- Activator.cs
- XmlBinaryWriter.cs
- BooleanSwitch.cs
- XamlInt32CollectionSerializer.cs
- InvalidPrinterException.cs
- UriTemplateDispatchFormatter.cs