public MvxSimpleChainedSourceBinding(
     object source,
     MvxPropertyNamePropertyToken propertyNamePropertyToken,
     IList<MvxPropertyToken> childTokens)
     : base(source, propertyNamePropertyToken.PropertyName, childTokens)
 {
     UpdateChildBinding();
 }
        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;
        }
コード例 #3
0
 public MvxSimpleLeafPropertyInfoSourceBinding(object source, MvxPropertyNamePropertyToken token)
     : base(source, token.PropertyName)
 {
 }