Check if the context of Visual Guard is valid.

Namespace: Novalys.VisualGuard.Security
Assembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2016.0.105.16 (2016.0.105.16)

Syntax

C#
public static bool CheckContext(
	bool throwOnError
)
Visual Basic
Public Shared Function CheckContext ( 
	throwOnError As Boolean
) As Boolean

Parameters

throwOnError
Type: System..::..Boolean
throw an error if the context is not valid

Return Value

Type: Boolean
true if the Visual Guard context is valid, false otherwise.

Remarks

You can call this method if you want to check if the context of Visual Guard is valid for the application. If you do not call this method, Visual Guard will check this information at the first call of the repository and will throw an exception at this time. The method will check if Visual Guard configuration files are valid and if it is possible to access to the repository and if the application has enough permissions on this repository.

Exceptions

ExceptionCondition
Novalys.VisualGuard.Security..::..VGInvalidRepositoryExceptionThis exception will be thrown if the application cannot access to the repository.
Novalys.VisualGuard.Security..::..VGConfigurationExceptionThis exception will be thrown if Visual Guard configuration files are not available or if the parameters of these files are not valid.

See Also