public void AddCreatorFunction( Type type, Func <IEditor, Form> createEditorForm) { if (type is null) { throw new ArgumentNullException(nameof(type)); } if (createEditorForm is null) { throw new ArgumentNullException(nameof(createEditorForm)); } if (!typeof(IEditor).IsAssignableFrom(type)) { throw new ArgumentException(); } EditorFormCreator.Add(type, createEditorForm); }