Share via


CsdlWriter.TryWriteCsdl Method

Definition

Overloads

TryWriteCsdl(IEdmModel, Utf8JsonWriter, IEnumerable<EdmError>)

Outputs a CSDL JSON artifact to the provided Utf8JsonWriter.

TryWriteCsdl(IEdmModel, Utf8JsonWriter, CsdlJsonWriterSettings, IEnumerable<EdmError>)

Outputs a CSDL JSON artifact to the provided Utf8JsonWriter using the settings.

TryWriteCsdl(IEdmModel, XmlWriter, CsdlTarget, IEnumerable<EdmError>)

Outputs a CSDL XML artifact to the provided XmlWriter.

TryWriteCsdl(IEdmModel, Utf8JsonWriter, IEnumerable<EdmError>)

Outputs a CSDL JSON artifact to the provided Utf8JsonWriter.

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

Parameters

model
IEdmModel

The Edm model to be written.

writer
Utf8JsonWriter

JSON writer the generated CSDL will be written to.

errors
IEnumerable<EdmError>

Errors that prevented successful serialization, or no errors if serialization was successful.

Returns

A value indicating whether serialization was successful.

Applies to

TryWriteCsdl(IEdmModel, Utf8JsonWriter, CsdlJsonWriterSettings, IEnumerable<EdmError>)

Outputs a CSDL JSON artifact to the provided Utf8JsonWriter using the settings.

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

Parameters

model
IEdmModel

The Edm model to be written.

writer
Utf8JsonWriter

JSON writer the generated CSDL will be written to.

settings
CsdlJsonWriterSettings

The CSDL writer settings.

errors
IEnumerable<EdmError>

Errors that prevented successful serialization, or no errors if serialization was successful.

Returns

A value indicating whether serialization was successful.

Applies to

TryWriteCsdl(IEdmModel, XmlWriter, CsdlTarget, IEnumerable<EdmError>)

Outputs a CSDL XML artifact to the provided XmlWriter.

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

Parameters

model
IEdmModel

Model to be written.

writer
XmlWriter

XmlWriter the generated CSDL will be written to.

target
CsdlTarget

Target implementation of the CSDL being generated.

errors
IEnumerable<EdmError>

Errors that prevented successful serialization, or no errors if serialization was successful.

Returns

A value indicating whether serialization was successful.

Applies to