public AsyncCustomCommand( ExecuteAsyncHandler executeAction, CanExecuteHandler canExecuteAction = null, bool handleExceptions = false, ViewModelBase parent = null, bool autoCanExecute = false, string groupName = null) : base(canExecuteAction, handleExceptions, parent, autoCanExecute, groupName) { executeAction.NotNull("execute"); ExecuteAsyncAction = executeAction; }
public Client(string hostname, ProtocolType protocolType = ProtocolType.Udp) { this.hostname = hostname; switch (protocolType) { case ProtocolType.Udp: this.ExecuteAutoAsync = this.ExecuteUDPAsync; break; case ProtocolType.Tcp: this.ExecuteAutoAsync = this.ExecuteTCPAsync; break; default: throw new ArgumentOutOfRangeException(nameof(protocolType)); } }