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
- EncryptedPackage.cs
- DataTemplateKey.cs
- IndexedString.cs
- HitTestDrawingContextWalker.cs
- ToolTipAutomationPeer.cs
- WindowAutomationPeer.cs
- ThreadStartException.cs
- Helpers.cs
- AttributeData.cs
- DeclarativeCatalogPart.cs
- HitTestDrawingContextWalker.cs
- WebPartCloseVerb.cs
- DataListItemCollection.cs
- FontUnit.cs
- ServiceNameElement.cs
- EventHandlers.cs
- ChannelEndpointElement.cs
- NgenServicingAttributes.cs
- PasswordRecovery.cs
- FrugalList.cs
- CodeTypeOfExpression.cs
- PolyQuadraticBezierSegment.cs
- CapiNative.cs
- ConnectionOrientedTransportChannelListener.cs
- ButtonRenderer.cs
- TargetInvocationException.cs
- PersonalizablePropertyEntry.cs
- LogLogRecordEnumerator.cs
- SafeNativeMethods.cs
- StringDictionary.cs
- IResourceProvider.cs
- XmlnsPrefixAttribute.cs
- WmlPanelAdapter.cs
- DataBoundControlHelper.cs
- Rotation3DAnimation.cs
- XsltOutput.cs
- NTAccount.cs
- EditorServiceContext.cs
- activationcontext.cs
- AuthenticationModuleElementCollection.cs
- SequentialActivityDesigner.cs
- CodeRegionDirective.cs
- ReadOnlyNameValueCollection.cs
- HtmlGenericControl.cs
- HtmlInputCheckBox.cs
- PtsCache.cs
- SqlGenericUtil.cs
- PerspectiveCamera.cs
- BindingBase.cs
- Mutex.cs
- CompilationUnit.cs
- ExpandCollapsePattern.cs
- XmlSchemaAll.cs
- DataGridViewRowStateChangedEventArgs.cs
- EventProviderWriter.cs
- SocketAddress.cs
- X509ChainElement.cs
- XmlMembersMapping.cs
- WebPartEventArgs.cs
- AstTree.cs
- GridViewRowPresenterBase.cs
- BuildManager.cs
- FormViewDeletedEventArgs.cs
- _BufferOffsetSize.cs
- EmissiveMaterial.cs
- CodePropertyReferenceExpression.cs
- KeyedPriorityQueue.cs
- BaseParser.cs
- RegexBoyerMoore.cs
- ImageAttributes.cs
- OpenFileDialog.cs
- WebServiceReceive.cs
- ItemsChangedEventArgs.cs
- PathGeometry.cs
- DataBinder.cs
- StringResourceManager.cs
- Schema.cs
- ObjectTypeMapping.cs
- SymmetricAlgorithm.cs
- TargetParameterCountException.cs
- WebBaseEventKeyComparer.cs
- MasterPageParser.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- HitTestWithPointDrawingContextWalker.cs
- CellNormalizer.cs
- TempEnvironment.cs
- CapabilitiesRule.cs
- WhitespaceRuleReader.cs
- CompensatableSequenceActivity.cs
- AccessText.cs
- TreeViewEvent.cs
- ExpressionLexer.cs
- TextContainerHelper.cs
- SqlBuffer.cs
- InitializationEventAttribute.cs
- ObfuscationAttribute.cs
- ColumnMapVisitor.cs
- SecurityUtils.cs
- DataGridViewToolTip.cs
- FlowDocumentScrollViewer.cs