示例#1
0
        public SchemaDomainObject Unpublish(UnpublishSchema command)
        {
            Guard.NotNull(command, nameof(command));

            VerifyCreatedAndNotDeleted();

            SchemaGuard.GuardCanUnpublish(schema);

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

            return(this);
        }
示例#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);
        }