Exemplo n.º 1
0
 public SECSMessage FindMessage(int stream, int function, string direction)
 {
     foreach (SECSMessage message in from t in this.list
              where t.Stream == stream && t.Function == function
              select t)
     {
         if (message.IsHost && direction == "H->E")
         {
             SECSMessage result = MessageAbstractSECSLibrary.DeepCopy(message);
             return(result);
         }
         if (!message.IsHost && direction == "E->H")
         {
             SECSMessage result = MessageAbstractSECSLibrary.DeepCopy(message);
             return(result);
         }
     }
     return(null);
 }
Exemplo n.º 2
0
        public static AbstractSECSLibrary CreateSECSLibrary(string filename)
        {
            XDocument document = XDocument.Load(filename);

            if (document.Element("SECSLibrary") == null)
            {
                if (document.Element("Library") != null)
                {
                    WinAbstractSECSLibrary library2 = new WinAbstractSECSLibrary();
                    if (library2.Load(filename))
                    {
                        return(library2);
                    }
                }
                return(null);
            }
            MessageAbstractSECSLibrary library3 = new MessageAbstractSECSLibrary();

            if (library3.Load(filename))
            {
                return(library3);
            }
            return(null);
        }
Exemplo n.º 3
0
 internal override List <SECSMessage> FindMessage(int stream, int function)
 {
     return((from t in this.list
             where t.Stream == stream && t.Function == function
             select MessageAbstractSECSLibrary.DeepCopy(t)).ToList <SECSMessage>());
 }
Exemplo n.º 4
0
 public override SECSMessage FindMessage(string name)
 {
     return((from msg in this.list
             where msg.Name == name
             select MessageAbstractSECSLibrary.DeepCopy(msg)).FirstOrDefault <SECSMessage>());
 }