public PreviewServiceProxy(IPreviewToolCallback previewToolCallback)
        {
            if (previewToolCallback == null)
            {
                throw new ArgumentNullException(nameof(previewToolCallback));
            }

            callbackHandler = new CallbackHandler(previewToolCallback);

            try { protocolWrapper = createProtocolWrapper(DefaultNamedPipeBaseAddress, CommunicationProtocols.NamedPipe); }
            catch { protocolWrapper = createProtocolWrapper(DefaultRestBaseAddress, CommunicationProtocols.REST); }
            protocolWrapper.ConnectionClosed += onConnectionClosed;
        }
        public PreviewServiceProxy(IPreviewToolCallback previewToolCallback, string baseAddress, CommunicationProtocols communicationProtocol)
        {
            if (previewToolCallback == null)
            {
                throw new ArgumentNullException(nameof(previewToolCallback));
            }

            if (string.IsNullOrEmpty(baseAddress))
            {
                throw new ArgumentNullException(nameof(baseAddress));
            }

            callbackHandler = new CallbackHandler(previewToolCallback);

            protocolWrapper = createProtocolWrapper(baseAddress, communicationProtocol);
            protocolWrapper.ConnectionClosed += onConnectionClosed;
        }