protected bool TryCreateNotifyChangeBinding(object source, List <MvxPropertyToken> remainingTokens, out IMvxSourceBinding result, FieldInfo fieldInfo, MvxPropertyNamePropertyToken propertyNameToken) { var fieldValue = fieldInfo.GetValue(source) as INotifyChange; if (fieldValue == null) { MvxBindingTrace.Warning("INotifyChange is null for {0}", propertyNameToken.PropertyName); result = null; return(false); } if (remainingTokens.Any()) { result = new MvxChainedNotifyChangeFieldSourceBinding(source, fieldValue, remainingTokens); } else { result = new MvxLeafNotifyChangeFieldSourceBinding(source, fieldValue); } return(true); }
protected bool TryCreateNotifyChangeBinding(object source, List<MvxPropertyToken> remainingTokens, out IMvxSourceBinding result, FieldInfo fieldInfo, MvxPropertyNamePropertyToken propertyNameToken) { var fieldValue = fieldInfo.GetValue(source) as INotifyChange; if (fieldValue == null) { MvxBindingTrace.Warning("INotifyChange is null for {0}", propertyNameToken.PropertyName); result = null; return false; } if (remainingTokens.Any()) { result = new MvxChainedNotifyChangeFieldSourceBinding(source, fieldValue, remainingTokens); } else { result = new MvxLeafNotifyChangeFieldSourceBinding(source, fieldValue); } return true; }