public void GetShouldBeCancelable()
        {
            BamServer server;
            SecureServiceProxyClient <Echo> sspc;

            ServiceProxyTestHelpers.StartTestServerGetEchoClient(out server, out sspc);

            bool?firedIngEvent = false;
            bool?firedEdEvent  = false;

            sspc.Getting += (s, a) =>
            {
                firedIngEvent  = true;
                a.CancelInvoke = true; // should cancel the call
            };
            sspc.Got += (s, a) =>
            {
                firedEdEvent = true;
            };

            try
            {
                sspc.Get("TestStringParameter", new object[] { "monkey" });
            }
            catch (Exception ex)
            {
                server.Stop();
                Expect.Fail(ex.Message);
            }

            server.Stop();

            Expect.IsTrue(firedIngEvent.Value, "Getting didn't fire");
            Expect.IsFalse(firedEdEvent.Value, "Got fired but should not have");
        }
        public void GetShouldFireEvents()
        {
            BamServer server;
            SecureServiceProxyClient <Echo> sspc;

            ServiceProxyTestHelpers.StartTestServerGetEchoClient(out server, out sspc);

            bool?firedIngEvent = false;
            bool?firedEdEvent  = false;

            sspc.Getting += (s, a) =>
            {
                firedIngEvent = true;
            };
            sspc.Got += (s, a) =>
            {
                firedEdEvent = true;
            };
            try
            {
                sspc.Get("TestStringParameter", new object[] { "monkey" }); // array forces resolution to the correct method
            }
            catch (Exception ex)
            {
                server.Stop();
                Expect.Fail(ex.Message);
            }

            server.Stop();

            Expect.IsTrue(firedIngEvent.Value, "Getting event didn't fire");
            Expect.IsTrue(firedEdEvent.Value, "Got event didn't fire");
        }