Files
InterfaceGenerator/Speckle.InterfaceGenerator/AttributeDataExtensions.cs
T
Adam Hathcock 1920ade855 folder rename
2024-05-17 11:49:54 +01:00

13 lines
381 B
C#

using System.Linq;
using Microsoft.CodeAnalysis;
namespace Speckle.InterfaceGenerator;
internal static class AttributeDataExtensions
{
public static string? GetNamedParamValue(this AttributeData attributeData, string paramName)
{
var pair = attributeData.NamedArguments.FirstOrDefault(x => x.Key == paramName);
return pair.Value.Value?.ToString();
}
}