rspec/rules/S4260/vbnet/rule.adoc

66 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-07-04 17:17:33 +02:00
include::../why.adoc[]
2023-07-04 17:17:33 +02:00
== How to fix it
2020-06-30 12:49:37 +02:00
2023-07-04 17:17:33 +02:00
=== Code examples
2020-06-30 12:49:37 +02:00
2023-07-04 17:17:33 +02:00
==== Noncompliant code example
[source,vbnet,diff-id=1,diff-type=noncompliant]
2020-06-30 12:49:37 +02:00
----
Imports System
2023-07-04 17:17:33 +02:00
Namespace MyLibrary
2020-06-30 12:49:37 +02:00
Public Class MyExtension
Inherits MarkupExtension
Public Sub New()
End Sub
Public Sub New(ByVal value1 As Object)
Value1 = value1
End Sub
<ConstructorArgument("value2")> ' Noncompliant
Public Property Value1 As Object
End Class
End Namespace
----
2023-07-04 17:17:33 +02:00
==== Compliant solution
2020-06-30 12:49:37 +02:00
2023-07-04 17:17:33 +02:00
[source,vbnet,diff-id=1,diff-type=compliant]
2020-06-30 12:49:37 +02:00
----
Imports System
Namespace MyLibrary
Public Class MyExtension
Inherits MarkupExtension
Public Sub New()
End Sub
Public Sub New(ByVal value1 As Object)
Value1 = value1
End Sub
<ConstructorArgument("value1")>
Public Property Value1 As Object
End Class
End Namespace
----
2023-07-04 17:17:33 +02:00
include::../resources.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../highlighting.adoc[]
endif::env-github,rspecator-view[]