public WPWithinService(RpcAgentConfiguration localAgentConfiguration) { InitClient(localAgentConfiguration); if (localAgentConfiguration.CallbackPort > 0) { _listener = new CallbackServerManager(localAgentConfiguration); _listener.Start(); } else { Log.Info("Callbacks disabled as port specified as 0"); } }
/// <summary> /// Creates an instance of the service that will communicate with remote devices using the configuration supplied by <paramref name="localAgentConfiguration"/>. /// </summary> /// <param name="localAgentConfiguration">Describes how the local Thrift RPC agent (the core SDK) can be communicated with.</param> public WPWithinService(RpcAgentConfiguration localAgentConfiguration) { if (localAgentConfiguration == null) { throw new ArgumentNullException("A configuration must be supplied", nameof(localAgentConfiguration)); } InitClient(localAgentConfiguration); if (localAgentConfiguration.CallbackPort > 0) { _listener = new CallbackServerManager(localAgentConfiguration); _listener.Start(); } else { Log.Info("Callbacks disabled as port specified as 0"); } }