public static void AddContentFilter(Type filter) { try { ContentFilterTypeDefinition definition = new ContentFilterTypeDefinition(filter); _contentFilters.Add(definition.Name, definition); } catch (Exception ex) { Trace.Fail("Unexpected exception adding Content Filter: " + ex.ToString()); } }
public static void AddContentFilter(Type filter) { try { ContentFilterTypeDefinition definition = new ContentFilterTypeDefinition(filter); _contentFilters.Add(definition.Name, definition); } catch (Exception ex) { Trace.Fail("Unexpected exception adding Content Filter: " + ex.ToString()); } }
public static IBlogPostContentFilter CreateContentFilter(string filterName) { ContentFilterTypeDefinition cftDefinition = _contentFilters[filterName] as ContentFilterTypeDefinition; return((IBlogPostContentFilter)cftDefinition.Constructor.Invoke(new object[0])); }