Skip to content

Commit

Permalink
Correct a couple spelling mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
mykolav authored Dec 23, 2019
1 parent a746bd6 commit 9345894
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ So something like this is OK:
```csharp
var testAddressDtoBuilder = new TestAddressDTOBuilder();
// some code skipped...
var addresDto = testAddressDtoBuilder.BuildWith(line3: "Suite 500", state: "WA");
var addressDto = testAddressDtoBuilder.BuildWith(line3: "Suite 500", state: "WA");
```

But the analyzer will not allow the code sample below to compile:
```csharp
var testAddressDtoBuilder = new TestAddressDTOBuilder();
// some code skipped...
var addresDto = testAddressDtoBuilder.BuildWith("54321 Another test street", "9th Floor");
var addressDto = testAddressDtoBuilder.BuildWith("54321 Another test street", "9th Floor");

```

Expand Down Expand Up @@ -152,9 +152,9 @@ TellPowerLevel(name: "Goku", powerLevel: 9001);
1. This analyzer looks at an invocation expression (e.g., a method call).
2. It then finds the method's definition.
3. If the definition is marked with a `[RequireNamedArgs]` attribute,
the analyzer requires to every caller to provide names for the invocation's arguments.
the analyzer requires every caller to provide names for the invocation's arguments.
4. If the last parameter is `params`, the analyzer
doesn't emit the diagnostic, as we cannot use named arguments in this case.
doesn't emit the diagnostic, as C# doesn't allow named arguments in this case.

![The RequireNamedArgs analyzer in action](./require-named-args-demo.gif)

Expand Down

0 comments on commit 9345894

Please sign in to comment.