C# 클래스 ExoModel.ModelSource

Utility class that supports accessing the value of a property along a static or instance source path.
파일 보기 프로젝트 열기: vc3/ExoModel 1 사용 예제들

Private Properties

프로퍼티 타입 설명
InitializeFromModelPath void
InitializeFromTypeAndPath bool
ModelSource System

공개 메소드들

메소드 설명
GetFormattedValue ( ModelInstance root ) : string

Gets the formatted value of the property for the current source path.

GetFormattedValue ( ModelInstance root, object &rawValue ) : string

Gets the formatted value of the property for the current source path.

GetFormattedValue ( ModelInstance root, string format ) : string

Gets the formatted value of the property for the current source path.

GetFormattedValue ( ModelInstance root, string format, IFormatProvider provider, object &rawValue ) : string

Gets the formatted value of the property for the current source path.

GetFormattedValue ( ModelInstance root, string format, object &rawValue ) : string

Gets the formatted value of the property for the current source path.

GetList ( ModelInstance root ) : ModelInstanceList

Gets the ModelInstanceList defined by specified source path.

GetModelProperties ( ModelType root ) : IEnumerable

Walks the steps of the ModelSource

GetModelProperty ( ModelType root ) : ModelProperty

Fetches a ModelProperty based on the root ModelType

GetReference ( ModelInstance root ) : ModelInstance

Gets the ModelInstance defined by specified source path.

GetSource ( ModelInstance root ) : IModelPropertySource
GetSource ( ModelInstance root, Func whenNull ) : IModelPropertySource
GetValue ( ModelInstance root ) : object

Gets the underlying value of the property for the current source path.

HasValue ( ModelInstance root ) : bool

Determines whether the value of the property along the source path has a value or not.

If any value along the source path is null, false will be returned. If the source property is a list, false will be returned if the list is empty.

ModelSource ( ModelPath path ) : System

Creates a new ModelSource for the specified root type and path.

ModelSource ( ModelType rootType, string path ) : System

Creates a new ModelSource for the specified root type and path.

SetValue ( ModelInstance root, object value ) : bool
SetValue ( ModelInstance root, object value, Func whenNull ) : bool
ToString ( ) : string

Gets the string representation of the source path.

TryGetSource ( ModelType rootType, string path, ModelSource &source ) : bool

Attempts to create a new ModelSource for the specified root type and path.

TryGetSource ( ModelType rootType, string path, ModelSource &source, ModelProperty &sourceProperty ) : bool

Attempts to create a new ModelSource for the specified root type and path.

비공개 메소드들

메소드 설명
InitializeFromModelPath ( ModelPath instancePath, string path, ModelProperty &sourceProperty ) : void

Initialize the source from a valid ModelPath

InitializeFromTypeAndPath ( ModelType rootType, string path, ModelProperty &sourceProperty ) : bool

Attempts to initialize a ModelSource with the specified root type and path.

ModelSource ( ) : System

메소드 상세

GetFormattedValue() 공개 메소드

Gets the formatted value of the property for the current source path.
public GetFormattedValue ( ModelInstance root ) : string
root ModelInstance
리턴 string

GetFormattedValue() 공개 메소드

Gets the formatted value of the property for the current source path.
public GetFormattedValue ( ModelInstance root, object &rawValue ) : string
root ModelInstance
rawValue object
리턴 string

GetFormattedValue() 공개 메소드

Gets the formatted value of the property for the current source path.
public GetFormattedValue ( ModelInstance root, string format ) : string
root ModelInstance
format string The specific format to use
리턴 string

GetFormattedValue() 공개 메소드

Gets the formatted value of the property for the current source path.
public GetFormattedValue ( ModelInstance root, string format, IFormatProvider provider, object &rawValue ) : string
root ModelInstance
format string
provider IFormatProvider
rawValue object
리턴 string

GetFormattedValue() 공개 메소드

Gets the formatted value of the property for the current source path.
public GetFormattedValue ( ModelInstance root, string format, object &rawValue ) : string
root ModelInstance
format string
rawValue object
리턴 string

GetList() 공개 메소드

Gets the ModelInstanceList defined by specified source path.
public GetList ( ModelInstance root ) : ModelInstanceList
root ModelInstance
리턴 ModelInstanceList

GetModelProperties() 공개 메소드

Walks the steps of the ModelSource
public GetModelProperties ( ModelType root ) : IEnumerable
root ModelType The root type from which the property should be inferred
리턴 IEnumerable

GetModelProperty() 공개 메소드

Fetches a ModelProperty based on the root ModelType
public GetModelProperty ( ModelType root ) : ModelProperty
root ModelType The root type from which the property should be inferred
리턴 ModelProperty

GetReference() 공개 메소드

Gets the ModelInstance defined by specified source path.
public GetReference ( ModelInstance root ) : ModelInstance
root ModelInstance
리턴 ModelInstance

GetSource() 공개 메소드

public GetSource ( ModelInstance root ) : IModelPropertySource
root ModelInstance
리턴 IModelPropertySource

GetSource() 공개 메소드

public GetSource ( ModelInstance root, Func whenNull ) : IModelPropertySource
root ModelInstance
whenNull Func
리턴 IModelPropertySource

GetValue() 공개 메소드

Gets the underlying value of the property for the current source path.
public GetValue ( ModelInstance root ) : object
root ModelInstance
리턴 object

HasValue() 공개 메소드

Determines whether the value of the property along the source path has a value or not.
If any value along the source path is null, false will be returned. If the source property is a list, false will be returned if the list is empty.
public HasValue ( ModelInstance root ) : bool
root ModelInstance
리턴 bool

ModelSource() 공개 메소드

Creates a new ModelSource for the specified root type and path.
public ModelSource ( ModelPath path ) : System
path ModelPath The source model path
리턴 System

ModelSource() 공개 메소드

Creates a new ModelSource for the specified root type and path.
public ModelSource ( ModelType rootType, string path ) : System
rootType ModelType The root type name, which is required for instance paths
path string The source path, which is either an instance path or a static path
리턴 System

SetValue() 공개 메소드

public SetValue ( ModelInstance root, object value ) : bool
root ModelInstance
value object
리턴 bool

SetValue() 공개 메소드

public SetValue ( ModelInstance root, object value, Func whenNull ) : bool
root ModelInstance
value object
whenNull Func
리턴 bool

ToString() 공개 메소드

Gets the string representation of the source path.
public ToString ( ) : string
리턴 string

TryGetSource() 공개 정적인 메소드

Attempts to create a new ModelSource for the specified root type and path.
public static TryGetSource ( ModelType rootType, string path, ModelSource &source ) : bool
rootType ModelType The root type name, which is required for instance paths
path string The source path, which is either an instance path or a static path
source ModelSource
리턴 bool

TryGetSource() 공개 정적인 메소드

Attempts to create a new ModelSource for the specified root type and path.
public static TryGetSource ( ModelType rootType, string path, ModelSource &source, ModelProperty &sourceProperty ) : bool
rootType ModelType The root type name, which is required for instance paths
path string The source path, which is either an instance path or a static path
source ModelSource
sourceProperty ModelProperty
리턴 bool