Skip to content

Commit b310037

Browse files
kshyjuCopilot
andcommitted
Fix build errors: remove duplicate base class members, update renamed APIs
- Remove duplicate OutputLog, WriteInputAsync, CreateTestTimeoutCts, etc. from ConsoleAppSamplesValidation (already in SamplesValidationBase) - Update AddFanInEdge -> AddFanInBarrierEdge in workflow samples - Update GetNewSessionAsync -> CreateSessionAsync in workflow samples - Update SourceId -> ExecutorId (obsolete) in workflow samples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent cd8344d commit b310037

10 files changed

Lines changed: 13 additions & 374 deletions

File tree

dotnet/samples/04-hosting/DurableWorkflows/AzureFunctions/02_ConcurrentWorkflow/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
Workflow workflow = new WorkflowBuilder(parseQuestion)
3535
.WithName("ExpertReview")
3636
.AddFanOutEdge(parseQuestion, [physicist, chemist])
37-
.AddFanInEdge([physicist, chemist], aggregator)
37+
.AddFanInBarrierEdge([physicist, chemist], aggregator)
3838
.Build();
3939

4040
using IHost app = FunctionsApplication

dotnet/samples/04-hosting/DurableWorkflows/AzureFunctions/03_WorkflowHITL/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
.AddEdge(createRequest, managerApproval)
4141
.AddEdge(managerApproval, prepareFinanceReview)
4242
.AddFanOutEdge(prepareFinanceReview, [budgetApproval, complianceApproval])
43-
.AddFanInEdge([budgetApproval, complianceApproval], reimburse)
43+
.AddFanInBarrierEdge([budgetApproval, complianceApproval], reimburse)
4444
.Build();
4545

4646
using IHost app = FunctionsApplication

dotnet/samples/04-hosting/DurableWorkflows/ConsoleApps/02_ConcurrentWorkflow/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
Workflow workflow = new WorkflowBuilder(parseQuestion)
5757
.WithName("ExpertReview")
5858
.AddFanOutEdge(parseQuestion, [physicist, chemist])
59-
.AddFanInEdge([physicist, chemist], aggregator)
59+
.AddFanInBarrierEdge([physicist, chemist], aggregator)
6060
.Build();
6161

6262
// Configure and start the host

dotnet/samples/04-hosting/DurableWorkflows/ConsoleApps/04_WorkflowAndAgents/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
Workflow expertTeamWorkflow = new WorkflowBuilder(questionParser)
5555
.WithName("ExpertTeamReview")
5656
.AddFanOutEdge(questionParser, [biologist, physicist])
57-
.AddFanInEdge([biologist, physicist], responseAggregator)
57+
.AddFanInBarrierEdge([biologist, physicist], responseAggregator)
5858
.Build();
5959

6060
Workflow chemistryWorkflow = new WorkflowBuilder(questionParser)
@@ -96,12 +96,12 @@
9696
Console.WriteLine("\n═══ DEMO 1: Direct Agent Conversation ═══\n");
9797

9898
AIAgent biologistProxy = services.GetRequiredKeyedService<AIAgent>("Biologist");
99-
AgentSession session = await biologistProxy.GetNewSessionAsync();
99+
AgentSession session = await biologistProxy.CreateSessionAsync();
100100
AgentResponse response = await biologistProxy.RunAsync("What is photosynthesis?", session);
101101
Console.WriteLine($"🧬 Biologist: {response.Text}\n");
102102

103103
AIAgent chemistProxy = services.GetRequiredKeyedService<AIAgent>("Chemist");
104-
session = await chemistProxy.GetNewSessionAsync();
104+
session = await chemistProxy.CreateSessionAsync();
105105
response = await chemistProxy.RunAsync("What is a chemical bond?", session);
106106
Console.WriteLine($"🧪 Chemist: {response.Text}\n");
107107

dotnet/samples/04-hosting/DurableWorkflows/ConsoleApps/05_WorkflowEvents/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static async Task RunWorkflowWithStreamingAsync(string orderId, Workflow workflo
116116
break;
117117

118118
case WorkflowOutputEvent e:
119-
WriteColored($" [Output] {e.SourceId}", ConsoleColor.DarkGray);
119+
WriteColored($" [Output] {e.ExecutorId}", ConsoleColor.DarkGray);
120120
break;
121121

122122
// Workflow completion

dotnet/samples/04-hosting/DurableWorkflows/ConsoleApps/06_WorkflowSharedState/Executors.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft. All rights reserved.
1+
// Copyright (c) Microsoft. All rights reserved.
22

33
using Microsoft.Agents.AI.Workflows;
44

dotnet/samples/04-hosting/DurableWorkflows/ConsoleApps/06_WorkflowSharedState/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
switch (evt)
9494
{
9595
case WorkflowOutputEvent e:
96-
Console.WriteLine($" [Output] {e.SourceId}: {e.Data}");
96+
Console.WriteLine($" [Output] {e.ExecutorId}: {e.Data}");
9797
break;
9898

9999
case DurableWorkflowCompletedEvent e:

dotnet/samples/04-hosting/DurableWorkflows/ConsoleApps/08_WorkflowHITL/Executors.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft. All rights reserved.
1+
// Copyright (c) Microsoft. All rights reserved.
22

33
using Microsoft.Agents.AI.Workflows;
44

dotnet/samples/04-hosting/DurableWorkflows/ConsoleApps/08_WorkflowHITL/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft. All rights reserved.
1+
// Copyright (c) Microsoft. All rights reserved.
22

33
// This sample demonstrates a Human-in-the-Loop (HITL) workflow using Durable Tasks.
44
//
@@ -43,7 +43,7 @@
4343
.AddEdge(createRequest, managerApproval)
4444
.AddEdge(managerApproval, prepareFinanceReview)
4545
.AddFanOutEdge(prepareFinanceReview, [budgetApproval, complianceApproval])
46-
.AddFanInEdge([budgetApproval, complianceApproval], reimburse)
46+
.AddFanInBarrierEdge([budgetApproval, complianceApproval], reimburse)
4747
.Build();
4848

4949
IHost host = Host.CreateDefaultBuilder(args)

0 commit comments

Comments
 (0)