示例#1
0
        static void Main(string[] args)
        {
            SomethingToObserve so = new SomethingToObserve();

            so.OnStateChange += So_OnStateChange;
            so.StartSomeRandomWork();
        }
示例#2
0
        private static void So_OnStateChange(object source, MyNewEventArguments e)
        {
            SomethingToObserve sender = (SomethingToObserve)source;

            Console.WriteLine("Callback recieved from the Observed item: " + sender.Name);
        }