public class OpenIdAutoDecryptAttr : ActionFilterAttribute
{
public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
{
base.OnActionExecuted(actionExecutedContext);
var objectContent = actionExecutedContext.Response.Content as ObjectContent;
if (objectContent != null && objectContent.Value != null && (objectContent.Value.GetType().BaseType == typeof(Parm) || objectContent.Value.GetType() == typeof(Parm)))
{
Parm parm = (Parm)objectContent.Value;
if (!String.IsNullOrEmpty(parm.ErrMsg))
{
LogUtil.DoLog("ErrMsg Before", parm.ErrMsg);
Regex regex = new Regex(@"(ORA-[0-9]{1,}:)(.*)\r
(.*)");
if (regex.IsMatch(parm.ErrMsg))
{
parm.ErrMsg = regex.Match(parm.ErrMsg).Result("$2").Trim();
}
LogUtil.DoLog("ErrMsg After", parm.ErrMsg);
}
}
}
}