public static void RegisterCreateableType(string scriptAlias, Type type) { #if !ANDROID_HACK CheckThread(); // no call to CheckHtmlAccess(); -- see DRT365 CheckName(scriptAlias, "scriptAlias"); if (type == null) { throw new ArgumentNullException("type"); } if (!ManagedObject.IsCreateable(type)) { throw new ArgumentException(type.ToString(), "type"); } if (HostServices.Current.CreateableTypes.ContainsKey(scriptAlias)) { throw new ArgumentException("scriptAlias"); } HostServices.Current.CreateableTypes [scriptAlias] = type; #endif }