public MainWindow() { InitializeComponent(); //Initialization Code try { // Configure the Endpoint details DuplexChannelFactory<IPig> channel = new DuplexChannelFactory<IPig>(this, "Pig"); // Activate a remote Shoe object pig = channel.CreateChannel(); // Regsister this client for the callbacks service callbackId = pig.RegisterForCallbacks(); // If they join after the game is started, this player will not be included in the game if( callbackId == 0 ) { MessageBox.Show("Game has already started"); this.Close(); } this.Title = "Hello Player " + callbackId; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public Salami(IPig pig, ICow cow, IButcher butcher) { }
public Ham(IPig pig, IButcher butcher) { }
public Bacon(IPig pig, IFarmer farmer) { }