public MyController( MyNotificationsEngine myNotificationsEngine, IDataCenter localDataCenter, IDataCenter 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("message1"); //somewhere else myController.HandleReplicatedMessage("message2"); }