コード例 #1
0
        public void Clear()
        {
            if (currentEditor != null)
            {
                currentEditor.Dispose();
                currentEditor = null;
            }

            target = null;
        }
コード例 #2
0
        Task <IObjectEditor> IEditorProvider.GetObjectEditorAsync(object item)
        {
            target = item as ComponentModelTarget;
            if (target == null)
            {
                throw new ArgumentException(string.Format("Cannot get editor for type {0} only ComponentModelObjectEditor types are allowed", item.GetType().Name));
            }

            if (currentEditor != null)
            {
                currentEditor.PropertyChanged -= CurrentEditor_PropertyChanged;
            }

            currentEditor = new ComponentModelObjectEditor(target);
            currentEditor.PropertyChanged += CurrentEditor_PropertyChanged;

            //on each editor we store current used providers
            return(Task.FromResult <IObjectEditor>(currentEditor));
        }
コード例 #3
0
 public Task <AssignableTypesResult> GetAssignableTypesAsync(ITypeInfo type, bool childTypes)
 => ComponentModelObjectEditor.GetAssignableTypes();