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

WCF Data Services 5.0

Outputs a CSDL artifact to the provided writer.

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

public static bool TryWriteCsdl(
	this IEdmModel model,
	XmlWriter writer,
	out IEnumerable<EdmError> errors


Type: Microsoft.Data.Edm.IEdmModel
The model to be written.
Type: System.Xml.XmlWriter
The XmlWriter the generated CSDL will be written to.
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).aspx or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).aspx.