public TypesResolver(Func <Type[]> registerAction)
 {
     RegisteredTypes = registerAction?.Invoke();
     resolveAction   = (s) => RegisteredTypes.FirstOrDefault(t => t.Name == s);
 }