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
- PageBuildProvider.cs
- WebBrowser.cs
- ParameterElementCollection.cs
- PolicyManager.cs
- XmlILConstructAnalyzer.cs
- HtmlWindow.cs
- XmlSchemaGroupRef.cs
- __ConsoleStream.cs
- WorkflowServiceHost.cs
- CodeDirectoryCompiler.cs
- WorkflowOperationErrorHandler.cs
- EmptyCollection.cs
- SqlDeflator.cs
- BadImageFormatException.cs
- SourceSwitch.cs
- TagPrefixInfo.cs
- PasswordRecovery.cs
- ParserContext.cs
- ExtensionWindowResizeGrip.cs
- ProcessModelSection.cs
- SchemaTableColumn.cs
- ProcessHostConfigUtils.cs
- GridViewRowEventArgs.cs
- NullRuntimeConfig.cs
- _HeaderInfo.cs
- RemoteTokenFactory.cs
- NetCodeGroup.cs
- StructureChangedEventArgs.cs
- CodeExporter.cs
- HotSpotCollection.cs
- LabelEditEvent.cs
- BaseDataBoundControl.cs
- TextBounds.cs
- DashStyle.cs
- ClrPerspective.cs
- Matrix3DConverter.cs
- WindowsFormsEditorServiceHelper.cs
- EventRouteFactory.cs
- ReachSerializationUtils.cs
- newinstructionaction.cs
- OptionalMessageQuery.cs
- Span.cs
- AnnotationStore.cs
- GPStream.cs
- WebPartActionVerb.cs
- ClientRuntimeConfig.cs
- ScriptResourceInfo.cs
- DataViewSettingCollection.cs
- ServiceSettingsResponseInfo.cs
- VersionedStreamOwner.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- MsmqBindingElementBase.cs
- BindingMAnagerBase.cs
- ThreadSafeList.cs
- xsdvalidator.cs
- WebBrowsableAttribute.cs
- XAMLParseException.cs
- DispatcherEventArgs.cs
- WinInet.cs
- TreeViewCancelEvent.cs
- ToolStripDropTargetManager.cs
- LinqDataSourceContextData.cs
- MetadataArtifactLoaderResource.cs
- ActivityStateRecord.cs
- SingleKeyFrameCollection.cs
- WebServiceParameterData.cs
- AbstractExpressions.cs
- HttpVersion.cs
- ObjectMemberMapping.cs
- Pen.cs
- SchemaDeclBase.cs
- COM2PictureConverter.cs
- SemaphoreSecurity.cs
- DefaultShape.cs
- HttpPostProtocolImporter.cs
- ObfuscationAttribute.cs
- CachedPathData.cs
- MessageBox.cs
- PropertyChangingEventArgs.cs
- tibetanshape.cs
- MessageQueuePermissionAttribute.cs
- DesignerAdapterUtil.cs
- MDIControlStrip.cs
- TypeConverterValueSerializer.cs
- SetIndexBinder.cs
- SqlDataAdapter.cs
- TokenBasedSet.cs
- LockedBorderGlyph.cs
- LocatorBase.cs
- SettingsBindableAttribute.cs
- NonBatchDirectoryCompiler.cs
- ReadOnlyDictionary.cs
- SnapshotChangeTrackingStrategy.cs
- Viewport3DAutomationPeer.cs
- RenamedEventArgs.cs
- BinaryParser.cs
- FullTextLine.cs
- DataControlPagerLinkButton.cs
- Point.cs
- FigureHelper.cs