public static ProductException Create(Application app, int code, bool error, Exception innerException, Mono.Cecil.ICustomAttributeProvider provider, Instruction instruction, string message, params object [] args) { if (provider is Mono.Cecil.MemberReference member) { if (instruction != null) { return(Create(app, code, error, innerException, member, instruction, message, args)); } return(Create(app, code, error, innerException, member, null, message, args)); } if (provider is Mono.Cecil.TypeReference type) { return(Create(app, code, error, innerException, type, message, args)); } return(new ProductException(code, error, innerException, message, args)); }
public static ProductException Create(Application app, int code, bool error, Exception innerException, Mono.Cecil.ICustomAttributeProvider provider, string message, params object [] args) { return(Create(app, code, error, innerException, provider, null, message, args)); }
public static bool HasAttribute <T>(this Mono.Cecil.ICustomAttributeProvider type) where T : Attribute { return(type.CustomAttributes.Any(a => a.AttributeType.FullName == typeof(T).FullName)); }
public static ProductException CreateWarning(Application app, int code, Mono.Cecil.ICustomAttributeProvider provider, string message, params object [] args) { return(Create(app, code, false, null, provider, message, args)); }
public static Mono.Cecil.CustomAttribute GetAttribute <T>(this Mono.Cecil.ICustomAttributeProvider type) where T : Attribute { return(type.CustomAttributes.Where(a => a.AttributeType.FullName == typeof(T).FullName).FirstOrDefault()); }