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
- OneWayChannelListener.cs
- AnnotationService.cs
- ValueCollectionParameterReader.cs
- NavigationPropertyEmitter.cs
- TriState.cs
- DBCSCodePageEncoding.cs
- UnsafeNativeMethods.cs
- ScriptingSectionGroup.cs
- SqlBuilder.cs
- StylusPointPropertyId.cs
- Rules.cs
- Utility.cs
- ProgramPublisher.cs
- KeySpline.cs
- SQLSingleStorage.cs
- ClientEventManager.cs
- XmlIlGenerator.cs
- remotingproxy.cs
- GradientStop.cs
- PatternMatcher.cs
- FamilyMapCollection.cs
- SchemaImporterExtensionsSection.cs
- ChannelDispatcher.cs
- UnmanagedHandle.cs
- ClientConfigurationSystem.cs
- TextContainer.cs
- Point3DAnimation.cs
- PersonalizationDictionary.cs
- DetailsViewDeleteEventArgs.cs
- PassportAuthenticationModule.cs
- NetworkInformationPermission.cs
- JsonFormatWriterGenerator.cs
- StaticSiteMapProvider.cs
- tabpagecollectioneditor.cs
- EncryptedType.cs
- HtmlSelect.cs
- SerializationHelper.cs
- ImportException.cs
- ExplicitDiscriminatorMap.cs
- AuthenticationModulesSection.cs
- DataGridViewColumnCollection.cs
- HtmlTableCellCollection.cs
- Manipulation.cs
- IPPacketInformation.cs
- DocumentViewerConstants.cs
- RadialGradientBrush.cs
- IgnoreSectionHandler.cs
- WindowsNonControl.cs
- OuterGlowBitmapEffect.cs
- x509utils.cs
- StatusBar.cs
- COM2EnumConverter.cs
- RotateTransform3D.cs
- DataGridPagerStyle.cs
- ListItemConverter.cs
- CatalogZoneBase.cs
- Grant.cs
- WebSysDescriptionAttribute.cs
- FieldToken.cs
- DataGridViewSortCompareEventArgs.cs
- NullRuntimeConfig.cs
- NativeMethods.cs
- XmlSchemaAll.cs
- InvalidOleVariantTypeException.cs
- ValueTypeFixupInfo.cs
- UserUseLicenseDictionaryLoader.cs
- SamlNameIdentifierClaimResource.cs
- TypeElement.cs
- MenuItem.cs
- TemplateColumn.cs
- Synchronization.cs
- XmlCDATASection.cs
- SolidColorBrush.cs
- ProfilePropertyMetadata.cs
- TraceSwitch.cs
- ResourcePool.cs
- Propagator.cs
- ActivityExecutionContext.cs
- PropertyGeneratedEventArgs.cs
- DataFormats.cs
- PartialToken.cs
- PartManifestEntry.cs
- XsltSettings.cs
- ComponentDispatcher.cs
- BamlCollectionHolder.cs
- DtcInterfaces.cs
- IndexedString.cs
- SqlDataSource.cs
- _DigestClient.cs
- PolyLineSegment.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- ContentDefinition.cs
- BaseCodeDomTreeGenerator.cs
- WebPartTransformerAttribute.cs
- ThrowHelper.cs
- NullableBoolConverter.cs
- DelegatingHeader.cs
- _RequestCacheProtocol.cs
- ByteStack.cs
- GeneratedContractType.cs