Show / Hide Table of Contents

Class ConcurrentDeviceUserCollection

A collection for users of device using a ConcurrentDictionary.

Inheritance
System.Object
ConcurrentDeviceUserCollection
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Users
Assembly: Phoenix.Plugin.Users.dll
Syntax
public class ConcurrentDeviceUserCollection

Constructors

View Source

ConcurrentDeviceUserCollection(IDevice)

Initializes a new instance of the ConcurrentDeviceUserCollection class.

Declaration
public ConcurrentDeviceUserCollection(IDevice device)
Parameters
Type Name Description
IDevice device

The device associated with the container.

Properties

View Source

Count

Gets the amount of users of the container.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
View Source

Device

Gets the device associated with the container.

Declaration
public IDevice Device { get; }
Property Value
Type Description
IDevice
View Source

Emails

Gets all emails that serve as keys for each user.

Declaration
public ICollection<string> Emails { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<System.String>
View Source

Item[String]

Tries to return a user by email.

Declaration
public PhoenixUser this[string email] { get; }
Parameters
Type Name Description
System.String email

The email associated with the user.

Property Value
Type Description
PhoenixUser

The PhoenixUser.

Exceptions
Type Condition
TryGetPhoenixUserFailedException

Thrown when a user can got be obtained.

View Source

Users

Gets all users in this container.

Declaration
public ICollection<PhoenixUser> Users { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<PhoenixUser>

Methods

View Source

Add(String, PhoenixUser)

Tries to add an email and it's associated PhoenixUser to the container

Declaration
public bool Add(string email, PhoenixUser user)
Parameters
Type Name Description
System.String email

The email of the user.

PhoenixUser user

The user

Returns
Type Description
System.Boolean

True if user was added successfully, false if not.

View Source

Clear()

Clears all users associated with this container.

Declaration
public void Clear()
View Source

ContainsEmail(String)

Checks whether a user by email exists or not.

Declaration
public bool ContainsEmail(string email)
Parameters
Type Name Description
System.String email

The email associated with the user.

Returns
Type Description
System.Boolean

True if the user exists, false if not.

View Source

GetEnumerator()

Gets an enumerator for this container.

Declaration
public IEnumerator<KeyValuePair<string, PhoenixUser>> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, PhoenixUser>>

An enumerator for this container.

View Source

Remove(String)

Tries to remove a user based on it's email from the container.

Declaration
public bool Remove(string email)
Parameters
Type Name Description
System.String email

The email of the user.

Returns
Type Description
System.Boolean

True if user was removed successfully, false if not.

  • View Source
In This Article
Back to top Generated by DocFX