/// <summary> /// Starts this instance. /// </summary> public void Start() { BaseNinjectServiceHostFactory.SetKernel(this.kernel); #if !MONO NinjectDataServiceHostFactory.SetKernel(this.kernel); #endif this.RegisterCustomBehavior(); }
public void MapDataServiceRoutes(RouteCollection routes) { var dataServiceHostFactory = new NinjectDataServiceHostFactory(); var serviceRoute = new ServiceRoute(ODataRoutePath, dataServiceHostFactory, typeof(PackageDataService)) { Defaults = RouteNames.PackageFeedRouteValues, Constraints = RouteNames.PackageFeedRouteValues }; routes.Add(RouteNames.Packages.Feed, serviceRoute); }