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); })); }
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)); }