Skip to content

Commit

Permalink
Fixes for 'delegate can be simplified.'
Browse files Browse the repository at this point in the history
  • Loading branch information
tillig committed Sep 24, 2020
1 parent aaba23b commit db5428b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions test/Autofac.Test/Util/AsyncDisposeTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ public void Dispose()
{
IsSyncDisposed = true;

if (Disposing != null)
{
Disposing(this, EventArgs.Empty);
}
Disposing?.Invoke(this, EventArgs.Empty);
}

public async ValueTask DisposeAsync()
Expand All @@ -27,10 +24,7 @@ public async ValueTask DisposeAsync()

IsAsyncDisposed = true;

if (Disposing != null)
{
Disposing(this, EventArgs.Empty);
}
Disposing?.Invoke(this, EventArgs.Empty);
}
}
}
5 changes: 1 addition & 4 deletions test/Autofac.Test/Util/AsyncOnlyDisposeTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ public async ValueTask DisposeAsync()

IsAsyncDisposed = true;

if (Disposing != null)
{
Disposing(this, EventArgs.Empty);
}
Disposing?.Invoke(this, EventArgs.Empty);
}
}
}
5 changes: 1 addition & 4 deletions test/Autofac.Test/Util/DisposeTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ public void Dispose()
{
IsDisposed = true;

if (Disposing != null)
{
Disposing(this, EventArgs.Empty);
}
Disposing?.Invoke(this, EventArgs.Empty);
}
}
}

0 comments on commit db5428b

Please sign in to comment.