godot/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/Constants.cs

24 lines
746 B
C#

using System.IO;
using System.Reflection;
namespace Godot.SourceGenerators.Tests;
public static class Constants
{
public static Assembly GodotSharpAssembly => typeof(GodotObject).Assembly;
public static string ExecutingAssemblyPath { get; }
public static string SourceFolderPath { get; }
public static string GeneratedSourceFolderPath { get; }
static Constants()
{
ExecutingAssemblyPath = Path.GetFullPath(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location!)!);
var testDataPath = Path.Combine(ExecutingAssemblyPath, "TestData");
SourceFolderPath = Path.Combine(testDataPath, "Sources");
GeneratedSourceFolderPath = Path.Combine(testDataPath, "GeneratedSources");
}
}