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
- UpdateCompiler.cs
- EventBuilder.cs
- MobileCapabilities.cs
- VisualTreeUtils.cs
- PenThreadWorker.cs
- ScrollBar.cs
- SiteMapNodeItemEventArgs.cs
- GenericArgumentsUpdater.cs
- SynthesizerStateChangedEventArgs.cs
- WebScriptMetadataMessage.cs
- QueryStringParameter.cs
- BypassElementCollection.cs
- Attributes.cs
- _HeaderInfo.cs
- FixedSOMElement.cs
- CloudCollection.cs
- EntityClassGenerator.cs
- GregorianCalendarHelper.cs
- OutputCacheSection.cs
- JumpPath.cs
- SmiMetaData.cs
- Animatable.cs
- ChtmlCalendarAdapter.cs
- RowToFieldTransformer.cs
- PropertyEmitter.cs
- RotateTransform.cs
- ToolStripDropDownMenu.cs
- ConnectionPoint.cs
- Image.cs
- ConnectionManagementElementCollection.cs
- TextTrailingWordEllipsis.cs
- CustomAttribute.cs
- ClientCultureInfo.cs
- SingleSelectRootGridEntry.cs
- InternalCache.cs
- BufferModesCollection.cs
- StreamGeometryContext.cs
- CallContext.cs
- CacheRequest.cs
- LoginView.cs
- Point4D.cs
- MenuItemStyle.cs
- QueryableDataSourceHelper.cs
- SoundPlayerAction.cs
- WebSysDisplayNameAttribute.cs
- DataGridViewRowStateChangedEventArgs.cs
- oledbmetadatacollectionnames.cs
- NetworkCredential.cs
- ReachIDocumentPaginatorSerializer.cs
- Message.cs
- StructuredTypeEmitter.cs
- Rfc2898DeriveBytes.cs
- ConsoleTraceListener.cs
- DataSvcMapFileSerializer.cs
- UIElementHelper.cs
- VisualStyleRenderer.cs
- XmlSchemaSimpleTypeList.cs
- ToolStripItemRenderEventArgs.cs
- SemanticResultKey.cs
- ZoneButton.cs
- Geometry3D.cs
- TimeSpanConverter.cs
- GeometryCombineModeValidation.cs
- Label.cs
- AttributedMetaModel.cs
- TableDetailsRow.cs
- DataGridView.cs
- PenCursorManager.cs
- Parsers.cs
- objectquery_tresulttype.cs
- DbConnectionClosed.cs
- MailAddress.cs
- DataGridCellClipboardEventArgs.cs
- CompilerGlobalScopeAttribute.cs
- UIElement3DAutomationPeer.cs
- GridViewDeleteEventArgs.cs
- BookmarkOptionsHelper.cs
- ValuePatternIdentifiers.cs
- ProxyWebPartManager.cs
- UiaCoreProviderApi.cs
- PieceDirectory.cs
- MatchingStyle.cs
- PropertyRecord.cs
- DataGridTextBox.cs
- FixedPosition.cs
- RootBrowserWindow.cs
- ListViewItemSelectionChangedEvent.cs
- JsonFormatWriterGenerator.cs
- DrawingBrush.cs
- TemplateEditingService.cs
- ImportContext.cs
- CompositeActivityDesigner.cs
- AccessedThroughPropertyAttribute.cs
- FolderLevelBuildProviderCollection.cs
- RowBinding.cs
- FocusManager.cs
- TextBlockAutomationPeer.cs
- TransformerInfo.cs
- PathGeometry.cs
- Crypto.cs