public void OnEvent( Event evnt,
                             IZone zone,
                             IMessageInfo info )
        {
            // Demonstrates basic handling of a SIF Event
            Console.WriteLine( "Received a " + evnt.ActionString + " event for LearnerPersonal" );
            StudentPersonal sp = (StudentPersonal) evnt.Data.ReadDataObject();

            // Simply write the XML of the event object to System.out
            Console.WriteLine( sp.ToXml() );
            Console.WriteLine( "End Event" );
        }
Exemplo n.º 2
0
 public void OnEvent(Event evnt,
                      IZone zone,
                      IMessageInfo info)
 {
     bool logToconsole = fAgent.getChameleonProperty(zone, "logConsole", false);
     SifMessageInfo smi = (SifMessageInfo)info;
     string debug =
         string.Format
             ("Received {0} Event from {1} in Zone: {2}", evnt.ActionString, smi.SourceId,
               zone.ZoneId);
     zone.ServerLog.Log
         (LogLevel.INFO, debug, null, "1003", LogEntryCodes.CATEGORY_SUCCESS,
           LogEntryCodes.CODE_SUCCESS, smi, null);
     Adk.Log.Info(debug);
     Log
         (fDir + Path.DirectorySeparatorChar + zone.ZoneId + Path.DirectorySeparatorChar +
           "Events\\" + evnt.ObjectType.Name + "\\" + evnt.ObjectType.Name +
           DateTime.Now.ToFileTime().ToString() + ".xml", evnt.Data, smi, logToconsole);
 }
Exemplo n.º 3
0
 /// <summary>  Respond to a SIF_Event received from a zone.</summary>
 /// <param name="evnt">The event data</param>
 /// <param name="zone">The zone from which this event originated</param>
 /// <param name="info">Information about the SIF_Event message</param>
 public void OnEvent( Event evnt, IZone zone, IMessageInfo info )
 {
     throw new NotImplementedException();
 }