none
Cold Observables (Code Sample) RRS feed

  • Question

  • privatestaticvoidColdStream()

        {

         

    varcoldStream = Observable.Interval(TimeSpan.FromSeconds(1));

          coldStream.Subscribe(value =>

    Console.WriteLine("\t\tCold 1: "+ value, ConsoleColor.Yellow));

         

    Thread.Sleep(TimeSpan.FromSeconds(10)); // sleep for 10 seconds befor the second subscription


          coldStream.Subscribe(value =>

    Console.WriteLine("\t\t\t\tCold 2: "+ value, ConsoleColor.DarkYellow));

          

    Console.ReadLine();

        }

    Wednesday, February 13, 2013 6:56 PM

All replies