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
- DbDataRecord.cs
- JapaneseLunisolarCalendar.cs
- PhoneCallDesigner.cs
- ObjectStateEntry.cs
- XmlSchemaSimpleType.cs
- WebControlsSection.cs
- FileUpload.cs
- EditorZoneDesigner.cs
- ModuleConfigurationInfo.cs
- StringUtil.cs
- ConvertTextFrag.cs
- InternalSendMessage.cs
- ConnectionOrientedTransportChannelListener.cs
- Currency.cs
- DbTransaction.cs
- ProfileProvider.cs
- SpeechAudioFormatInfo.cs
- SectionUpdates.cs
- JsonQueryStringConverter.cs
- ParseNumbers.cs
- _HelperAsyncResults.cs
- PersistNameAttribute.cs
- XmlTypeAttribute.cs
- NamedPipeHostedTransportConfiguration.cs
- DataViewManagerListItemTypeDescriptor.cs
- PropertyMap.cs
- HashJoinQueryOperatorEnumerator.cs
- _AcceptOverlappedAsyncResult.cs
- PolicyDesigner.cs
- selecteditemcollection.cs
- IntegerValidator.cs
- DataGridViewRowHeaderCell.cs
- CellParagraph.cs
- PropertyFilterAttribute.cs
- versioninfo.cs
- HostingEnvironmentSection.cs
- Bitmap.cs
- DocumentReference.cs
- PrtCap_Reader.cs
- ListItemCollection.cs
- TdsParserSafeHandles.cs
- PermissionSet.cs
- HttpApplication.cs
- DockingAttribute.cs
- SqlCacheDependencySection.cs
- NameTable.cs
- _IPv4Address.cs
- Model3DGroup.cs
- DuplicateWaitObjectException.cs
- TemplateBamlTreeBuilder.cs
- NumericUpDown.cs
- WebRequest.cs
- GridViewDeleteEventArgs.cs
- SessionMode.cs
- DataGridColumnCollection.cs
- XmlBinaryReader.cs
- OutputCacheProfileCollection.cs
- Dump.cs
- StubHelpers.cs
- DataGridViewCellCollection.cs
- HwndSourceParameters.cs
- Substitution.cs
- EventManager.cs
- TextServicesHost.cs
- CryptoKeySecurity.cs
- NamespaceMapping.cs
- UriExt.cs
- Helper.cs
- SuppressMessageAttribute.cs
- COM2ComponentEditor.cs
- Column.cs
- BooleanSwitch.cs
- PropertyInformationCollection.cs
- ColumnPropertiesGroup.cs
- DmlSqlGenerator.cs
- DispatcherSynchronizationContext.cs
- ThaiBuddhistCalendar.cs
- CacheOutputQuery.cs
- NullableBoolConverter.cs
- DomNameTable.cs
- WebPartZone.cs
- ExpressionsCollectionConverter.cs
- EllipseGeometry.cs
- AnchoredBlock.cs
- ServerValidateEventArgs.cs
- ProfileModule.cs
- MembershipAdapter.cs
- Serializer.cs
- ProgramNode.cs
- QuerySetOp.cs
- ResourcePool.cs
- DesignerFrame.cs
- WindowsFont.cs
- UITypeEditor.cs
- TraceHwndHost.cs
- ItemCheckEvent.cs
- XmlILModule.cs
- CodeSnippetExpression.cs
- TreeNodeSelectionProcessor.cs
- TextRangeBase.cs