Ejemplo n.º 1
0
        public SchemaDomainObject Unpublish(UnpublishSchema command)
        {
            Guard.NotNull(command, nameof(command));

            VerifyCreatedAndNotDeleted();

            SchemaGuard.GuardCanUnpublish(schema);

            RaiseEvent(SimpleMapper.Map(command, new SchemaUnpublished()));

            return(this);
        }
Ejemplo n.º 2
0
        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);
        }