Beispiel #1
0
        protected virtual ISingleBindingSourceAccessor GetAccessor(object model, string path, IDataContext context, bool isSource)
        {
            var observer = new MultiPathObserver(model, BindingPath.Create(path), false);
            var source   = isSource
                ? new BindingSource(observer)
                : new BindingTarget(observer);

            return(new BindingSourceAccessor(source, context, !isSource));
        }
 protected virtual ISingleBindingSourceAccessor GetAccessor(object model, string path, IDataContext context, bool isSource, Func<IDataContext, object> commandParameterDelegate = null)
 {
     var source = new MultiPathObserver(model, BindingPath.Create(path), false);
     if (commandParameterDelegate != null)
     {
         context = context.ToNonReadOnly();
         context.AddOrUpdate(BindingBuilderConstants.CommandParameter, commandParameterDelegate);
     }
     return new BindingSourceAccessor(source, context, !isSource);
 }
Beispiel #3
0
        private static IBindingSource CreateSource(object model, string path)
        {
            var observer = new MultiPathObserver(model, BindingPath.Create(path), false);

            return(new BindingSource(observer));
        }