예제 #1
0
 public MyController(
     MyNotificationsEngine myNotificationsEngine,
     DataCenter localDataCenter,
     DataCenter 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("message");


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