Пример #1
0
 public MyController(
     MyNotificationsEngine myNotificationsEngine,
     IDataCenter localDataCenter,
     IDataCenter remoteDataCenter)
 {
     _myNotificationsEngine = myNotificationsEngine;
     _localDataCenter       = localDataCenter;
     _remoteDataCenter      = remoteDataCenter;
 }
Пример #2
0
        static void Main2(string[] args)
        {
            var myNotificationsEngine = new MyNotificationsEngine();

            var localDataCenter  = new DataCenter();
            var remoteDataCenter = new DataCenter();

            var myController = new MyController(
                myNotificationsEngine,
                localDataCenter,
                remoteDataCenter);

            //somewhere
            myController.HandleMessageFromUser("message1");


            //somewhere else
            myController.HandleReplicatedMessage("message2");
        }