[Core] Add IsUncommon
This commit is contained in:
Родитель
54204b1b18
Коммит
271f23d040
|
@ -35,6 +35,8 @@ namespace Xamarin.PropertyEditing.Tests.MockPropertyInfo
|
|||
|
||||
public bool CanWrite { get; }
|
||||
|
||||
public bool IsUncommon { get; }
|
||||
|
||||
public ValueSources ValueSources { get; }
|
||||
|
||||
public IReadOnlyList<PropertyVariationOption> Variations { get; }
|
||||
|
|
|
@ -23,12 +23,13 @@ namespace Xamarin.PropertyEditing.Tests.MockPropertyInfo
|
|||
|
||||
public class MockPropertyInfo<T> : IPropertyInfo, IPropertyConverter, IEquatable<MockPropertyInfo<T>>
|
||||
{
|
||||
public MockPropertyInfo (string name, string description = null, string category = null, bool canWrite = true, IEnumerable<Type> converterTypes = null, ValueSources valueSources = ValueSources.Local | ValueSources.Default, PropertyVariationOption[] options = null)
|
||||
public MockPropertyInfo (string name, string description = null, string category = null, bool canWrite = true, IEnumerable<Type> converterTypes = null, ValueSources valueSources = ValueSources.Local | ValueSources.Default, PropertyVariationOption[] options = null, bool isUncommon = false)
|
||||
{
|
||||
Name = name;
|
||||
Description = description;
|
||||
Category = category;
|
||||
CanWrite = canWrite;
|
||||
IsUncommon = isUncommon;
|
||||
ValueSources = valueSources;
|
||||
if (converterTypes != null) {
|
||||
this.typeConverters = converterTypes
|
||||
|
@ -52,6 +53,7 @@ namespace Xamarin.PropertyEditing.Tests.MockPropertyInfo
|
|||
|
||||
public string Category { get; }
|
||||
public bool CanWrite { get; }
|
||||
public bool IsUncommon { get; }
|
||||
public ValueSources ValueSources { get; }
|
||||
static readonly PropertyVariationOption[] EmptyVariationOptions = new PropertyVariationOption[0];
|
||||
|
||||
|
|
|
@ -32,6 +32,14 @@ namespace Xamarin.PropertyEditing
|
|||
|
||||
bool CanWrite { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the property is an uncommonly used property.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This acts as a hint to hide the property behind disclosures when appropriate.
|
||||
/// </remarks>
|
||||
bool IsUncommon { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the possible sources of values for this property.
|
||||
/// </summary>
|
||||
|
|
|
@ -47,6 +47,8 @@ namespace Xamarin.PropertyEditing.Reflection
|
|||
|
||||
public bool CanWrite => this.propertyInfo.CanWrite;
|
||||
|
||||
public bool IsUncommon => false;
|
||||
|
||||
public ValueSources ValueSources => ValueSources.Local;
|
||||
|
||||
public IReadOnlyList<PropertyVariationOption> Variations => EmtpyVariationOptions;
|
||||
|
|
Загрузка…
Ссылка в новой задаче