コード例 #1
0
 private static void CheckResult(Type attributeType, PropertyInfo property, object obj)
 {
     if (AttributeCache.Has(property, attributeType))
     {
         var @attribute = AttributeCache.GetAttribute <BasePropertyAttribute>(property, attributeType);
         if (@attribute.IsError(obj))
         {
             throw new ApiException(@attribute.Type, property.Name);
         }
     }
 }
コード例 #2
0
        public static void Check <T>(T t)
        {
            var type = t.GetType();

            if (AttributeCache.Has(type, attrType))
            {
                return;
            }
            else
            {
                throw new ApiException(ResponseType.Required, Constants.TOKEN);
            }
        }
コード例 #3
0
        public static bool IsCustomerResponse <T>(T t)
        {
            var type = t.GetType();

            return(AttributeCache.Has(type, attrType));
        }
コード例 #4
0
ファイル: CallBackChecker.cs プロジェクト: SeeSharply/SeApi
 public static bool IsCallBack(Type type)
 {
     return(AttributeCache.Has(type, attrType));
 }
コード例 #5
0
ファイル: CallBackChecker.cs プロジェクト: SeeSharply/SeApi
        public static bool IsCallBack <T>(T t)
        {
            var type = t.GetType();

            return(AttributeCache.Has(type, attrType));
        }