Xaml Members have their methods SetValue and GetValue as virtual to let implemetors override them as they want :D

This commit is contained in:
José Manuel Nieto Sánchez 2016-02-06 13:44:13 +01:00
Родитель c2ffcccc82
Коммит 46b17c65cf
2 изменённых файлов: 4 добавлений и 13 удалений

Просмотреть файл

@ -13,11 +13,6 @@
{
}
protected override IMemberValuePlugin LookupXamlMemberValueConnector()
{
return new MemberValuePlugin(this);
}
protected override IEnumerable<Member> LookupDependencies()
{
var underlyingType = DeclaringType.UnderlyingType;

Просмотреть файл

@ -15,11 +15,12 @@ namespace OmniXaml.Typing
FeatureProvider = typeFeatureProvider;
TypeRepository = typeRepository;
DeclaringType = declaringType;
MemberValuePlugin = new MemberValuePlugin(this);
}
public ITypeRepository TypeRepository { get; }
public XamlType DeclaringType { get; }
public IMemberValuePlugin MemberValuePlugin => LookupXamlMemberValueConnector();
private IMemberValuePlugin MemberValuePlugin { get; }
public ITypeFeatureProvider FeatureProvider { get; }
public abstract MethodInfo Getter { get; }
@ -45,17 +46,12 @@ namespace OmniXaml.Typing
return "Member: " + Name;
}
protected virtual IMemberValuePlugin LookupXamlMemberValueConnector()
{
return new MemberValuePlugin(this);
}
public void SetValue(object instance, object value)
public virtual void SetValue(object instance, object value)
{
MemberValuePlugin.SetValue(instance, value);
}
public object GetValue(object instance)
public virtual object GetValue(object instance)
{
return MemberValuePlugin.GetValue(instance);
}