forked from Misaki/GhostEngine
Update editor
This commit is contained in:
35
Ghost.Editor/Models/LaunchArguments.cs
Normal file
35
Ghost.Editor/Models/LaunchArguments.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
namespace Ghost.Editor.Models;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
internal sealed class ArgumentNameAttribute : Attribute
|
||||
{
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public ArgumentNameAttribute(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
}
|
||||
|
||||
internal class LaunchArguments
|
||||
{
|
||||
[ArgumentName("project-path")]
|
||||
public string ProjectPath
|
||||
{
|
||||
get; set;
|
||||
} = string.Empty;
|
||||
|
||||
[ArgumentName("project-name")]
|
||||
public string ProjectName
|
||||
{
|
||||
get; set;
|
||||
} = string.Empty;
|
||||
|
||||
public bool IsValid()
|
||||
{
|
||||
return Directory.Exists(ProjectPath) && !string.IsNullOrWhiteSpace(ProjectName);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user