Closed ddjerqq closed 3 months ago
just now i pushed the first idea of how i'll implement it also a question, by wrapper you mean it should be an extention class of decimal?
no by wrapper i mean:
public record Wallet(decimal Balance)
{
// ...
}
i dont see your branch, can you push it and open a [WIP] Pull request?
i dont see your branch, can you push it and open a [WIP] Pull request?
ok i will
@ddjerqq i will have to create the seperate wallet class since u want to use the users wallet what do you think?
bool TryTranfer(Wallet other)
@ddjerqq i will have to create the seperate wallet class since u want to use the users wallet what do you think?
bool TryTranfer(Wallet other)
nevermind i found a better way lol
I want a wallet ValueObject, that will be a wrapper over decimal. I want the following methods implemented:
bool HasBalance(decimal amount)
bool TryTranfer(Wallet other)
I want wallet to be implicitly cast to decimal, but explicitly cast to wallet. Wallet must never have a negative balance.