Example #1
0
        private static ZteEvent GetAsnParseClass(ZteTraceRecSession traceCollecFile)
        {
            var function = traceCollecFile.msg.function;
            var name     = traceCollecFile.msg.name;
            var event2   = ListZteEvents.FirstOrDefault(p => p.EventType.Equals(function) && p.EventName.Equals(name));

            try
            {
                if (event2 != null)
                {
                    return(event2);
                }
                if (!function.Equals("X2AP") && !function.Equals("S1AP"))
                {
                    return(null);
                }
                Func <ZteEvent, bool> predicate = p => p.EventType.Equals(function);
                return(ListZteEvents.FirstOrDefault(predicate));
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
            return(event2);
        }
Example #2
0
 private static ZteEvent GetAsnParseClass(ZteTraceRecSession traceCollecFile)
 {
     var function = traceCollecFile.msg.function;
     var name = traceCollecFile.msg.name;
     var event2 = ListZteEvents.FirstOrDefault(p => p.EventType.Equals(function) && p.EventName.Equals(name));
     try
     {
         if (event2 != null)
         {
             return event2;
         }
         if (!function.Equals("X2AP") && !function.Equals("S1AP"))
         {
             return null;
         }
         Func<ZteEvent, bool> predicate = p => p.EventType.Equals(function);
         return ListZteEvents.FirstOrDefault(predicate);
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception);
     }
     return event2;
 }