Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / TextOutput.cs / 1305376 / TextOutput.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.Xml;
using System.Xml.XPath;
using System.Text;
internal class TextOutput : SequentialOutput {
private TextWriter writer;
internal TextOutput(Processor processor, Stream stream)
: base(processor)
{
if (stream == null) {
throw new ArgumentNullException("stream");
}
this.encoding = processor.Output.Encoding;
this.writer = new StreamWriter(stream, this.encoding);
}
internal TextOutput(Processor processor, TextWriter writer)
: base(processor)
{
if (writer == null) {
throw new ArgumentNullException("writer");
}
this.encoding = writer.Encoding;
this.writer = writer;
}
internal override void Write(char outputChar) {
this.writer.Write(outputChar);
}
internal override void Write(string outputText) {
this.writer.Write(outputText);
}
internal override void Close() {
this.writer.Flush();
this.writer = null;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// 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.Xml;
using System.Xml.XPath;
using System.Text;
internal class TextOutput : SequentialOutput {
private TextWriter writer;
internal TextOutput(Processor processor, Stream stream)
: base(processor)
{
if (stream == null) {
throw new ArgumentNullException("stream");
}
this.encoding = processor.Output.Encoding;
this.writer = new StreamWriter(stream, this.encoding);
}
internal TextOutput(Processor processor, TextWriter writer)
: base(processor)
{
if (writer == null) {
throw new ArgumentNullException("writer");
}
this.encoding = writer.Encoding;
this.writer = writer;
}
internal override void Write(char outputChar) {
this.writer.Write(outputChar);
}
internal override void Write(string outputText) {
this.writer.Write(outputText);
}
internal override void Close() {
this.writer.Flush();
this.writer = null;
}
}
}
// 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
- TemplateControl.cs
- OutputScopeManager.cs
- PrefixHandle.cs
- CustomPopupPlacement.cs
- ElementHostAutomationPeer.cs
- ToolStripPanelRow.cs
- XmlSerializerSection.cs
- BuildProviderAppliesToAttribute.cs
- DesignerActionItemCollection.cs
- WebServiceClientProxyGenerator.cs
- GroupBox.cs
- GradientStopCollection.cs
- RedistVersionInfo.cs
- SelectionProviderWrapper.cs
- HttpCacheVary.cs
- OdbcParameterCollection.cs
- safemediahandle.cs
- DbParameterHelper.cs
- Point3D.cs
- PlainXmlDeserializer.cs
- SmiContext.cs
- QilFunction.cs
- FastPropertyAccessor.cs
- MailAddress.cs
- _SecureChannel.cs
- BindingNavigator.cs
- WpfKnownMember.cs
- TransformConverter.cs
- FixedTextView.cs
- ValueUnavailableException.cs
- PointCollection.cs
- DocumentationServerProtocol.cs
- HostProtectionPermission.cs
- AtomServiceDocumentSerializer.cs
- OleDbPropertySetGuid.cs
- TabPanel.cs
- AttachedAnnotation.cs
- SecurityCriticalDataForSet.cs
- UnsafeNativeMethods.cs
- SqlConnection.cs
- Transform3D.cs
- KeyConstraint.cs
- DataSvcMapFile.cs
- Int32Collection.cs
- ToolStrip.cs
- RadioButtonRenderer.cs
- ResourceExpressionEditor.cs
- DbProviderFactoriesConfigurationHandler.cs
- QuaternionRotation3D.cs
- MgmtResManager.cs
- SourceSwitch.cs
- UnSafeCharBuffer.cs
- OleDbPropertySetGuid.cs
- TraceContext.cs
- ListViewItem.cs
- ConfigurationManagerInternalFactory.cs
- WizardStepBase.cs
- StrongNameUtility.cs
- HashMembershipCondition.cs
- base64Transforms.cs
- JsonEncodingStreamWrapper.cs
- StatusBarDrawItemEvent.cs
- AsymmetricSignatureFormatter.cs
- Helpers.cs
- PixelFormats.cs
- CodeNamespace.cs
- EventSourceCreationData.cs
- TypeReference.cs
- LambdaCompiler.Logical.cs
- CodeTypeReferenceCollection.cs
- DelegateSerializationHolder.cs
- DataSetMappper.cs
- XamlDesignerSerializationManager.cs
- Tile.cs
- ConstructorBuilder.cs
- COAUTHIDENTITY.cs
- PanelStyle.cs
- ConfigurationStrings.cs
- ServiceNameElementCollection.cs
- CodeAttachEventStatement.cs
- PeerOutputChannel.cs
- WeakHashtable.cs
- ADConnectionHelper.cs
- XmlDataCollection.cs
- RootProfilePropertySettingsCollection.cs
- MulticastOption.cs
- FreezableDefaultValueFactory.cs
- SqlTrackingWorkflowInstance.cs
- SqlBinder.cs
- WebBrowsableAttribute.cs
- ProfileInfo.cs
- QueryCorrelationInitializer.cs
- XsltFunctions.cs
- TypeReference.cs
- HttpCacheVaryByContentEncodings.cs
- TemplateBaseAction.cs
- HtmlAnchor.cs
- CellRelation.cs
- DeclarativeCatalogPart.cs
- StylusPointDescription.cs