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
- model
Type: Microsoft.Data.Edm.IEdmModel
The model to be written.
- writer
Type: System.Xml.XmlWriter
The XmlWriter the generated CSDL will be written to.
- errors
Type: System.Collections.Generic.IEnumerable<EdmError>%
The errors that prevented successful serialization or no errors if serialization was successful.
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).