public MyController( MyNotificationsEngine myNotificationsEngine, DataCenter localDataCenter, DataCenter remoteDataCenter) { _myNotificationsEngine = myNotificationsEngine; _localDataCenter = localDataCenter; _remoteDataCenter = remoteDataCenter; }
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"); }