public void Nameofproduct(Iproduct onename) //show the name of the product { foreach (var agent in _agents) { var obj = agent; Task.Factory.StartNew(itsobject2 => { ((InterfaceAgent)itsobject2).nameofproduct(onename.name()); }, obj); } }
public void Descriptionofproduct(Iproduct oneproduct) { foreach (var agent in _agents) { var obj = agent; Task.Factory.StartNew(itsobject => { ((InterfaceAgent)itsobject).abouttheproduct(oneproduct.name()); }, obj); } }