Implement input config loading and saving.

This commit is contained in:
2022-11-15 17:26:00 +08:00
parent f82e0ce9ef
commit d2b2834a60
4 changed files with 59 additions and 2 deletions

View File

@@ -168,5 +168,19 @@ namespace Cryville.Common {
}
return result;
}
/// <summary>
/// Gets the namespace qualified name of a type.
/// </summary>
/// <param name="type">The type.</param>
/// <returns>The namespace qualified name of the class.</returns>
public static string GetNamespaceQualifiedName(Type type) {
string result = type.Namespace + "." + type.Name;
var typeargs = type.GetGenericArguments();
if (typeargs.Length > 0) {
result = string.Format("{0}[{1}]", result, string.Join(",", from a in typeargs select GetNamespaceQualifiedName(a)));
}
return result;
}
}
}