[PostProviderExtension] public class HasImageErrorCheckerPostExtension : IPostProviderExtension { public void BindEvents(PostProviderBase postProvider) { postProvider.Added += new PostChanged(postProvider_Added); }
void postProvider_Added(Model.PostInfo post) { try { StackFrame[] stacks = new StackTrace().GetFrames(); if (post.Content.IndexOf("IMG") > -1 && post.HasImage == false) { StringBuilder sb = new StringBuilder(); sb.AppendLine("问题出现"); sb.AppendLine("stack is:"); sb.Append(ToString(stacks));