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
- OrderingInfo.cs
- _ListenerResponseStream.cs
- ResourceDisplayNameAttribute.cs
- SemaphoreFullException.cs
- SessionPageStatePersister.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- StrongNameUtility.cs
- Matrix3DValueSerializer.cs
- CodeTypeDeclarationCollection.cs
- BitmapSizeOptions.cs
- IdleTimeoutMonitor.cs
- MsmqInputSessionChannelListener.cs
- WebPartDesigner.cs
- IisTraceWebEventProvider.cs
- ColorPalette.cs
- IgnoreSection.cs
- ObjectCloneHelper.cs
- ColorConverter.cs
- RootAction.cs
- StickyNoteContentControl.cs
- ClrProviderManifest.cs
- SystemUdpStatistics.cs
- EarlyBoundInfo.cs
- AuthenticationModuleElementCollection.cs
- HyperLink.cs
- WindowsFormsHost.cs
- SqlErrorCollection.cs
- EncoderFallback.cs
- SecurityPermission.cs
- Request.cs
- KnownIds.cs
- CodeDOMUtility.cs
- RegistryKey.cs
- EntityDataSourceStatementEditorForm.cs
- AutomationAttributeInfo.cs
- COSERVERINFO.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- ItemContainerProviderWrapper.cs
- CheckBoxField.cs
- ListViewDesigner.cs
- DoubleCollectionConverter.cs
- DataViewManagerListItemTypeDescriptor.cs
- PointCollection.cs
- Accessible.cs
- EntityDesignerUtils.cs
- XmlLinkedNode.cs
- linebase.cs
- TypeElement.cs
- SecureEnvironment.cs
- URL.cs
- MediaScriptCommandRoutedEventArgs.cs
- AncillaryOps.cs
- dbenumerator.cs
- ClassHandlersStore.cs
- UrlPath.cs
- ToolStripDropTargetManager.cs
- TextLineResult.cs
- XamlSerializerUtil.cs
- HealthMonitoringSection.cs
- Line.cs
- TeredoHelper.cs
- GifBitmapDecoder.cs
- ToolStripManager.cs
- Encoding.cs
- DragStartedEventArgs.cs
- ContainsRowNumberChecker.cs
- ProfileSettings.cs
- SrgsElement.cs
- RawMouseInputReport.cs
- CombinedGeometry.cs
- Focus.cs
- GridItemPatternIdentifiers.cs
- ReadOnlyCollectionBuilder.cs
- Literal.cs
- SEHException.cs
- DocobjHost.cs
- ValidationEventArgs.cs
- HttpModuleCollection.cs
- ExpressionVisitor.cs
- SessionConnectionReader.cs
- TableRowGroupCollection.cs
- SQLUtility.cs
- DbConnectionHelper.cs
- ReceiveReply.cs
- WindowsMenu.cs
- DataGridDesigner.cs
- XPathCompileException.cs
- WebServiceClientProxyGenerator.cs
- CompModSwitches.cs
- DataControlFieldCollection.cs
- StyleBamlRecordReader.cs
- SqlDataSourceCommandParser.cs
- NetMsmqBindingElement.cs
- DocComment.cs
- InlineCollection.cs
- DataGridBoolColumn.cs
- DrawingBrush.cs
- DataGridViewCellConverter.cs
- Viewport2DVisual3D.cs
- MenuItemStyleCollection.cs