private void Setup()
 {
     try
       {
     m_ViewModel.Trace("Entering Setup");
     Current.ConfigurationFactory = new ConsumerConfigurationFactory();
     MainWindowModel _model = new MainWindowModel() { ViewModelBindingFactory = m_ViewModel };
     Current.BindingFactory = _model;
     Current.EncodingFactory = _model;
     Current.MessageHandlerFactory = new ConsumerMessageHandlerFactory(x => m_ToDispose.Add(x), m_ViewModel, m_ViewModel.Trace);
     m_ViewModel.Trace("Initialize consumer engine.");
     Current.Initialize();
     m_ViewModel.Trace("On start receiving UDP frames.");
     Current.Run();
     m_ViewModel.ConsumerErrorMessage = "Running";
       }
       catch (Exception ex)
       {
     string _errorMessage = $"Error: {ex.Message}";
     m_ViewModel.Trace(_errorMessage);
     m_ViewModel.ConsumerErrorMessage = _errorMessage;
     Dispose();
       }
 }
 internal void Setup()
 {
     try
     {
         ReferenceApplicationEventSource.Log.Initialization($"{nameof(ConsumerDataManagementSetup)}.{nameof(Setup)} starting");
         ViewModel.ConsumerUpdateConfiguration = new RestartCommand(Restart); //TODO Remove reference of ConsumerDataManagementSetup System.Windows  #239
         ConfigurationFactory = new ConsumerConfigurationFactory();
         MainWindowModel _model = new MainWindowModel()
         {
             ViewModelBindingFactory = ViewModel
         };
         BindingFactory  = _model;
         EncodingFactory = _model;
         Start();
         ViewModel.ConsumerErrorMessage = "Running";
         ReferenceApplicationEventSource.Log.Initialization($" consumer engine and starting receiving data acomplished");
     }
     catch (Exception _ex)
     {
         ReferenceApplicationEventSource.Log.LogException(_ex);
         ViewModel.ConsumerErrorMessage = "ERROR";
         Dispose();
     }
 }