//public static IMessageFormatter GetFormatter(string XmlMessage)
        //{
        //   GK10 _BMCMessage = new GK10(XmlMessage);
        //   return new STMMessageFormat(_BMCMessage);
        //}
        public static IMessageFormatter GetFormatter(string XmlMessage, bool FilterMessage)
        {
            //Events from slot machine
            if (XmlMessage.StartsWith("<Polled_Event>"))
            {
                GK10 _BMCMessage = new GK10(XmlMessage);
                if (FilterMessage)
                {
                    if (_STMMessageFilter == null)
                    {
                        _STMMessageFilter = STMMessageFilter.GetInstance();
                    }
                    if (_STMMessageFilter.IsFiltered(_BMCMessage.ExceptionCode))
                    {
                        throw new MessageFilteredException(_BMCMessage.ExceptionCode);
                    }
                }
                return(new STMGK10XMLFormat(_BMCMessage));
            }
            else // /send unprocessed data
            {
                return(new RawDataFormatter(XmlMessage));
            }

            return(null);
        }
 //public static IMessageFormatter GetFormatter(string XmlMessage)
 //{
 //   GK10 _BMCMessage = new GK10(XmlMessage);
 //   return new STMMessageFormat(_BMCMessage);
 //}
 public static IMessageFormatter GetFormatter(string XmlMessage,bool FilterMessage)
 {
     //Events from slot machine 
     if (XmlMessage.StartsWith("<Polled_Event>"))
     {
         GK10 _BMCMessage = new GK10(XmlMessage);
         if (FilterMessage)
         {
             if (_STMMessageFilter == null)
             {
                 _STMMessageFilter = STMMessageFilter.GetInstance();
             }
             if (_STMMessageFilter.IsFiltered(_BMCMessage.ExceptionCode))
             {
                 throw new MessageFilteredException(_BMCMessage.ExceptionCode);
             }
         }
         return new STMGK10XMLFormat(_BMCMessage);
     }
     else // /send unprocessed data
     {
         return new RawDataFormatter(XmlMessage);
     }
     
     return null;
 }
 public STMMessageFormat(GK10 Message)
 {
     if (Message == null)
     {
         throw new Exception("Null object[GK10]");
     }
     _Message = Message;
 }
 public STMMessageFormat(GK10 Message)
 {
     if (Message == null)
     {
         throw new Exception("Null object[GK10]");
     }
     _Message = Message;
 }
 public STMGK10XMLFormat(GK10 Message)
 {
     try
     {
         if (Message == null)
         {
             throw new Exception("Null object[GK10]");
         }
         _Message = Message;
         this.FormatMessage();
     }
     catch (Exception Ex)
     {
         Logger.Error("STMGK10XMLFormat", "Constructor", Ex);
         throw;
     }
 }
Beispiel #6
0
 public STMGK10XMLFormat(GK10 Message)
 {
     try
     {
         if (Message == null)
         {
             throw new Exception("Null object[GK10]");
         }
         _Message = Message;
         this.FormatMessage();
     }
     catch (Exception Ex)
     {
         Logger.Error("STMGK10XMLFormat", "Constructor", Ex);
         throw;
     }
 }