Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQ] Fluent Strongly Typed Context #56

Open
MhAllan opened this issue Dec 1, 2020 · 0 comments
Open

[FEATURE REQ] Fluent Strongly Typed Context #56

MhAllan opened this issue Dec 1, 2020 · 0 comments

Comments

@MhAllan
Copy link

MhAllan commented Dec 1, 2020

We have two problems with C# sdk
1- It is not strongly typed
2- It is unreadable, long methods and too much attributes

Suggestion suppose people to put Activities in interface or class. the the IDurableOrchestrationContext should be able to produce proxy for strongly typed methods

let's instead of

class ActivityClass
{
    [FunctionName(nameof(MethodName))]
    public Task<string> MethodName(int x)
}
//orchestrator
context.CallActivityWithRetryAsync<T>(nameof(ActivityClass.MethodName), retryOptions, input);

We should be able to do:

class ActivityClass
{
    public Task<string> MethodName(int x)
}
//orchestrator
context.ClientOf<AcitivyClass>().WithRetry(retryOptions).MethodName(10);

Will be great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants