
* S6674: add how to fix section * S6677: add how to fix section * S2629: add how to fix section * S6670: add how to fix section * S1312: add how to fix section * S6672: add how to fix section * S6670: add compliant/noncompliant headers * S6669: add how to fix section * S6668: add how to fix section * S2629: remove method definition * S6669: update formatting * S6670: add links * Fix formatting
27 lines
577 B
Plaintext
27 lines
577 B
Plaintext
include::../why-dotnet.adoc[]
|
|
|
|
include::../how-dotnet.adoc[]
|
|
|
|
=== Code examples
|
|
|
|
==== Noncompliant code example
|
|
|
|
[source,csharp,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
public void Checkout(ILogger logger, User user, Order order)
|
|
{
|
|
logger.LogDebug("User {Id} purchased order {Id}", user.Id, order.Id);
|
|
}
|
|
----
|
|
|
|
==== Compliant solution
|
|
|
|
[source,csharp,diff-id=1,diff-type=compliant]
|
|
----
|
|
public void Checkout(ILogger logger, User user, Order order)
|
|
{
|
|
logger.LogDebug("User {UserId} purchased order {OrderId}", user.Id, order.Id);
|
|
}
|
|
----
|
|
|
|
include::../resources-dotnet.adoc[] |