Gets or sets the value of the attribute.

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

Syntax

C#
Object Value { get; set; }
Visual Basic
Property Value As Object
	Get
	Set

Property Value

Type: Object

Examples

This example modify the argument Country of the permission '\Common\Display only information on a country'

Visual Basic Copy imageCopy
Dim PermId As Guid = New Guid("975d80d8-b23f-4226-8cc8-ce2965e59e8c") ' Id of the permission "\Common\Display only information on a country"
' Checks if the permission is granted to the current user and gets the argument value assign to this permission
If Not VGSecurityManager.Principal.HasPermission(PermId) Then
    MessageBox.Show("The permssion '\Common\Display only information on a country' is not granted to the current user")
Else
    Dim myPerm As VGIPermission = VGSecurityManager.Principal.GetPermission(PermId)
    Dim attr As VGIPermissionAttribute = myPerm.Attributes.GetAttributeByName("Country")
    attr.Value = "France"
    MessageBox.Show("The current user can now see information about the country 'France'")
End If
C# Copy imageCopy
Guid PermId = new Guid("975d80d8-b23f-4226-8cc8-ce2965e59e8c");
// Id of the permission "\Common\Display only information on a country"
// Checks if the permission is granted to the current user and gets the argument value assign to this permission
if (!VGSecurityManager.Principal.HasPermission(PermId))
{
    MessageBox.Show("The permssion '\\Common\\Display only information on a country' is not granted to the current user");
}
else
{
    VGIPermission myPerm = VGSecurityManager.Principal.GetPermission(PermId);
    VGIPermissionAttribute attr = myPerm.Attributes.GetAttributeByName("Country");
    attr.Value = "France";
    MessageBox.Show("The current user can now see information about the country 'France'");
}

See Also