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
- BasicCellRelation.cs
- XsltSettings.cs
- ByteStreamBufferedMessageData.cs
- StructureChangedEventArgs.cs
- TransformerTypeCollection.cs
- XmlLoader.cs
- VisualStateChangedEventArgs.cs
- ConstNode.cs
- GeneratedView.cs
- HashStream.cs
- DataService.cs
- QueryContinueDragEventArgs.cs
- BinaryObjectWriter.cs
- Deflater.cs
- MenuItemBindingCollection.cs
- SmiGettersStream.cs
- XmlSchemaAnnotation.cs
- VisualBrush.cs
- Input.cs
- TimersDescriptionAttribute.cs
- WsdlContractConversionContext.cs
- CultureInfoConverter.cs
- CodeSpit.cs
- ping.cs
- EpmSyndicationContentDeSerializer.cs
- LinqDataSourceView.cs
- StringUtil.cs
- ValidationRule.cs
- WebPartsSection.cs
- Opcode.cs
- OuterGlowBitmapEffect.cs
- IgnoreSection.cs
- TempFiles.cs
- IndexerNameAttribute.cs
- Thread.cs
- ExpressionSelection.cs
- hresults.cs
- FacetChecker.cs
- AutomationPatternInfo.cs
- AlphaSortedEnumConverter.cs
- assemblycache.cs
- Form.cs
- ConnectionStringsExpressionBuilder.cs
- XmlAttributeCache.cs
- ContextMenuAutomationPeer.cs
- RecommendedAsConfigurableAttribute.cs
- DecoderBestFitFallback.cs
- ServiceDescriptionReflector.cs
- OracleConnectionStringBuilder.cs
- PropertyItemInternal.cs
- TextDecoration.cs
- Evidence.cs
- PolyLineSegment.cs
- KoreanLunisolarCalendar.cs
- FontConverter.cs
- ControlType.cs
- XmlTextReaderImplHelpers.cs
- ImageListDesigner.cs
- WebPartConnectionsCancelEventArgs.cs
- Reference.cs
- ExtendedPropertyCollection.cs
- CmsInterop.cs
- Dump.cs
- sitestring.cs
- EntityEntry.cs
- ListDictionaryInternal.cs
- DocumentPage.cs
- Workspace.cs
- RenderingEventArgs.cs
- EventPrivateKey.cs
- DBConnectionString.cs
- HtmlHistory.cs
- BaseValidator.cs
- CounterSetInstance.cs
- CallbackCorrelationInitializer.cs
- PingOptions.cs
- TrustManager.cs
- ObservableCollection.cs
- WebRequest.cs
- DataBinding.cs
- ClientSideQueueItem.cs
- XmlUtil.cs
- DesignerEventService.cs
- EmbeddedMailObjectsCollection.cs
- DbConnectionPoolCounters.cs
- PngBitmapDecoder.cs
- SettingsPropertyNotFoundException.cs
- CodeIdentifier.cs
- ObjectConverter.cs
- HashLookup.cs
- panel.cs
- IntegerValidator.cs
- UpdateExpressionVisitor.cs
- DbModificationCommandTree.cs
- NameValuePermission.cs
- ProviderMetadata.cs
- AnchoredBlock.cs
- NativeMethods.cs
- EntityClassGenerator.cs
- CommandLibraryHelper.cs