IPrivilegePredicate

Description

interface Tinman.Core.Privileges.IPrivilegePredicate

Extended by

PrivilegePredicate abstract

Base interfaces for classes that check whether a privilege for accessing a native resource is granted to the Tinman 3D SDK.

The object.ToString method of a IPrivilegePredicate implementation should return a human-readable representation of the predicate logic.

See also

Privilege

Public / Methods

And


public method And → (1)

other in : IPrivilegePredicate

[not-null]
The other privilege object.

returns → IPrivilegePredicate

The resulting privilege object.

Returns a IPrivilegePredicate object that only allows an access if it is allowed by this object and the given other in one.

The string representation of the returned object is "AND(X,Y…​)", where X is the string representation of thisIPrivilegePredicate object and Y is the string representation of other in.

Check


[Pure] [ThreadSafe]
public method Check → (1)

info in : PrivilegeInfo

The additional information to use.

returns → bool

true if the privilege shall be granted,
false if the privilege shall be withheld.

Checks whether to grant the privilege for the current access.

If Flags returns PrivilegeFlags.None, then this method must always return the same value, i.e. it must behave as if Constant had been specified (see IPrivilegePredicate.IsAlways).

Not


public method Not → ()

returns → IPrivilegePredicate

The resulting privilege object.

Returns a IPrivilegePredicate object that inverts the result of this object.

The string representation of the returned is "NOT(X)", where X is the string representation of thisIPrivilegePredicate object.

Or


public method Or → (1)

other in : IPrivilegePredicate

[not-null]
The other privilege object.

returns → IPrivilegePredicate

The resulting privilege object.

Returns a IPrivilegePredicate object that allows an access if it is allowed by this object or the given other in one.

The string representation of the returned object is "OR(X,Y…​)", where X is the string representation of thisIPrivilegePredicate object and Y is the string representation of other in.

Public / Attributes

Flags


[Constant]
public attribute Flags → (get)

value : PrivilegeFlags

The privilege flags.

Returns the flags of this privilege.

Extensions

Is​Always


public static method IsAlways → (1)

result in : bool

The constant result to check.

returns → bool

true if the privilege check will always yield result in,
false if not.

Determines if checking of this privilege always yields the same result.

Restrict

2 overloads


public static method Restrict1 → (1)

privilege in : Privilege

[not-null]
The privilege to restrict, which must provide all required information, see IPrivilegePredicate.Flags.

Restricts the given privilege in by requiring that this predicate returns true before granting it.

This method may only be called while the Tinman 3D SDK is still uninitialized, see TinmanModule.IsInitialized.


public static method Restrict2 → (1)

privileges in : IEnumerable<Privilege>

[not-null]
The privileges to restrict, which must provide all required information, see IPrivilegePredicate.Flags.

Restricts the given privileges in by requiring that this predicate returns true before granting any of them.

This method may only be called while the Tinman 3D SDK is still uninitialized, see TinmanModule.IsInitialized.