Skip to content
#

dependency-injection

Here are 2,479 public repositories matching this topic...

liaodq
liaodq commented Sep 3, 2019

doInterceptions方法里有对Warehouse.interceptors的判断

if (null != Warehouse.interceptors && Warehouse.interceptors.size() > 0){
      checkInterceptorsInitStatus();
      ......
}

Warehouse.interceptors是在InterceptorServiceImpl#init里新线程里完成添加的

         IInterceptor iInterceptor = interceptorClass.getConstructor().newInstance();
         iInterceptor.init(context);
bug
rogpeppe
rogpeppe commented May 25, 2019

One of the specific advantages of the wire approach is that it generates code that's relatively readable compared to reflect-based equivalents. When wire.Value is used on a small by-value type, there's no need for the value to live in a global variable - the expression could instead be used literally inside the generated code, which would make the code easier to follow, and more similar to the c

loopback-next
vitorhugomagalhaes
vitorhugomagalhaes commented May 29, 2017

Hi,

I've tried to use the new 4.0.2 release but there were some API changes that I cannot understand. Some of them cause the app to crash.

Here goes a list of issues:

TyphoonAssemblyActivator was deprecated.

Some of our assemblies are not listed in the plist file and thus, we have the following code to manually activate them.

@interface FactoryAssembly : TyphoonAssembly

goddanao
goddanao commented Apr 16, 2020

Is your feature request related to a problem? Please describe.
I got few migrations each referring a different connection. migrate:fresh, migrate:refresh doesn't handle this scenario since they operate on the default connection or in the specific connection passed via --database param.

Describe the solution you'd like
The simplest solution can be to process only migrations that has th

PHP-DI
sridesmet
sridesmet commented Sep 18, 2018

I am puzzled how to use the enableCompilation() function after reading through the documentation. The documentation states you only have to call enableCompilation(), but for optimum speed you don't want to add the definitions after reading in the compilation file?

Isn't it an if-else story? E.g

if (getenv('ENABLECOMPILATION') == 'true') {
        $builder->enableCompilation(__DIR__ . '
andrus
andrus commented May 25, 2017
BQCoreModule.extend(binder)
                .addCommand(cli -> CommandOutcome.suceeded());

The code above results in the an exception below, because command lambda has no metadata. At the minimum we need to pre-validate this case and throw something more user-friendly. And maybe extend the API to allow supplying CommandMetadata to the nameless lambda.

com.google.inject.CreationE

xenoterracide
xenoterracide commented Jan 15, 2020

title might be wrong, here's what I'm doing

@singleton()
export default class StripeConnectionTokenResolversFactory extends AbstractResolversFactory {
@registry([
  { token: InjectToken.GraphFieldResolvers, useToken: StripeConnectionTokenResolversFactory },
  { token: InjectToken.ApolloProvider, useClass: ApolloProvider },
  { token: InjectToken.ContentfulProvider, use
ygor-sk
ygor-sk commented Oct 3, 2018

The section on factories shows two alternatives on how to define a factory:

def taxCalculator(taxBase: Double) = wire[TaxCalculator]
    // or: lazy val taxCalculator = (taxBase: Double) => wire[TaxCalculator]

It does not show though, how a class can depend on such factory.

This answer on SO shows, how

Improve this page

Add a description, image, and links to the dependency-injection topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the dependency-injection topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.