C# Class ExoModel.ModelPath

Represents a property path from a root ModelType with one or more steps.
Due to inheritance, property paths may branch as properties with similar names appear on siblings in the inheritance hierarchy.
Inheritance: IDisposable
显示文件 Open project: vc3/ExoModel Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
GetInstances ( ModelInstance root ) : HashSet

Gets the model for the specified root object including all objects on the path.

ToString ( ) : string

Returns the string representation of the path.

Private Methods

Method Description
CreatePath ( ModelType rootType, Expression expression ) : ModelPath

Creates a new ModelPath instance for the specified root ModelType based on the specified Expression tree.

CreatePath ( ModelType rootType, string path ) : ModelPath

Creates a new ModelPath instance for the specified root ModelType and path string.

GetInstances ( ModelInstance instance, ModelStepList steps, HashSet model ) : void

Recursively loads a path in the model by walking steps.

Notify ( ModelInstance instance ) : void

Notify path subscribers that the path has changed.

RemoveStep ( ModelStep step ) : void

Safely removes an invalid step from a path.

Subscribe ( ModelStepList steps ) : void

Recursively subscribes to path changes.

Unsubscribe ( ModelStepList steps ) : void

Recursively unsubscribes to path changes.

Method Details

Dispose() public method

public Dispose ( ) : void
return void

GetInstances() public method

Gets the model for the specified root object including all objects on the path.
public GetInstances ( ModelInstance root ) : HashSet
root ModelInstance
return HashSet

ToString() public method

Returns the string representation of the path.
public ToString ( ) : string
return string