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
- SafeRightsManagementEnvironmentHandle.cs
- GenerateHelper.cs
- DataRecord.cs
- WeakEventTable.cs
- RangeValuePattern.cs
- StructuredTypeEmitter.cs
- mda.cs
- Unit.cs
- DBAsyncResult.cs
- StrongName.cs
- Transform3D.cs
- UserPreferenceChangingEventArgs.cs
- FontUnit.cs
- RtfToken.cs
- WindowProviderWrapper.cs
- TextTreeDeleteContentUndoUnit.cs
- HijriCalendar.cs
- XamlFigureLengthSerializer.cs
- NamedPipeTransportManager.cs
- DataPagerFieldItem.cs
- Parameter.cs
- Predicate.cs
- ImageAnimator.cs
- EntityTypeEmitter.cs
- XsdCachingReader.cs
- MasterPage.cs
- LocalValueEnumerator.cs
- XPathParser.cs
- WorkflowDebuggerSteppingAttribute.cs
- BamlResourceSerializer.cs
- TextBounds.cs
- WsdlParser.cs
- AnnotationComponentManager.cs
- RangeValueProviderWrapper.cs
- GeometryGroup.cs
- StringFormat.cs
- RuleInfoComparer.cs
- GridItem.cs
- RectAnimation.cs
- ProtectedProviderSettings.cs
- XamlPointCollectionSerializer.cs
- HyperLinkField.cs
- OutputCacheProfileCollection.cs
- WindowInteropHelper.cs
- ProfileSettingsCollection.cs
- SamlEvidence.cs
- CacheRequest.cs
- ProtocolsSection.cs
- XsdDateTime.cs
- FlagsAttribute.cs
- SecurityToken.cs
- NamespaceCollection.cs
- OleDbErrorCollection.cs
- SystemTcpStatistics.cs
- LayoutDump.cs
- AppDomainInstanceProvider.cs
- Viewport3DVisual.cs
- SiteMap.cs
- RouteData.cs
- ReliabilityContractAttribute.cs
- ConstructorNeedsTagAttribute.cs
- WaitHandle.cs
- WindowsGraphicsCacheManager.cs
- ObjectListItemCollection.cs
- HwndHostAutomationPeer.cs
- Message.cs
- CheckBox.cs
- TextSegment.cs
- Operators.cs
- EditingCoordinator.cs
- WebEvents.cs
- HttpServerUtilityBase.cs
- unsafenativemethodsother.cs
- PropertyGrid.cs
- FileRecordSequenceHelper.cs
- _NativeSSPI.cs
- MetadataSection.cs
- StrongNameKeyPair.cs
- GeneralTransform2DTo3DTo2D.cs
- ScrollEvent.cs
- RandomNumberGenerator.cs
- RegistryPermission.cs
- DigestTraceRecordHelper.cs
- RuntimeDelegateArgument.cs
- BuildProvidersCompiler.cs
- PageContent.cs
- followingsibling.cs
- GB18030Encoding.cs
- XPathAxisIterator.cs
- MarkupCompilePass2.cs
- RepeaterItemCollection.cs
- XmlDataSource.cs
- AssociationTypeEmitter.cs
- BaseAutoFormat.cs
- X509Certificate.cs
- XmlCharCheckingWriter.cs
- SoapIgnoreAttribute.cs
- UnitySerializationHolder.cs
- FixedLineResult.cs
- SingleQueryOperator.cs