Dependency on Autofac

Sep 6, 2014 at 3:41 PM
Why does Tweetinvi has a dependency on Autofac? Does the core relies on Autofac or is it possible to separate the functionality depending on Autofac and make it pluggable?
Sep 7, 2014 at 3:14 AM
Edited Sep 7, 2014 at 3:14 AM
Hi there,

The core of Tweetinvi relies on Autofac. Tweetinvi relies on Injection of Control and Dependency Inversion and it is using Autofac for this.

Though, if you do not want to reference Autofac and prefer any other library for dependency injection (in constructors) please feel free to implement the ITweetinviContainer interface. You will then just have to change the class called TweetinviContainer where a new ITweetinviContainer is created by invoking _container = new AutofacContainer();

Hope this helps you understand why Tweetinvi needs Autofac and how to use another container.

Kind Regards,
Marked as answer by linvi on 9/11/2014 at 5:05 AM