Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / TemplateBaseAction.cs / 1305376 / 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
- PointAnimation.cs
- DuplexClientBase.cs
- CookieHandler.cs
- SimpleLine.cs
- LinearKeyFrames.cs
- ObjectDisposedException.cs
- UnsafeNativeMethods.cs
- SamlConditions.cs
- EmptyQuery.cs
- TextServicesCompartmentEventSink.cs
- ReleaseInstanceMode.cs
- DbException.cs
- OdbcErrorCollection.cs
- StringExpressionSet.cs
- HtmlAnchor.cs
- PagerSettings.cs
- MatrixAnimationUsingKeyFrames.cs
- FullTextState.cs
- MouseGestureValueSerializer.cs
- PeerUnsafeNativeMethods.cs
- DataErrorValidationRule.cs
- AlternateViewCollection.cs
- CodeSubDirectoriesCollection.cs
- SymmetricAlgorithm.cs
- ToolboxItemCollection.cs
- QilVisitor.cs
- TextLine.cs
- SaveWorkflowAsyncResult.cs
- PersonalizableAttribute.cs
- TextViewSelectionProcessor.cs
- InternalConfirm.cs
- TableCellAutomationPeer.cs
- CreateUserWizard.cs
- Environment.cs
- ConfigsHelper.cs
- TextTreeTextNode.cs
- AlphabeticalEnumConverter.cs
- FuncCompletionCallbackWrapper.cs
- RedBlackList.cs
- RtfToXamlLexer.cs
- HierarchicalDataBoundControl.cs
- PixelFormatConverter.cs
- XmlILAnnotation.cs
- IWorkflowDebuggerService.cs
- DefaultMemberAttribute.cs
- XmlArrayItemAttributes.cs
- _ConnectOverlappedAsyncResult.cs
- MetadataArtifactLoaderFile.cs
- HtmlAnchor.cs
- TdsValueSetter.cs
- ResourceDescriptionAttribute.cs
- SystemIcons.cs
- ClientRequest.cs
- ColumnHeaderConverter.cs
- AppDomain.cs
- MultitargetingHelpers.cs
- BasicKeyConstraint.cs
- ExpressionNode.cs
- Glyph.cs
- MultiBinding.cs
- OperationFormatStyle.cs
- ResourcesBuildProvider.cs
- Matrix.cs
- WebResponse.cs
- WebRequestModuleElementCollection.cs
- XmlHierarchicalEnumerable.cs
- CodeConditionStatement.cs
- PermissionToken.cs
- WebUtility.cs
- DataError.cs
- BitmapEffectOutputConnector.cs
- StringComparer.cs
- DBConnectionString.cs
- JsonXmlDataContract.cs
- DateTimeFormatInfo.cs
- DefaultTraceListener.cs
- _SecureChannel.cs
- RoutedEvent.cs
- XamlParser.cs
- VisualTarget.cs
- ItemCollection.cs
- XPathParser.cs
- SuppressIldasmAttribute.cs
- XhtmlTextWriter.cs
- SecurityUniqueId.cs
- DynamicDataExtensions.cs
- EnumUnknown.cs
- AnnotationResourceChangedEventArgs.cs
- DisplayNameAttribute.cs
- PropertyMappingExceptionEventArgs.cs
- MenuItem.cs
- oledbconnectionstring.cs
- WebBrowserDesigner.cs
- ProfileModule.cs
- GlyphElement.cs
- ConfigXmlDocument.cs
- TraceContextRecord.cs
- PropertyKey.cs
- coordinator.cs
- ItemDragEvent.cs