Exemplo n.º 1
0
        public void writeEvent(string message, Consts.eventType eventType, int eventLevel)
        {
            Consts.writeEnteringMethodToDebugLog(System.Reflection.MethodBase.GetCurrentMethod().ReflectedType + "." + System.Reflection.MethodBase.GetCurrentMethod().Name);
            GenericEventArgs eventArgs = new GenericEventArgs(message, eventType, eventLevel);

            writeEventToFile(this, eventArgs);
            Consts.writeExitingMethodToDebugLog(System.Reflection.MethodBase.GetCurrentMethod().ReflectedType + "." + System.Reflection.MethodBase.GetCurrentMethod().Name);
        }
Exemplo n.º 2
0
 public void eventWritingToFile(object sender, GenericEventArgs e)
 {
     Consts.writeEnteringMethodToDebugLog(System.Reflection.MethodBase.GetCurrentMethod().ReflectedType + "." + System.Reflection.MethodBase.GetCurrentMethod().Name);
     if (e._eventlevel <= Consts.CURRENT_EVENT_DEBUG_LEVEL)
     {
         switch (e._eventType)
         {
             case Consts.eventType.Character:
                 Consts.writeToCharacterEventLog(e._message);
                 break;
             case Consts.eventType.Building:
                 Consts.writeToBuildingEventLog(e._message);
                 break;
             case Consts.eventType.Stronghold:
                 Consts.writeToStrongholdEventLog(e._message);
                 break;
         }
     }
     Consts.writeExitingMethodToDebugLog(System.Reflection.MethodBase.GetCurrentMethod().ReflectedType + "." + System.Reflection.MethodBase.GetCurrentMethod().Name);
 }