Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / MessageAction.cs / 1305376 / MessageAction.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
namespace System.Xml.Xsl.XsltOld {
using Res = System.Xml.Utils.Res;
using System;
using System.IO;
using System.Globalization;
using System.Diagnostics;
using System.Xml;
using System.Xml.XPath;
internal class MessageAction : ContainerAction {
bool _Terminate;
internal override void Compile(Compiler compiler) {
CompileAttributes(compiler);
if (compiler.Recurse()) {
CompileTemplate(compiler);
compiler.ToParent();
}
}
internal override bool CompileAttribute(Compiler compiler) {
string name = compiler.Input.LocalName;
string value = compiler.Input.Value;
if (Ref.Equal(name, compiler.Atoms.Terminate)) {
_Terminate = compiler.GetYesNo(value);
}
else {
return false;
}
return true;
}
internal override void Execute(Processor processor, ActionFrame frame) {
Debug.Assert(processor != null && frame != null);
switch (frame.State) {
case Initialized:
TextOnlyOutput output = new TextOnlyOutput(processor, new StringWriter(CultureInfo.InvariantCulture));
processor.PushOutput(output);
processor.PushActionFrame(frame);
frame.State = ProcessingChildren;
break;
case ProcessingChildren:
TextOnlyOutput recOutput = processor.PopOutput() as TextOnlyOutput;
Debug.Assert(recOutput != null);
Console.WriteLine(recOutput.Writer.ToString());
if (_Terminate) {
throw XsltException.Create(Res.Xslt_Terminate, recOutput.Writer.ToString());
}
frame.Finished();
break;
default:
Debug.Fail("Invalid MessageAction execution state");
break;
}
}
}
}
// 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
- ToolStripAdornerWindowService.cs
- updateconfighost.cs
- StreamingContext.cs
- NegatedCellConstant.cs
- VirtualizingStackPanel.cs
- SelectionItemPattern.cs
- ProcessModelSection.cs
- ScriptBehaviorDescriptor.cs
- CheckBoxStandardAdapter.cs
- DirectoryInfo.cs
- File.cs
- CellPartitioner.cs
- ChtmlTextBoxAdapter.cs
- Menu.cs
- mactripleDES.cs
- ToolstripProfessionalRenderer.cs
- TextPenaltyModule.cs
- TransactionManagerProxy.cs
- InstancePersistenceException.cs
- CacheDependency.cs
- MulticastIPAddressInformationCollection.cs
- InstanceDataCollection.cs
- BatchServiceHost.cs
- TransformConverter.cs
- PageCodeDomTreeGenerator.cs
- SafeSerializationManager.cs
- xsdvalidator.cs
- CompositeCollection.cs
- GeometryDrawing.cs
- KeyboardNavigation.cs
- SeverityFilter.cs
- UnsafeNativeMethods.cs
- RtfNavigator.cs
- ActiveXMessageFormatter.cs
- UInt32.cs
- WindowsGraphicsWrapper.cs
- Listbox.cs
- ZipFileInfoCollection.cs
- RuntimeConfig.cs
- SerialPort.cs
- RegistryKey.cs
- Control.cs
- XmlQueryStaticData.cs
- CLRBindingWorker.cs
- ItemCheckedEvent.cs
- SafeNativeMethods.cs
- LoginView.cs
- TransformerTypeCollection.cs
- StringFormat.cs
- CopyNamespacesAction.cs
- XmlSubtreeReader.cs
- COM2Enum.cs
- RuleConditionDialog.cs
- BooleanSwitch.cs
- ToolStripProgressBar.cs
- ItemsChangedEventArgs.cs
- HyperLink.cs
- XmlSchemaGroupRef.cs
- CodeTypeParameterCollection.cs
- GroupBox.cs
- GenericsNotImplementedException.cs
- AnnotationAuthorChangedEventArgs.cs
- ManipulationDevice.cs
- PageFunction.cs
- ArraySegment.cs
- ContextMarshalException.cs
- LineBreakRecord.cs
- ClonableStack.cs
- SqlMethods.cs
- DocumentViewerBaseAutomationPeer.cs
- BaseInfoTable.cs
- GetCertificateRequest.cs
- GenericUriParser.cs
- BroadcastEventHelper.cs
- ThreadAbortException.cs
- WindowsRebar.cs
- SoapIgnoreAttribute.cs
- GridItemCollection.cs
- OperatingSystem.cs
- LabelLiteral.cs
- VirtualizingPanel.cs
- ToolStripItemRenderEventArgs.cs
- SelectionRangeConverter.cs
- SerializerWriterEventHandlers.cs
- SharedStatics.cs
- ProjectedSlot.cs
- SqlConnectionPoolProviderInfo.cs
- DurableRuntimeValidator.cs
- AbstractSvcMapFileLoader.cs
- ProxyOperationRuntime.cs
- HwndSource.cs
- SynchronizingStream.cs
- SafeEventLogWriteHandle.cs
- DbReferenceCollection.cs
- Scheduler.cs
- Decimal.cs
- EncodingNLS.cs
- KoreanCalendar.cs
- DeploymentSection.cs
- OleDbReferenceCollection.cs