Skip to content

Commit

Permalink
Use nameof for argumentnullexception
Browse files Browse the repository at this point in the history
  • Loading branch information
ejsmith committed Jul 19, 2021
1 parent 6e65ed9 commit a65905b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Foundatio/Messaging/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public interface IMessage {

[DebuggerDisplay("Type: {Type}")]
public class Message : IMessage {
private Lazy<object> _getBody;
private readonly Lazy<object> _getBody;

public Message(Func<object> getBody) {
if (getBody == null)
throw new ArgumentNullException("getBody");
throw new ArgumentNullException(nameof(getBody));

_getBody = new Lazy<object>(getBody);
}
Expand Down

0 comments on commit a65905b

Please sign in to comment.