public static VcRemoteClient GetInstance(IOSLaunchOptions options) { VcRemoteClient client = null; string baseAddressFormat = string.Empty; if (options.Secure) { var handler = new RequestAuthHandler(); client = new VcRemoteClient(handler); client.ServerCertificateValidationCallback = handler.ServerCertificateValidationCallback; baseAddressFormat = @"https://{0}:{1}/"; } else { client = new VcRemoteClient(); baseAddressFormat = @"http://{0}:{1}/"; } client.BaseAddress = new Uri(string.Format(CultureInfo.InvariantCulture, baseAddressFormat, options.RemoteMachineName, options.VcRemotePort)); client.Timeout = new TimeSpan(0, 0, 10); //10 second timeout client.Secure = options.Secure; client._launchOptions = options; return client; }
public static VcRemoteClient GetInstance(IOSLaunchOptions options) { VcRemoteClient client = null; string baseAddressFormat = string.Empty; if (options.Secure) { var handler = new RequestAuthHandler(); client = new VcRemoteClient(handler); client.ServerCertificateValidationCallback = handler.ServerCertificateValidationCallback; baseAddressFormat = @"https://{0}:{1}/"; } else { client = new VcRemoteClient(); baseAddressFormat = @"http://{0}:{1}/"; } client.BaseAddress = new Uri(string.Format(CultureInfo.InvariantCulture, baseAddressFormat, options.RemoteMachineName, options.VcRemotePort)); client.Timeout = new TimeSpan(0, 0, 10); //10 second timeout client.Secure = options.Secure; client._launchOptions = options; return(client); }