Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pengweiqhca committed Jan 18, 2025
2 parents 86ca7a5 + 4d5954e commit f4385f0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Use `Microsoft.Extensions.DependencyInjection` to resolve xUnit test cases

> xunit v2 please use [v2](/pengweiqhca/Xunit.DependencyInjection/tree/v2) branch, Xunit.DependencyInjection.StaFact and Xunit.DependencyInjection.xRetry depend on upstream packages, waiting for update.
> XUnit v2 users: please use [v2](https://github.com/pengweiqhca/Xunit.DependencyInjection/tree/v2) branch, Xunit.DependencyInjection.StaFact and Xunit.DependencyInjection.xRetry depend on upstream packages, waiting for update.
## How to use

Expand Down Expand Up @@ -122,6 +122,16 @@ public class Startup
}
```

* `BuildHost` method

> **NOTE**: If this method signature is not found, the host is built by simply calling `hostBuilder.Build();`.
```C#
public class Startup
{
public IHost BuildHost([IHostBuilder hostBuilder]) { return hostBuilder.Build(); }
}
```

* `Configure` method

Anything defined in `ConfigureServices`, can be specified in the `Configure` method signature. These services are injected if they're available.
Expand Down

0 comments on commit f4385f0

Please sign in to comment.