public RasDialService(IRasApi32 api, IRasHangUp hangUpService, IRasDialExtensionsBuilder extensionsBuilder, IRasDialParamsBuilder paramsBuilder, IExceptionPolicy exceptionPolicy, IRasDialCallbackHandler callbackHandler, IMarshaller marshaller) { this.api = api ?? throw new ArgumentNullException(nameof(api)); this.hangUpService = hangUpService ?? throw new ArgumentNullException(nameof(hangUpService)); this.extensionsBuilder = extensionsBuilder ?? throw new ArgumentNullException(nameof(extensionsBuilder)); this.paramsBuilder = paramsBuilder ?? throw new ArgumentNullException(nameof(paramsBuilder)); this.exceptionPolicy = exceptionPolicy ?? throw new ArgumentNullException(nameof(exceptionPolicy)); this.callbackHandler = callbackHandler ?? throw new ArgumentNullException(nameof(callbackHandler)); this.marshaller = marshaller ?? throw new ArgumentNullException(nameof(marshaller)); callback = callbackHandler.OnCallback; }
public RasDialService(IRasApi32 api, IRasHangUp hangUpService, IRasDialExtensionsBuilder extensionsBuilder, IRasDialParamsBuilder paramsBuilder, IExceptionPolicy exceptionPolicy, IRasDialCallbackHandler callbackHandler, ITaskCompletionSourceFactory completionSourceFactory, ITaskCancellationSourceFactory cancellationSourceFactory) { this.api = api ?? throw new ArgumentNullException(nameof(api)); this.hangUpService = hangUpService ?? throw new ArgumentNullException(nameof(hangUpService)); this.extensionsBuilder = extensionsBuilder ?? throw new ArgumentNullException(nameof(extensionsBuilder)); this.paramsBuilder = paramsBuilder ?? throw new ArgumentNullException(nameof(paramsBuilder)); this.exceptionPolicy = exceptionPolicy ?? throw new ArgumentNullException(nameof(exceptionPolicy)); this.callbackHandler = callbackHandler ?? throw new ArgumentNullException(nameof(callbackHandler)); this.completionSourceFactory = completionSourceFactory ?? throw new ArgumentNullException(nameof(completionSourceFactory)); this.cancellationSourceFactory = cancellationSourceFactory ?? throw new ArgumentNullException(nameof(cancellationSourceFactory)); callback = callbackHandler.OnCallback; }
public TestableRasDialService(IRasApi32 api, IRasHangUp hangUpService, IRasDialExtensionsBuilder extensionsBuilder, IRasDialParamsBuilder paramsBuilder, IExceptionPolicy exceptionPolicy, IRasDialCallbackHandler callbackHandler, IMarshaller marshaller) : base(api, hangUpService, extensionsBuilder, paramsBuilder, exceptionPolicy, callbackHandler, marshaller) { }