diff options
Diffstat (limited to 'Xamarin.Forms.Xaml/XamlServiceProvider.cs')
-rw-r--r-- | Xamarin.Forms.Xaml/XamlServiceProvider.cs | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/Xamarin.Forms.Xaml/XamlServiceProvider.cs b/Xamarin.Forms.Xaml/XamlServiceProvider.cs index 77ed6345..5599cbbc 100644 --- a/Xamarin.Forms.Xaml/XamlServiceProvider.cs +++ b/Xamarin.Forms.Xaml/XamlServiceProvider.cs @@ -89,7 +89,7 @@ namespace Xamarin.Forms.Xaml.Internals } } - internal class XamlValueTargetProvider : IProvideParentValues, IProvideValueTarget + class XamlValueTargetProvider : IProvideParentValues, IProvideValueTarget { public XamlValueTargetProvider(object targetObject, INode node, HydratationContext context, object targetProperty) { @@ -102,14 +102,8 @@ namespace Xamarin.Forms.Xaml.Internals INode Node { get; } HydratationContext Context { get; } - public object TargetObject { get; } - - public object TargetProperty - { - get { throw new NotImplementedException(); } - private set { } - } + public object TargetProperty { get; } = null; IEnumerable<object> IProvideParentValues.ParentObjects { @@ -141,15 +135,17 @@ namespace Xamarin.Forms.Xaml.Internals public class SimpleValueTargetProvider : IProvideParentValues, IProvideValueTarget { readonly object[] objectAndParents; + readonly object targetProperty; - public SimpleValueTargetProvider(object[] objectAndParents) + public SimpleValueTargetProvider(object[] objectAndParents, object targetProperty) { if (objectAndParents == null) - throw new ArgumentNullException("objectAndParents"); + throw new ArgumentNullException(nameof(objectAndParents)); if (objectAndParents.Length == 0) throw new ArgumentException(); this.objectAndParents = objectAndParents; + this.targetProperty = targetProperty; } IEnumerable<object> IProvideParentValues.ParentObjects @@ -164,7 +160,7 @@ namespace Xamarin.Forms.Xaml.Internals object IProvideValueTarget.TargetProperty { - get { throw new NotImplementedException(); } + get { return targetProperty; } } } @@ -249,7 +245,7 @@ namespace Xamarin.Forms.Xaml.Internals XmlType xmlType, IXmlLineInfo xmlInfo, Assembly currentAssembly, out XamlParseException exception); } - internal class XamlRootObjectProvider : IRootObjectProvider + class XamlRootObjectProvider : IRootObjectProvider { public XamlRootObjectProvider(object rootObject) { @@ -269,7 +265,7 @@ namespace Xamarin.Forms.Xaml.Internals public IXmlLineInfo XmlLineInfo { get; } } - internal interface INameScopeProvider + interface INameScopeProvider { INameScope NameScope { get; } } |