public static FeatureCreatedEvent ExtractFeatureCreatedEvent(this CreateFeatureCommand command, ISystemClock clock)
 {
     return(new FeatureCreatedEvent
     {
         Name = command.Name,
         CreatedBy = command.CreatedBy,
         CreatedOn = clock.UtcNow,
         Path = command.Path,
     });
 }
 public static PathCreatedEvent ExtractPathCreatedEvent(this CreateFeatureCommand command, ISystemClock clock)
 {
     return(new PathCreatedEvent
     {
         CreatedBy = command.CreatedBy,
         CreatedOn = clock.UtcNow,
         Path = command.Path,
         FeatureAdded = command.Name,
     });
 }
 public static void Validate(this CreateFeatureCommand command)
 {
     command.Required(nameof(command));
     command.Name.Required(nameof(command.Name));
     command.CreatedBy.Required(nameof(command.CreatedBy));
 }