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
- ObjectStorage.cs
- CompatibleComparer.cs
- DebugManager.cs
- ClockGroup.cs
- ProvideValueServiceProvider.cs
- PersistenceTypeAttribute.cs
- CFGGrammar.cs
- SQLMoney.cs
- TextEndOfLine.cs
- SqlEnums.cs
- EntityTypeEmitter.cs
- TextParentUndoUnit.cs
- DbUpdateCommandTree.cs
- StylusPointProperty.cs
- Peer.cs
- SqlUserDefinedTypeAttribute.cs
- ConfigurationHelpers.cs
- BinaryCommonClasses.cs
- SqlCachedBuffer.cs
- validation.cs
- AutomationPropertyInfo.cs
- TcpSocketManager.cs
- CodeExpressionRuleDeclaration.cs
- HelpInfo.cs
- CommandLibraryHelper.cs
- VersionedStreamOwner.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- DoubleAnimationUsingPath.cs
- IndexerNameAttribute.cs
- shaperfactory.cs
- InkCanvas.cs
- Stacktrace.cs
- ClrPerspective.cs
- MatchingStyle.cs
- WebPartTransformer.cs
- GenericAuthenticationEventArgs.cs
- DataViewSetting.cs
- EventToken.cs
- EventProvider.cs
- StringValueSerializer.cs
- RemoteWebConfigurationHostStream.cs
- WebPartsPersonalization.cs
- BitSet.cs
- ControlBuilder.cs
- ServicePointManagerElement.cs
- Pkcs7Signer.cs
- DataSourceCollectionBase.cs
- SqlRowUpdatedEvent.cs
- PropertyManager.cs
- XpsDigitalSignature.cs
- DefaultMemberAttribute.cs
- SystemDropShadowChrome.cs
- TraceUtility.cs
- HighlightOverlayGlyph.cs
- EntityContainerAssociationSet.cs
- ClaimTypeElementCollection.cs
- ListView.cs
- DataRecordInternal.cs
- BaseParser.cs
- NativeMethods.cs
- FixedNode.cs
- WindowsServiceCredential.cs
- EnumBuilder.cs
- JpegBitmapDecoder.cs
- AnnotationObservableCollection.cs
- WebServiceMethodData.cs
- HandlerMappingMemo.cs
- TableRow.cs
- PrimitiveXmlSerializers.cs
- XPathCompiler.cs
- TabRenderer.cs
- RuntimeConfig.cs
- XmlSchemaAll.cs
- PasswordDeriveBytes.cs
- IndexingContentUnit.cs
- XmlValidatingReaderImpl.cs
- HierarchicalDataBoundControl.cs
- BindingSource.cs
- MetadataArtifactLoaderResource.cs
- XmlMapping.cs
- ExceptionHandlers.cs
- SchemaImporterExtensionsSection.cs
- ReachPageContentCollectionSerializerAsync.cs
- Font.cs
- UxThemeWrapper.cs
- PassportAuthenticationEventArgs.cs
- StorageInfo.cs
- PropertyGroupDescription.cs
- ToolboxItemFilterAttribute.cs
- RegisteredDisposeScript.cs
- FixedElement.cs
- MediaPlayerState.cs
- ProjectionCamera.cs
- WorkflowWebService.cs
- ProviderIncompatibleException.cs
- FileDialogCustomPlace.cs
- DispatchProxy.cs
- GPPOINT.cs
- ApplicationManager.cs
- DataGridParentRows.cs