-
Notifications
You must be signed in to change notification settings - Fork 2
/
AppConfig.cs
118 lines (99 loc) · 3.46 KB
/
AppConfig.cs
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
//
// DocGen Source
//
// Copyright (c) 2019 ADAM MAJCHEREK ALL RIGHTS RESERVED
//
using System;
using JEM.Configuration;
namespace DocGen
{
/// <summary>
/// DocGen main configuration file.
/// </summary>
[Serializable]
public class AppConfig
{
/// <summary>
/// Name of the config file.
/// </summary>
public const string FileName = "appcfg";
/// <summary>
/// If true, every DocGen action will be printed.
/// </summary>
public bool LogProcessing = false;
/// <summary>
/// Path to README.md file that will be copied after Doc Gen.
/// </summary>
public string ReadMe = "style/README.md";
/// <summary>
/// Name of tree in _sidebar.md.
/// </summary>
public string TreeTitleName = "DocGen Powered by Overmodded.DocGenerator";
/// <summary>
/// Name of _sidebar.md file.
/// </summary>
public string SidebarName = "_sidebar.md";
/// <summary>
/// Markdown content to insert before DocGen content.
/// </summary>
public string SidebarBefore = "style/_sidebarBefore.md";
/// <summary>
/// Markdown content to insert after DocGen content.
/// </summary>
public string SidebarEnd = "style/_sidebarEnd.md";
/// <summary>
/// Markdown content to insert at the end of every file.
/// </summary>
public string FileEnd = "style/_fileEnd.md";
/// <summary>
/// Directory to assemblies to generate from.
/// </summary>
public string AssembliesDir = "Assemblies";
/// <summary>
/// Name of .txt files that tells from what files DocGen should generate.
/// </summary>
public string AssembliesTargetsFile = "targets.txt";
/// <summary>
/// Generated content directory path.
/// </summary>
public string DeployDir = "Deploy";
/// <summary>
/// Generated content directory path to insert in sidebar.
/// </summary>
public string DeploySidebarPath = "_deploy";
/// <summary>
/// Directory to example files.
/// </summary>
public string ExamplesDir = "Examples";
/// <summary>
/// Array of namespaces that are disallowed by DocGen to mention in any aspect in files.
/// </summary>
public string[] DisallowedNamespaces = {
"UnityEngine"
};
/// <summary>
/// List of types (classes) that are disallowed to mention.
/// NOTE: Currently only methods uses this field (MethodInfo.DeclaringType)
/// </summary>
public string[] DisallowedDeclarationTypes = {
typeof(object).FullName
};
/// <summary>
/// Array of types that are not allowed by DocGen to mention.
/// </summary>
public string[] DisallowedTypes = {
typeof(object).FullName
};
/// <summary>
/// Load configuration.
/// </summary>
internal static void LoadConfiguration()
{
Loaded = ConfigurationFactory.LoadData<AppConfig>(ConfigurationFactory.ResolveFilePath(FileName));
}
/// <summary>
/// Loaded application configuration data.
/// </summary>
internal static AppConfig Loaded { get; private set; }
}
}