public static void AddNakedObjects(this NakedCoreOptions coreOptions, Action <NakedObjectsOptions> setupAction)
        {
            var options = new NakedObjectsOptions();

            setupAction(options);

            options.RegisterCustomTypes?.Invoke(coreOptions.Services);


            coreOptions.Services.RegisterFacetFactories <IObjectFacetFactoryProcessor>(ObjectFacetFactories.StandardFacetFactories());
            coreOptions.Services.AddSingleton <ObjectFacetFactorySet, ObjectFacetFactorySet>();
            coreOptions.Services.AddSingleton <ObjectClassStrategy, ObjectClassStrategy>();
            coreOptions.Services.AddSingleton <SystemTypeFacetFactorySet, SystemTypeFacetFactorySet>();
            coreOptions.Services.AddSingleton <SystemTypeClassStrategy, SystemTypeClassStrategy>();

            coreOptions.Services.AddSingleton <IReflector, SystemTypeReflector>();
            coreOptions.Services.AddSingleton <IReflector, ObjectReflector>();
            coreOptions.Services.AddSingleton <IObjectReflectorConfiguration>(p => ObjectReflectorConfig(options));
        }
 private static ObjectReflectorConfiguration ObjectReflectorConfig(NakedObjectsOptions options)
 {
     ObjectReflectorConfiguration.NoValidate = options.NoValidate;
     return(new ObjectReflectorConfiguration(options.Types, options.Services, options.ConcurrencyCheck));
 }