Questionable/QuestPathGenerator/RoslynElements/SatisfactionSupplyIdExtensions.cs
2024-08-17 21:01:46 +02:00

20 lines
732 B
C#

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)))));
}
}