mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
00cc16455c
* App: Add events which the app subscribes to Various events, which are relevant for the app to react to changes made on the server. * Refactor events * Do not extend NewBlockEvent * Refactoring events * Add store role events * Refactoring: Rename StoreUserEvent * Fix: Subscribe to UserEvent.Invited --------- Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
37 lines
1007 B
C#
37 lines
1007 B
C#
#nullable enable
|
|
|
|
namespace BTCPayServer.Events;
|
|
|
|
public abstract class StoreRoleEvent(string storeId, string roleId)
|
|
{
|
|
public string StoreId { get; } = storeId;
|
|
public string RoleId { get; } = roleId;
|
|
|
|
public class Added(string storeId, string roleId) : StoreRoleEvent(storeId, roleId)
|
|
{
|
|
protected override string ToString()
|
|
{
|
|
return $"{base.ToString()} has been added";
|
|
}
|
|
}
|
|
public class Removed(string storeId, string roleId) : StoreRoleEvent(storeId, roleId)
|
|
{
|
|
protected override string ToString()
|
|
{
|
|
return $"{base.ToString()} has been removed";
|
|
}
|
|
}
|
|
public class Updated(string storeId, string roleId) : StoreRoleEvent(storeId, roleId)
|
|
{
|
|
protected override string ToString()
|
|
{
|
|
return $"{base.ToString()} has been updated";
|
|
}
|
|
}
|
|
|
|
protected new virtual string ToString()
|
|
{
|
|
return $"StoreRoleEvent: Store {StoreId}, Role {RoleId}";
|
|
}
|
|
}
|