Esempio n. 1
0
        static async Task FabricServiceCall()
        {
            var address = new FabricServiceAddress("fabric:/Sample.Sf.Application/Sample.Sf.DummyService");

            var client = ServiceProxy.Create <IMyService>(address);

            var result = await client.HelloWorldAsync();

            Console.WriteLine($"Fabric Service Call Result: {result}");
        }
        public static Task <bool> IsOnline <T>(this FabricServiceAddress address)
            where T : IService
        {
            try
            {
                ServiceProxy.Create <T>(address);

                return(Task.FromResult(true));
            }
            catch (Exception e)
            {
                Trace.WriteLine(e);

                return(Task.FromResult(false));
            }
        }