Exemple #1
0
        static void Run()
        {
            var account = new AccountState
                          (
                Currency: "EUR",
                Status: AccountStatus.Active
                          );
            var newState = account.WithStatus(AccountStatus.Frozen);

            var frozen = account.With
                         (
                Status: AccountStatus.Frozen,
                AllowedOverdraft: 0m
                         );
        }
Exemple #2
0
 public static AccountState PutOnAlert(this AccountState account)
 => account.With
 (
     Status: AccountStatus.Frozen,
     AllowedOverdraft: 0m
 );
Exemple #3
0
 public static AccountState Freeze(this AccountState account)
 => account.With(Status: AccountStatus.Frozen);