コード例 #1
0
ファイル: OnewaysAMI.cs プロジェクト: renchuanrc/ice
        internal static void Run(TestHelper helper, IMyClassPrx proxy)
        {
            Communicator?communicator = helper.Communicator();

            TestHelper.Assert(communicator != null);
            IMyClassPrx p = proxy.Clone(oneway: true);

            {
                var cb = new Callback();
                p.IcePingAsync(progress: new Progress <bool>(sentSynchronously => cb.Sent()));
                cb.Check();
            }

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

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

            {
                var cb = new Callback();
                p.opVoidAsync(progress: new Progress <bool>(sentSynchronously => cb.Sent()));
                cb.Check();
            }

            {
                var cb = new Callback();
                p.opIdempotentAsync(progress: new Progress <bool>(sentSynchronously => cb.Sent()));
                cb.Check();
            }

            {
                var cb = new Callback();
                p.opOnewayAsync(progress: new Progress <bool>(sentSynchronously => cb.Sent()));
                cb.Check();
            }

            {
                var cb = new Callback();
                p.opOnewayMetadataAsync(progress: new Progress <bool>(sentSynchronously => cb.Sent()));
                cb.Check();
            }

            (byte ReturnValue, byte p3) = p.opByteAsync(0xff, 0x0f).Result;
        }