예제 #1
0
 public BindingProvider([NotNull] IBindingParser parser, IEnumerable <IBindingBehavior> defaultBehaviors)
 {
     Should.NotBeNull(parser, nameof(parser));
     _parser           = parser;
     _defaultBehaviors = new OrderedListInternal <IBindingBehavior>(defaultBehaviors ?? Empty.Array <IBindingBehavior>(), BehaviorComparer);
     _buildDelegate    = BuildBinding;
 }
예제 #2
0
 public BindingProvider(IBindingParser parser = null)
 {
     _parser           = parser ?? new BindingParser();
     _defaultBehaviors = new OrderedListInternal <IBindingBehavior>(BehaviorComparer)
     {
         new OneWayBindingMode()
     };
     _buildDelegate = BuildBinding;
 }
예제 #3
0
 public BindingProvider(IBindingParser parser = null)
 {
     _parser = parser ?? new BindingParser();
     _defaultBehaviors = new OrderedListInternal<IBindingBehavior>(BehaviorComparer)
     {
         new OneWayBindingMode()
     };
     _buildDelegate = BuildBinding;
 }
예제 #4
0
 public DynamicViewModelWindowPresenter([NotNull] IViewMappingProvider viewMappingProvider, [NotNull] IOperationCallbackManager callbackManager, [NotNull] IWrapperManager wrapperManager)
 {
     Should.NotBeNull(viewMappingProvider, nameof(viewMappingProvider));
     Should.NotBeNull(callbackManager, nameof(callbackManager));
     Should.NotBeNull(wrapperManager, nameof(wrapperManager));
     _viewMappingProvider = viewMappingProvider;
     _callbackManager = callbackManager;
     _wrapperManager = wrapperManager;
     _mediatorRegistrations = new OrderedListInternal<MediatorRegistration>();
 }
예제 #5
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="BindingProvider" /> class.
        /// </summary>
        public BindingProvider(IBindingParser parser = null)
        {
            _parser = parser ?? new BindingParser();
            var comparer = new DelegateComparer <IBindingSourceDecorator>((manager, targetManager) => targetManager.Priority.CompareTo(manager.Priority));

            _decorators       = new OrderedListInternal <IBindingSourceDecorator>(comparer);
            _defaultBehaviors = new OrderedListInternal <IBindingBehavior>(BehaviorComparer)
            {
                new OneWayBindingMode()
            };
            _buildDelegate = BuildBinding;
        }
예제 #6
0
 public DynamicPresentersCollection(ViewModelPresenter presenter)
 {
     _presenter = presenter;
     _list      = new OrderedListInternal <IDynamicViewModelPresenter>(new DelegateComparer <IDynamicViewModelPresenter>(ComparerDelegate));
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="BindingProvider" /> class.
 /// </summary>
 public BindingProvider(IBindingParser parser = null)
 {
     _parser = parser ?? new BindingParser();
     var comparer = new DelegateComparer<IBindingSourceDecorator>((manager, targetManager) => targetManager.Priority.CompareTo(manager.Priority));
     _decorators = new OrderedListInternal<IBindingSourceDecorator>(comparer);
     _defaultBehaviors = new OrderedListInternal<IBindingBehavior>(BehaviorComparer)
     {
         new OneWayBindingMode()
     };
     _buildDelegate = BuildBinding;
 }