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
- WebAdminConfigurationHelper.cs
- ViewSimplifier.cs
- AdjustableArrowCap.cs
- xsdvalidator.cs
- OptimalBreakSession.cs
- WebConfigurationHostFileChange.cs
- SqlUtils.cs
- DefaultIfEmptyQueryOperator.cs
- WebPartZone.cs
- ResourceExpressionBuilder.cs
- CodeIdentifier.cs
- HeaderCollection.cs
- SoapCodeExporter.cs
- MetadataException.cs
- assemblycache.cs
- FontNameEditor.cs
- PartialCachingAttribute.cs
- DBSqlParser.cs
- DataBindEngine.cs
- XmlSerializationGeneratedCode.cs
- MachineKeyValidationConverter.cs
- AppSettingsExpressionBuilder.cs
- CultureInfoConverter.cs
- HelpInfo.cs
- WebServiceTypeData.cs
- DocumentApplicationJournalEntry.cs
- IQueryable.cs
- XmlSchemaAttributeGroup.cs
- UDPClient.cs
- SubMenuStyleCollectionEditor.cs
- InvokeMethodActivityDesigner.cs
- SymbolType.cs
- EventLogPermission.cs
- FileSystemWatcher.cs
- PreservationFileReader.cs
- DesignSurfaceCollection.cs
- DataGridHyperlinkColumn.cs
- SqlSelectStatement.cs
- ContentHostHelper.cs
- Timer.cs
- ProfilePropertySettings.cs
- PersonalizablePropertyEntry.cs
- EllipticalNodeOperations.cs
- DefaultMemberAttribute.cs
- EmptyStringExpandableObjectConverter.cs
- MemoryMappedFileSecurity.cs
- PolicyStatement.cs
- DoubleAnimationClockResource.cs
- xamlnodes.cs
- HeaderFilter.cs
- DesigntimeLicenseContextSerializer.cs
- Schedule.cs
- XmlSchemaSet.cs
- CustomSignedXml.cs
- DataGridComboBoxColumn.cs
- MenuBindingsEditor.cs
- TextEditorSelection.cs
- TabletCollection.cs
- ValueConversionAttribute.cs
- NavigationWindowAutomationPeer.cs
- PathSegmentCollection.cs
- BooleanSwitch.cs
- DocumentViewer.cs
- TdsParserHelperClasses.cs
- EncoderReplacementFallback.cs
- XmlSchemaComplexContentExtension.cs
- WebPartZoneBaseDesigner.cs
- CfgParser.cs
- HttpCachePolicyBase.cs
- BlobPersonalizationState.cs
- _UncName.cs
- SqlNamer.cs
- DocumentViewer.cs
- VectorAnimation.cs
- TextSpanModifier.cs
- ProcessHostFactoryHelper.cs
- MetadataArtifactLoaderFile.cs
- XamlStyleSerializer.cs
- AnnouncementEventArgs.cs
- SymbolMethod.cs
- FormatControl.cs
- XsltFunctions.cs
- SuspendDesigner.cs
- RSAOAEPKeyExchangeDeformatter.cs
- PrivacyNoticeBindingElementImporter.cs
- CssTextWriter.cs
- HashHelper.cs
- Int32Storage.cs
- ObjectListDesigner.cs
- DataControlExtensions.cs
- VisualBasicSettingsHandler.cs
- _DomainName.cs
- ServiceContractGenerationContext.cs
- TrackBarRenderer.cs
- DataObjectSettingDataEventArgs.cs
- OrthographicCamera.cs
- GroupBoxAutomationPeer.cs
- GetIndexBinder.cs
- AlternateViewCollection.cs
- CodeParameterDeclarationExpressionCollection.cs