Exemplo n.º 1
0
      private static void ValidateSupportedType(ResultBox rb, ValueHandler valueHandler)
      {
         Type t = null;

         if (rb is PropertyResultBox pbox)
            t = rb.ResultBaseType;

         if (t != null && !valueHandler.IsSupported(t))
         {
            throw new NotSupportedException($"type {t} on object '{rb.Name}' is not supported.");
         }
      }