Exemplo n.º 1
0
        public void AddListen(FSMEventListener FSMEventListener)
        {
            if (!MessageDispatcher.ContainsKey(FSMEventListener.GetType().ToString()))
            {
                MessageDispatcher.Add(FSMEventListener.GetType().ToString(), null);
            }

            MessageDispatcher[FSMEventListener.GetType().ToString()] += FSMEventListener.ReceiveMessage;
        }
Exemplo n.º 2
0
 public static void ReceivingMessageError(FSMEventListener FSMEventListener, Exception InitialError)
 {
     if (FSMDebug.Instance.FSMDebugConfiguration.WriteInFile)
     {
         string lineToWrite = Format();
         lineToWrite += FSMEventListener.name + "/" + FSMEventListener.GetInstanceID() + " - ";
         lineToWrite += ("ERROR - Event listener has received a message but has failed to process : " + InitialError.Message + Environment.NewLine + InitialError.StackTrace);
         FSMDebug.Instance.Write(lineToWrite);
     }
 }
Exemplo n.º 3
0
 public void RemoveListen(FSMEventListener FSMEventListener)
 {
     MessageDispatcher[FSMEventListener.GetType().ToString()] -= FSMEventListener.ReceiveMessage;
 }