internal override void CompileAndAssertValidity() { if (!_projectMethods.Methods.Any() && !_createMethods.Methods.Any()) { throw new InvalidProjectionException( $"EventProjection {GetType().FullNameInCode()} has no valid projection operations"); } var invalidMethods = MethodCollection.FindInvalidMethods(GetType(), _projectMethods, _createMethods); if (invalidMethods.Any()) { throw new InvalidProjectionException(this, invalidMethods); } IncludedEventTypes.Fill(MethodCollection.AllEventTypes(_createMethods, _projectMethods)); }
internal override void AssembleAndAssertValidity() { if (_applyMethods.IsEmpty() && _createMethods.IsEmpty()) { throw new InvalidProjectionException( $"AggregateProjection for {typeof(T).FullNameInCode()} has no valid create or apply operations"); } var invalidMethods = MethodCollection.FindInvalidMethods(GetType(), _applyMethods, _createMethods, _shouldDeleteMethods); if (invalidMethods.Any()) { throw new InvalidProjectionException(this, invalidMethods); } specialAssertValid(); var eventTypes = determineEventTypes(); IncludedEventTypes.Fill(eventTypes); }