Skip to main content

API

The Porygon library is only composed of one class, the DependenciesHandler.

Static methods​

  • Create : Create a new instance of DependenciesHandler.

Public methods​

  • Add : Register a new service in the handler.
  • AddInstance : Register a new instance of a service in the handler.
  • Get : Get an instance of a service.
  • GetOrThrow : Get an instance of a service or throw an exception if the service is not registered.
  • GetShared : Get a shared pointer on the current DependenciesHandler instance.
  • Has : Check if a service is registered.
  • MakeWithDependencies : Make a new instance of a class and provide it the dependencies handler as first constructor parameter if needed.
  • MakeSharedWithDependencies : Create a new shared pointer of a class and provide it the dependencies handler as first constructor parameter if needed.