Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / TextOutput.cs / 1 / 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
- XPathNavigatorReader.cs
- XmlSchemaSimpleContent.cs
- CodeStatement.cs
- UserInitiatedNavigationPermission.cs
- CharacterShapingProperties.cs
- Vector3DValueSerializer.cs
- IgnoreFileBuildProvider.cs
- MetadataElement.cs
- ITextView.cs
- AssemblyBuilderData.cs
- WindowHideOrCloseTracker.cs
- TextWriter.cs
- EntityModelBuildProvider.cs
- StickyNoteAnnotations.cs
- HttpRequest.cs
- DataGridViewLinkCell.cs
- Schema.cs
- WindowsFormsHost.cs
- ElementFactory.cs
- DesignBindingEditor.cs
- EntityDataSourceView.cs
- GenericParameterDataContract.cs
- InvalidateEvent.cs
- TreeNodeStyleCollection.cs
- SubpageParaClient.cs
- StorageAssociationSetMapping.cs
- UnsafeNativeMethods.cs
- HttpUnhandledOperationInvoker.cs
- UIInitializationException.cs
- Hex.cs
- xsdvalidator.cs
- TextReader.cs
- EntityViewGenerator.cs
- EncryptedKeyIdentifierClause.cs
- ProjectionNode.cs
- DesignerVerb.cs
- ForceCopyBuildProvider.cs
- OperationValidationEventArgs.cs
- ManagedIStream.cs
- TextTreeNode.cs
- SByteConverter.cs
- EtwTrackingBehaviorElement.cs
- ExtenderControl.cs
- Paragraph.cs
- SchemaCollectionPreprocessor.cs
- ContextStaticAttribute.cs
- OneOfElement.cs
- ThrowHelper.cs
- CustomCategoryAttribute.cs
- DBCSCodePageEncoding.cs
- PropertyPushdownHelper.cs
- UniqueCodeIdentifierScope.cs
- thaishape.cs
- RemoveStoryboard.cs
- LogReservationCollection.cs
- SqlProfileProvider.cs
- WrappedIUnknown.cs
- sqlstateclientmanager.cs
- SessionEndedEventArgs.cs
- Baml2006KnownTypes.cs
- GlyphInfoList.cs
- Int16Animation.cs
- PerformanceCounterPermissionEntryCollection.cs
- ToolStripRendererSwitcher.cs
- UInt64Storage.cs
- BuildProvidersCompiler.cs
- DataControlFieldHeaderCell.cs
- Helper.cs
- LogStream.cs
- ReflectionUtil.cs
- WebPartEditorApplyVerb.cs
- TextEmbeddedObject.cs
- RegisteredExpandoAttribute.cs
- InheritanceUI.cs
- NetworkInterface.cs
- CaseInsensitiveOrdinalStringComparer.cs
- KeyboardDevice.cs
- DebugControllerThread.cs
- mediaeventshelper.cs
- SqlConnectionManager.cs
- Size.cs
- UserControl.cs
- ClientCredentials.cs
- CacheMemory.cs
- FileDialogCustomPlaces.cs
- DefaultValueTypeConverter.cs
- ResizingMessageFilter.cs
- DataGridViewColumnTypePicker.cs
- GridViewDeletedEventArgs.cs
- DeviceContext.cs
- Serializer.cs
- GridLength.cs
- SchemaLookupTable.cs
- HybridWebProxyFinder.cs
- LoadWorkflowAsyncResult.cs
- MessageEventSubscriptionService.cs
- BaseDataListActionList.cs
- HttpsChannelFactory.cs
- Constraint.cs
- HostVisual.cs