rspec/rules/S1123/csharp/rule.adoc

45 lines
660 B
Plaintext
Raw Normal View History

== Why is this an issue?
2022-11-29 16:57:02 +01:00
include::../description-dotnet.adoc[]
2020-06-30 12:47:33 +02:00
=== Noncompliant code example
2020-06-30 12:47:33 +02:00
2022-02-04 17:28:24 +01:00
[source,csharp]
2020-06-30 12:47:33 +02:00
----
public class Car
{
[Obsolete] // Noncompliant
2022-11-29 16:57:02 +01:00
public void CrankEngine(int turnsOfCrank)
2020-06-30 12:47:33 +02:00
{ ... }
}
----
=== Compliant solution
2020-06-30 12:47:33 +02:00
2022-02-04 17:28:24 +01:00
[source,csharp]
2020-06-30 12:47:33 +02:00
----
public class Car
{
[Obsolete("Replaced by the automatic starter")]
2022-11-29 16:57:02 +01:00
public void CrankEngine(int turnsOfCrank)
2020-06-30 12:47:33 +02:00
{ ... }
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
'''
== Comments And Links
(visible only on this page)
2022-11-29 16:57:02 +01:00
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]