public SchemaDomainObject Unpublish(UnpublishSchema command) { Guard.NotNull(command, nameof(command)); VerifyCreatedAndNotDeleted(); SchemaGuard.GuardCanUnpublish(schema); RaiseEvent(SimpleMapper.Map(command, new SchemaUnpublished())); return(this); }
public SchemaDomainObject Reorder(ReorderFields command) { Guard.Valid(command, nameof(command), () => $"Cannot reorder fields for schema '{Id}'"); VerifyCreatedAndNotDeleted(); SchemaGuard.GuardCanReorder(schema, command.FieldIds); RaiseEvent(SimpleMapper.Map(command, new SchemaFieldsReordered())); return(this); }