Beispiel #1
0
 public _(LongRunning parent, IObserver <TSource> observer)
     : base(observer)
 {
     _source    = parent._source;
     _scheduler = parent._longRunningScheduler;
     _prepends  = parent._prepends;
     _appends   = parent._appends;
 }
        public IActionResult RunLongRunningJob()
        {
            var longRunning = new LongRunning();

            BackgroundJob.Enqueue(() => longRunning.Start(new LongRunningArgs {
                JobDuration = 3600, SleepDuration = 10, TimeStamp = DateTime.Now.ToString()
            }, CancellationToken.None));
            return(Ok());
        }
Beispiel #3
0
        async static Task ProvaAsyncAwait()
        {
            string s1 = null;
            var    s2 = "stringa";

            if (s1 == s2)
            {
                Console.WriteLine("Le stringhe sono uguali");
            }
            var lr       = new LongRunning();
            var stringa1 = await lr.GetString();

            Console.WriteLine(stringa1);

            Console.WriteLine("Stringa finale");

            //Console.ReadKey();
        }
        public object Any(LongRunning request)
        {
            Thread.Sleep(5000);

            return("LongRunning done.");
        }
        public object Any(LongRunning request)
        {
            Thread.Sleep(5000);

            return "LongRunning done.";
        }
Beispiel #6
0
        private static void DelegateCallbackExample()
        {
            LongRunning longr = new LongRunning();

            longr.LongRunningMethod(DelegateCallbackPrint);
        }