2023-06-09 17:19:16 +02:00
|
|
|
include::../why.adoc[]
|
2023-05-25 14:18:12 +02:00
|
|
|
|
2023-06-09 17:19:16 +02:00
|
|
|
== How to fix it
|
2023-05-25 14:18:12 +02:00
|
|
|
|
2023-06-09 17:19:16 +02:00
|
|
|
=== Code examples
|
2023-05-25 14:18:12 +02:00
|
|
|
|
2023-06-09 17:19:16 +02:00
|
|
|
==== Noncompliant code example
|
|
|
|
|
|
|
|
[source,csharp,diff-id=1,diff-type=noncompliant]
|
2023-05-25 14:18:12 +02:00
|
|
|
----
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
[assembly: AssemblyTitle("MyAssembly")] // Noncompliant
|
|
|
|
namespace MyLibrary
|
|
|
|
{
|
2023-06-09 17:19:16 +02:00
|
|
|
// ...
|
2023-05-25 14:18:12 +02:00
|
|
|
}
|
|
|
|
----
|
|
|
|
|
2023-06-09 17:19:16 +02:00
|
|
|
==== Compliant solution
|
2023-05-25 14:18:12 +02:00
|
|
|
|
2023-06-09 17:19:16 +02:00
|
|
|
[source,csharp,diff-id=1,diff-type=compliant]
|
2023-05-25 14:18:12 +02:00
|
|
|
----
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
[assembly: AssemblyTitle("MyAssembly")]
|
2023-06-09 17:19:16 +02:00
|
|
|
[assembly: AssemblyVersion("42.1.125.0")]
|
2023-05-25 14:18:12 +02:00
|
|
|
namespace MyLibrary
|
|
|
|
{
|
2023-06-09 17:19:16 +02:00
|
|
|
// ...
|
2023-05-25 14:18:12 +02:00
|
|
|
}
|
|
|
|
----
|
|
|
|
|
2023-06-09 17:19:16 +02:00
|
|
|
include::../resources.adoc[]
|
2023-05-25 14:18:12 +02:00
|
|
|
|
2023-06-09 17:19:16 +02:00
|
|
|
include::../rspecator.adoc[]
|