Skip to main content

Definition

Assembly: Microsoft.Restier.Core.dll Namespace: Microsoft.Restier.Core.Authorization Inheritance: System.Object

Syntax

Microsoft.Restier.Core.Authorization.AuthorizationEntry

Summary

Describes the methods of verifying various CRUD operations for a given EF Entity. Useful in code generation scenarios

Constructors

.ctor

Creates a new instance of an AuthorizationEntry for a given AuthorizationEntry.Type. Assumes all authorization checks will return false by default.

Syntax

public AuthorizationEntry(System.Type t)

Parameters

NameTypeDescription
tSystem.TypeThe AuthorizationEntry.Type to track authorization methods for.

.ctor

Creates a new instance of an AuthorizationEntry for a given AuthorizationEntry.Type while allowing you to specify the action to run when authorizing Inserts.

Syntax

public AuthorizationEntry(System.Type t, System.Func<bool> canInsertAction)

Parameters

NameTypeDescription
tSystem.TypeThe AuthorizationEntry.Type to track authorization methods for.
canInsertActionSystem.Func<bool>A Func`1 that evaluates to a Boolean specifying whether or not a record can be inserted through the Restier API.

.ctor

Creates a new instance of an AuthorizationEntry for a given AuthorizationEntry.Type while allowing you to specify the actions to run when authorizing Inserts and Updates.

Syntax

public AuthorizationEntry(System.Type t, System.Func<bool> canInsertAction, System.Func<bool> canUpdateAction)

Parameters

NameTypeDescription
tSystem.TypeThe AuthorizationEntry.Type to track authorization methods for.
canInsertActionSystem.Func<bool>A Func`1 that evaluates to a Boolean specifying whether or not a record can be inserted through the Restier API.
canUpdateActionSystem.Func<bool>A Func`1 that evaluates to a Boolean specifying whether or not a record can be updated through the Restier API.

.ctor

Creates a new instance of an AuthorizationEntry for a given AuthorizationEntry.Type while allowing you to specify the actions to run when authorizing Inserts, Updates, and Deletes.

Syntax

public AuthorizationEntry(System.Type t, System.Func<bool> canInsertAction, System.Func<bool> canUpdateAction, System.Func<bool> canDeleteAction)

Parameters

NameTypeDescription
tSystem.TypeThe AuthorizationEntry.Type to track authorization methods for.
canInsertActionSystem.Func<bool>A Func`1 that evaluates to a Boolean specifying whether or not a record can be inserted through the Restier API.
canUpdateActionSystem.Func<bool>A Func`1 that evaluates to a Boolean specifying whether or not a record can be updated through the Restier API.
canDeleteActionSystem.Func<bool>A Func`1 that evaluates to a Boolean specifying whether or not a record can be deleted through the Restier API.

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

CanDeleteAction

A Func`1 that evaluates to a Boolean specifying whether or not a record can be deleted through the Restier API. The default is false.

Syntax

public System.Func<bool> CanDeleteAction { get; set; }

Property Value

Type: System.Func<bool>

CanInsertAction

A Func`1 that evaluates to a Boolean specifying whether or not a record can be inserted through the Restier API. The default is false.

Syntax

public System.Func<bool> CanInsertAction { get; set; }

Property Value

Type: System.Func<bool>

CanUpdateAction

A Func`1 that evaluates to a Boolean specifying whether or not a record can be updated through the Restier API. The default is false.

Syntax

public System.Func<bool> CanUpdateAction { get; set; }

Property Value

Type: System.Func<bool>

Type

The AuthorizationEntry.Type to register this AuthorizationEntry for in the AuthorizationFactoryAuthorizationFactory’s</see> backing Dictionary.

Syntax

public System.Type Type { get; set; }

Property Value

Type: System.Type

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?