Skip to content

Remove reduntant method calling#439

Merged
dluc merged 1 commit intomicrosoft:mainfrom
marcominerva:main
Apr 26, 2024
Merged

Remove reduntant method calling#439
dluc merged 1 commit intomicrosoft:mainfrom
marcominerva:main

Conversation

@marcominerva
Copy link
Copy Markdown
Contributor

Motivation and Context (Why the change? What's the scenario?)

In the following method:

public static IKernelMemoryBuilder WithAzureQueuesOrchestration(this IKernelMemoryBuilder builder, AzureQueuesConfig config)
{
config.Validate();
builder.Services.AddAzureQueuesOrchestration(config);
return builder;
}
}

There is a call to the AzureQueuesConfig.Validate method, but then the AddAzureQueuesOrchestration method is invoked, that in turns calls AzureQueuesConfig.Validate again:

So, it is possible to safely remove the first invocation.

@marcominerva marcominerva requested a review from dluc as a code owner April 26, 2024 09:50
@dluc dluc merged commit 4598fb2 into microsoft:main Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants