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
- XmlEncoding.cs
- PseudoWebRequest.cs
- PolicyStatement.cs
- DbMetaDataFactory.cs
- BitmapEffectDrawingContextWalker.cs
- SessionStateUtil.cs
- PopOutPanel.cs
- ellipse.cs
- DataListItem.cs
- XmlTextReaderImplHelpers.cs
- SqlFacetAttribute.cs
- Renderer.cs
- PathFigure.cs
- XmlUtil.cs
- HtmlTableRow.cs
- RulePatternOps.cs
- CreateRefExpr.cs
- ServiceReference.cs
- RootBuilder.cs
- AnnotationComponentChooser.cs
- SliderAutomationPeer.cs
- WorkflowPersistenceContext.cs
- SymmetricAlgorithm.cs
- NodeInfo.cs
- DrawListViewItemEventArgs.cs
- MergeFilterQuery.cs
- TdsParserStateObject.cs
- WebControl.cs
- BamlLocalizabilityResolver.cs
- RegexParser.cs
- SqlBulkCopyColumnMappingCollection.cs
- HtmlContainerControl.cs
- CodeVariableDeclarationStatement.cs
- Command.cs
- HtmlWindow.cs
- DSASignatureDeformatter.cs
- DoubleLinkList.cs
- SqlDataReaderSmi.cs
- LiteralDesigner.cs
- OpenFileDialog.cs
- ModelItemKeyValuePair.cs
- Peer.cs
- SoapFormatExtensions.cs
- Metadata.cs
- cookie.cs
- AssemblyAttributes.cs
- EntityDataSourceDataSelectionPanel.cs
- QueryCacheEntry.cs
- safex509handles.cs
- MsmqIntegrationProcessProtocolHandler.cs
- DesignerActionItemCollection.cs
- SqlNode.cs
- PnrpPermission.cs
- ApplicationId.cs
- SessionStateModule.cs
- PrintPreviewDialog.cs
- DataRelationCollection.cs
- DataObject.cs
- ConnectionsZone.cs
- WizardSideBarListControlItem.cs
- FutureFactory.cs
- TaskResultSetter.cs
- CodeMethodInvokeExpression.cs
- FileLoadException.cs
- Cursors.cs
- ViewStateException.cs
- DnsPermission.cs
- CodeConstructor.cs
- EditingCoordinator.cs
- PasswordPropertyTextAttribute.cs
- CustomCredentialPolicy.cs
- GridViewItemAutomationPeer.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- codemethodreferenceexpression.cs
- ExpressionBuilderCollection.cs
- FormViewModeEventArgs.cs
- CqlBlock.cs
- RemotingSurrogateSelector.cs
- ListCollectionView.cs
- OutOfProcStateClientManager.cs
- EnvironmentPermission.cs
- OleDbSchemaGuid.cs
- GacUtil.cs
- WithStatement.cs
- Timeline.cs
- Scripts.cs
- TagPrefixInfo.cs
- LongCountAggregationOperator.cs
- DocumentsTrace.cs
- WebPartDisplayModeEventArgs.cs
- RawTextInputReport.cs
- DynamicDataRouteHandler.cs
- ImageList.cs
- ConvertBinder.cs
- ToggleButtonAutomationPeer.cs
- DrawListViewSubItemEventArgs.cs
- GenericAuthenticationEventArgs.cs
- wgx_exports.cs
- FormattedTextSymbols.cs
- LinqDataSourceHelper.cs