MetadataSerializationContext.ReadFromDocument Method

Definition

Overloads

ReadFromDocument(String, TextReader, Encoding)

Read the content of the documnet, provided by the specified reader and store it in the context under the specified logical path.

ReadFromDocument(String, Stream)

Read the content of the documnet, provided by the specified stream and store it in the context under the specified logical path.

ReadFromDocument(Stream)

Read the content of the documnet, provided by the specified stream and store it in the context.

ReadFromDocument(TextReader, Encoding)

Read the content of the documnet, provided by the specified reader and store it in the context.

ReadFromDocument(String, TextReader, Encoding)

Read the content of the documnet, provided by the specified reader and store it in the context under the specified logical path.

public Microsoft.AnalysisServices.Tabular.Serialization.MetadataDocument ReadFromDocument (string logicalPath, System.IO.TextReader reader, System.Text.Encoding encoding = default);
member this.ReadFromDocument : string * System.IO.TextReader * System.Text.Encoding -> Microsoft.AnalysisServices.Tabular.Serialization.MetadataDocument
Public Function ReadFromDocument (logicalPath As String, reader As TextReader, Optional encoding As Encoding = Nothing) As MetadataDocument

Parameters

logicalPath
String

The logical path that can be used to get the content in the set of documents in the context.

reader
TextReader

A TextReader that provides access to the content.

encoding
Encoding

An optional Encoding that should be used when storing the content in the context.

Returns

A MetadataDocument that can be used to access the loaded 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 already exists in the context.

Applies to

ReadFromDocument(String, Stream)

Read the content of the documnet, provided by the specified stream and store it in the context under the specified logical path.

public Microsoft.AnalysisServices.Tabular.Serialization.MetadataDocument ReadFromDocument (string logicalPath, System.IO.Stream document);
member this.ReadFromDocument : string * System.IO.Stream -> Microsoft.AnalysisServices.Tabular.Serialization.MetadataDocument
Public Function ReadFromDocument (logicalPath As String, document As Stream) As MetadataDocument

Parameters

logicalPath
String

The logical path that can be used to get the content in the set of documents in the context.

document
Stream

A Stream with the content of the document.

Returns

A MetadataDocument that can be used to access the loaded 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 already exists in the context.
  • The specified document does not support reading from it.

Applies to

ReadFromDocument(Stream)

Read the content of the documnet, provided by the specified stream and store it in the context.

public Microsoft.AnalysisServices.Tabular.Serialization.MetadataDocument ReadFromDocument (System.IO.Stream document);
member this.ReadFromDocument : System.IO.Stream -> Microsoft.AnalysisServices.Tabular.Serialization.MetadataDocument
Public Function ReadFromDocument (document As Stream) As MetadataDocument

Parameters

document
Stream

A Stream with the content of the document.

Returns

A MetadataDocument that can be used to access the loaded content of the document.

Exceptions

The specified document is a null reference (Nothing in Visual Basic).

The specified document does not support reading from it.

Applies to

ReadFromDocument(TextReader, Encoding)

Read the content of the documnet, provided by the specified reader and store it in the context.

public Microsoft.AnalysisServices.Tabular.Serialization.MetadataDocument ReadFromDocument (System.IO.TextReader reader, System.Text.Encoding encoding = default);
member this.ReadFromDocument : System.IO.TextReader * System.Text.Encoding -> Microsoft.AnalysisServices.Tabular.Serialization.MetadataDocument
Public Function ReadFromDocument (reader As TextReader, Optional encoding As Encoding = Nothing) As MetadataDocument

Parameters

reader
TextReader

A TextReader that provides access to the content.

encoding
Encoding

An optional Encoding that should be used when storing the content in the context.

Returns

A MetadataDocument that can be used to access the loaded content of the document.

Exceptions

The specified reader is a null reference (Nothing in Visual Basic).

Applies to