/// <summary> /// Checks if the supplied <see cref="IValueAssociation"/> is an <see cref="InstancePropertyAssociation"/>. /// </summary> /// <param name="propertyValue">The <see cref="IValueAssociation"/>.</param> /// <exception cref="ArgumentNullException">The value of '<paramref name="propertyValue"/>' cannot be null.</exception> /// <returns>A value indicating, whether, this instance can handle the <see cref="IValueAssociation"/>.</returns> public Boolean CanResolveValue(IValueAssociation propertyValue) { if (propertyValue == null) { throw new ArgumentNullException(nameof(propertyValue)); } return(propertyValue is IInstanceValueAssociation); }
public PropertyValueResolutionContext CreatePropertyValueResolutionContext([NotNull] IValueAssociation propertyValue) { if (propertyValue == null) { throw new ArgumentNullException(nameof(propertyValue)); } return new PropertyValueResolutionContext(propertyValue, this); }
/// <summary> /// Initializes a new instance of the <see cref="PropertyValueResolutionContext"/> class. /// </summary> /// <param name="propertyValue">The <see cref="IValueAssociation"/>.</param> /// <param name="InstanceResolutionContext">The parent <see cref="InstanceResolutionContext"/>.</param> /// <exception cref="ArgumentNullException">The value of '<paramref name="propertyValue"/>' and '<paramref name="InstanceResolutionContext"/>' cannot be null.</exception> public PropertyValueResolutionContext([NotNull] IValueAssociation propertyValue, [NotNull] InstanceResolutionContext InstanceResolutionContext) { if (propertyValue == null) { throw new ArgumentNullException(nameof(propertyValue)); } if (InstanceResolutionContext == null) { throw new ArgumentNullException(nameof(InstanceResolutionContext)); } this.PropertyValue = propertyValue; this.InstanceResolutionContext = InstanceResolutionContext; }