public static IObjectContainer CreateContainer(SpecFlowPackagePackage package) { var container = new ObjectContainer(); container.RegisterInstanceAs(package); container.RegisterInstanceAs<IServiceProvider>(package); RegisterDefaults(container); BiDiContainerProvider.CurrentContainer = container; //TODO: avoid static field return container; }
public static IObjectContainer CreateContainer(SpecFlowPackagePackage package) { var container = new ObjectContainer(); container.RegisterInstanceAs(package); container.RegisterInstanceAs <IServiceProvider>(package); RegisterDefaults(container); BiDiContainerProvider.CurrentContainer = container; //TODO: avoid static field return(container); }