forked from PeterWaher/IoTGateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCSharpExportState.cs
More file actions
55 lines (49 loc) · 1.17 KB
/
CSharpExportState.cs
File metadata and controls
55 lines (49 loc) · 1.17 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
using System;
using System.Collections.Generic;
using System.Text;
namespace Waher.Content.Asn1
{
/// <summary>
/// C# export state
/// </summary>
public class CSharpExportState
{
/// <summary>
/// C# export settings.
/// </summary>
public CSharpExportSettings Settings;
internal int ExportingValuesIndent = 0;
internal bool ExportingValues = false;
internal string CurrentNamespace = null;
/// <summary>
/// C# export state
/// </summary>
/// <param name="Settings">Export settings.</param>
public CSharpExportState(CSharpExportSettings Settings)
{
this.Settings = Settings;
}
/// <summary>
/// Close pending actions
/// </summary>
/// <param name="Output">C# Output</param>
public void ClosePending(StringBuilder Output)
{
this.ClosePendingValues(Output);
}
/// <summary>
/// Close pending value actions
/// </summary>
/// <param name="Output">C# Output</param>
public void ClosePendingValues(StringBuilder Output)
{
if (this.ExportingValues)
{
this.ExportingValues = false;
Output.Append(Model.Asn1Node.Tabs(this.ExportingValuesIndent - 1));
Output.AppendLine("}");
Output.AppendLine();
}
}
}
}