public IEnumerable <IChange> CollectChanges(ScaffolderContext context) { IOutputCollector scaffolder = context.ScaffolderType switch { ScaffolderTypes.DomainEntity => new DomainEntityOutputCollector(), ScaffolderTypes.Endpoint => new EndpointOutputCollector(), _ => throw new Exception($"Scaffolder type '{context.ScaffolderType}' is not supported"), }; return(scaffolder.CollectChanges(context)); }
public IEnumerable <IChange> CollectChanges(ScaffolderContext context) { var endpointType = context.Variables.Get <EndpointTypes>(Constants.EndpointType); IOutputCollector scaffolder = endpointType switch { EndpointTypes.Command => new CommandOutputCollector(), EndpointTypes.Query => new QueryOutputCollector(), _ => throw new Exception($"Endpoint type '{endpointType}' is not supported"), }; return(scaffolder.CollectChanges(context)); }