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
- DefaultShape.cs
- UnicastIPAddressInformationCollection.cs
- WpfSharedXamlSchemaContext.cs
- ServiceInfo.cs
- PersistenceContextEnlistment.cs
- serverconfig.cs
- SystemDropShadowChrome.cs
- ActivityExecutorOperation.cs
- Win32.cs
- UIElementPropertyUndoUnit.cs
- ScrollItemPattern.cs
- XPathAncestorQuery.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- FunctionDetailsReader.cs
- OracleInfoMessageEventArgs.cs
- CompilationSection.cs
- HttpProtocolImporter.cs
- XmlArrayItemAttributes.cs
- CompilationSection.cs
- ScrollPatternIdentifiers.cs
- SQLDecimalStorage.cs
- StartUpEventArgs.cs
- BaseDataList.cs
- SubclassTypeValidatorAttribute.cs
- SessionViewState.cs
- SetUserPreferenceRequest.cs
- OptimizedTemplateContent.cs
- FusionWrap.cs
- CodePropertyReferenceExpression.cs
- TTSEvent.cs
- CapabilitiesAssignment.cs
- FormViewInsertedEventArgs.cs
- EventBindingService.cs
- Stacktrace.cs
- DrawingAttributeSerializer.cs
- SqlSelectClauseBuilder.cs
- DataAdapter.cs
- SelectionItemProviderWrapper.cs
- AppSettingsSection.cs
- Decorator.cs
- SoapMessage.cs
- recordstatefactory.cs
- TableLayoutSettingsTypeConverter.cs
- SqlCacheDependencySection.cs
- UrlMappingCollection.cs
- HttpRawResponse.cs
- WebPartChrome.cs
- SpecialNameAttribute.cs
- PageWrapper.cs
- PostBackOptions.cs
- SecUtil.cs
- Decorator.cs
- SingleConverter.cs
- TCEAdapterGenerator.cs
- RequestQueryProcessor.cs
- CodeVariableDeclarationStatement.cs
- BamlLocalizationDictionary.cs
- AlternateViewCollection.cs
- SafeNativeMethods.cs
- DurableDispatcherAddressingFault.cs
- IteratorFilter.cs
- LayoutDump.cs
- Ref.cs
- GPPOINT.cs
- Input.cs
- ADConnectionHelper.cs
- CommandValueSerializer.cs
- LogLogRecord.cs
- CompiledRegexRunner.cs
- TemplateBindingExtensionConverter.cs
- ProxyElement.cs
- GlyphingCache.cs
- TransactionScope.cs
- MessageDesigner.cs
- ProtectedProviderSettings.cs
- MediaTimeline.cs
- MD5CryptoServiceProvider.cs
- AliasedSlot.cs
- SimpleFieldTemplateFactory.cs
- PageContentAsyncResult.cs
- TextServicesProperty.cs
- ProcessHostFactoryHelper.cs
- Trigger.cs
- CodeDirectoryCompiler.cs
- WebPartZoneCollection.cs
- SQLSingleStorage.cs
- Rijndael.cs
- CubicEase.cs
- StatusInfoItem.cs
- GridItemProviderWrapper.cs
- XmlDocumentSchema.cs
- NumberFormatter.cs
- TextServicesDisplayAttribute.cs
- TextContainer.cs
- DesignerActionPropertyItem.cs
- EncodingTable.cs
- _SslStream.cs
- XsltLibrary.cs
- SoapAttributeAttribute.cs
- XmlWriterTraceListener.cs