Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / TemplateBaseAction.cs / 1 / TemplateBaseAction.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.Diagnostics; using System.Collections; using System.Xml; using System.Xml.XPath; using System.Globalization; // RootAction and TemplateActions have a litle in common -- they are responsible for variable allocation // TemplateBaseAction -- implenemts this shared behavior internal abstract class TemplateBaseAction : ContainerAction { protected int variableCount; // space to allocate on frame for variables private int variableFreeSlot; // compile time counter responsiable for variable placement logic public int AllocateVariableSlot() { // Variable placement logic. Optimized int thisSlot = this.variableFreeSlot; this.variableFreeSlot ++; if(this.variableCount < this.variableFreeSlot) { this.variableCount = this.variableFreeSlot; } return thisSlot; } public void ReleaseVariableSlots(int n) { // This code does optimisation of variable placement. Comented out for this version // Reuse of the variable disable the check that variable was assigned before the actual use // this check has to be done in compile time n future. // this.variableFreeSlot -= n; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.Diagnostics; using System.Collections; using System.Xml; using System.Xml.XPath; using System.Globalization; // RootAction and TemplateActions have a litle in common -- they are responsible for variable allocation // TemplateBaseAction -- implenemts this shared behavior internal abstract class TemplateBaseAction : ContainerAction { protected int variableCount; // space to allocate on frame for variables private int variableFreeSlot; // compile time counter responsiable for variable placement logic public int AllocateVariableSlot() { // Variable placement logic. Optimized int thisSlot = this.variableFreeSlot; this.variableFreeSlot ++; if(this.variableCount < this.variableFreeSlot) { this.variableCount = this.variableFreeSlot; } return thisSlot; } public void ReleaseVariableSlots(int n) { // This code does optimisation of variable placement. Comented out for this version // Reuse of the variable disable the check that variable was assigned before the actual use // this check has to be done in compile time n future. // this.variableFreeSlot -= n; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BufferedGraphicsContext.cs
- PropertyReferenceExtension.cs
- FixedTextContainer.cs
- XmlSignificantWhitespace.cs
- WpfSharedBamlSchemaContext.cs
- CustomErrorsSectionWrapper.cs
- CodeTypeReference.cs
- FileInfo.cs
- DataServiceBuildProvider.cs
- CommandConverter.cs
- ReachDocumentSequenceSerializer.cs
- EntityCommand.cs
- XmlValidatingReader.cs
- DataGridRow.cs
- DependencyPropertyChangedEventArgs.cs
- RootNamespaceAttribute.cs
- BrowserInteropHelper.cs
- OracleConnectionFactory.cs
- PropertyMetadata.cs
- FlowPosition.cs
- XamlStackWriter.cs
- WeakHashtable.cs
- TextEncodedRawTextWriter.cs
- Oid.cs
- Funcletizer.cs
- InputDevice.cs
- RootBrowserWindowAutomationPeer.cs
- ScriptManager.cs
- StringAttributeCollection.cs
- AdapterUtil.cs
- LogManagementAsyncResult.cs
- XamlVector3DCollectionSerializer.cs
- SQLMoneyStorage.cs
- ActiveXHelper.cs
- UrlAuthorizationModule.cs
- COAUTHINFO.cs
- CommandLineParser.cs
- SoapIncludeAttribute.cs
- SimpleFieldTemplateFactory.cs
- MimeParameter.cs
- RealizedColumnsBlock.cs
- SecurityPolicySection.cs
- EncodingInfo.cs
- FrameworkTextComposition.cs
- StreamReader.cs
- templategroup.cs
- EmptyStringExpandableObjectConverter.cs
- ChannelPoolSettings.cs
- ButtonColumn.cs
- SwitchLevelAttribute.cs
- NamedPipeChannelListener.cs
- ProfilePropertySettings.cs
- BoundingRectTracker.cs
- ComponentEditorPage.cs
- EntityProviderFactory.cs
- PolyQuadraticBezierSegment.cs
- AspNetHostingPermission.cs
- BlurBitmapEffect.cs
- ParameterToken.cs
- GeometryHitTestParameters.cs
- CompositeTypefaceMetrics.cs
- ColorDialog.cs
- ToolStripRendererSwitcher.cs
- Relationship.cs
- SQLString.cs
- SspiWrapper.cs
- XPathMultyIterator.cs
- PasswordPropertyTextAttribute.cs
- ViewPort3D.cs
- ServiceEndpointElement.cs
- FilteredAttributeCollection.cs
- SkewTransform.cs
- OutputCacheModule.cs
- HuffModule.cs
- LocatorPartList.cs
- ObservableCollection.cs
- DisableDpiAwarenessAttribute.cs
- PagesSection.cs
- CompModSwitches.cs
- SubMenuStyleCollection.cs
- SqlTypeConverter.cs
- FontFamilyConverter.cs
- UiaCoreProviderApi.cs
- OneOfConst.cs
- DateTimeConstantAttribute.cs
- InternalConfigHost.cs
- _AcceptOverlappedAsyncResult.cs
- MarkupCompilePass2.cs
- EntityProviderFactory.cs
- Content.cs
- UrlUtility.cs
- WindowPattern.cs
- ComponentCommands.cs
- DirectionalLight.cs
- BackStopAuthenticationModule.cs
- ObjectHandle.cs
- SqlDependencyListener.cs
- ComponentResourceKeyConverter.cs
- LinkTarget.cs
- TTSEngineTypes.cs