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
- PartialList.cs
- AlternateViewCollection.cs
- Icon.cs
- NonVisualControlAttribute.cs
- TextWriterTraceListener.cs
- EventlogProvider.cs
- RequiredFieldValidator.cs
- TextEditor.cs
- TraceListeners.cs
- XamlDesignerSerializationManager.cs
- CheckBoxPopupAdapter.cs
- BasicDesignerLoader.cs
- DispatcherTimer.cs
- BlurBitmapEffect.cs
- DataServiceResponse.cs
- DNS.cs
- VectorCollection.cs
- RbTree.cs
- sqlnorm.cs
- xmlsaver.cs
- TypeConverterValueSerializer.cs
- MouseButton.cs
- Win32MouseDevice.cs
- GradientStop.cs
- BamlRecordReader.cs
- ObjectNotFoundException.cs
- CfgParser.cs
- ColorContextHelper.cs
- GregorianCalendar.cs
- Visual3D.cs
- Metafile.cs
- XmlSchemaSimpleContentExtension.cs
- TextCharacters.cs
- ReadOnlyMetadataCollection.cs
- ListItemParagraph.cs
- WhitespaceReader.cs
- ResourceReferenceExpression.cs
- MimeFormReflector.cs
- MembershipPasswordException.cs
- TransactionTable.cs
- DiagnosticTrace.cs
- XmlNamedNodeMap.cs
- DescendantQuery.cs
- ConcurrencyMode.cs
- FormViewRow.cs
- XmlSchemaGroup.cs
- EntityContainerAssociationSet.cs
- FontStretch.cs
- DictionaryCustomTypeDescriptor.cs
- TreeNodeEventArgs.cs
- ChannelManager.cs
- DocumentGridContextMenu.cs
- SvcMapFileLoader.cs
- HttpCacheVary.cs
- FontWeight.cs
- GridItem.cs
- ZipIOExtraField.cs
- ComponentCodeDomSerializer.cs
- BitmapEffectGeneralTransform.cs
- Mappings.cs
- hwndwrapper.cs
- Journal.cs
- ProfileProvider.cs
- TaskFileService.cs
- Timeline.cs
- StyleHelper.cs
- ZoomComboBox.cs
- LabelLiteral.cs
- CodeDomLoader.cs
- CodeMemberProperty.cs
- FormViewCommandEventArgs.cs
- MatrixTransform.cs
- COM2ComponentEditor.cs
- EventLogEntry.cs
- TypeExtension.cs
- XmlObjectSerializerReadContextComplex.cs
- KeyGestureConverter.cs
- LazyTextWriterCreator.cs
- ColorMatrix.cs
- DataQuery.cs
- CodeMemberMethod.cs
- ToolZoneDesigner.cs
- HtmlFormWrapper.cs
- XPathNode.cs
- ObjectFullSpanRewriter.cs
- KeySplineConverter.cs
- FlowDocumentReaderAutomationPeer.cs
- ReadOnlyMetadataCollection.cs
- WebPartRestoreVerb.cs
- UIHelper.cs
- _HTTPDateParse.cs
- SettingsPropertyValueCollection.cs
- EventListener.cs
- EnvironmentPermission.cs
- FixedSchema.cs
- AdornedElementPlaceholder.cs
- LowerCaseStringConverter.cs
- IsolatedStoragePermission.cs
- TextRunProperties.cs
- ObjectSet.cs