static bool IsAllowed(Type type, out string areaName) { if (MainAssembly == null) { throw new InvalidOperationException("PortableAreaControllers.MainAssembly is not set"); } areaName = null; if (type == null) { return(false); } if (type.Assembly == MainAssembly) { return(true); } return(AllowedTypes.TryGetValue(type, out areaName)); }