This repository has been archived by the owner on Dec 4, 2022. It is now read-only.
/
LuaWriterSettings.vb
102 lines (92 loc) · 2.46 KB
/
LuaWriterSettings.vb
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Imports Microsoft.VisualBasic
Imports System
Namespace System.Lua
Public Class LuaWriterSettings
Private Const defaultIndentChars As String = " "
Public Sub New()
Me.TableOnNewLine = False
Me.TableFieldOnNewLine = True
Me.EndTableOnNewLine = True
Me.Indent = True
Me.IndentChars = defaultIndentChars
Me.NewLineChars = Environment.NewLine
Me.ValidateContent = True
End Sub
Private privateIndent As Boolean
Public Property Indent() As Boolean
Get
Return privateIndent
End Get
Set(ByVal value As Boolean)
privateIndent = value
End Set
End Property
Private privateIndentChars As String
Public Property IndentChars() As String
Get
Return privateIndentChars
End Get
Set(ByVal value As String)
privateIndentChars = value
End Set
End Property
Private privateNewLineChars As String
Public Property NewLineChars() As String
Get
Return privateNewLineChars
End Get
Set(ByVal value As String)
privateNewLineChars = value
End Set
End Property
''' <summary>
''' Gets or sets a value indicating whether to start tables on a new line.
''' </summary>
Private privateTableOnNewLine As Boolean
Public Property TableOnNewLine() As Boolean
Get
Return privateTableOnNewLine
End Get
Set(ByVal value As Boolean)
privateTableOnNewLine = value
End Set
End Property
''' <summary>
''' Gets or sets a value indicating whether a table field should be on a new line.
''' </summary>
Private privateTableFieldOnNewLine As Boolean
Public Property TableFieldOnNewLine() As Boolean
Get
Return privateTableFieldOnNewLine
End Get
Set(ByVal value As Boolean)
privateTableFieldOnNewLine = value
End Set
End Property
''' <summary>
''' Gets or sets a value indicating whether to close tables on a new line.
''' </summary>
Private privateEndTableOnNewLine As Boolean
Public Property EndTableOnNewLine() As Boolean
Get
Return privateEndTableOnNewLine
End Get
Set(ByVal value As Boolean)
privateEndTableOnNewLine = value
End Set
End Property
''' <summary>
''' Gets or sets a value indicating whether content should be validated and only valid Lua
''' code emitted.
''' </summary>
Private privateValidateContent As Boolean
Public Property ValidateContent() As Boolean
Get
Return privateValidateContent
End Get
Set(ByVal value As Boolean)
privateValidateContent = value
End Set
End Property
End Class
End Namespace