blob: 7c9f6961efef9c84751503e44b2132a479b74b0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Xamarin.PropertyEditing
{
public interface IEditorProvider
{
Task<IObjectEditor> GetObjectEditorAsync (object item);
Task<IReadOnlyCollection<IPropertyInfo>> GetPropertiesForTypeAsync (ITypeInfo type);
/// <summary>
/// Creates a representation value of the <paramref name="type"/> and returns it.
/// </summary>
Task<object> CreateObjectAsync (ITypeInfo type);
/// <summary>
/// Gets the children targets of the given target <paramref name="item"/>.
/// </summary>
Task<IReadOnlyList<object>> GetChildrenAsync (object item);
/// <summary>
/// Gets a mapping of known types (such as CommonSolidBrush) to a real-type analog.
/// </summary>
/// <remarks>
/// The "real-type analog" <see cref="ITypeInfo" /> does not need to be the real version of the type. It simply needs to be a type
/// that <see cref="CreateObjectAsync"/> into <see cref="GetObjectEditorAsync"/> can understand for the purposes of creating an
/// <see cref="IObjectEditor"/> of it.
/// </remarks>
Task<IReadOnlyDictionary<Type, ITypeInfo>> GetKnownTypesAsync (IReadOnlyCollection<Type> knownTypes);
}
}
|