Ejemplo n.º 1
0
 private void RegisterAggregates()
 {
     GalaSoft.MvvmLight.Messaging.Messenger.Default.Register <Payload>(this, e => {
         App.Current.Dispatcher.Invoke((Action) delegate                // <--- HERE
         {
             AllReadingsWithTopic.Insert(0, e);
         });
     });
 }
Ejemplo n.º 2
0
 private void RegisterAggregates()
 {
     GalaSoft.MvvmLight.Messaging.Messenger.Default.Register <string>(this, e =>
     {
         if (e == _last)
         {
             return;
         }
         _last = e;
         App.Current.Dispatcher.Invoke((Action) delegate                // <--- HERE
         {
             AllReadingsWithTopic.Insert(2, e);
         });
     });
 }
Ejemplo n.º 3
0
        private async System.Threading.Tasks.Task Run()
        {
            RunTask = System.Threading.Tasks.Task.Factory.StartNew(() =>
            {
                try
                {
                    // Show Usage information
                    NamespaceManager namespaceManager = NamespaceManager.CreateFromConnectionString(EventHubConnectionString);
                    // Generate the data
                    Engine.GenerateData(new string[] { NumberOfCDRs.ToString().Trim(), SimCardProbability.ToString().Trim(), DurationInHours.ToString().Trim() });
                }
                catch (Exception e)
                {
                    AllReadingsWithTopic.Insert(0, e.Message);
                }
            });

            return;
        }