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
- ExpressionCopier.cs
- DataControlCommands.cs
- BaseCodePageEncoding.cs
- ToolstripProfessionalRenderer.cs
- MaskedTextBoxTextEditorDropDown.cs
- IsolatedStorage.cs
- KeyedQueue.cs
- SortQuery.cs
- ZipIOExtraField.cs
- SendMailErrorEventArgs.cs
- ResourceAttributes.cs
- AccessedThroughPropertyAttribute.cs
- PopupEventArgs.cs
- JournalEntry.cs
- Adorner.cs
- HtmlInputImage.cs
- KerberosSecurityTokenParameters.cs
- DataObjectPastingEventArgs.cs
- TreeNodeClickEventArgs.cs
- EventHandlerList.cs
- BaseAddressPrefixFilterElementCollection.cs
- DataControlButton.cs
- TextRunCacheImp.cs
- DefaultParameterValueAttribute.cs
- FigureParaClient.cs
- ExternalCalls.cs
- IpcClientManager.cs
- DetailsViewModeEventArgs.cs
- XmlSchemaAny.cs
- ParseNumbers.cs
- LocalizationParserHooks.cs
- XamlLoadErrorInfo.cs
- CalendarDataBindingHandler.cs
- securitycriticaldataformultiplegetandset.cs
- RegexReplacement.cs
- DataBindingCollectionEditor.cs
- SequentialOutput.cs
- RawStylusInputCustomDataList.cs
- DataSysAttribute.cs
- DataGridCellInfo.cs
- ColumnCollectionEditor.cs
- TokenBasedSetEnumerator.cs
- PeerHelpers.cs
- TabItemWrapperAutomationPeer.cs
- SkewTransform.cs
- FormViewRow.cs
- ZipIOCentralDirectoryBlock.cs
- WebEvents.cs
- XmlSchemaImport.cs
- TreeViewHitTestInfo.cs
- WorkflowMessageEventArgs.cs
- ISAPIRuntime.cs
- XmlDigitalSignatureProcessor.cs
- ModelTreeEnumerator.cs
- userdatakeys.cs
- BinaryWriter.cs
- InternalControlCollection.cs
- StorageInfo.cs
- TemplateManager.cs
- DesignBindingEditor.cs
- BrushProxy.cs
- WorkflowApplicationUnloadedException.cs
- FamilyMapCollection.cs
- KeyGestureConverter.cs
- TemplatingOptionsDialog.cs
- QueryBranchOp.cs
- DataObject.cs
- SimpleBitVector32.cs
- LinearGradientBrush.cs
- followingquery.cs
- DataTemplateSelector.cs
- Maps.cs
- ExecutionContext.cs
- sqlstateclientmanager.cs
- CharacterMetrics.cs
- SystemWebExtensionsSectionGroup.cs
- AuthenticatingEventArgs.cs
- StoryFragments.cs
- AppSettingsExpressionBuilder.cs
- MailWebEventProvider.cs
- DeploymentSection.cs
- SectionXmlInfo.cs
- CopyAttributesAction.cs
- TraceSwitch.cs
- AvTrace.cs
- MouseGestureValueSerializer.cs
- AuthenticationService.cs
- WebSysDefaultValueAttribute.cs
- ObjectViewQueryResultData.cs
- TypeSchema.cs
- PartitionedDataSource.cs
- WindowsFormsSectionHandler.cs
- WorkflowInstanceTerminatedRecord.cs
- ButtonField.cs
- TrackingServices.cs
- ActivityFunc.cs
- Psha1DerivedKeyGenerator.cs
- Point3DCollectionValueSerializer.cs
- ConsoleTraceListener.cs
- DictionaryContent.cs