MetadataSerializationContext.WriteToDocument Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WriteToDocument(String, Stream) |
Writing the context that is indexed by the specified logical-path into the provided document. |
WriteToDocument(String, TextWriter, Encoding) |
Writing the context that is indexed by the specified logical-path into the provided writer. |
WriteToDocument(String, Stream)
Writing the context that is indexed by the specified logical-path into the provided document.
public void WriteToDocument (string logicalPath, System.IO.Stream document);
member this.WriteToDocument : string * System.IO.Stream -> unit
Public Sub WriteToDocument (logicalPath As String, document As Stream)
Parameters
- logicalPath
- String
The logical path that identify the content in the set of documents in the context.
Exceptions
- The specified path is a null reference (Nothing in Visual Basic) or empty.
- The specified document is a null reference (Nothing in Visual Basic).
- The specified path does not exist in the context.
- The specified document does not support writing into it.
Applies to
WriteToDocument(String, TextWriter, Encoding)
Writing the context that is indexed by the specified logical-path into the provided writer.
public void WriteToDocument (string logicalPath, System.IO.TextWriter writer, System.Text.Encoding encoding = default);
member this.WriteToDocument : string * System.IO.TextWriter * System.Text.Encoding -> unit
Public Sub WriteToDocument (logicalPath As String, writer As TextWriter, Optional encoding As Encoding = Nothing)
Parameters
- logicalPath
- String
The logical path that identify the content in the set of documents in the context.
- writer
- TextWriter
A TextWriter that should be used to persist the content of the document.
Exceptions
- The specified path is a null reference (Nothing in Visual Basic) or empty.
- The specified document is a null reference (Nothing in Visual Basic).
The specified path does not exist in the context.