Role Class

Namespace:
Weavy.Core.Models
Assembly:
Weavy.Core.dll

An object representing a security role.

[Boost(1.2F)]
public class Role : Expando, IExpando, IDynamicMetaObjectProvider, IEnumerable>, IEnumerable, ITrashable, IEntity, ICloneable, IValidatableObject
Inheritance:
System.Object → ExpandoRole
Attributes:
BoostAttribute
Implements:
IExpando, ITrashable, IEntity

Constructors

Role() Initializes a new instance of the Role class.

Properties

CreatedAt Gets or sets the time (UTC) the Role was created.
CreatedById Gets or sets the id of the User that updated the Role.
Description Gets or sets a short description of the Role.
Id Gets the id.
IsMember Gets a value indicating whether the current user is a member of the Role.
Iss Gets or sets the issuer (for external roles).
MemberIds Gets the ids of the users that are members of the Role.
ModifiedAt Gets or sets the time (UTC) the Role was updated.
ModifiedById Gets or sets the id of the User that updated the Role.
Name Gets or sets the name of the role (used for authorization).
Sub Gets or sets the subject (for external roles).
SyncedAt Gets the time the Role was last synchronized with the external provider.
Timestamp Gets the timestamp.
TrashedAt Gets the time (UTC) the Role was trashed.
TrashedById Gets the id of the User that trashed this Role.
Type Gets the type of the entity.

Methods

Clone() Creates a new object that is a copy of the current instance.
GetExcerpt(Boolean) Gets an excerpt or summary suitable for display in lists and search results.
GetIcon() Gets an icon suitable for display in the user interface.
GetTitle() Gets the display name of the Role.
Validate(ValidationContext)

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(Object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(Object, Nullable, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(Object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.