private void SetupCustomEditor(BUILT_IN_EDITOR_COMPONENTS editorTypeName) { _decoratedEditorType = _editorAssembly.GetTypes().Where(t => t.Name == editorTypeName.ToString()).FirstOrDefault(); Init(); // Check CustomEditor types. System.Type originalEditedType = GetCustomEditorType(_decoratedEditorType); if (originalEditedType != _editedObjectType) { throw new System.ArgumentException( string.Format("Type {0} does not match the editor {1} type {2}", _editedObjectType, editorTypeName, originalEditedType)); } }
/// <summary> /// constructor of the class: here we initialize reflexion variables /// </summary> /// <param name="editorTypeName">name of the component we inspect</param> public DecoratorComponentsEditor(BUILT_IN_EDITOR_COMPONENTS editorTypeName, bool showExtension = true, string tinyEditorName = "") { SetupDecoratorSettings(showExtension, tinyEditorName, isCustomEditor: false, editorTypeName.ToString()); SetupCustomEditor(editorTypeName); }