Esempio n. 1
0
        public void Bind(object newValue)
        {
            if (this.binder == null)
            {
                throw BindingException.FromField(this, "Field is not bindable.");
            }

            try
            {
                this.binder((TValue)newValue);
                this.Value = newValue;
            }
            catch (NotIndexableException)
            {
                throw BindingException.FromField(this, "Property has no indexer.");
            }
            catch (NotWritableException)
            {
                throw BindingException.FromField(this, "Property has no setter.");
            }
            catch (Exception ex)
            {
                throw BindingException.FromField(this, innerException: ex);
            }
        }
Esempio n. 2
0
 public void Bind(object newValue) => throw BindingException.FromField(this, "Missing fields are not bindable due to a null container.");
Esempio n. 3
0
 public void Bind(object newValue) => throw BindingException.FromField(this, "Models are not not bindable due to having no container.");