Click or drag to resize

ModelSetterMethodsGetOrSetValueAtPath Method

Get the property value

Namespace: SanteDB
Assembly: SanteDB.Core.Model (in SanteDB.Core.Model.dll) Version: 3.0.2081-alpha+0a330d5f5a5d3cb3e6e945ef530e94ac5671b49c
Syntax
public static Object GetOrSetValueAtPath(
	this IdentifiedData root,
	string hdsiExpressionPath,
	Object valueToSet = null,
	bool replace = true
)

Parameters

root  IdentifiedData
The root object from which data should be selected
hdsiExpressionPath  String
The HDSI expression to retrieve
valueToSet  Object  (Optional)
The value to set the property to if no value at the hdsiExpressionPath exists. Null if no value is to be set
replace  Boolean  (Optional)
True if the value at hdsiExpressionPath should be replaced with the valueToSet, when false valueToSet will be added to the object

Return Value

Object
The property value

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IdentifiedData. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
This method differs from the query expression parser in that it will actually modify root to set properties until it gets to the path expressed
See Also