Class UserSerializationManager
Manages user serialization.
Inheritance
Namespace: Phoenix.Users
Assembly: Phoenix.Plugin.Users.dll
Syntax
public class UserSerializationManager : BindableBase
Constructors
View SourceUserSerializationManager(String, IPhoenixLogger)
Initializes a new instance of the UserSerializationManager class.
Declaration
public UserSerializationManager(string userListFilePath, IPhoenixLogger logger)
Parameters
Type | Name | Description |
---|---|---|
System.String | userListFilePath | The file path where the user list is found. |
IPhoenixLogger | logger | User Management Module logger. |
Properties
View SourceAllSerializableUsersAreSelected
Gets or sets a value indicating whether or not all serialized users are selected.
Declaration
public bool? AllSerializableUsersAreSelected { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
CanUpdateList
Gets or sets a value indicating whether the master list is being updated already.
Declaration
public bool CanUpdateList { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
MasterUserList
Gets the master user list of serialized users.
Declaration
public ObservableCollection<SerializableUser> MasterUserList { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<SerializableUser> |
RemoveSelectedSerializableUsersCommand
Gets the command to remove all selected serializable users.
Declaration
public DelegateCommand RemoveSelectedSerializableUsersCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
RemoveSerializableUserCommand
Gets the command to remove a serializable user from the master list.
Declaration
public DelegateCommand<SerializableUser> RemoveSerializableUserCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<SerializableUser> |
Methods
View SourceAddOrUpdateMasterListAsync(PhoenixUser)
Adds or updates a user in the master list.
Declaration
public Task AddOrUpdateMasterListAsync(PhoenixUser phoenixUser)
Parameters
Type | Name | Description |
---|---|---|
PhoenixUser | phoenixUser | A phoenix user |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task performing the request. |
AddOrUpdateMasterListAsync(SerializableUser)
Adds or updates a user in the master list and saves the list.
Declaration
public Task AddOrUpdateMasterListAsync(SerializableUser user)
Parameters
Type | Name | Description |
---|---|---|
SerializableUser | user | A new user. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task performing the request. |
AddOrUpdateMasterListAsync(User)
Adds or updates a single user in the master list.
Declaration
public Task AddOrUpdateMasterListAsync(User user)
Parameters
Type | Name | Description |
---|---|---|
User | user | The user. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task performing the request. |
AddOrUpdateMasterListAsync(IEnumerable<PhoenixUser>)
Adds or updates a user in the master list.
Declaration
public Task AddOrUpdateMasterListAsync(IEnumerable<PhoenixUser> phoenixUsers)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<PhoenixUser> | phoenixUsers | List of Phoenix Users to add. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task performing the request. |
AddOrUpdateMasterListAsync(IEnumerable<User>)
Adds or updates a user in the master list.
Declaration
public Task AddOrUpdateMasterListAsync(IEnumerable<User> users)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<User> | users | List of users to add. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task performing the request. |
LoadUserList()
Loads a user list from the AppData folder. If the file doesn't exist, an empty list is created. Throws an exception if it's unable to deserialize the provided file.
Declaration
public void LoadUserList()
RemoveSelectedSerializableUsersAsync()
Removes the selected serializable users.
Declaration
public async Task RemoveSelectedSerializableUsersAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task performing the request. |
RemoveSerializableUserAsync(SerializableUser)
Removes a serializable user from the list.
Declaration
public async Task RemoveSerializableUserAsync(SerializableUser user)
Parameters
Type | Name | Description |
---|---|---|
SerializableUser | user | The user to remove. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task performing the request. |
SaveUserListAsync()
Saves the user list to the AppData folder. Overwrites an existing list.
Declaration
public Task SaveUserListAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task performing the request. |