mirror of
https://github.com/adusak/Dependify.git
synced 2026-01-14 21:23:44 +01:00
Updated factory method documentation
This commit is contained in:
@@ -61,10 +61,10 @@ public class Audi : ICar, IFuelConsumer {
|
||||
|
||||
## Factory method attributes
|
||||
|
||||
If you want to add `Audi` as an implementation of `ICar` using factory method, you can do following
|
||||
If you want to add `Audi` as an implementation of `ICar` using static factory method, you can do following
|
||||
```c#
|
||||
[RegisterTransientFactory(typeof(ICar))]
|
||||
public Audi CreateAudi(IServiceProvider provider) {
|
||||
public static Audi CreateAudi(IServiceProvider provider) {
|
||||
return new Audi();
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user