/// <summary> /// Creates a new <see cref="Client"/> object instance and attempts to launch the tor application executable. /// </summary> /// <param name="createParams">The parameters used when creating the client.</param> /// <returns>A <see cref="Client"/> object instance.</returns> public static Client Create(ClientCreateParams createParams) { if (createParams == null) { throw new ArgumentNullException("createParams"); } return(new Client(createParams)); }
/// <summary> /// Initializes a new instance of the <see cref="Client"/> class. /// </summary> /// <param name="remoateParams">The parameters used when connecting to the client.</param> private Client(ClientRemoteParams remoteParams) { this.createParams = null; this.disposed = false; this.process = null; this.remoteParams = remoteParams; this.synchronize = new object(); this.Start(); }
/// <summary> /// Determines whether the specified <see cref="System.Object" />, is equal to this instance. /// </summary> /// <param name="obj">The <see cref="System.Object" /> to compare with this instance.</param> /// <returns> /// <c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>. /// </returns> public override bool Equals(object obj) { ClientCreateParams compare = obj as ClientCreateParams; if (compare == null) { return(false); } return(compare.configurationFile == configurationFile && compare.controlPassword == controlPassword && compare.controlPort == controlPort && compare.defaultConfigurationFile == defaultConfigurationFile && compare.path == path); }