Questionable/QuestPathGenerator/RoslynElements/SatisfactionSupplyIdExtensions.cs

20 lines
732 B
C#
Raw Normal View History

2024-08-17 18:59:42 +00:00
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Questionable.Model.Questing;
using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
using static Questionable.QuestPathGenerator.RoslynShortcuts;
namespace Questionable.QuestPathGenerator.RoslynElements;
internal static class SatisfactionSupplyIdExtensions
{
public static ExpressionSyntax ToExpressionSyntax(this SatisfactionSupplyNpcId satisfactionSupplyNpcId)
{
return ObjectCreationExpression(
IdentifierName(nameof(SatisfactionSupplyNpcId)))
.WithArgumentList(
ArgumentList(
SingletonSeparatedList(
Argument(LiteralValue(satisfactionSupplyNpcId.Value)))));
}
}