public static IServiceCollection AddDevCommands( this IServiceCollection @this, IConfiguration config = null, Action <DevCommandsOptions> options = null) { if (config?.GetValue("PredictableGuidEnabled", defaultValue: false) == true) { PredictableGuidGenerator.Reset("Default"); Entities.GuidEntity.NewIdGenerator = PredictableGuidGenerator.Generate; } @this.AddSingleton <IDevCommand, TestContextDevCommand>(); @this.AddSingleton <IDevCommand, InjectTimeDevCommand>(); @this.AddSingleton <IDevCommand, DatabaseClearCacheDevCommand>(); options?.Invoke(new DevCommandsOptions(@this)); return(@this); }
public override Task <string> Run() { PredictableGuidGenerator.Reset(Param("name")); return(Task.FromResult(string.Empty)); }