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
- HyperlinkAutomationPeer.cs
- FixedTextSelectionProcessor.cs
- ProvidersHelper.cs
- TypeProvider.cs
- DataGridViewSortCompareEventArgs.cs
- AutoGeneratedField.cs
- PropertyBuilder.cs
- ProfileSettingsCollection.cs
- ApplyTemplatesAction.cs
- MonthCalendarDesigner.cs
- unsafeIndexingFilterStream.cs
- SecUtil.cs
- DescendantOverDescendantQuery.cs
- FileSystemInfo.cs
- UnaryNode.cs
- BitStack.cs
- ArithmeticException.cs
- XmlSchemaSubstitutionGroup.cs
- Exceptions.cs
- PageClientProxyGenerator.cs
- FrameworkElementFactoryMarkupObject.cs
- FloaterBaseParagraph.cs
- ContextStack.cs
- DataGridItemAttachedStorage.cs
- MsmqIntegrationSecurity.cs
- LogicalExpr.cs
- GZipStream.cs
- LocatorPart.cs
- SuppressIldasmAttribute.cs
- XmlAttribute.cs
- MultiByteCodec.cs
- SqlUserDefinedTypeAttribute.cs
- XmlNamespaceMappingCollection.cs
- IDQuery.cs
- RoleManagerEventArgs.cs
- SymDocumentType.cs
- TrailingSpaceComparer.cs
- Int32CollectionConverter.cs
- ResourceManager.cs
- ApplicationTrust.cs
- PublisherIdentityPermission.cs
- IndexedEnumerable.cs
- LogRecordSequence.cs
- SignatureToken.cs
- RadioButtonBaseAdapter.cs
- PropertyNames.cs
- ImageKeyConverter.cs
- XmlSchemaInfo.cs
- VectorAnimationUsingKeyFrames.cs
- RawStylusInputCustomDataList.cs
- ProxyAttribute.cs
- filewebresponse.cs
- HttpModuleActionCollection.cs
- NativeObjectSecurity.cs
- LookupNode.cs
- UriTemplateHelpers.cs
- RepeatBehavior.cs
- MetaModel.cs
- TypedOperationInfo.cs
- BaseTemplateParser.cs
- UnsafeNativeMethodsCLR.cs
- EmissiveMaterial.cs
- NullableBoolConverter.cs
- MemberPathMap.cs
- NotifyParentPropertyAttribute.cs
- InputProcessorProfiles.cs
- DataRowView.cs
- ViewLoader.cs
- RegexCaptureCollection.cs
- ExplicitDiscriminatorMap.cs
- SemanticTag.cs
- DesignerTransaction.cs
- DiscoveryClientProtocol.cs
- CharConverter.cs
- SrgsOneOf.cs
- InputEventArgs.cs
- QueryExpression.cs
- IndentedTextWriter.cs
- SettingsPropertyNotFoundException.cs
- NumericExpr.cs
- SymbolDocumentGenerator.cs
- XmlTextReaderImpl.cs
- Exceptions.cs
- HttpListenerPrefixCollection.cs
- OleDbParameterCollection.cs
- TextEditorParagraphs.cs
- TopClause.cs
- COM2Enum.cs
- ProjectionPath.cs
- DataConnectionHelper.cs
- Single.cs
- NativeMethods.cs
- HtmlControlPersistable.cs
- WebPartZoneCollection.cs
- FileClassifier.cs
- ParameterRetriever.cs
- WebException.cs
- _BufferOffsetSize.cs
- ScrollChrome.cs
- HMACSHA512.cs