Azure / Azure/azure-functions-dotnet-extensions

[FEATURE REQ] Fluent Strongly Typed Context

Open
#56 0 comments 0 reactions 0 assignees View on GitHub
Needs: Triage (Functions)
Dominant language
C#
Stars
81
Forks
50
PR merge metrics
No merged PRs in 30d

Description

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

```csharp
class ActivityClass
{
[FunctionName(nameof(MethodName))]
public Task MethodName(int x)
}
//orchestrator
context.CallActivityWithRetryAsync(nameof(ActivityClass.MethodName), retryOptions, input);
```
We should be able to do:
```csharp
class ActivityClass
{
public Task MethodName(int x)
}
//orchestrator
context.ClientOf().WithRetry(retryOptions).MethodName(10);
```

Will be great

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading IDurableOrchestrationContext and the existing CallActivityWithRetryAsync usage shown in the issue. Identify how activities are currently represented and invoked, then define the scope and completion criteria for a strongly typed ClientOf proxy with retry support and method invocation matching the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.