Visual Guard Class Library Documentation

VGSecurityManager.VGCheckVersionEventHandler Event

Allows to check if the version of the repository permissions is compatible with the version of the application.

public static event VGCheckVersionEventHandler CheckVersion;

Event Data

The event handler receives an argument of type VGCheckVersionEventArgs containing data related to this event. The following VGCheckVersionEventArgs properties provide information specific to this event.

Property Description
Cancel Allows to cancel the authentication or authorization process.
Version Gets the version of the permissions of the application.

Remarks

Occurs after the authentication and before loading permissions.

Example

This example display how to use the event CheckVersion to allow the user select a roles in the list of granted roles.

[Visual Basic]
Private Sub OnCheckVersion(ByVal sender As Object, ByVal e As VGCheckVersionEventArgs)
    If e.Version < new Version(1,2,0,0) Then
        e.Cancel = true
    End If
End Sub
[C#]
private void OnCheckVersion (object sender, VGCheckVersionEventArgs args)
{
    if (e.Version < new Version(1,2,0,0))
    {
        e.Cancel = true
    }
}

See Also

VGSecurityManager Class | Novalys.VisualGuard.Security Namespace