mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-19 22:37:43 +01:00
Add "enum cloning" source generator
This commit is contained in:
parent
55eb7e41d8
commit
8bb6cdd8d6
14 changed files with 395 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
using System.Threading;
|
||||
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.Text;
|
||||
|
||||
namespace Dalamud.EnumGenerator.Tests.Utils;
|
||||
|
||||
public class TestAdditionalFile : AdditionalText
|
||||
{
|
||||
private readonly SourceText text;
|
||||
|
||||
public TestAdditionalFile(string path, string text)
|
||||
{
|
||||
Path = path;
|
||||
this.text = SourceText.From(text);
|
||||
}
|
||||
|
||||
public override SourceText GetText(CancellationToken cancellationToken = new()) => this.text;
|
||||
|
||||
public override string Path { get; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue