C-DEngine 5.105

TheThing..::..SetSafeProperty Method (ICDEThing, String, Object, ePropertyTypes, Boolean)

A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TString"

Namespace:  nsCDEngine.Engines.ThingService
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public static cdeP SetSafeProperty(
	ICDEThing pThing,
	string pName,
	Object pValue,
	ePropertyTypes pType,
	bool UpdateThing
)
Public Shared Function SetSafeProperty ( _
	pThing As ICDEThing, _
	pName As String, _
	pValue As Object, _
	pType As ePropertyTypes, _
	UpdateThing As Boolean _
) As cdeP
public:
static cdeP^ SetSafeProperty(
	ICDEThing^ pThing, 
	String^ pName, 
	Object^ pValue, 
	ePropertyTypes^ pType, 
	bool^ UpdateThing
)

Parameters

pThing
Type: nsCDEngine.Engines.ThingService..::..ICDEThing
Target TheThing
pName
Type: String
Property Name
pValue
Type: Object
A value to be put in the Property. No Conversion will take place - it will be stored in the Property with its original Type but Serialized with ToString()
pType
Type: nsCDEngine.Engines.ThingService..::..ePropertyTypes
Sets the Type of the Property
UpdateThing
Type: Boolean
If set to true, TheThing's UpdateThing function will be called and TheThing is updated in TheThingRegistry and TheThingRegistry is flushed to Disk

Return Value