Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- FreezableOperations.cs
- ListenerConstants.cs
- Delegate.cs
- DataGridViewCellPaintingEventArgs.cs
- PersonalizationEntry.cs
- CodeMemberMethod.cs
- Matrix3DStack.cs
- ProfileSettings.cs
- TextProperties.cs
- HttpPostedFile.cs
- DesignerSerializationManager.cs
- TextTabProperties.cs
- DecoderNLS.cs
- ObservableCollectionDefaultValueFactory.cs
- ParameterExpression.cs
- CmsInterop.cs
- SqlTypeConverter.cs
- NamespaceEmitter.cs
- DataSourceView.cs
- _LocalDataStoreMgr.cs
- ThemeConfigurationDialog.cs
- TextRangeAdaptor.cs
- ToolStripItem.cs
- SessionStateItemCollection.cs
- Int16Animation.cs
- HierarchicalDataBoundControl.cs
- TextClipboardData.cs
- ScriptReferenceBase.cs
- ReadOnlyCollectionBase.cs
- Internal.cs
- MappingModelBuildProvider.cs
- DeadCharTextComposition.cs
- DataGridViewCellValidatingEventArgs.cs
- TypeSystem.cs
- ReadOnlyDataSourceView.cs
- SqlNotificationEventArgs.cs
- nulltextcontainer.cs
- Soap.cs
- ImageKeyConverter.cs
- BinaryReader.cs
- CompoundFileStreamReference.cs
- CodeRemoveEventStatement.cs
- TextElement.cs
- SmuggledIUnknown.cs
- XslTransform.cs
- RelationshipNavigation.cs
- CodeAccessPermission.cs
- PackageFilter.cs
- DesigntimeLicenseContextSerializer.cs
- TextEditorTables.cs
- HttpCapabilitiesBase.cs
- TagPrefixCollection.cs
- CaseInsensitiveComparer.cs
- AdjustableArrowCap.cs
- ElementAction.cs
- TextViewBase.cs
- ReadOnlyState.cs
- EncoderExceptionFallback.cs
- AudioException.cs
- BitmapInitialize.cs
- DateTimeConverter2.cs
- EqualityComparer.cs
- SettingsProperty.cs
- Accessors.cs
- Error.cs
- StringBuilder.cs
- XhtmlMobileTextWriter.cs
- HierarchicalDataSourceDesigner.cs
- GetBrowserTokenRequest.cs
- VirtualizingPanel.cs
- MetadataHelper.cs
- BypassElementCollection.cs
- WindowsRichEdit.cs
- EventProvider.cs
- UICuesEvent.cs
- StringValueSerializer.cs
- ProcessHostFactoryHelper.cs
- RegistryKey.cs
- ClientConfigurationSystem.cs
- ConfigurationLockCollection.cs
- ClientConfigPaths.cs
- HttpPostServerProtocol.cs
- SessionStateContainer.cs
- Qualifier.cs
- WeakHashtable.cs
- TreeNodeStyle.cs
- InvalidWMPVersionException.cs
- SaveFileDialog.cs
- cookiecontainer.cs
- PrintControllerWithStatusDialog.cs
- FixedSOMSemanticBox.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- ScrollBar.cs
- ToolStripItemDesigner.cs
- TopClause.cs
- GrammarBuilderRuleRef.cs
- FontWeight.cs
- SessionIDManager.cs
- DispatchWrapper.cs
- SmtpSpecifiedPickupDirectoryElement.cs