コード例 #1
0
 public MikroApiTrapException(MikroTikResponseFrameDictionary frame) : base(message: GetMessage(frame))
 {
     if (frame.TryGetValue("category", out var v))
     {
         Category = (TrapCategory)int.Parse(v, CultureInfo.InvariantCulture);
     }
 }
コード例 #2
0
        private static string?GetMessage(MikroTikResponseFrameDictionary frame)
        {
            if (!frame.TryGetValue("message", out var message))
            {
                message = null;
            }

            return(message);
        }