Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ColorComboBox.cs
- UnicastIPAddressInformationCollection.cs
- ConstraintCollection.cs
- StylusPointCollection.cs
- AndCondition.cs
- TypeSystemProvider.cs
- ContactManager.cs
- DataTemplateSelector.cs
- HtmlInputText.cs
- DataListGeneralPage.cs
- GPStream.cs
- PrintController.cs
- Base64Encoder.cs
- X509CertificateCollection.cs
- XmlAttributeProperties.cs
- Size.cs
- ExpressionBindingCollection.cs
- StructuredCompositeActivityDesigner.cs
- EntityDataSourceColumn.cs
- TextEditorLists.cs
- Simplifier.cs
- QilBinary.cs
- XmlAttributeAttribute.cs
- TransformPatternIdentifiers.cs
- ToolStripArrowRenderEventArgs.cs
- Flattener.cs
- AlgoModule.cs
- ObjectReferenceStack.cs
- _TimerThread.cs
- RawStylusInputReport.cs
- NavigationProperty.cs
- SerializationBinder.cs
- ResizeBehavior.cs
- GeneratedContractType.cs
- CodeCatchClause.cs
- ExceptionUtil.cs
- StringArrayConverter.cs
- ProtocolsSection.cs
- DeviceSpecificDesigner.cs
- AssertFilter.cs
- InputScopeManager.cs
- PlanCompiler.cs
- OracleParameterBinding.cs
- ShaperBuffers.cs
- MessageSmuggler.cs
- ExtensibleClassFactory.cs
- AsymmetricKeyExchangeFormatter.cs
- ClientConfigurationHost.cs
- COM2TypeInfoProcessor.cs
- activationcontext.cs
- ConfigurationStrings.cs
- AddInEnvironment.cs
- SystemTcpStatistics.cs
- ACL.cs
- CreateUserErrorEventArgs.cs
- Nodes.cs
- DefaultObjectMappingItemCollection.cs
- Type.cs
- BamlLocalizabilityResolver.cs
- FunctionDescription.cs
- RoleManagerModule.cs
- HttpListenerException.cs
- DocumentReferenceCollection.cs
- SecurityHelper.cs
- HttpApplicationStateWrapper.cs
- ObjectDataSourceStatusEventArgs.cs
- XmlUrlEditor.cs
- typedescriptorpermission.cs
- InstanceContext.cs
- DataGridToolTip.cs
- StickyNoteContentControl.cs
- FormDocumentDesigner.cs
- DataGridViewImageCell.cs
- CookieProtection.cs
- PropertyEmitterBase.cs
- PositiveTimeSpanValidator.cs
- ScaleTransform.cs
- NavigatorInput.cs
- ObjectTag.cs
- ExtensionSurface.cs
- BackgroundWorker.cs
- SqlVisitor.cs
- ConfigurationManagerInternal.cs
- ToolStripRenderer.cs
- StrokeCollection.cs
- XmlSerializerFaultFormatter.cs
- VarInfo.cs
- GcSettings.cs
- OutputCacheSettingsSection.cs
- ItemsControlAutomationPeer.cs
- BaseComponentEditor.cs
- XmlObjectSerializerContext.cs
- ClrPerspective.cs
- X509ThumbprintKeyIdentifierClause.cs
- CancellationTokenRegistration.cs
- ExceptionUtil.cs
- XsltInput.cs
- RelationshipWrapper.cs
- DynamicQueryableWrapper.cs
- MatrixAnimationUsingPath.cs