public void Open(Type hostType, string registrationServerNameOrAddress, int registrationServerPort, int listenerPort) { Open(registrationServerNameOrAddress, registrationServerPort, listenerPort); _hostMain = (HostMain)Activator.CreateInstance(hostType); _hostMain._host = this; _hostMain.Main(); }
public void Open <THostMain>(string registrationServerNameOrAddress, int registrationServerPort, int listenerPort) where THostMain : HostMain { Open(registrationServerNameOrAddress, registrationServerPort, listenerPort); _hostMain = Activator.CreateInstance <HostMain>(); _hostMain._host = this; _hostMain.Main(); }