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
- EntityClassGenerator.cs
- SoapAttributeAttribute.cs
- RecordManager.cs
- SimpleLine.cs
- ServerProtocol.cs
- ProfileService.cs
- RoleGroupCollectionEditor.cs
- RepeatButtonAutomationPeer.cs
- InstanceData.cs
- NumberFormatter.cs
- BufferAllocator.cs
- XmlWellformedWriter.cs
- CompositeDispatchFormatter.cs
- DesignBindingConverter.cs
- DoWorkEventArgs.cs
- TextParaLineResult.cs
- SpotLight.cs
- ControlBuilder.cs
- DatagramAdapter.cs
- ErrorInfoXmlDocument.cs
- DependentList.cs
- FileCodeGroup.cs
- TableStyle.cs
- PageAdapter.cs
- SystemNetworkInterface.cs
- WebScriptEnablingElement.cs
- LinqDataSourceHelper.cs
- Process.cs
- ParameterModifier.cs
- StringFreezingAttribute.cs
- SafeWaitHandle.cs
- CallTemplateAction.cs
- ConsumerConnectionPointCollection.cs
- BitmapCodecInfo.cs
- UpDownBaseDesigner.cs
- InitializerFacet.cs
- CryptoProvider.cs
- SamlAttribute.cs
- FixedDocument.cs
- CmsInterop.cs
- TabletCollection.cs
- ShaderEffect.cs
- HttpCookiesSection.cs
- ScriptBehaviorDescriptor.cs
- ComponentChangingEvent.cs
- DefaultTextStoreTextComposition.cs
- StylusPointDescription.cs
- GroupJoinQueryOperator.cs
- CroppedBitmap.cs
- WeakReferenceList.cs
- Hashtable.cs
- HtmlTableCell.cs
- hwndwrapper.cs
- UIHelper.cs
- LogRestartAreaEnumerator.cs
- DataSet.cs
- DataServiceHostWrapper.cs
- ObjectTag.cs
- Rect.cs
- BindStream.cs
- LayoutEditorPart.cs
- PipelineModuleStepContainer.cs
- XsltContext.cs
- ThemeableAttribute.cs
- exports.cs
- DataGridViewAdvancedBorderStyle.cs
- QilXmlWriter.cs
- TypefaceMetricsCache.cs
- BoolExpr.cs
- basevalidator.cs
- Int64.cs
- DataSvcMapFile.cs
- datacache.cs
- OleDbDataAdapter.cs
- BCLDebug.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- ObjectParameter.cs
- EDesignUtil.cs
- FormViewDeleteEventArgs.cs
- NotImplementedException.cs
- SettingsBase.cs
- QueryCacheKey.cs
- CallTemplateAction.cs
- AppendHelper.cs
- DispatcherSynchronizationContext.cs
- infer.cs
- DeflateStream.cs
- ScrollBarRenderer.cs
- ThousandthOfEmRealPoints.cs
- WindowsFormsHelpers.cs
- BackEase.cs
- basenumberconverter.cs
- BrowserTree.cs
- TargetInvocationException.cs
- Object.cs
- TextSelectionHelper.cs
- FrameworkPropertyMetadata.cs
- Graphics.cs
- _SslState.cs
- CmsInterop.cs