public static InlineEditorTypes GetTypes <ItemType>() { var editorTypes = new List <Type> { null }; var itemTypes = new List <Type> { null }; var typeNames = new List <string> { "<null>" }; foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) { foreach (var itemType in assembly.GetExportedTypes()) { if (TypeFinder.IsCreatableAs <ItemType>(itemType)) { var editorType = GetEditorForType(itemType); editorTypes.Add(editorType); itemTypes.Add(itemType); typeNames.Add(itemType.Name); } } } return(new InlineEditorTypes { Count = editorTypes.Count, EditorTypes = editorTypes.ToArray(), ItemTypes = itemTypes.ToArray(), TypeNames = typeNames.ToArray() }); }
static InlineEditor() { foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) { foreach (var type in assembly.GetExportedTypes()) { if (TypeFinder.IsCreatableAs <InlineEditor>(type)) { _inlineEditorTypes.Add(type); } } } }