public static void ImpleEvent() { Operation o = new Operation(); o.Action("Event calling"); Console.WriteLine(); o.xyz += new EventsHandler(CatchEvent); o.Action("Events Caller"); }
public static void ImplementEvent() { Operation o = new Operation(); o.Action("Event Calling"); Console.WriteLine(); o.xyz += new EventHandler(CatchEvent); o.xyz += new EventHandler(CatchEvent1); o.Action("Event Called"); }
public Task CallAction(Action operation) { var tcs = new TaskCompletionSource <object>(); Enqueue(Operation.Action(() => operation(), tcs)); return(tcs.Task); }
public static bool IsMatch(Operation operation, int[] startingRegisters, int[] arguments, int[] endingRegisters) { var newRegisters = Copy(startingRegisters); operation.Action(newRegisters, arguments[1], arguments[2], arguments[3]); return(Equal(newRegisters, endingRegisters)); }