C# 클래스 Catel.Data.ModelBaseExtensions

파일 보기 프로젝트 열기: Catel/Catel

공개 메소드들

메소드 설명
GetErrorMessage ( this model, string userFriendlyObjectName = null ) : string

Returns a message that contains all the current errors.

GetValidationContextForObjectGraph ( this model ) : IValidationContext

Gets the validation context for a complete object graph by also checking the properties and recursive

GetWarningMessage ( this model, string userFriendlyObjectName = null ) : string

Returns a message that contains all the current warnings.

Save ( this model, Stream stream, ISerializer serializer ) : void

Saves the specified model to the stream using the serializer.

Save ( this model, string filePath, ISerializer serializer ) : void

Saves the specified model to the file using the specified serializer.

SaveAsXml ( this model, Stream stream ) : void

Saves as XML.

SaveAsXml ( this model, string filePath ) : void

Saves the specified model to the file as xml.

비공개 메소드들

메소드 설명
AddModelValidation ( this validationContext, IModel model, List handledModels ) : void
GetListMessages ( IValidationContext validationContext, ValidationResultType validationResult ) : string

Gets the list messages.

This method is used to create a message string for field warnings or errors and business warnings or errors. Just pass the right dictionary and list to this method.

메소드 상세

GetErrorMessage() 공개 정적인 메소드

Returns a message that contains all the current errors.
The is null.
public static GetErrorMessage ( this model, string userFriendlyObjectName = null ) : string
model this The model base.
userFriendlyObjectName string Name of the user friendly object.
리턴 string

GetValidationContextForObjectGraph() 공개 정적인 메소드

Gets the validation context for a complete object graph by also checking the properties and recursive
The is null.
public static GetValidationContextForObjectGraph ( this model ) : IValidationContext
model this The model.
리턴 IValidationContext

GetWarningMessage() 공개 정적인 메소드

Returns a message that contains all the current warnings.
The is null.
public static GetWarningMessage ( this model, string userFriendlyObjectName = null ) : string
model this The model base.
userFriendlyObjectName string Name of the user friendly object.
리턴 string

Save() 공개 정적인 메소드

Saves the specified model to the stream using the serializer.
public static Save ( this model, Stream stream, ISerializer serializer ) : void
model this The model.
stream System.IO.Stream The stream.
serializer ISerializer The serializer.
리턴 void

Save() 공개 정적인 메소드

Saves the specified model to the file using the specified serializer.
public static Save ( this model, string filePath, ISerializer serializer ) : void
model this The model.
filePath string The file path.
serializer ISerializer The serializer.
리턴 void

SaveAsXml() 공개 정적인 메소드

Saves as XML.
public static SaveAsXml ( this model, Stream stream ) : void
model this The model.
stream System.IO.Stream The stream.
리턴 void

SaveAsXml() 공개 정적인 메소드

Saves the specified model to the file as xml.
public static SaveAsXml ( this model, string filePath ) : void
model this The model.
filePath string The file path.
리턴 void