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
- ActivityScheduledRecord.cs
- ISessionStateStore.cs
- ServiceHandle.cs
- UnicodeEncoding.cs
- AnonymousIdentificationModule.cs
- ZipIOExtraFieldPaddingElement.cs
- ToolboxComponentsCreatedEventArgs.cs
- _NetRes.cs
- XmlDataSourceDesigner.cs
- QueryAccessibilityHelpEvent.cs
- DeploymentExceptionMapper.cs
- SystemNetworkInterface.cs
- LinkLabelLinkClickedEvent.cs
- SafeArrayRankMismatchException.cs
- WebServiceHostFactory.cs
- StartFileNameEditor.cs
- TrackingMemoryStreamFactory.cs
- ReadOnlyHierarchicalDataSource.cs
- IIS7WorkerRequest.cs
- FormViewInsertEventArgs.cs
- InputBuffer.cs
- ListItemCollection.cs
- DataSvcMapFileSerializer.cs
- NotSupportedException.cs
- DataMisalignedException.cs
- ScrollBarAutomationPeer.cs
- RegionIterator.cs
- SortFieldComparer.cs
- TreeViewEvent.cs
- OutputChannel.cs
- TextPointerBase.cs
- CompositeDataBoundControl.cs
- KnownTypesHelper.cs
- DataGridLinkButton.cs
- RewritingPass.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- XmlSchemaImport.cs
- DesignUtil.cs
- WizardSideBarListControlItemEventArgs.cs
- IIS7WorkerRequest.cs
- PathTooLongException.cs
- JsonReader.cs
- SoapCodeExporter.cs
- DummyDataSource.cs
- DataSourceProvider.cs
- StoreItemCollection.Loader.cs
- InkCanvasSelection.cs
- NGCPageContentSerializerAsync.cs
- SoapTransportImporter.cs
- MonitorWrapper.cs
- ToolboxComponentsCreatingEventArgs.cs
- DbProviderFactories.cs
- WebPartTransformerCollection.cs
- InputLanguageEventArgs.cs
- TraceSwitch.cs
- UIElementCollection.cs
- StubHelpers.cs
- TreeViewItemAutomationPeer.cs
- MethodCallConverter.cs
- StreamReader.cs
- PropertyTabAttribute.cs
- ResourceDescriptionAttribute.cs
- Column.cs
- IntSecurity.cs
- ManipulationVelocities.cs
- TypeDelegator.cs
- ExcludePathInfo.cs
- HtmlSelect.cs
- SqlDataSourceQueryEditorForm.cs
- CheckedPointers.cs
- SerializationSectionGroup.cs
- ModelUIElement3D.cs
- SelectionEditingBehavior.cs
- BitmapEffectInput.cs
- Bits.cs
- CommunicationObjectAbortedException.cs
- ThreadInterruptedException.cs
- ThicknessAnimationBase.cs
- ReferenceConverter.cs
- sqlmetadatafactory.cs
- AccessibleObject.cs
- _NTAuthentication.cs
- EraserBehavior.cs
- SpnEndpointIdentityExtension.cs
- ApplicationTrust.cs
- ToolStripRenderer.cs
- EncryptedXml.cs
- SingletonInstanceContextProvider.cs
- BinaryMethodMessage.cs
- TextServicesCompartmentContext.cs
- CompressionTransform.cs
- SqlDataSourceQueryEditorForm.cs
- NativeRecognizer.cs
- TemplateBamlRecordReader.cs
- SafeCryptContextHandle.cs
- DictionaryBase.cs
- OleDbException.cs
- HighContrastHelper.cs
- ResXBuildProvider.cs
- Query.cs