static void Main(string[] args) { Stock stock = new Stock(); Broker brokerIvan = new Broker("Иван", stock); Bank bankSber = new Bank("Сбербанк", stock); stock.Market(); Console.WriteLine(new string('-', 55)); stock.Market(); Console.WriteLine(new string('-', 55)); stock.Market(); Console.WriteLine(new string('-', 55)); brokerIvan.StopTrade(); Console.WriteLine(new string('=', 55)); stock.Market(); stock.Market(); Console.ReadKey(); }
static void Main(string[] args) { Stock stock = new Stock(); Banck banck = new Banck("Bank 1 ", stock); Banck banck2 = new Banck("Bank 2 ", stock); Broker broker = new Broker("Broker 1", stock); stock.Market(); stock.Market(); broker.StopTrade(); banck.StopTrade(); banck2.StopTrade(); Console.Read(); }
static void Main(string[] args) { Stock stock = new Stock(); Bank bank = new Bank("ЮнитБанк", stock); Broker broker = new Broker("Иван Иваныч", stock); // имитация торгов stock.Market(); // брокер прекращает наблюдать за торгами broker.StopTrade(); // имитация торгов stock.Market(); Console.Read(); }
static void Main() { Stock stock = new Stock(); Bank bank = new Bank("American Express", stock); Broker broker = new Broker("John Smith", stock); // Imitation trading stock.Market(); //Stop trading broker.StopTrade(); // Imitation trading stock.Market(); Console.Read(); }
static void Main(string[] args) { Stock stock = new Stock(); Bank bank = new Bank("UnitBank", stock); Broker broker = new Broker("Ivan Inavovich", stock); // imitation of trades stock.Market(); // the broker stops watching trades broker.StopTrade(); // imitation of trades stock.Market(); Console.Read(); }
private static void Main() { var stock = new Stock(); var bank = new Bank("TestBank", stock); var broker = new Broker("TestBroker", stock); stock.Market(); broker.StopTrade(); stock.Market(); bank.StopTrade(); stock.Market(); }
static void Main(string[] args) { Stock stock = new Stock(); Bank bank = new Bank("Steel", stock); Broker broker = new Broker("Alex", stock); stock.Market(); stock.Market(); stock.Market(); broker.StopTrade(); stock.Market(); stock.Market(); Console.ReadLine(); }
static void Main(string[] args) { Stock stock = new Stock(); Bank bank = new Bank("ЮнитБанк", stock); Broker broker = new Broker("Иван Иваныч", stock); stock.Market(); broker.StopTrade(); stock.Market(); string mess = "Hello me"; mess += " art"; mess.Replace("me", "eleks"); Console.WriteLine(mess); Console.Read(); }
static void Main(string[] args) { Console.ForegroundColor = ConsoleColor.Green; Console.Title = "Observer"; Stock stock = new Stock(); Bank bank = new Bank("ЮнитБанк", stock); Broker broker = new Broker("Василий Иванович", stock); // Имитация торгов stock.Market(); broker.StopTrade(); // имитация торгов stock.Market(); Console.ReadKey(); }
/// <summary> /// The main. /// </summary> private static void Main() { var stock = new Stock(); var broker = new Broker(stock); broker.AddSubscribe(); stock.Market(); stock.Market(); stock.Market(); stock.Market(); broker.RemoveSubscribe(); stock.Market(); stock.Market(); stock.Market(); stock.Market(); Console.ReadLine(); }