Skip to content

Commit 0afa770

Browse files
committed
Style Fixups
1 parent cc61b6a commit 0afa770

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

ReactiveUI/Legacy/ReactiveAsyncCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ void marshalFailures(Action block)
211211

212212
protected virtual void raiseCanExecuteChanged(EventArgs e)
213213
{
214-
EventHandler handler = this.CanExecuteChanged;
215-
if (handler != null)
216-
{
214+
var handler = this.CanExecuteChanged;
215+
216+
if (handler != null) {
217217
handler(this, e);
218218
}
219219
}

ReactiveUI/Legacy/ReactiveCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ void marshalFailures(Action block)
195195

196196
protected virtual void raiseCanExecuteChanged(EventArgs e)
197197
{
198-
EventHandler handler = this.CanExecuteChanged;
199-
if (handler != null)
200-
{
198+
var handler = this.CanExecuteChanged;
199+
200+
if (handler != null) {
201201
handler(this, e);
202202
}
203203
}

ReactiveUI/ReactiveCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ void marshalFailures(Action block)
164164

165165
protected virtual void raiseCanExecuteChanged(EventArgs e)
166166
{
167-
EventHandler handler = this.CanExecuteChanged;
168-
if (handler != null)
169-
{
167+
var handler = this.CanExecuteChanged;
168+
169+
if (handler != null) {
170170
handler(this, e);
171171
}
172172
}
@@ -267,4 +267,4 @@ public static IObservable<Unit> RegisterAsyncTask(this IReactiveCommand This, Fu
267267
return This.RegisterAsync(x => calculationFunc(x).ToObservable());
268268
}
269269
}
270-
}
270+
}

ReactiveUI/ReactiveList.cs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -503,35 +503,36 @@ static IObservable<TObs> refcountSubscribers<TObs>(IObservable<TObs> input, Acti
503503

504504
protected virtual void raiseCollectionChanging(NotifyCollectionChangedEventArgs e)
505505
{
506-
NotifyCollectionChangedEventHandler handler = this.CollectionChanging;
506+
var handler = this.CollectionChanging;
507+
507508
if(handler != null && _suppressionRefCount == 0) {
508509
handler(this, e);
509510
}
510511
}
511512

512513
protected virtual void raiseCollectionChanged(NotifyCollectionChangedEventArgs e)
513514
{
514-
NotifyCollectionChangedEventHandler handler = this.CollectionChanged;
515-
if (handler != null && _suppressionRefCount == 0)
516-
{
515+
var handler = this.CollectionChanged;
516+
517+
if (handler != null && _suppressionRefCount == 0) {
517518
handler(this, e);
518519
}
519520
}
520521

521522
protected virtual void raisePropertyChanging(PropertyChangingEventArgs e)
522523
{
523-
PropertyChangingEventHandler handler = this.PropertyChanging;
524-
if (handler != null && _suppressionRefCount == 0)
525-
{
524+
var handler = this.PropertyChanging;
525+
526+
if (handler != null && _suppressionRefCount == 0) {
526527
handler(this, e);
527528
}
528529
}
529530

530531
protected virtual void raisePropertyChanged(PropertyChangedEventArgs e)
531532
{
532-
PropertyChangedEventHandler handler = this.PropertyChanged;
533-
if (handler != null && _suppressionRefCount == 0)
534-
{
533+
var handler = this.PropertyChanged;
534+
535+
if (handler != null && _suppressionRefCount == 0) {
535536
handler(this, e);
536537
}
537538
}

0 commit comments

Comments
 (0)