using System; using System.Collections.Generic; using System.Threading.Tasks; namespace Xamarin.PropertyEditing { public interface IEditorProvider { /// /// Gets a mapping of known types (such as CommonSolidBrush) to a real-type analog. /// /// /// /// The "real-type analog" does not need to be the real version of the type. It simply needs to be a type /// that into can understand for the purposes of creating an /// of it. /// /// /// Expected known types are: /// - Applicable Common*Brush types /// - if the platform supports binding. /// - for XAML platforms. /// /// IReadOnlyDictionary KnownTypes { get; } /// /// Gets an object editor for the given target . /// /// /// /// It is not recommended that property value retrieval happens eagerly if the returned task waits for that to complete. /// Either do so in a separate-async fashion, or wait for the first call, /// as numerous s may be requested that never retrieve their full value suite. /// /// Task GetObjectEditorAsync (object item); Task> GetPropertiesForTypeAsync (ITypeInfo type); /// /// Creates a representation value of the and returns it. /// Task CreateObjectAsync (ITypeInfo type); /// /// Gets types assignable to the given base . /// /// The base type to retrieve assignable types for. /// Whether or not to look for children of a collection or just . Task GetAssignableTypesAsync (ITypeInfo type, bool childTypes); /// /// Gets the children targets of the given target . /// Task> GetChildrenAsync (object item); } }