-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
P2bugSomething isn't workingSomething isn't workingsource generatorsIssue relates to the source generator project(s)Issue relates to the source generator project(s)
Description
If the "name" value of the [DurableTask(name)] attribute isn't a valid C# identifier, the source generator will still generate a method using this invalid name.
For example, defining an activity like this:
[DurableTask("Foo.Bar")]
class FooBarActivity : TaskActivityBase<object, object>
{
// ...
}Results in generated output like this, which doesn't compile:
public static Task<object> CallFoo.BarAsync(this TaskOrchestrationContext ctx, object input, TaskOptions? options = null)
{
return ctx.CallActivityAsync<object>("Foo.Bar", input, options);
}Instead, the method name should be normalized into something valid, like this:
public static Task<object> CallFooBarAsync(this TaskOrchestrationContext ctx, object input, TaskOptions? options = null)
{
return ctx.CallActivityAsync<object>("Foo.Bar", input, options);
}Copilot
Metadata
Metadata
Assignees
Labels
P2bugSomething isn't workingSomething isn't workingsource generatorsIssue relates to the source generator project(s)Issue relates to the source generator project(s)