Back to Devexpress

XafApplicationExtensions.GetSecurityStrategy(XafApplication) Method

expressappframework-devexpress-dot-expressapp-dot-security-dot-xafapplicationextensions-dot-getsecuritystrategy-x28-devexpress-dot-expressapp-dot-xafapplication-x29.md

latest2.6 KB
Original Source

XafApplicationExtensions.GetSecurityStrategy(XafApplication) Method

Gets a SecurityStrategy instance of an application’s Security System.

Namespace : DevExpress.ExpressApp.Security

Assembly : DevExpress.ExpressApp.Security.v25.2.dll

NuGet Package : DevExpress.ExpressApp.Security

Declaration

csharp
public static SecurityStrategy GetSecurityStrategy(
    this XafApplication xafApplication
)
vb
<ExtensionAttribute>
Public Shared Function GetSecurityStrategy(
    xafApplication As XafApplication
) As SecurityStrategy

Parameters

NameTypeDescription
xafApplicationXafApplication

An XafApplication object that provides methods and properties to manage the current application.

|

Returns

TypeDescription
SecurityStrategy

A SecurityStrategy object that specifies an application’s Security Strategy.

|

Remarks

The following example uses this method.

csharp
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Security;
// ...
public class SecurityStrategyController : ViewController {
    protected override void OnActivated() {
        base.OnActivated();
        SecurityStrategy securityStrategy = Application.GetSecurityStrategy();
        // ...
    }
}

Refer to the IsGrantedExtensions class methods for more examples.

See Also

XafApplicationExtensions Class

XafApplicationExtensions Members

DevExpress.ExpressApp.Security Namespace