diff --git a/README.md b/README.md index 20a27c4..3bb959f 100644 --- a/README.md +++ b/README.md @@ -17,54 +17,4 @@ Why the name? Because I wanted to contribute to the following [list](http://www. # Usage -Let's have following interface and class -```c# -public interface ICar { - -} - -public class Audi : ICar { - -} -``` - -## Class Attributes - -### Single interface - -If you want to add `Audi` as an implementation of `ICar` into `IServiceCollection` you just need to add `RegisterTransient`, `RegisterScoped` or `RegisterSingleton` attribute like - -```c# -[RegisterTransient] -public class Audi : ICar { - -} -``` - -and call -```c# -public void ConfigureServices(IServiceCollection services) { - services.AutoRegister(); -} -``` - -### Multiple interfaces - -If your class implements multiple interfaces, you can specify which one should be registered - -```c# -[RegisterTransient(typeof(IFuelConsumer)] -public class Audi : ICar, IFuelConsumer { - -} -``` - -## Factory method attributes - -If you want to add `Audi` as an implementation of `ICar` using static factory method, you can do following -```c# -[RegisterTransientFactory(typeof(ICar))] -public static Audi CreateAudi(IServiceProvider provider) { - return new Audi(); -} -``` +See [Wiki](https://github.com/davidkaya/Dependify/wiki/Usage) for usage instructions.