🇺🇸
ModularBr Framework for Delphi
Portugues(PT)TelegramGitHub
  • Welcome to ModularBr
  • Getting to know
    • Introduction
      • Benefits
      • Requirements
      • Installing
  • Module
    • Exporting Binds
    • Importing Binds
  • Routes
    • Route Guard
    • Middlewares
  • Pipes
  • Dependency injection
  • Route Handlers
  • Usability
    • Horse and ModularBr
    • Desktop and ModularBr
  • CLI
  • Frequently Asked Questions
    • FAQs
      • How to contribute?
      • How to download and install?
      • What is InjectorBr?
      • What is ResultPairBr?
      • What is ECLBr?
  • Usage policy
    • License
Powered by GitBook
On this page
  1. Module

Exporting Binds

Exporting Binds: The ease of sharing resources between modules in ModularBr.

Exporting Binds

Some modules are created with the sole purpose of exporting binds to other modules, and that's where the "ExportedBinds" method comes in. This method is used to define the binds that the module exports, making them available for other modules that wish to import them.

unit export.module;

interface

uses
  dmfbr.module,
  nfe.controller;

type
  TExportModule = class(TModule)
  public
    function ExportedBinds: TExportedBinds; override;
  end;

implementation

{ TAppModule }

function TExportModule.ExportedBinds: TExportedBinds;
begin
  Result := [Bind<TControllerServer>.Singleton];
end;

end.

WARNING

Module export is only for Binds. Routes will not be exposed.

PreviousModuleNextImporting Binds

Last updated 2 years ago