Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-Maes authored Jan 11, 2024
1 parent 38060c0 commit 7fca16b
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,34 +69,8 @@ builder.Services
.ForKeyedServices()
.WithOptions(Configuration) //Pass builder.Configuration here
.Register();

// Register types and options from referenced project
builder.Services
.AddAutowiringForAssembly(Assembly.GetAssembly(typeof(IInterface)))
.WithOptions(Configuration)
.Register();
```

**Example with ServiceCollectionExtensions**

```csharp
// Hosting project:
var configuration = builder.Configuration;

builder.Services.AddSecondProject(configuration);

// In other project
public static IServiceCollection AddSecondProject(this IServiceCollection services, IConfiguration configuration)
{
services.AddAutowiringForAssembly(Assembly.GetExecutingAssembly())
.WithOptions(configuration)
.Register();

return services;
}
```


## Decorate your services:

### Basic usage
Expand Down

0 comments on commit 7fca16b

Please sign in to comment.