Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / TemplateBaseAction.cs / 1305376 / 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
- StringConcat.cs
- HttpChannelHelper.cs
- ISCIIEncoding.cs
- FailedToStartupUIException.cs
- DeclaredTypeElement.cs
- MarkerProperties.cs
- MultiSelectRootGridEntry.cs
- BeginEvent.cs
- XamlReaderConstants.cs
- BatchParser.cs
- mediaeventargs.cs
- ProxyElement.cs
- ASCIIEncoding.cs
- basenumberconverter.cs
- TagNameToTypeMapper.cs
- DrawingAttributes.cs
- SharedPerformanceCounter.cs
- BoundField.cs
- RawContentTypeMapper.cs
- PageThemeCodeDomTreeGenerator.cs
- PersonalizationEntry.cs
- ConnectionManagementElementCollection.cs
- TickBar.cs
- TableDetailsCollection.cs
- TransactionInterop.cs
- UIElementParagraph.cs
- Line.cs
- PanelDesigner.cs
- peernodestatemanager.cs
- ComponentEditorPage.cs
- BaseDataList.cs
- LayeredChannelListener.cs
- FixedPage.cs
- TemplatedAdorner.cs
- ConversionValidationRule.cs
- ProviderConnectionPoint.cs
- RegexCompiler.cs
- CoTaskMemUnicodeSafeHandle.cs
- StringResourceManager.cs
- ClientScriptManager.cs
- MergablePropertyAttribute.cs
- SqlDesignerDataSourceView.cs
- Exception.cs
- ApplicationBuildProvider.cs
- FormViewUpdateEventArgs.cs
- ParameterReplacerVisitor.cs
- LogAppendAsyncResult.cs
- DataGridViewHeaderCell.cs
- TransactionTable.cs
- StatusBarDrawItemEvent.cs
- UserControlCodeDomTreeGenerator.cs
- FixedNode.cs
- TableRow.cs
- EventSource.cs
- WebPartCloseVerb.cs
- WindowsStreamSecurityElement.cs
- RemotingConfigParser.cs
- ControlEvent.cs
- LicenseManager.cs
- XmlTextAttribute.cs
- WebHttpBindingElement.cs
- TreeNodeStyle.cs
- ComponentManagerBroker.cs
- ChannelManager.cs
- Imaging.cs
- WeakEventManager.cs
- DataGridClipboardCellContent.cs
- StatusBar.cs
- BaseAsyncResult.cs
- XmlDataLoader.cs
- SpellerError.cs
- Bidi.cs
- NameValueConfigurationCollection.cs
- ObjectDataSourceView.cs
- CommandSet.cs
- HtmlInputFile.cs
- ScrollChrome.cs
- AllMembershipCondition.cs
- HostSecurityManager.cs
- OperationDescriptionCollection.cs
- HttpApplicationStateBase.cs
- StreamingContext.cs
- ListBoxItemWrapperAutomationPeer.cs
- XhtmlBasicCalendarAdapter.cs
- Latin1Encoding.cs
- BinaryReader.cs
- XmlSchemaValidationException.cs
- SystemIPGlobalProperties.cs
- ProfileGroupSettings.cs
- EventPrivateKey.cs
- IisTraceListener.cs
- Msec.cs
- LostFocusEventManager.cs
- MimeTypeAttribute.cs
- FormsAuthenticationTicket.cs
- CodeSubDirectory.cs
- PolygonHotSpot.cs
- Helper.cs
- DbDataReader.cs
- QuadraticBezierSegment.cs