IUnrestrictedPermission.IsUnrestricted 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回一个值,该值指示是否允许不受限制的访问权限所保护的资源。
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