public RabbitMQPublishDesignerViewModel2(ModelItem modelItem, IRabbitMQSourceModel model)
     : base(modelItem)
 {
     VerifyArgument.IsNotNull("model", model);
     _modelItem = modelItem;
     _model     = model;
     SetupCommonViewModelProperties();
 }
        public RabbitMQConsumeDesignerViewModel(ModelItem modelItem)
            : base(modelItem)
        {
            VerifyArgument.IsNotNull("modelItem", modelItem);

            IShellViewModel shellViewModel = CustomContainer.Get <IShellViewModel>();
            IServer         server         = shellViewModel.ActiveServer;

            _model = CustomContainer.CreateInstance <IRabbitMQSourceModel>(server.UpdateRepository, server.QueryProxy, shellViewModel);
            SetupCommonViewModelProperties();
        }
        public RabbitMQPublishDesignerViewModel(ModelItem modelItem)
            : base(modelItem)
        {
            VerifyArgument.IsNotNull("modelItem", modelItem);

            var shellViewModel = CustomContainer.Get <IShellViewModel>();
            var server         = shellViewModel.ActiveServer;

            _model = CustomContainer.CreateInstance <IRabbitMQSourceModel>(server.UpdateRepository, server.QueryProxy, shellViewModel);
            SetupCommonViewModelProperties();
            HelpText = Warewolf.Studio.Resources.Languages.HelpText.Tool_Utility_Rabbit_MQ_Publish;
        }
Beispiel #4
0
 public ManageRabbitMQSourceViewModel(IRabbitMQSourceModel rabbitMQSourceModel, IRabbitMQServiceSourceDefinition rabbitMQServiceSource, IAsyncWorker asyncWorker)
     : this(rabbitMQSourceModel)
 {
     VerifyArgument.IsNotNull("rabbitMQServiceSource", rabbitMQServiceSource);
     asyncWorker.Start(() => rabbitMQSourceModel.FetchSource(rabbitMQServiceSource.ResourceID), source =>
     {
         _rabbitMQServiceSource = source;
         _rabbitMQServiceSource.ResourcePath = rabbitMQServiceSource.ResourcePath;
         SetupHeaderTextFromExisting();
         FromModel(source);
     });
 }
Beispiel #5
0
        ManageRabbitMQSourceViewModel(IRabbitMQSourceModel rabbitMQSourceModel)
            : base("RabbitMQSource")
        {
            VerifyArgument.IsNotNull("rabbitMQSourceModel", rabbitMQSourceModel);

            _rabbitMQSourceModel = rabbitMQSourceModel;

            PublishCommand = new DelegateCommand(TestConnection, CanTest);
            OkCommand      = new DelegateCommand(SaveConnection, CanSave);

            Testing          = false;
            TestPassed       = false;
            TestFailed       = false;
            TestErrorMessage = "";
        }
Beispiel #6
0
        public ManageRabbitMQSourceViewModel(IRabbitMQSourceModel rabbitMQSourceModel, Task <IRequestServiceNameViewModel> requestServiceNameViewModel)
            : this(rabbitMQSourceModel)
        {
            VerifyArgument.IsNotNull("requestServiceNameViewModel", requestServiceNameViewModel);

            _rabbitMQSourceModel        = rabbitMQSourceModel;
            RequestServiceNameViewModel = requestServiceNameViewModel;

            HeaderText  = Resources.Languages.Core.RabbitMQSourceNewHeaderLabel;
            Header      = Resources.Languages.Core.RabbitMQSourceNewHeaderLabel;
            HostName    = string.Empty;
            Port        = 5672;
            UserName    = string.Empty;
            Password    = string.Empty;
            VirtualHost = "/";
        }