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
- HtmlInputSubmit.cs
- ContextMenu.cs
- FormViewUpdatedEventArgs.cs
- FormsAuthenticationTicket.cs
- MailWriter.cs
- DiffuseMaterial.cs
- CrossContextChannel.cs
- ErrorWrapper.cs
- XPathDocumentIterator.cs
- DataControlFieldHeaderCell.cs
- DataGridViewCellFormattingEventArgs.cs
- HistoryEventArgs.cs
- InvalidEnumArgumentException.cs
- OutOfProcStateClientManager.cs
- LinkClickEvent.cs
- DragCompletedEventArgs.cs
- ActivitiesCollection.cs
- ToolStripItemEventArgs.cs
- MouseCaptureWithinProperty.cs
- BatchStream.cs
- KnownTypeAttribute.cs
- XPathParser.cs
- WorkflowMarkupSerializationProvider.cs
- SqlColumnizer.cs
- DataControlFieldCollection.cs
- Guid.cs
- StateDesigner.LayoutSelectionGlyph.cs
- AttributeCollection.cs
- AutomationTextAttribute.cs
- GPStream.cs
- CanonicalizationDriver.cs
- XmlNodeList.cs
- GatewayIPAddressInformationCollection.cs
- Schedule.cs
- SharedStatics.cs
- ObjectCache.cs
- WindowsListViewGroupHelper.cs
- AstNode.cs
- TextEditorContextMenu.cs
- XmlRawWriterWrapper.cs
- InitializationEventAttribute.cs
- QueryReaderSettings.cs
- CssStyleCollection.cs
- SchemaCollectionPreprocessor.cs
- XNodeSchemaApplier.cs
- UIPropertyMetadata.cs
- DesignerActionPanel.cs
- InternalBufferOverflowException.cs
- Stream.cs
- EmptyElement.cs
- RowUpdatingEventArgs.cs
- ThrowOnMultipleAssignment.cs
- ExpressionPrefixAttribute.cs
- SmtpNtlmAuthenticationModule.cs
- SmiGettersStream.cs
- XmlSchemaElement.cs
- ToolStripRenderer.cs
- followingsibling.cs
- RangeValidator.cs
- WebCategoryAttribute.cs
- FormsAuthenticationTicket.cs
- BrowserCapabilitiesFactoryBase.cs
- SecondaryIndexList.cs
- GeneralTransform3DGroup.cs
- VisualTreeUtils.cs
- Socket.cs
- UriScheme.cs
- TextComposition.cs
- SafeNativeMethods.cs
- TdsEnums.cs
- SqlProvider.cs
- ProxyHelper.cs
- Choices.cs
- WebControlsSection.cs
- ResourcePermissionBaseEntry.cs
- PrintDialog.cs
- TableRowGroup.cs
- GuidConverter.cs
- SoapSchemaImporter.cs
- ColorConverter.cs
- IsolationInterop.cs
- SafeThemeHandle.cs
- ScopelessEnumAttribute.cs
- ProviderUtil.cs
- WithParamAction.cs
- LayoutEditorPart.cs
- Object.cs
- SpAudioStreamWrapper.cs
- CompiledRegexRunner.cs
- ConfigurationCollectionAttribute.cs
- ViewEventArgs.cs
- AccessKeyManager.cs
- ExternalCalls.cs
- AudioException.cs
- RoleGroupCollection.cs
- Function.cs
- UnsafeNativeMethods.cs
- ContainerAction.cs
- DataKey.cs
- SerTrace.cs