anchor.diff:    end;
     inherited;
   end;
  -
   
   function TDUnitXIoC.GetInterfaceKey<TInterface>(const AName: string): string;
   var
  
positive.code:       class constructor Create;
    public
      class function CreateInstance(const AClass : TClass) : IInterface;
    end;
  
  
  implementation
  
  
negative.code:     //cannot replace a singleton that has already been instanciated.
      if rego.IsSingleton and (rego.Instance <> nil)  then
        raise EIoCException.Create(Format('An implementation for type %s with name %s is already registered with IoC',[pInfo.Name, newName]));
      rego.ActivatorDelegate := delegate;
      rego.IsSingleton := newSingleton;
      FContainerInfo.AddOrSetValue(key,rego);
    end;
  end;
  
  procedure TDUnitXIoC.RegisterType<TInterface>(const delegate: TActivatorDelegate<TInterface>; const name: string);
  begin
    InternalRegisterType<TInterface>(false, delegate, name);
  end;
  
  class destructor TDUnitXIoC.ClassDestroy;
  begin
  