public RedisSourceViewModel(IRedisSourceModel redisSourceModel, IEventAggregator aggregator, IRedisServiceSource redisServiceSource, IAsyncWorker asyncWorker, IExternalProcessExecutor executor) : this(redisSourceModel, aggregator, asyncWorker, executor) { VerifyArgument.IsNotNull(nameof(redisServiceSource), redisServiceSource); _warewolfserverName = redisSourceModel.ServerName; AsyncWorker.Start(() => redisSourceModel.FetchSource(redisServiceSource.Id), source => { _redisServiceSource = source; _redisServiceSource.Path = redisServiceSource.Path; FromModel(_redisServiceSource); Item = ToSource(); SetupHeaderTextFromExisting(); }); }
public RedisSourceViewModel(IRedisSourceModel redisSourceModel, IEventAggregator aggregator, IAsyncWorker asyncWorker, IExternalProcessExecutor executor) : base("RedisSource") { VerifyArgument.IsNotNull(nameof(executor), executor); VerifyArgument.IsNotNull(nameof(asyncWorker), asyncWorker); VerifyArgument.IsNotNull(nameof(redisSourceModel), redisSourceModel); VerifyArgument.IsNotNull(nameof(aggregator), aggregator); AsyncWorker = asyncWorker; Executor = executor; _redisSourceModel = redisSourceModel; _warewolfserverName = redisSourceModel.ServerName; _authenticationType = AuthenticationType.Anonymous; _hostName = string.Empty; _port = "6379"; _password = string.Empty; HeaderText = Resources.Languages.Core.RedisNewHeaderLabel; Header = Resources.Languages.Core.RedisNewHeaderLabel; TestCommand = new DelegateCommand(TestConnection, CanTest); OkCommand = new DelegateCommand(SaveConnection, CanSave); CancelTestCommand = new DelegateCommand(CancelTest, CanCancelTest); }
public RedisSourceViewModel(IRedisSourceModel redisSourceModel, Task <IRequestServiceNameViewModel> requestServiceNameViewModel, IEventAggregator aggregator, IAsyncWorker asyncWorker, IExternalProcessExecutor executor) : this(redisSourceModel, aggregator, asyncWorker, executor) { VerifyArgument.IsNotNull(nameof(requestServiceNameViewModel), requestServiceNameViewModel); _requestServiceNameViewModel = requestServiceNameViewModel; }