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
- DrawTreeNodeEventArgs.cs
- ApplicationServicesHostFactory.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- StringArrayConverter.cs
- MergeExecutor.cs
- TypeDescriptor.cs
- ErrorLog.cs
- StrokeNode.cs
- ComponentResourceManager.cs
- KoreanCalendar.cs
- DBCSCodePageEncoding.cs
- SiteMapPath.cs
- CodeExpressionRuleDeclaration.cs
- BlurBitmapEffect.cs
- panel.cs
- EntityParameterCollection.cs
- SqlReorderer.cs
- FunctionCommandText.cs
- TemplateBuilder.cs
- SafeBitVector32.cs
- CodeThrowExceptionStatement.cs
- HttpsTransportBindingElement.cs
- XhtmlBasicLinkAdapter.cs
- DeploymentSectionCache.cs
- WindowsClaimSet.cs
- _AutoWebProxyScriptWrapper.cs
- SortKey.cs
- QueryOperationResponseOfT.cs
- XmlArrayItemAttribute.cs
- MsmqChannelListenerBase.cs
- RemoteWebConfigurationHostServer.cs
- FtpWebResponse.cs
- HScrollProperties.cs
- WindowsFormsLinkLabel.cs
- SoapMessage.cs
- RunClient.cs
- EnumUnknown.cs
- HasCopySemanticsAttribute.cs
- AggregateNode.cs
- BitmapEffectCollection.cs
- XsdCachingReader.cs
- XmlSchemaSimpleTypeList.cs
- ServiceNotStartedException.cs
- AxHost.cs
- SqlDesignerDataSourceView.cs
- XmlDataSourceView.cs
- HyperLinkStyle.cs
- ClusterRegistryConfigurationProvider.cs
- XmlStreamedByteStreamReader.cs
- ReadOnlyHierarchicalDataSourceView.cs
- SimpleRecyclingCache.cs
- wpf-etw.cs
- ObjectDataSourceSelectingEventArgs.cs
- Metafile.cs
- DbProviderServices.cs
- ControlDesigner.cs
- SqlUtil.cs
- WindowsServiceElement.cs
- DiscoveryDocument.cs
- SettingsPropertyIsReadOnlyException.cs
- _ConnectOverlappedAsyncResult.cs
- IImplicitResourceProvider.cs
- ImageSourceValueSerializer.cs
- TypeForwardedFromAttribute.cs
- ActivationArguments.cs
- Operand.cs
- WebConfigurationManager.cs
- RegexCompilationInfo.cs
- KoreanLunisolarCalendar.cs
- HexParser.cs
- RSAOAEPKeyExchangeDeformatter.cs
- Conditional.cs
- EventRoute.cs
- ResourceCategoryAttribute.cs
- Config.cs
- FormatException.cs
- LogAppendAsyncResult.cs
- ListViewUpdatedEventArgs.cs
- LayoutEvent.cs
- Overlapped.cs
- FtpWebRequest.cs
- ErrorHandlerFaultInfo.cs
- SolidBrush.cs
- FileDetails.cs
- MtomMessageEncoder.cs
- coordinatorscratchpad.cs
- InstanceData.cs
- MediaContext.cs
- Stream.cs
- CodeArgumentReferenceExpression.cs
- SwitchCase.cs
- ZipIOLocalFileBlock.cs
- COM2PictureConverter.cs
- RequestQueue.cs
- DirectoryInfo.cs
- SrgsSubset.cs
- FixedHighlight.cs
- ToolboxItemCollection.cs
- InheritanceContextHelper.cs
- VisualStyleElement.cs