@abmprotocl/services-core 中文文档教程

发布于 4年前 浏览 21 更新于 3年前

@makerdao/services-core

dai.js 中使用的依赖注入框架。

TODO

  • [ ] create full usage example

Usage (TODO)

class MyService extends PrivateService {
  constructor(name = 'serviceRoleName') {
    super(name, dependencyRoleNames);
  }

  initialize(settings) {
    // initialize() for all its dependencies will run first
  }

  connect() {
    // connect() for all its dependencies will run first
  }

  authenticate() {
    // authenticate() for all its dependencies will run first
  }
}

@makerdao/services-core

A dependency injection framework used in dai.js.

TODO

  • [ ] create full usage example

Usage (TODO)

class MyService extends PrivateService {
  constructor(name = 'serviceRoleName') {
    super(name, dependencyRoleNames);
  }

  initialize(settings) {
    // initialize() for all its dependencies will run first
  }

  connect() {
    // connect() for all its dependencies will run first
  }

  authenticate() {
    // authenticate() for all its dependencies will run first
  }
}
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文