1- namespace ReactiveUI . Winforms
1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Linq ;
4+ using System . Reactive . Disposables ;
5+ using System . Reactive . Linq ;
6+ using System . Windows . Forms ;
7+ using System . Windows . Input ;
8+ using ReactiveUI ;
9+
10+ namespace ReactiveUI . Winforms
211{
3- using System ;
4- using System . Collections . Generic ;
5- using System . Linq ;
6- using System . Reactive . Disposables ;
7- using System . Reactive . Linq ;
8- using System . Windows . Forms ;
9- using System . Windows . Input ;
10-
11- using ReactiveUI ;
12+
1213
1314 /// <summary>
1415 /// This binder is the default binder for connecting to arbitrary events
@@ -30,8 +31,7 @@ public int GetAffinityForObject(Type type, bool hasEventTarget)
3031
3132 if ( hasEventTarget ) return 5 ;
3233
33- return defaultEventsToBind . Any ( x =>
34- {
34+ return defaultEventsToBind . Any ( x => {
3535 var ei = type . GetEvent ( x . Item1 , BindingFlags . Public | BindingFlags . FlattenHierarchy | BindingFlags . Instance ) ;
3636 return ei != null ;
3737 } ) ? 3 : 0 ;
@@ -71,8 +71,7 @@ public IDisposable BindCommandToObject<TEventArgs>(ICommand command, object targ
7171 var evt = Observable . FromEventPattern < TEventArgs > ( target , eventName ) ;
7272 ret . Add ( evt . Subscribe ( ea =>
7373 {
74- if ( command . CanExecute ( useEventArgsInstead ? ea : latestParameter ) )
75- {
74+ if ( command . CanExecute ( useEventArgsInstead ? ea : latestParameter ) ) {
7675 command . Execute ( useEventArgsInstead ? ea : latestParameter ) ;
7776 }
7877 } ) ) ;
0 commit comments