-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMod.cs
More file actions
21 lines (19 loc) · 656 Bytes
/
Copy pathMod.cs
File metadata and controls
21 lines (19 loc) · 656 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
namespace BTD6Helper;
public readonly struct Mod(string? name, string? version, string? author, string assembly)
{
private string? Name { get; } = name;
private string? Author { get; } = author;
private string? Version { get; } = version;
private string Assembly { get; } = assembly;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override string ToString()
{
var sb = new StringBuilder();
sb.Append(Name ?? Assembly);
if (Version != null)
sb.Append($" v{Version}");
if (Author != null)
sb.Append($" by {Author}");
return sb.ToString();
}
}