Inheritance: Caliburn.Micro.PropertyChangedBase
        public MessageListViewModel(
            IEventAggregator eventAggregator,
            IWorkNotifier workNotifier,
            IServiceControl serviceControl,
            SearchBarViewModel searchBarViewModel,
            GeneralHeaderViewModel generalHeaderDisplay,
            MessageSelectionContext selectionContext,
            IClipboard clipboard,
            ISettingsProvider settingsProvider)
        {
            SearchBar = searchBarViewModel;
            Selection = selectionContext;

            this.clipboard            = clipboard;
            this.settingsProvider     = settingsProvider;
            this.eventAggregator      = eventAggregator;
            this.workNotifier         = workNotifier;
            this.serviceControl       = serviceControl;
            this.generalHeaderDisplay = generalHeaderDisplay;

            Items.Add(SearchBar);

            RetryMessageCommand  = new RetryMessageCommand(eventAggregator, workNotifier, serviceControl);
            CopyMessageIdCommand = new CopyMessageURICommand(clipboard, serviceControl);
            CopyHeadersCommand   = Command.Create(CopyHeaders,
                                                  generalHeaderDisplay.Changed
                                                  .Where(pc => pc.PropertyName == nameof(GeneralHeaderViewModel.HeaderContent))
                                                  .Select(s => !((string)s.Value).IsEmpty()));
            Rows = new BindableCollection <StoredMessage>();
        }
 public PerformanceHeaderViewModel(
     IEventAggregator eventAggregator,
     IContentDecoder<IList<HeaderInfo>> decoder,
     MessageSelectionContext selectionContext)
     : base(eventAggregator, decoder, selectionContext)
 {
     DisplayName = "Performance";
 }
 public GeneralHeaderViewModel(
     IEventAggregator eventAggregator,
     IContentDecoder<IList<HeaderInfo>> decoder,
     MessageSelectionContext selectionContext)
     : base(eventAggregator, decoder, selectionContext)
 {
     this.decoder = decoder;
     DisplayName = "General";
 }
 protected HeaderInfoViewModelBase(
     IEventAggregator eventAggregator,
     IContentDecoder<IList<HeaderInfo>> decoder,
     MessageSelectionContext selectionContext)
 {
     this.decoder = decoder;
     EventAggregator = eventAggregator;
     Selection = selectionContext;
     ConditionsMap = new Dictionary<Func<HeaderInfo, bool>, Action<HeaderInfo>>();
     MapHeaderKeys();
 }
        public void TestInitialize()
        {
            eventAggregator = Substitute.For<IEventAggregator>();
            workNotifier = Substitute.For<IWorkNotifier>();
            serviceControl = Substitute.For<IServiceControl>();
            hexContent = Substitute.For<HexContentViewModel>();
            jsonContent = Substitute.For<JsonMessageViewModel>();
            xmlContent = Substitute.For<XmlMessageViewModel>();
            selection = new MessageSelectionContext(eventAggregator);

            messageBodyFunc = () => new MessageBodyViewModel(hexContent, jsonContent, xmlContent, serviceControl, workNotifier, selection);
        }
Example #6
0
        public MessageListViewModel(
            IEventAggregator eventAggregator,
            IServiceControl serviceControl,
            SearchBarViewModel searchBarViewModel,
            GeneralHeaderViewModel generalHeaderDisplay,
            MessageSelectionContext selectionContext,
            IClipboard clipboard)
        {
            this.SearchBar = searchBarViewModel;
            this.Selection = selectionContext;

            this.clipboard            = clipboard;
            this.eventAggregator      = eventAggregator;
            this.serviceControl       = serviceControl;
            this.generalHeaderDisplay = generalHeaderDisplay;

            Items.Add(SearchBar);

            RetryMessageCommand  = new RetryMessageCommand(eventAggregator, serviceControl);
            CopyMessageIdCommand = new CopyMessageURICommand(clipboard, serviceControl);
            CopyHeadersCommand   = this.CreateCommand(CopyHeaders, generalHeaderDisplay.WhenAnyValue(ghd => ghd.HeaderContent).Select(s => !s.IsEmpty()));
            Rows = new BindableCollection <StoredMessage>();
        }
 public ShowSagaCommand(IEventAggregator eventAggregator, MessageSelectionContext selectionContext)
 {
     this.eventAggregator = eventAggregator;
     selection = selectionContext;
 }
 public ChangeSelectedMessageCommand(MessageSelectionContext selectionContext)
 {
     selection = selectionContext;
 }