Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / Avt.cs / 1305376 / Avt.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.Text; internal sealed class Avt { private string constAvt; private TextEvent[] events; private Avt(string constAvt) { Debug.Assert(constAvt != null); this.constAvt = constAvt; } private Avt(ArrayList eventList) { Debug.Assert(eventList != null); this.events = new TextEvent[eventList.Count]; for(int i = 0; i < eventList.Count; i ++) { this.events[i] = (TextEvent) eventList[i]; } } public bool IsConstant { get {return this.events == null;} } internal string Evaluate(Processor processor, ActionFrame frame) { if (IsConstant) { Debug.Assert(constAvt != null); return constAvt; } else { Debug.Assert(processor != null && frame != null); StringBuilder builder = processor.GetSharedStringBuilder(); for(int i = 0; i < events.Length; i ++) { builder.Append(events[i].Evaluate(processor, frame)); } processor.ReleaseSharedStringBuilder(); return builder.ToString(); } } internal static Avt CompileAvt(Compiler compiler, string avtText) { Debug.Assert(compiler != null); Debug.Assert(avtText != null); bool constant; ArrayList list = compiler.CompileAvt(avtText, out constant); return constant ? new Avt(avtText) : new Avt(list); } } } // 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
- DataControlFieldTypeEditor.cs
- ProvideValueServiceProvider.cs
- XmlFormatWriterGenerator.cs
- ScrollBar.cs
- hresults.cs
- FlowDocument.cs
- EncryptedType.cs
- ConvertEvent.cs
- NameSpaceExtractor.cs
- JsonGlobals.cs
- MarginCollapsingState.cs
- SelectionProcessor.cs
- Latin1Encoding.cs
- RequestResizeEvent.cs
- XamlSerializationHelper.cs
- SystemIPInterfaceProperties.cs
- Latin1Encoding.cs
- Hash.cs
- RegexMatchCollection.cs
- Propagator.ExtentPlaceholderCreator.cs
- PipelineModuleStepContainer.cs
- PageHandlerFactory.cs
- WebServiceReceive.cs
- XmlTextReaderImpl.cs
- DeferredRunTextReference.cs
- SystemFonts.cs
- TreeViewImageIndexConverter.cs
- OracleString.cs
- FormViewInsertedEventArgs.cs
- SizeIndependentAnimationStorage.cs
- StringBuilder.cs
- XmlCodeExporter.cs
- BaseCodeDomTreeGenerator.cs
- ProfileInfo.cs
- PngBitmapDecoder.cs
- Schema.cs
- CorrelationManager.cs
- SrgsText.cs
- EditorZoneBase.cs
- CharConverter.cs
- TypeElement.cs
- XmlSchemaSimpleType.cs
- AssemblyBuilder.cs
- Set.cs
- AuthenticationSection.cs
- UIElement3DAutomationPeer.cs
- ResourceIDHelper.cs
- Listener.cs
- ChildTable.cs
- AsmxEndpointPickerExtension.cs
- CodeChecksumPragma.cs
- PropertyCondition.cs
- StateWorkerRequest.cs
- HashHelper.cs
- WebPartDisplayMode.cs
- PasswordBoxAutomationPeer.cs
- ProcessStartInfo.cs
- DataSourceListEditor.cs
- TransformGroup.cs
- QueryStringParameter.cs
- TypeConverter.cs
- WmlSelectionListAdapter.cs
- TableLayoutStyleCollection.cs
- WizardPanel.cs
- XmlSchemaSimpleTypeRestriction.cs
- PartialTrustVisibleAssembly.cs
- DataServicePagingProviderWrapper.cs
- ContractDescription.cs
- TypefaceCollection.cs
- DataTableClearEvent.cs
- ChangeInterceptorAttribute.cs
- RuntimeIdentifierPropertyAttribute.cs
- DocumentXPathNavigator.cs
- StringKeyFrameCollection.cs
- TypeBrowserDialog.cs
- WorkflowOperationBehavior.cs
- SoapAttributeOverrides.cs
- BaseParser.cs
- SourceItem.cs
- MetadataExchangeBindings.cs
- StackOverflowException.cs
- HostProtectionPermission.cs
- FileEnumerator.cs
- XmlLinkedNode.cs
- RequestQueryParser.cs
- ControlCodeDomSerializer.cs
- EnvelopeVersion.cs
- DataGridViewCheckBoxColumn.cs
- RecipientIdentity.cs
- BoundPropertyEntry.cs
- TrackPointCollection.cs
- VectorAnimation.cs
- TCPListener.cs
- EntityCommandCompilationException.cs
- SoapServerMethod.cs
- Soap12ProtocolReflector.cs
- Mouse.cs
- WorkflowValidationFailedException.cs
- Common.cs
- MessageQueueConverter.cs