66 lines
1.1 KiB
Plaintext
66 lines
1.1 KiB
Plaintext
include::../why.adoc[]
|
|
|
|
== How to fix it
|
|
|
|
=== Code examples
|
|
|
|
==== Noncompliant code example
|
|
|
|
[source,vbnet,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
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
|
|
|
|
[source,vbnet,diff-id=1,diff-type=compliant]
|
|
----
|
|
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
|
|
----
|
|
|
|
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[]
|