public static bool HasModule(this HtmlHelper helper, string moduleName, bool ignoreCase = false) { var mt = Type.GetType(moduleName, false, ignoreCase); if (mt != null) { return(helper.GetStorage().ContainsKey(WebExModuleExtensions.MakeViewDataKey(mt))); } return(false); }
public static void RegisterModule(IDictionary storage, IModule r) { if (r == null) { throw new ArgumentNullException(nameof(r)); } if (storage == null) { throw new ArgumentNullException(nameof(storage)); } storage[WebExModuleExtensions.MakeViewDataKey(r.GetType())] = new CachedModule(r); }
public static bool HasModule(this HtmlHelper helper, Type module) { return(helper.GetStorage().ContainsKey(WebExModuleExtensions.MakeViewDataKey(module))); }