Check if the context of Visual Guard is valid.
Namespace: Novalys.VisualGuard.SecurityAssembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2017.0.101.17 (2017.0.101.17)
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: Booleantrue 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
Exception | Condition |
---|---|
Novalys.VisualGuard.Security..::..VGInvalidRepositoryException | This exception will be thrown if the application cannot access to the repository. |
Novalys.VisualGuard.Security..::..VGConfigurationException | This exception will be thrown if Visual Guard configuration files are not available or if the parameters of these files are not valid. |