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
- CharAnimationBase.cs
- Polyline.cs
- ZipIORawDataFileBlock.cs
- GeometryDrawing.cs
- HttpCookie.cs
- TemplateControl.cs
- WebPartDisplayMode.cs
- HttpHeaderCollection.cs
- GroupItem.cs
- PerformanceCounterPermissionEntryCollection.cs
- AuthenticationModeHelper.cs
- InputReport.cs
- BindingCompleteEventArgs.cs
- MonitorWrapper.cs
- SerialPinChanges.cs
- WebPartActionVerb.cs
- TextParagraphProperties.cs
- StickyNoteHelper.cs
- PropertySourceInfo.cs
- DefaultEventAttribute.cs
- SiteMap.cs
- cryptoapiTransform.cs
- PanelContainerDesigner.cs
- SpellerError.cs
- NullableFloatAverageAggregationOperator.cs
- ZipIOExtraFieldZip64Element.cs
- PropertyCondition.cs
- ListViewCancelEventArgs.cs
- HwndHostAutomationPeer.cs
- CultureInfo.cs
- AsymmetricKeyExchangeDeformatter.cs
- WebControlsSection.cs
- VectorValueSerializer.cs
- HttpCookieCollection.cs
- Span.cs
- ActivityCodeGenerator.cs
- TypeResolver.cs
- SqlXml.cs
- WebMessageEncodingBindingElement.cs
- AssertFilter.cs
- BufferedGraphicsContext.cs
- TypedCompletedAsyncResult.cs
- LocatorGroup.cs
- DbgUtil.cs
- SerializationTrace.cs
- NavigationPropertyEmitter.cs
- BitmapCodecInfoInternal.cs
- UserControlAutomationPeer.cs
- SqlSelectStatement.cs
- StackOverflowException.cs
- ResourceContainer.cs
- HorizontalAlignConverter.cs
- ColumnResizeAdorner.cs
- FlowDocumentReader.cs
- LineGeometry.cs
- TypeNameConverter.cs
- Dynamic.cs
- MachineKeyValidationConverter.cs
- BuildProvidersCompiler.cs
- TargetFrameworkUtil.cs
- BuildManager.cs
- ArrayWithOffset.cs
- IPHostEntry.cs
- ClientEventManager.cs
- LinearQuaternionKeyFrame.cs
- FileUpload.cs
- GroupBox.cs
- BlurBitmapEffect.cs
- XmlILCommand.cs
- Figure.cs
- PenThreadPool.cs
- PerfCounterSection.cs
- AppSecurityManager.cs
- ExcCanonicalXml.cs
- MetadataProperty.cs
- NumericUpDown.cs
- PngBitmapDecoder.cs
- SeekStoryboard.cs
- COM2Enum.cs
- ProvideValueServiceProvider.cs
- BrowserDefinitionCollection.cs
- KeyValueSerializer.cs
- _AutoWebProxyScriptEngine.cs
- ContextMenuStrip.cs
- LongValidatorAttribute.cs
- SortQuery.cs
- MultiBinding.cs
- LinkTarget.cs
- Command.cs
- AstNode.cs
- SqlError.cs
- Peer.cs
- CompilerGlobalScopeAttribute.cs
- CriticalFinalizerObject.cs
- IntegerValidator.cs
- EntityClientCacheKey.cs
- ColorBlend.cs
- ScrollEvent.cs
- WebPartExportVerb.cs
- SafeThreadHandle.cs