docs icon indicating copy to clipboard operation
docs copied to clipboard

Dependency Injection Does Not Work

Open vikasjayaswal opened this issue 3 years ago • 0 comments

Type of issue

Code doesn't work

Description

Page: https://learn.microsoft.com/en-us/dotnet/orleans/host/client?pivots=orleans-7-0 Issue: Dependency Injection Section Error: error CS7036: There is no argument given that corresponds to the required parameter 'services' of 'ClientBuilder.ClientBuilder(IServiceCollection)'

Code that Doesn't work:

public ClusterClientHostedService(ILoggerProvider loggerProvider) { Client = new ClientBuilder() .UseLocalhostClustering() .ConfigureLogging(builder => builder.AddProvider(loggerProvider)) .Build(); }

[Enter feedback here]

Page URL

https://learn.microsoft.com/en-us/dotnet/orleans/tutorials-and-samples/tutorial-1

Content source URL

https://github.com/dotnet/docs/blob/main/docs/orleans/tutorials-and-samples/tutorial-1.md

Document Version Independent Id

b61f5003-091e-e698-982b-124316d7eba3

Article author

IEvangelist


Associated WorkItem - 169716

vikasjayaswal avatar Oct 03 '23 15:10 vikasjayaswal