共用方式為


IUnrestrictedPermission.IsUnrestricted 方法

定義

傳回值,指示是否允許不受限制存取受權限保護的資源。

public:
 bool IsUnrestricted();
public bool IsUnrestricted ();
abstract member IsUnrestricted : unit -> bool
Public Function IsUnrestricted () As Boolean

傳回

如果允許不受限制的使用受權限保護的資源,則為 true;否則為 false

範例

下列程式代碼範例示範如何實作 IsUnrestricted 方法。 此程式代碼範例是針對 類別提供的較大範例的 IUnrestrictedPermission 一部分。

    // Returns true if permission is effectively unrestricted.
public:
    virtual bool IsUnrestricted()
    {
        // This means that the object is unrestricted at runtime.
        return stateFlags == SoundPermissionState::PlayAnySound;
    }
// Returns true if permission is effectively unrestricted.
public Boolean IsUnrestricted()
{
    // This means that the object is unrestricted at runtime.
    return m_flags == SoundPermissionState.PlayAnySound;
}
' Returns true if permission is effectively unrestricted.
Public Function IsUnrestricted() As [Boolean] Implements IUnrestrictedPermission.IsUnrestricted
    ' This means that the object is unrestricted at runtime.
    Return m_flags = SoundPermissionState.PlayAnySound

End Function 'IsUnrestricted

適用於