forked from TiLied/CSharpToJavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCSTOJSOptions.cs
More file actions
96 lines (87 loc) · 2.88 KB
/
CSTOJSOptions.cs
File metadata and controls
96 lines (87 loc) · 2.88 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
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
using CSharpToJavaScript.Utils;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace CSharpToJavaScript
{
/// <summary>
/// Options for <see cref="CSTOJS" />.
/// </summary>
public record class CSTOJSOptions
{
/// <summary>
/// Debug. When set to true prints additional info to console, cs lines to js file.
/// </summary>
/// <value>
/// Default: <c>false</c>
/// </value>
public bool Debug { get; set; } = false;
/// <summary>
/// Self-explanatory, Disable Console Colors.
/// </summary>
/// <value>
/// Default: <c>false</c>
/// </value>
public bool DisableConsoleColors { get; set; } = false;
/// <summary>
/// Self-explanatory, Disable Console Output.
/// </summary>
/// <value>
/// Default: <c>false</c>
/// </value>
public bool DisableConsoleOutput { get; set; } = false;
/// <summary>
/// Output path for javascript file/files.
/// </summary>
/// <value>
/// Default: <see cref="Directory.GetCurrentDirectory()" />
/// </value>
public string OutPutPath { get; set; } = Directory.GetCurrentDirectory();
/// <summary>
/// Self-explanatory, Use var over let.
/// </summary>
/// <value>
/// Default: <c>false</c>
/// </value>
public bool UseVarOverLet { get; set; } = false;
/// <summary>
/// List of custom names to convert.
/// </summary>
/// <remarks>Example: <c>new List<Tuple<string, string>>(){new Tuple<string, string>("Console", "console")}</c>. Will convert "Console" to "console".</remarks>
/// <value>
/// Default: <c>new()</c>
/// </value>
public List<Tuple<string, string>> CustomCSNamesToJS { get; set; } = new();
/// <summary>
/// List of types to convert.
/// </summary>
/// <remarks>Example: Similar to <see cref="CSTOJSOptions.CustomCSNamesToJS" />, but convers the type. You need to use <see cref="ToAttribute" />.</remarks>
/// <value>
/// Default: <c>new()</c>
/// </value>
public List<Type> CustomCSTypesToJS { get; set; } = new();
/// <summary>
/// Add a <see cref="StringBuilder" /> to the front of a javascript file.
/// </summary>
/// <remarks>Note! When passing a folder path to <see cref="CSTOJS.GenerateOneAsync(string, string?)" /> applies to every file!</remarks>
/// <value>
/// Default: <c>new()</c>
/// </value>
public StringBuilder AddSBInFront { get; set; } = new();
/// <summary>
/// Add a <see cref="StringBuilder" /> to the end of a javascript file.
/// </summary>
/// <remarks>Note! When passing a folder path to <see cref="CSTOJS.GenerateOneAsync(string, string?)" /> applies to every file!</remarks>
/// <value>
/// Default: <c>new()</c>
/// </value>
public StringBuilder AddSBInEnd { get; set; } = new();
/// <summary>
/// Creates new default options. See <see cref="CSTOJSOptions" />.
/// </summary>
public CSTOJSOptions()
{
}
}
}