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
- ValueExpressions.cs
- Win32Exception.cs
- GlobalEventManager.cs
- CallContext.cs
- Activator.cs
- RenderingEventArgs.cs
- SqlDataSourceFilteringEventArgs.cs
- TypeValidationEventArgs.cs
- DataColumn.cs
- UserControl.cs
- ExpressionVisitor.cs
- ClientRuntimeConfig.cs
- ComponentEditorPage.cs
- StylusEventArgs.cs
- ProxyGenerationError.cs
- DataGridViewRowConverter.cs
- DataGridViewCellCancelEventArgs.cs
- DbMetaDataCollectionNames.cs
- SystemDropShadowChrome.cs
- UdpDiscoveryMessageFilter.cs
- SqlFactory.cs
- UserPreferenceChangedEventArgs.cs
- AutomationAttributeInfo.cs
- ParserStreamGeometryContext.cs
- RuntimeResourceSet.cs
- XmlSchemaIdentityConstraint.cs
- TemplateContent.cs
- ApplicationContext.cs
- WindowsIdentity.cs
- TypedReference.cs
- NativeCompoundFileAPIs.cs
- SerializationEventsCache.cs
- ReferencedAssemblyResolver.cs
- EventPrivateKey.cs
- MaskedTextProvider.cs
- BaseCodeDomTreeGenerator.cs
- EventData.cs
- WindowAutomationPeer.cs
- DataKeyArray.cs
- Process.cs
- WindowsListViewItem.cs
- UserControlParser.cs
- IApplicationTrustManager.cs
- ToolStripDropDown.cs
- ForceCopyBuildProvider.cs
- ActivityCodeGenerator.cs
- WarningException.cs
- HttpCacheVary.cs
- ListViewAutomationPeer.cs
- IntegerFacetDescriptionElement.cs
- TwoPhaseCommit.cs
- WebPartEditVerb.cs
- MultilineStringConverter.cs
- TreeViewItem.cs
- ToolStripLocationCancelEventArgs.cs
- EdgeModeValidation.cs
- ContextStaticAttribute.cs
- Activity.cs
- PropertyConverter.cs
- DateTimeOffsetConverter.cs
- ParserExtension.cs
- CacheDependency.cs
- HttpValueCollection.cs
- EditableLabelControl.cs
- XmlSchemas.cs
- CommentEmitter.cs
- Set.cs
- ListItem.cs
- AlignmentYValidation.cs
- ZipPackagePart.cs
- ObjectViewQueryResultData.cs
- NotImplementedException.cs
- AnnotationMap.cs
- SqlTrackingService.cs
- ReferenceEqualityComparer.cs
- StringDictionary.cs
- MessageBox.cs
- LayoutEvent.cs
- RadioButtonStandardAdapter.cs
- Base64Encoding.cs
- FileBasedResourceGroveler.cs
- WebPartZoneCollection.cs
- SerTrace.cs
- ObjectConverter.cs
- TextSpan.cs
- XhtmlBasicFormAdapter.cs
- EventlogProvider.cs
- SafeNativeMethodsCLR.cs
- ListBoxAutomationPeer.cs
- StreamGeometry.cs
- TransportChannelFactory.cs
- CommandValueSerializer.cs
- ServiceManager.cs
- HttpContext.cs
- PromptBuilder.cs
- FilterEventArgs.cs
- WindowsSecurityToken.cs
- DocumentApplicationJournalEntry.cs
- MimeObjectFactory.cs
- DiagnosticTraceSource.cs