| 1 |
Public Class clsUserFunction |
| 2 |
Inherits clsItem |
| 3 |
|
| 4 |
Public Property Name As String |
| 5 |
Friend Property Output As Description |
| 6 |
|
| 7 |
Friend Enum ArgumentType |
| 8 |
[Object] |
| 9 |
Character |
| 10 |
Location |
| 11 |
Number |
| 12 |
Text |
| 13 |
End Enum |
| 14 |
|
| 15 |
Friend Class Argument |
| 16 |
Public Property Name As String |
| 17 |
Public Property Type As ArgumentType |
| 18 |
End Class |
| 19 |
Friend Arguments As List(Of Argument) |
| 20 |
|
| 21 |
Public Sub New() |
| 22 |
Output = New Description |
| 23 |
Arguments = New List(Of Argument) |
| 24 |
End Sub |
| 25 |
|
| 26 |
Friend Overrides ReadOnly Property AllDescriptions As System.Collections.Generic.List(Of SharedModule.Description) |
| 27 |
Get |
| 28 |
Dim all As New List(Of Description) |
| 29 |
all.Add(Output) |
| 30 |
Return all |
| 31 |
End Get |
| 32 |
End Property |
| 33 |
|
| 34 |
Public Overrides ReadOnly Property Clone As clsItem |
| 35 |
Get |
| 36 |
Return CType(Me.MemberwiseClone, clsItem) |
| 37 |
End Get |
| 38 |
End Property |
| 39 |
|
| 40 |
Public Overrides ReadOnly Property CommonName As String |
| 41 |
Get |
| 42 |
Return Name |
| 43 |
End Get |
| 44 |
End Property |
| 45 |
|
| 46 |
Public Overrides Function DeleteKey(sKey As String) As Boolean |
| 47 |
|
| 48 |
For Each d As Description In AllDescriptions |
| 49 |
If Not d.DeleteKey(sKey) Then Return False |
| 50 |
Next |
| 51 |
|
| 52 |
Return True |
| 53 |
End Function |
| 54 |
|
| 55 |
Friend Overrides Function FindStringLocal(sSearchString As String, Optional sReplace As String = Nothing, Optional bFindAll As Boolean = True, Optional ByRef iReplacements As Integer = 0) As Object |
| 56 |
Dim iCount As Integer = iReplacements |
| 57 |
iReplacements += MyBase.FindStringInStringProperty(Me.Name, sSearchString, sReplace, bFindAll) |
| 58 |
Return iReplacements - iCount |
| 59 |
End Function |
| 60 |
|
| 61 |
Public Overrides Function ReferencesKey(sKey As String) As Integer |
| 62 |
|
| 63 |
End Function |
| 64 |
End Class |