Beispiel #1
0
        internal static void onewaysAMI(global::Test.TestHelper helper, Test.IMyClassPrx proxy)
        {
            Communicator communicator = helper.communicator();

            Test.IMyClassPrx p = proxy.Clone(oneway: true);

            {
                Callback cb = new Callback();
                p.IcePingAsync(progress: new Progress <bool>(
                                   sentSynchronously =>
                {
                    cb.sent(sentSynchronously);
                }));
                cb.check();
            }

            bool   b  = p.IceIsAAsync("::Test::MyClass").Result;
            string id = p.IceIdAsync().Result;

            string[] ids = p.IceIdsAsync().Result;

            {
                Callback cb = new Callback();
                p.opVoidAsync(progress: new Progress <bool>(
                                  sentSynchronously =>
                {
                    cb.sent(sentSynchronously);
                }));
                cb.check();
            }

            {
                Callback cb = new Callback();
                p.opIdempotentAsync(progress: new Progress <bool>(
                                        sentSynchronously =>
                {
                    cb.sent(sentSynchronously);
                }));
                cb.check();
            }

            {
                Callback cb = new Callback();
                p.opOnewayAsync(progress: new Progress <bool>(
                                    sentSynchronously =>
                {
                    cb.sent(sentSynchronously);
                }));
                cb.check();
            }

            var _ = p.opByteAsync(0xff, 0x0f).Result;
        }
Beispiel #2
0
        internal static void onewaysAMI(global::Test.TestHelper helper, Test.IMyClassPrx proxy)
        {
            Communicator communicator = helper.communicator();

            Test.IMyClassPrx p = proxy.Clone(oneway: true);

            {
                Callback cb = new Callback();
                p.IcePingAsync(progress: new Progress <bool>(
                                   sentSynchronously =>
                {
                    cb.sent(sentSynchronously);
                }));
                cb.check();
            }

            {
                try
                {
                    p.IceIsAAsync("::Test::MyClass");
                    test(false);
                }
                catch (TwowayOnlyException)
                {
                }
            }

            {
                try
                {
                    p.IceIdAsync();
                    test(false);
                }
                catch (TwowayOnlyException)
                {
                }
            }

            {
                try
                {
                    p.IceIdsAsync();
                    test(false);
                }
                catch (TwowayOnlyException)
                {
                }
            }

            {
                Callback cb = new Callback();
                p.opVoidAsync(progress: new Progress <bool>(
                                  sentSynchronously =>
                {
                    cb.sent(sentSynchronously);
                }));
                cb.check();
            }

            {
                Callback cb = new Callback();
                p.opIdempotentAsync(progress: new Progress <bool>(
                                        sentSynchronously =>
                {
                    cb.sent(sentSynchronously);
                }));
                cb.check();
            }

            {
                Callback cb = new Callback();
                p.opNonmutatingAsync(progress: new Progress <bool>(
                                         sentSynchronously =>
                {
                    cb.sent(sentSynchronously);
                }));
                cb.check();
            }

            {
                try
                {
                    p.opByteAsync(0xff, 0x0f);
                    test(false);
                }
                catch (TwowayOnlyException)
                {
                }
            }
        }