ScriptInfos
Represent a script.cs. This script can only contains 1 class.
uint UID; // unique id of this script
string FilePath; // file path
string Namespace; // namespace of the class in this script
string ClassName; // the class in this script
PrebuildAttribute Prebuild; // the prebuild attribute defined for this script
List<System.Reflection.MethodInfo> Methods; // method list
List<System.Reflection.FieldInfo> Fields; // fields list
public string CacheFilePath => Prebuild.ExternalFilePath; // alias
public bool IsCacheGenerator => CacheFilePath.Length > 0; // write in external file
List<ScriptInfos> References; // references -> see advanced section
string FullName {
get { return Namespace + "." + ClassName; }
}
int RegionStartAt = -1; // position of region in script
public int HeaderSize = 1; // #region or #region -> class line for external
public List<string> Content; // script file split by lines
// append content
public void WriteContent(string line) {
...
Content.Insert(RegionStartAt, line);
}
// region content only
public List<string> GetRegionContent() {
...
}
// using lines only
public List<string> GetUsings() {
...
}