private ProtocolWrapperBase createProtocolWrapper(string baseAddress, CommunicationProtocols communicationProtocol) { switch (communicationProtocol) { case CommunicationProtocols.NamedPipe: return(new NamedPipeProtocolWrapper(baseAddress, callbackHandler)); case CommunicationProtocols.REST: return(new RestProtocolWrapper(baseAddress, callbackHandler)); default: throw new Exception("Unexpected case."); } }
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; }
public Device(string osIdentifier) { OsIdentifier = osIdentifier; OsVersion = new double[] { -1 }; CommunicationProtocol = CommunicationProtocols.AvtGigE; }
public Device(string osIdentifier) { OsIdentifier = osIdentifier; OsVersion = new double[]{-1}; CommunicationProtocol = CommunicationProtocols.AvtGigE; }