unit XData.Wizard.Service.Registration;

interface

procedure Register;

implementation

uses
  ToolsAPI, XData.Wizard.Service;

var
  ServiceWizardIndex : Integer;

function InitialiseWizard : IOTAWizard;
begin
  // The trick to getting a repository wizard to work - register a normal wizard
  // here (returned through RegisterProc) and add the repository wizard via
  // AddWizard
  ServiceWizardIndex := (BorlandIDEServices as IOTAWizardServices).AddWizard(
    TXDataServiceWizard.Create);
  Result := nil;
end;

procedure Register;
begin
  InitialiseWizard;
end;

initialization
  ServiceWizardIndex := -1;

finalization
  if ServiceWizardIndex >= 0 then begin
    (BorlandIDEServices As IOTAWizardServices).RemoveWizard(ServiceWizardIndex);
    ServiceWizardIndex := -1;
  end;

end.
