public GreenFOG() { Name = "GreenFOG"; switch (Settings.OS) { case Settings.OSType.Windows: _instance = new WindowsGreen(); break; default: _instance = new UnixGreen(); break; } }
public ActionResult DodajLiniju(int ID, string Oznaka) { Task.Factory.StartNew(() => { NetTcpBinding binding = new NetTcpBinding(); EndpointAddress address1 = new EndpointAddress("net.tcp://localhost:8951/InputRequest_Green"); ChannelFactory <IGreen> channelFactory = new ChannelFactory <IGreen>(binding, address1); IGreen proxy = channelFactory.CreateChannel(); proxy.DodajLiniju(Convert.ToInt32(ID), Oznaka.ToCharArray()); }); return(RedirectToAction("Index")); }