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); } } }
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); } }
public static bool IsCustomerResponse <T>(T t) { var type = t.GetType(); return(AttributeCache.Has(type, attrType)); }
public static bool IsCallBack(Type type) { return(AttributeCache.Has(type, attrType)); }
public static bool IsCallBack <T>(T t) { var type = t.GetType(); return(AttributeCache.Has(type, attrType)); }