C-DEngine 5.105

cdeP..::..SetSafeProperty Method (cdeP, String, Object, ePropertyTypes, Boolean, 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(
	cdeP pProp,
	string pName,
	Object pValue,
	ePropertyTypes pType,
	bool UpdateThing,
	bool ForceUpdate
)
Public Shared Function SetSafeProperty ( _
	pProp As cdeP, _
	pName As String, _
	pValue As Object, _
	pType As ePropertyTypes, _
	UpdateThing As Boolean, _
	ForceUpdate As Boolean _
) As cdeP
public:
static cdeP^ SetSafeProperty(
	cdeP^ pProp, 
	String^ pName, 
	Object^ pValue, 
	ePropertyTypes^ pType, 
	bool^ UpdateThing, 
	bool^ ForceUpdate
)

Parameters

pProp
Type: nsCDEngine.Engines.ThingService..::..cdeP
Target Property
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
ForceUpdate
Type: Boolean
Forces an update to the Thing - even if the value of the property is the same as already store in the property

Return Value