Skip to content

Instantly share code, notes, and snippets.

@domingoladron
Last active December 28, 2021 19:47
Show Gist options
  • Save domingoladron/556e674b7c6f09d7b6e2f508f86bc174 to your computer and use it in GitHub Desktop.
Save domingoladron/556e674b7c6f09d7b6e2f508f86bc174 to your computer and use it in GitHub Desktop.
Crappy-ATM-Machine-Class-Example.cs
using System.Collections.Generic;
using AtmEncapsulationExample.AtmMachines.Good;
namespace AtmEncapsulationExample.AtmMachines.Crappy
{
/// <summary>
/// Our un-encapsulated ATM Machine
/// </summary>
public class CrappyAtmMachine
{
public bool UserIsValidated { get; set; }
public readonly List<AccountInfo> ThisJerksAccounts = new List<AccountInfo>();
public Dosh TotalCashInTheMachine { get; set; }
public CrappyAtmMachine()
{
TotalCashInTheMachine = new Dosh {CountryOfOrigin = "NZ", Value = 100000};
var account1 = new AccountInfo(12345, 200);
var account2 = new AccountInfo(34567, 550);
ThisJerksAccounts.Add(account1);
ThisJerksAccounts.Add(account2);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment