Click or drag to resize

VGSecurityRuntimeSetSecurity Method (Object)

Sets the security for the specified object.

Namespace:  Novalys.VisualGuard.Security
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2019.1.831.19 (2019.1.0831.19)
Syntax
public void SetSecurity(
	Object target
)

Parameters

target
Type: SystemObject
The object for which you want to set the security
Exceptions
ExceptionCondition
ArgumentNullExceptiontarget is null.
Remarks
You need to call this method only once for each object instance.In most of case, this method must be called at the end of constructor of the object (after the call of InitializeComponent method for components). This method registers the object in Visual Guard then it executes the actions defined for this target to be executed when the security is loaded.If some actions must be executed on other events, It handles these events. The actions associated to these events will be executed each time the events are raised.

If the target is an ancestor class, you must use the SetSecurity(Object, Type) method to specify the type of the ancestor for which the security must be set.


For more information, you can consult:

How Visual Guard secures an application

How to apply security in your application

See Also