2023-09-23 13:33:23 +00:00
|
|
|
using Tiger.Communication.Messages.Interfaces;
|
|
|
|
using Tiger.Communication.Messages.Types;
|
|
|
|
|
|
|
|
namespace Tiger.Communication.Messages.Outgoing.Users;
|
|
|
|
|
|
|
|
public class CreditBalanceComposer : IMessageComposer
|
|
|
|
{
|
2023-09-23 16:51:16 +00:00
|
|
|
private readonly int _credits;
|
2023-09-23 13:33:23 +00:00
|
|
|
|
2023-09-23 16:51:16 +00:00
|
|
|
public CreditBalanceComposer(int credits)
|
2023-09-23 13:33:23 +00:00
|
|
|
{
|
|
|
|
_credits = credits;
|
|
|
|
}
|
|
|
|
|
|
|
|
public OutgoingHeaders Header => OutgoingHeaders.CreditBalanceComposer;
|
|
|
|
public void Compose(ServerMessage message)
|
|
|
|
{
|
|
|
|
message.AppendString($"{_credits}.0");
|
|
|
|
}
|
|
|
|
}
|