dependency-injection
Here are 2,479 public repositories matching this topic...
The documentation at https://github.com/inversify/InversifyJS/blob/master/wiki/environment.md contains the following note:
⚠️ Thereflect-metadata
polyfill should be imported only once in your entire application because the Reflect object is mean to be a global singleton. More details about this can be found [here](inversify/InversifyJS#262 (comment)
The Android Java guide at one point says
Just call the startKoin() function.
It is vague and what worked for me was ContextFunctionsKt.startKoin
.
Please include this or possibly a more elegant solution in the guide.
ps: Is the website also opensource? I couldn't find it to make a PR.
-
Updated
May 9, 2020 - Swift
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
-
Updated
May 27, 2020 - C#
-
Updated
May 26, 2020 - PHP
contributing.md
We need a contributing.md
doc that shares community conventions.
Stamp conventions
- Naming stamps:
your-module-name-stamp
- Keywords for
package.json
:stamp
,stampit
Automatic code quality conventions 😎
- Use the prod-module-boilerplate (soon to be replaced with `npm install -g cloverfield cf-package
This is a follow-up issue for #5000 where we moved datasource config from JSON files to TS files and discovered few aspects of the datasource template that can be improved.
- Update https://github.com/strongloop/loopback4-example-shopping and https://github.com/strongloop/loopback-next/blob/master/docs/site/Inside-Loopback-Application.md to follow the new style
- Make the static DataSo
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
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
-
Updated
Apr 24, 2020 - PHP
-
Updated
Apr 22, 2020 - C#
-
Updated
May 27, 2020 - C#
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__ . '
@Service
export class FooFactory implements ServiceFactory<DatabaseDriver> {
create(): DatabaseDriver {
return new DatabaseDriver()
}
}
@Service
export class UserManager {
constructor(readonly dbDriver: DatabaseDriver) {}
-
Updated
May 27, 2020 - C#
-
Updated
Apr 20, 2020 - TypeScript
-
Updated
Mar 31, 2020 - Go
Right we throw a fatalError
if we have duplicate bindings for the same type. This can be improved. Likely throw an exception to be handled by the RootComponent
of(_:)
function.
-
Updated
May 28, 2020
Fx applications may provide a fx.Printer with the fx.Logger option. Typical Fx applications include a logging module that provides something more powerful than a fx.Printer, such as a Zap logger. However, if this logging module has a dependency on other modules (eg Zap cores), then these lower level modules have
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
Running current code for Router section results in following error:
Cannot modify header information - headers already sent
It is caused by echo
statements in route resolvers and can be fixed if resolvers return content instead.
As it is, one cannot finish this section without an exception page. Is this b
[Request] Add a wiki
I am a fairly inexperienced developer who might benefit from a wiki page explaining when you'd use this library and what it solves that the base .net framework does not.
I was under the impression that .Net core had assembly scanning already. Does this just make it more user-friendly or is it something else?
At the top of the docs it mentions lazy-loading, but I can't find anything in the docs regarding where and how is this available.
Sample use-cases would be nice as well :-)
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
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.
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."
在doInterceptions方法里有对Warehouse.interceptors的判断
而Warehouse.interceptors是在InterceptorServiceImpl#init里新线程里完成添加的