示例#1
0
文件: Events.cs 项目: sav/efl
        public static void event_with_bool_payload()
        {
            test.ITesting obj           = new test.Testing();
            bool          received_bool = false;

            obj.EvtWithBoolEvt += (object sender, EvtWithBoolEvt_Args e) => {
                received_bool = e.arg;
            };

            obj.EmitEventWithBool(true);

            Test.AssertEquals(true, received_bool);

            obj.EmitEventWithBool(false);

            Test.AssertEquals(false, received_bool);
        }