void _main()
 {
     var account = new AccountState
                   (
         Currency: "EUR",
         Status: AccountStatus.Active
                   );
     var newState = account.WithStatus(AccountStatus.Frozen);
 }
Пример #2
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
                         );
        }