dependency-resolver

How can I add a Dependency that can be used as type parameter 'TImpl' for Castle Windsor?

僤鯓⒐⒋嵵緔 提交于 2020-01-06 15:32:51
问题 I was getting this runtime exception with a particular URL: " Missing dependency. Component NRBQ.Web.Controllers.DeliveryController has a dependency on SeaStore.Data.Legacy.Interfaces.INRBQDeliveryRepository, which could not be resolved. Make sure the dependency is correctly registered in the container as a service, or provided as inline argument." ExceptionType: "Castle.MicroKernel.Resolvers.DependencyResolverException " ...so I added this code (based on existing code that works) to the IOC

How would one write a resolve.alias function for gulp?

戏子无情 提交于 2019-12-25 08:48:09
问题 I'm using Gulp and Tape to run my test suite instead of Webpack and Tape. The reason is for speed and simplicity. Gulp functional task approach instead of testing while bundling. Now, in order for it to work I need to resolve a file path for an import. In webpack I would use: resolve: { alias: { 'machingWord' : __dirname } } So something like this: https://www.npmjs.com/package/gulp-resolve, but not as manual. Want the task to be able to resolve import '...' as it tests it. Is there a way for

Simple Injector registration problem in SignalR

主宰稳场 提交于 2019-12-23 07:03:08
问题 I set DI in my Controller as shown below and tied to register IHubContext as it seen on Controller: public class DemoController : Controller { private IHubContext<DemoHub> context; public DemoController(IHubContext<DemoHub> context) { this.context = context; } } Global.asax: protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); BundleConfig.RegisterBundles(BundleTable

Using ninject dependecyResolver for both MVC and WebAPI

陌路散爱 提交于 2019-12-18 13:33:06
问题 I have created and MVC 4 web application and decided to use web api in this app. I'm using ninject dependency resolver for MVC web app. and now I want to use this ninject dependency resolver for web api. but the problem raise here mvc IDependencyResolver namespace is: using System.Web.Mvc and web api IDependencyResolver is using System.Web.Http.Dependencies so how can I solve this issue? finally I want something like this: // Use the container and the NinjectDependencyResolver as //

Autofac - The request lifetime scope cannot be created because the HttpContext is not available - due to async code?

浪尽此生 提交于 2019-12-17 16:34:22
问题 Short Question: Same as this unanswered problem Long Question: I just ported some code over from an MVC 4 + Web Api solution that was using Autofac into my new solution which is also using Autofac but only with Web Api 2 (no MVC 5.1 project, just a web api). In my previous solution I had MVC4 and Web Api so I had 2 Bootstrapper.cs files, one for each. I copied over just the Web Api bootstrapper for the new project. Now I have 2 other projects in the new solution that need to pull a dependency

Why won't Groovy/Grape resolve artifacts from Maven Central?

笑着哭i 提交于 2019-12-10 17:56:17
问题 With a fresh download of Groovy 2.1.9, I create: // Test.Groovy @Grab('commons-io:commons-io:1.2') import org.apache.commons.io.CopyUtils println "Resolved!" Then I try running $ ./groovy-2.1.9/bin/groovy Test.groovy which fails with General error during conversion: Error grabbing Grapes -- [download failed: commons-io#commons-io;1.2!commons-io.jar] The artifact is listed in maven central, downloadable here For what it's worth, various local files are created in: ~/.groovy/grapes/commons-io

How does Maven resolve SNAPSHOT dependencies when there are SNAPSHOTS with different timestamps in the local and the remote repository?

ぐ巨炮叔叔 提交于 2019-11-30 01:13:18
Say I have a project A in development that depends on project B - which is also currently in development and not yet released. So, in A 's POM file, I have the following section: <dependency> <groupId>com.example</groupId> <artifactId>project-b</artifactId> <version>1.0.0-SNAPSHOT</version> <\dependency> At work, we have a remote repo (Nexus) and a CI box (running Jenkins). When my colleague makes a change to B and commits to SVN, Jenkins will pick that change up, compile it and put it into the remote repo. Around that time, I might open B locally, make a change, compile it and install it into

How does Maven resolve SNAPSHOT dependencies when there are SNAPSHOTS with different timestamps in the local and the remote repository?

时光总嘲笑我的痴心妄想 提交于 2019-11-28 21:21:44
问题 Say I have a project A in development that depends on project B - which is also currently in development and not yet released. So, in A 's POM file, I have the following section: <dependency> <groupId>com.example</groupId> <artifactId>project-b</artifactId> <version>1.0.0-SNAPSHOT</version> <\dependency> At work, we have a remote repo (Nexus) and a CI box (running Jenkins). When my colleague makes a change to B and commits to SVN, Jenkins will pick that change up, compile it and put it into

Autofac - The request lifetime scope cannot be created because the HttpContext is not available - due to async code?

回眸只為那壹抹淺笑 提交于 2019-11-27 23:36:18
Short Question: Same as this unanswered problem Long Question: I just ported some code over from an MVC 4 + Web Api solution that was using Autofac into my new solution which is also using Autofac but only with Web Api 2 (no MVC 5.1 project, just a web api). In my previous solution I had MVC4 and Web Api so I had 2 Bootstrapper.cs files, one for each. I copied over just the Web Api bootstrapper for the new project. Now I have 2 other projects in the new solution that need to pull a dependency. Lets just assume I have to use DependencyResolver.Current.GetService<T>() despite it being an anti

Wait for Angular 2 to load/resolve model before rendering view/template

十年热恋 提交于 2019-11-26 12:15:31
问题 In Angular 1.x, UI-Router was my primary tool for this. By returning a promise for \"resolve\" values, the router would simply wait for the promise to complete before rendering directives. Alternately, in Angular 1.x, a null object will not crash a template - so if I don\'t mind a temporarily incomplete render, I can just use $digest to render after the promise.then() populates an initially empty model object. Of the two approaches, if possible I\'d prefer to wait to load the view, and cancel