private bool Equal(string stream, int expectedIdx, string eventType, byte[] actual) { var originalName = StreamNamesGenerator.GetOriginalName(stream); var producer = CorrespondingProducer(originalName); bool equal; lock (_factoryLock) equal = producer.Equal(expectedIdx, eventType, actual); return equal; }
private Event CreateEvent(string stream, int version) { var originalName = StreamNamesGenerator.GetOriginalName(stream); var factory = CorrespondingProducer(originalName); Event generated; lock (_factoryLock) generated = factory.Create(version); return generated; }