Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- CodeCastExpression.cs
- ContextMenuStrip.cs
- MultiDataTrigger.cs
- GenericWebPart.cs
- Button.cs
- EdmSchemaAttribute.cs
- Thumb.cs
- ImageSource.cs
- BamlRecords.cs
- AssemblyAttributesGoHere.cs
- CurrentChangingEventManager.cs
- OdbcRowUpdatingEvent.cs
- CommonRemoteMemoryBlock.cs
- LogRecordSequence.cs
- SqlTransaction.cs
- BindingUtils.cs
- StatusBarPanel.cs
- Gdiplus.cs
- ExpressionCopier.cs
- HttpContextWrapper.cs
- SqlBuffer.cs
- GeometryDrawing.cs
- SmtpDigestAuthenticationModule.cs
- RectAnimationClockResource.cs
- DriveInfo.cs
- ConfigurationManagerInternal.cs
- ScriptIgnoreAttribute.cs
- OleDbConnectionFactory.cs
- ProviderConnectionPointCollection.cs
- RequestStatusBarUpdateEventArgs.cs
- MutexSecurity.cs
- PowerModeChangedEventArgs.cs
- FactoryRecord.cs
- CompiledXpathExpr.cs
- AttachmentService.cs
- PointLight.cs
- ColorContext.cs
- DynamicAttribute.cs
- SiteOfOriginPart.cs
- PEFileReader.cs
- Storyboard.cs
- CodeObjectCreateExpression.cs
- RegexCapture.cs
- WindowsTooltip.cs
- BypassElement.cs
- Thumb.cs
- SubpageParaClient.cs
- MyContact.cs
- DbCommandTree.cs
- OpenFileDialog.cs
- MD5.cs
- RootBrowserWindow.cs
- AvTraceFormat.cs
- EventsTab.cs
- TabletDeviceInfo.cs
- IDataContractSurrogate.cs
- CalloutQueueItem.cs
- ExtensionCollection.cs
- Metafile.cs
- FormCollection.cs
- HtmlEmptyTagControlBuilder.cs
- CreationContext.cs
- SAPIEngineTypes.cs
- ExpressionBuilderContext.cs
- WebPartCancelEventArgs.cs
- CacheVirtualItemsEvent.cs
- CodeDefaultValueExpression.cs
- SettingsProviderCollection.cs
- Module.cs
- XmlSchemaGroup.cs
- ItemCollectionEditor.cs
- MembershipPasswordException.cs
- PreviewKeyDownEventArgs.cs
- UrlPath.cs
- SmtpReplyReader.cs
- IndentedTextWriter.cs
- WebConvert.cs
- TypeSystemHelpers.cs
- EdmPropertyAttribute.cs
- SQLDecimalStorage.cs
- NamespaceListProperty.cs
- MultiSelectRootGridEntry.cs
- Assert.cs
- LayoutExceptionEventArgs.cs
- SelectionRangeConverter.cs
- ReceiveErrorHandling.cs
- SymbolMethod.cs
- Point4D.cs
- SoapAttributeAttribute.cs
- ConfigXmlComment.cs
- QilGeneratorEnv.cs
- HttpWriter.cs
- CrossAppDomainChannel.cs
- PageFunction.cs
- WindowsStatic.cs
- TableProvider.cs
- sitestring.cs
- UpdatePanelTriggerCollection.cs
- XmlArrayItemAttribute.cs
- ManipulationInertiaStartingEventArgs.cs