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 ); }
public static AccountState PutOnAlert(this AccountState account) => account.With ( Status: AccountStatus.Frozen, AllowedOverdraft: 0m );
public static AccountState Freeze(this AccountState account) => account.With(Status: AccountStatus.Frozen);