Class UsageTrackingObject<TUser>
Describes an object that can track it's users.
Namespace: AlchemyBow.Navigation.Surfaces
Assembly: AlchemyBow.Navigation.dll
Syntax
public abstract class UsageTrackingObject<TUser>
where TUser : class
Type Parameters
Name | Description |
---|---|
TUser | The type of users. |
Constructors
| Improve this Doc View SourceUsageTrackingObject(Int32)
Initializes an instance of the UsageTrackingObject class.
Declaration
protected UsageTrackingObject(int initialUsersCapacity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | initialUsersCapacity | The initial unique user capacity. |
Properties
| Improve this Doc View SourceHasNoUsers
Determines whether the object has not users.
Declaration
public bool HasNoUsers { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
UsersCount
The number of the unique users.
Declaration
public int UsersCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of the unique users. |
Methods
| Improve this Doc View SourceAddUser(TUser)
Adds the user.
Declaration
public void AddUser(TUser user)
Parameters
Type | Name | Description |
---|---|---|
TUser | user | A user to add. |
GetUser(Int32)
Get the user at the specified index.
Declaration
public TUser GetUser(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the user. |
Returns
Type | Description |
---|---|
TUser | The user at the specified index. |
HasUser(TUser)
Determines whether a user is tracked.
Declaration
public bool HasUser(TUser user)
Parameters
Type | Name | Description |
---|---|---|
TUser | user | The user to locate. |
Returns
Type | Description |
---|---|
System.Boolean |
|
RemoveUser(TUser)
Removes the user.
Declaration
public void RemoveUser(TUser user)
Parameters
Type | Name | Description |
---|---|---|
TUser | user | A user to remove. |