Skip to content

Commit cc8b77a

Browse files
authored
Merge pull request #5 from wipiano/allow-full-name-attributes
UnitOfAttribute のフルネームを記述した場合もコード生成の対象とする
2 parents bc78fd0 + 3b449e1 commit cc8b77a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/UnitGenerator/SourceGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
122122
{
123123
if (syntaxNode is StructDeclarationSyntax s && s.AttributeLists.Count > 0)
124124
{
125-
var attr = s.AttributeLists.SelectMany(x => x.Attributes).FirstOrDefault(x => x.Name.ToString() is "UnitOf" or "UnitOfAttribute");
125+
var attr = s.AttributeLists.SelectMany(x => x.Attributes).FirstOrDefault(x => x.Name.ToString() is "UnitOf" or "UnitOfAttribute" or "UnitGenerator.UnitOf" or "UnitGenerator.UnitOfAttribute");
126126
if (attr != null)
127127
{
128128
Targets.Add((s, attr));

0 commit comments

Comments
 (0)