Class SimplePrincipal
Simple IPrincipal implementation that extends GenericPrincipal, implementing only Equals and GetHashCode. For hash code generation and equality comparison, SimplePrincipal uses only the Identity.Name property.
Implements
Inherited Members
Namespace: Tangosol.Net.Security.Impl
Assembly: Coherence.dll
Syntax
public class SimplePrincipal : GenericPrincipal, IPrincipal
Constructors
SimplePrincipal(IIdentity, string[])
Constructor
Declaration
public SimplePrincipal(IIdentity id, string[] roles)
Parameters
Type | Name | Description |
---|---|---|
IIdentity | id | IIdentity a generic user representation. |
string[] | roles | A list of roles to which the user represented by IIdentity belongs. |
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if obj is a SimplePrincipal and its Identity.Name matches that of the current object. false otherwise. |
Overrides
GetHashCode()
Obtain the hashcode for this object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | The integer hashcode of the Identity.Name property. |