Skip to content

Commit 810c98f

Browse files
committed
cleanup
1 parent 56c0e32 commit 810c98f

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/Generators/DurableTaskSourceGenerator.cs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
197197
return null;
198198
}
199199

200-
string typeName = eventType.ToDisplayString();
201200
string eventName = eventType.Name;
202201

203202
if (attribute.ArgumentList?.Arguments.Count > 0)
@@ -210,7 +209,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
210209
}
211210
}
212211

213-
return new DurableEventTypeInfo(typeName, eventName, eventType);
212+
return new DurableEventTypeInfo(eventName, eventType);
214213
}
215214

216215
static DurableFunction? GetDurableFunction(GeneratorSyntaxContext context)
@@ -359,15 +358,11 @@ public static class GeneratedDurableTaskExtensions
359358
else
360359
{
361360
// ASP.NET Core-specific service registration methods
362-
// Only generate if there are actually tasks to register
363-
if (orchestrators.Count > 0 || activities.Count > 0 || entities.Count > 0)
364-
{
365-
AddRegistrationMethodForAllTasks(
366-
sourceBuilder,
367-
orchestrators,
368-
activities,
369-
entities);
370-
}
361+
AddRegistrationMethodForAllTasks(
362+
sourceBuilder,
363+
orchestrators,
364+
activities,
365+
entities);
371366
}
372367

373368
sourceBuilder.AppendLine(" }").AppendLine("}");
@@ -613,7 +608,7 @@ static string GetRenderedTypeExpression(ITypeSymbol? symbol)
613608

614609
class DurableEventTypeInfo
615610
{
616-
public DurableEventTypeInfo(string typeName, string eventName, ITypeSymbol eventType)
611+
public DurableEventTypeInfo(string eventName, ITypeSymbol eventType)
617612
{
618613
this.TypeName = GetRenderedTypeExpression(eventType);
619614
this.EventName = eventName;

0 commit comments

Comments
 (0)