Пример #1
0
        public void Charge(int clientId, decimal amount)
        {
            Client1 client = _repository.Get(clientId);

            if (client.IsVip() && client.MoneyLeft > 0)
            {
                client.MoneyLeft -= amount;
            }
        }
Пример #2
0
        public void Process(Data input)
        {
            ProcessStep1();
            input.ProcessStep2();

            Data temporary = new Data();

            Client1 data = _repositry.Get(1);


            input.Param1.DoStap2(); // ERROR - violation of Law of Demeter!!!
        }