Bagikan melalui


CsdlWriter.TryWriteCsdl Method (IEdmModel, XmlWriter, IEnumerable<EdmError>%)

Outputs a CSDL artifact to the provided writer.

Namespace:  Microsoft.Data.Edm.Csdl
Assembly:  Microsoft.Data.Edm (in Microsoft.Data.Edm.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function TryWriteCsdl ( _
    model As IEdmModel, _
    writer As XmlWriter, _
    <OutAttribute> ByRef errors As IEnumerable(Of EdmError) _
) As Boolean
'Usage
Dim model As IEdmModel 
Dim writer As XmlWriter 
Dim errors As IEnumerable(Of EdmError)
Dim returnValue As Boolean 

returnValue = model.TryWriteCsdl(writer, _
    errors)
public static bool TryWriteCsdl(
    this IEdmModel model,
    XmlWriter writer,
    out IEnumerable<EdmError> errors
)
[ExtensionAttribute]
public:
static bool TryWriteCsdl(
    IEdmModel^ model, 
    XmlWriter^ writer, 
    [OutAttribute] IEnumerable<EdmError^>^% errors
)
static member TryWriteCsdl : 
        model:IEdmModel * 
        writer:XmlWriter * 
        errors:IEnumerable<EdmError> byref -> bool
public static function TryWriteCsdl(
    model : IEdmModel, 
    writer : XmlWriter, 
    errors : IEnumerable<EdmError>
) : boolean

Parameters

Return Value

Type: System.Boolean
true if serialization was successful; otherwise, false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEdmModel. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.103) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).

See Also

Reference

CsdlWriter Class

TryWriteCsdl Overload

Microsoft.Data.Edm.Csdl Namespace