public static PropertyTreeBinderOptions ReadOnly(PropertyTreeBinderOptions source)
        {
            var result = source.Clone();

            result.IsReadOnly = true;
            return(result);
        }
 public PropertyTreeBinderOptions(PropertyTreeBinderOptions other)
 {
     if (other == null)
     {
         return;
     }
     _expressionContext = other.ExpressionContext;
 }
        public object Bind(Type componentType, PropertyTreeBinderOptions options)
        {
            if (componentType == null)
            {
                throw new ArgumentNullException("componentType");
            }

            var obj = PropertyTreeMetaObject.Create(componentType);

            return(TopLevelBind(obj, options, null).Component);
        }
        public T Bind <T>(T component, PropertyTreeBinderOptions options)
        {
            PropertyTreeMetaObject obj;

            if (ReferenceEquals(component, null))
            {
                obj = PropertyTreeMetaObject.Create(typeof(T));
            }
            else
            {
                obj = PropertyTreeMetaObject.Create(component);
            }

            return((T)TopLevelBind(obj, options, null).Component);
        }
 public T Bind <T>(T component, PropertyTreeBinderOptions options)
 {
     return(CreateNavigator().Bind <T>(component, options));
 }
 public T Bind <T>(PropertyTreeBinderOptions options)
 {
     return((T)Bind(typeof(T), options));
 }
 public object Bind(Type componentType, PropertyTreeBinderOptions options)
 {
     return(CreateNavigator().Bind(componentType, options));
 }
 internal PropertyTreeMetaObject TopLevelBind(PropertyTreeMetaObject obj, PropertyTreeBinderOptions options, IServiceProvider serviceProvider)
 {
     return(PropertyTreeMetaObjectBinder.Create(options).Bind(obj, this, serviceProvider));
 }
Esempio n. 9
0
 public object Bind(Type instanceType, PropertyTreeBinderOptions options)
 {
     return(CreateNavigator().Bind(instanceType, options));
 }
Esempio n. 10
0
 public T Bind <T>(T model, PropertyTreeBinderOptions options)
 {
     return(CreateNavigator().Bind <T>(model, options));
 }