public void OnMesgDefinition(object sender, MesgDefinitionEventArgs e) { // Notify any subscribers if (MesgDefinitionEvent != null) { MesgDefinitionEvent(sender, e); } }
// Client implements their handlers of interest and subscribes to MesgBroadcaster events static void OnMesgDefn(object sender, MesgDefinitionEventArgs e) { Console.WriteLine("OnMesgDef: Received Defn for local message #{0}, global num {1}", e.mesgDef.LocalMesgNum, e.mesgDef.GlobalMesgNum); Console.WriteLine("\tIt has {0} fields and is {1} bytes long", e.mesgDef.NumFields, e.mesgDef.GetMesgSize()); }