rspec/rules/S4260/vbnet/rule.adoc

46 lines
805 B
Plaintext
Raw Normal View History

2020-06-30 12:49:37 +02:00
include::../description.adoc[]
== Noncompliant Code Example
----
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("value2")> ' Noncompliant
Public Property Value1 As Object
End Class
End Namespace
----
== Compliant Solution
----
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
----