-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFvError.vb
More file actions
68 lines (58 loc) · 1.71 KB
/
FvError.vb
File metadata and controls
68 lines (58 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Imports System.Text
Public Class FvError
Public Enum ErrorSource
Validation
Exception
End Enum
Private _source As ErrorSource = ErrorSource.Validation
Public Property Source() As ErrorSource
Get
Return _source
End Get
Set(ByVal value As ErrorSource)
_source = value
End Set
End Property
Private _message As String
Public Property Message() As String
Get
Return _message
End Get
Private Set(ByVal value As String)
_message = value
End Set
End Property
Private _propertyChain As FvPropertyChain
Public Property PropertyChain() As FvPropertyChain
Get
Return _propertyChain
End Get
Private Set(ByVal value As FvPropertyChain)
_propertyChain = value
End Set
End Property
Public ReadOnly Property OriginalPath() As String
Get
Return PropertyChain.OriginalPath
End Get
End Property
Public ReadOnly Property Path() As String
Get
Return PropertyChain.Path
End Get
End Property
Public ReadOnly Property OriginalContent()
Get
Return Message.Replace("$propertyName$", OriginalPath)
End Get
End Property
Public ReadOnly Property Content() As String
Get
Return Message.Replace("$propertyName$", Path)
End Get
End Property
Public Sub New(ByVal message As String, ByVal propertyChain As FvPropertyChain)
Me.Message = message
Me.PropertyChain = New FvPropertyChain(propertyChain)
End Sub
End Class