Пример #1
0
        public void On(SchemaCreated @event, EnvelopeHeaders headers)
        {
            var id = @event.SchemaId.Id;

            Schemas = Schemas.SetItem(id, EntityMapper.Create <JsonSchemaEntity>(@event, headers, s =>
            {
                s.SchemaDef = SchemaEventDispatcher.Create(@event, registry);

                SimpleMapper.Map(@event, s);
            }));
        }
Пример #2
0
        private void UpdateSchema(SchemaEvent @event, EnvelopeHeaders headers, Action <JsonSchemaEntity> updater = null)
        {
            var id = @event.SchemaId.Id;

            Schemas = Schemas.SetItem(id, x => x.Clone().Update(@event, headers, updater));
        }