Partilhar via


CodeAccessPermission.Issubsetof(CodeAccessPermission) Method

Definition

Determines whether a current permission is a subset of the specified permission when it is overridden by a derived class.

public:
 abstract bool Issubsetof(Microsoft::Dynamics::Ax::Xpp::CodeAccessPermission ^ target);
public abstract bool Issubsetof (Microsoft.Dynamics.Ax.Xpp.CodeAccessPermission target);
abstract member Issubsetof : Microsoft.Dynamics.Ax.Xpp.CodeAccessPermission -> bool
Public MustOverride Function Issubsetof (target As CodeAccessPermission) As Boolean

Parameters

target
CodeAccessPermission

A CodeAccessPermission class object.

Returns

true if a current permission is a subset of a specified permission; otherwise, false.

Remarks

You can override the method as part of the process of making an API more secure.

The following example shows how to override the isSubsetOf method to determine whether permissions that are stored in the current object are located in _target.

public boolean isSubsetOf(CodeAccessPermission _target) 
{ 
    SysTestCodeAccessPermission sysTarget = _target; 
    return this.handle() == _target.handle(); 
}

Applies to