Jaa


CsdlReader.TryParse Method

Definition

Overloads

TryParse(Utf8JsonReader, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL-JSON artifact for an IEdmModel.

TryParse(XmlReader, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

TryParse(Utf8JsonReader, CsdlJsonReaderSettings, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL-JSON artifact for an IEdmModel.

TryParse(XmlReader, IEdmModel, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

TryParse(XmlReader, Boolean, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

TryParse(XmlReader, IEnumerable<IEdmModel>, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

TryParse(XmlReader, Func<Uri,XmlReader>, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

TryParse(XmlReader, IEnumerable<IEdmModel>, CsdlReaderSettings, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

TryParse(XmlReader, IEnumerable<IEdmModel>, Boolean, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

TryParse(Utf8JsonReader, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL-JSON artifact for an IEdmModel.

public static bool TryParse (ref System.Text.Json.Utf8JsonReader reader, out Microsoft.OData.Edm.IEdmModel model, out System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.Validation.EdmError> errors);
static member TryParse : Utf8JsonReader * IEdmModel * seq -> bool
Public Shared Function TryParse (ByRef reader As Utf8JsonReader, ByRef model As IEdmModel, ByRef errors As IEnumerable(Of EdmError)) As Boolean

Parameters

reader
Utf8JsonReader

The given JSON reader containing the CSDL artifact.

model
IEdmModel

The model generated by parsing

errors
IEnumerable<EdmError>

Errors reported while parsing.

Returns

Success of the parse operation.

Applies to

TryParse(XmlReader, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

public static bool TryParse (System.Xml.XmlReader reader, out Microsoft.OData.Edm.IEdmModel model, out System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.Validation.EdmError> errors);
static member TryParse : System.Xml.XmlReader * IEdmModel * seq -> bool
Public Shared Function TryParse (reader As XmlReader, ByRef model As IEdmModel, ByRef errors As IEnumerable(Of EdmError)) As Boolean

Parameters

reader
XmlReader

XmlReader containing the CSDL artifact.

model
IEdmModel

The model generated by parsing

errors
IEnumerable<EdmError>

Errors reported while parsing.

Returns

Success of the parse operation.

Applies to

TryParse(Utf8JsonReader, CsdlJsonReaderSettings, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL-JSON artifact for an IEdmModel.

public static bool TryParse (ref System.Text.Json.Utf8JsonReader reader, Microsoft.OData.Edm.Csdl.CsdlJsonReaderSettings settings, out Microsoft.OData.Edm.IEdmModel model, out System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.Validation.EdmError> errors);
static member TryParse : Utf8JsonReader * Microsoft.OData.Edm.Csdl.CsdlJsonReaderSettings * IEdmModel * seq -> bool
Public Shared Function TryParse (ByRef reader As Utf8JsonReader, settings As CsdlJsonReaderSettings, ByRef model As IEdmModel, ByRef errors As IEnumerable(Of EdmError)) As Boolean

Parameters

reader
Utf8JsonReader

The given JSON reader containing the CSDL artifact.

settings
CsdlJsonReaderSettings

CSDL-JSON reader settings for current parser.

model
IEdmModel

The model generated by parsing

errors
IEnumerable<EdmError>

Errors reported while parsing.

Returns

Success of the parse operation.

Applies to

TryParse(XmlReader, IEdmModel, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

public static bool TryParse (System.Xml.XmlReader reader, Microsoft.OData.Edm.IEdmModel reference, out Microsoft.OData.Edm.IEdmModel model, out System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.Validation.EdmError> errors);
static member TryParse : System.Xml.XmlReader * Microsoft.OData.Edm.IEdmModel * IEdmModel * seq -> bool
Public Shared Function TryParse (reader As XmlReader, reference As IEdmModel, ByRef model As IEdmModel, ByRef errors As IEnumerable(Of EdmError)) As Boolean

Parameters

reader
XmlReader

XmlReader containing the CSDL artifact.

reference
IEdmModel

Model to be referenced by the created model.

model
IEdmModel

The model generated by parsing

errors
IEnumerable<EdmError>

Errors reported while parsing.

Returns

Success of the parse operation.

Applies to

TryParse(XmlReader, Boolean, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

public static bool TryParse (System.Xml.XmlReader reader, bool ignoreUnexpectedAttributesAndElements, out Microsoft.OData.Edm.IEdmModel model, out System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.Validation.EdmError> errors);
static member TryParse : System.Xml.XmlReader * bool * IEdmModel * seq -> bool
Public Shared Function TryParse (reader As XmlReader, ignoreUnexpectedAttributesAndElements As Boolean, ByRef model As IEdmModel, ByRef errors As IEnumerable(Of EdmError)) As Boolean

Parameters

reader
XmlReader

XmlReader containing the CSDL artifact.

ignoreUnexpectedAttributesAndElements
Boolean

Ignore the unexpected attributes and elements in schema.

model
IEdmModel

The model generated by parsing

errors
IEnumerable<EdmError>

Errors reported while parsing.

Returns

Success of the parse operation.

Applies to

TryParse(XmlReader, IEnumerable<IEdmModel>, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

public static bool TryParse (System.Xml.XmlReader reader, System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.IEdmModel> references, out Microsoft.OData.Edm.IEdmModel model, out System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.Validation.EdmError> errors);
static member TryParse : System.Xml.XmlReader * seq<Microsoft.OData.Edm.IEdmModel> * IEdmModel * seq -> bool
Public Shared Function TryParse (reader As XmlReader, references As IEnumerable(Of IEdmModel), ByRef model As IEdmModel, ByRef errors As IEnumerable(Of EdmError)) As Boolean

Parameters

reader
XmlReader

XmlReader containing the CSDL artifact.

references
IEnumerable<IEdmModel>

Models to be referenced by the created model.

model
IEdmModel

The model generated by parsing

errors
IEnumerable<EdmError>

Errors reported while parsing.

Returns

Success of the parse operation.

Applies to

TryParse(XmlReader, Func<Uri,XmlReader>, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

public static bool TryParse (System.Xml.XmlReader reader, Func<Uri,System.Xml.XmlReader> getReferencedModelReaderFunc, out Microsoft.OData.Edm.IEdmModel model, out System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.Validation.EdmError> errors);
static member TryParse : System.Xml.XmlReader * Func<Uri, System.Xml.XmlReader> * IEdmModel * seq -> bool
Public Shared Function TryParse (reader As XmlReader, getReferencedModelReaderFunc As Func(Of Uri, XmlReader), ByRef model As IEdmModel, ByRef errors As IEnumerable(Of EdmError)) As Boolean

Parameters

reader
XmlReader

XmlReader containing the CSDL artifact.

getReferencedModelReaderFunc
Func<Uri,XmlReader>

The function to load referenced model xml. If null, will stop loading the referenced models. Normally it should throw no exception.

model
IEdmModel

The model generated by parsing

errors
IEnumerable<EdmError>

Errors reported while parsing.

Returns

Success of the parse operation.

Remarks

If getReferencedModelReaderFunc throws exception, it won't be caught internally but will be thrown out for caller to handle.

Applies to

TryParse(XmlReader, IEnumerable<IEdmModel>, CsdlReaderSettings, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

public static bool TryParse (System.Xml.XmlReader reader, System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.IEdmModel> references, Microsoft.OData.Edm.Csdl.CsdlReaderSettings settings, out Microsoft.OData.Edm.IEdmModel model, out System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.Validation.EdmError> errors);
static member TryParse : System.Xml.XmlReader * seq<Microsoft.OData.Edm.IEdmModel> * Microsoft.OData.Edm.Csdl.CsdlReaderSettings * IEdmModel * seq -> bool
Public Shared Function TryParse (reader As XmlReader, references As IEnumerable(Of IEdmModel), settings As CsdlReaderSettings, ByRef model As IEdmModel, ByRef errors As IEnumerable(Of EdmError)) As Boolean

Parameters

reader
XmlReader

XmlReader containing the CSDL artifact.

references
IEnumerable<IEdmModel>

Models to be referenced by the created model.

settings
CsdlReaderSettings

CsdlReader settings for current parser.

model
IEdmModel

The model generated by parsing

errors
IEnumerable<EdmError>

Errors reported while parsing.

Returns

Success of the parse operation.

Remarks

If getReferencedModelReaderFunc throws exception, it won't be caught internally but will be thrown out for caller to handle.

Applies to

TryParse(XmlReader, IEnumerable<IEdmModel>, Boolean, IEdmModel, IEnumerable<EdmError>)

Tries parsing the given CSDL artifact for an IEdmModel.

public static bool TryParse (System.Xml.XmlReader reader, System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.IEdmModel> references, bool includeDefaultVocabularies, out Microsoft.OData.Edm.IEdmModel model, out System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.Validation.EdmError> errors);
static member TryParse : System.Xml.XmlReader * seq<Microsoft.OData.Edm.IEdmModel> * bool * IEdmModel * seq -> bool
Public Shared Function TryParse (reader As XmlReader, references As IEnumerable(Of IEdmModel), includeDefaultVocabularies As Boolean, ByRef model As IEdmModel, ByRef errors As IEnumerable(Of EdmError)) As Boolean

Parameters

reader
XmlReader

XmlReader containing the CSDL artifact.

references
IEnumerable<IEdmModel>

Models to be referenced by the created model.

includeDefaultVocabularies
Boolean

A value indicating enable/disable the built-in vocabulary supporting.

model
IEdmModel

The model generated by parsing

errors
IEnumerable<EdmError>

Errors reported while parsing.

Returns

Success of the parse operation.

Applies to