Beispiel #1
0
        private TemperatureMeasurement(Guid measurementId)
        {
            Guard.Against.Default(measurementId, nameof(measurementId));

            var @event = TemperatureMeasurementStarted.Create(
                measurementId
                );

            Enqueue(@event);
            Apply(@event);
        }
    private TemperatureMeasurement(Guid measurementId)
    {
        if (measurementId == Guid.Empty)
        {
            throw new ArgumentOutOfRangeException(nameof(measurementId));
        }

        var @event = TemperatureMeasurementStarted.Create(
            measurementId
            );

        Enqueue(@event);
        Apply(@event);
    }