Jaa


MetadataDocument.Create Method

Definition

Overloads

Create(MetadataSerializationStyle, Stream, String)

Create a new instance of MetadataDocument based on the content of the documnet, provided by the specified stream.

Create(MetadataSerializationStyle, TextReader, Encoding, String)

Create a new instance of MetadataDocument based on the content of the documnet, provided by the specified reader.

Create(MetadataSerializationStyle, Stream, String)

Create a new instance of MetadataDocument based on the content of the documnet, provided by the specified stream.

public static Microsoft.AnalysisServices.Tabular.Serialization.MetadataDocument Create (Microsoft.AnalysisServices.Tabular.Serialization.MetadataSerializationStyle style, System.IO.Stream document, string logicalPath = default);
static member Create : Microsoft.AnalysisServices.Tabular.Serialization.MetadataSerializationStyle * System.IO.Stream * string -> Microsoft.AnalysisServices.Tabular.Serialization.MetadataDocument
Public Shared Function Create (style As MetadataSerializationStyle, document As Stream, Optional logicalPath As String = Nothing) As MetadataDocument

Parameters

style
MetadataSerializationStyle

The style of metadata serialization used for the content.

document
Stream

A Stream with the content of the document.

logicalPath
String

An optional String with the logical-path of the serialized 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 style is not a valid style.
  • The specified document does not support reading from it.

Applies to

Create(MetadataSerializationStyle, TextReader, Encoding, String)

Create a new instance of MetadataDocument based on the content of the documnet, provided by the specified reader.

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

Parameters

style
MetadataSerializationStyle

The style of metadata serialization used for the content.

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.

logicalPath
String

An optional String with the logical-path of the serialized document.

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).

The specified style is not a valid style.

Applies to