private static async Task QueueingDemo(ISimpleStatefulService proxy)
 {
     Console.WriteLine("Type any value to add to collection, hit enter to view and empty queue:");
     var data = Console.ReadLine();
     if (string.IsNullOrWhiteSpace(data))
     {
         var strings = await proxy.GetStrings();
         Console.WriteLine("Contents of the queue:");
         foreach (var s in strings)
         {
             Console.WriteLine(s);
         }
     }
     else
     {
         await proxy.SetString(data);
     }
     await QueueingDemo(proxy);
 }
Exemple #2
0
        private static async Task QueueingDemo(ISimpleStatefulService proxy)
        {
            Console.WriteLine("Type any value to add to collection, hit enter to view and empty queue:");
            var data = Console.ReadLine();

            if (string.IsNullOrWhiteSpace(data))
            {
                var strings = await proxy.GetStrings();

                Console.WriteLine("Contents of the queue:");
                foreach (var s in strings)
                {
                    Console.WriteLine(s);
                }
            }
            else
            {
                await proxy.SetString(data);
            }
            await QueueingDemo(proxy);
        }
 public StateSvcController()
 {
     stateSvc = ServiceProxy.Create <ISimpleStatefulService>(
         new Uri("fabric:/ManyFabrics/SimpleStatefulService"), new ServicePartitionKey(1));
 }