|
| 1 | +// The MIT License (MIT) |
| 2 | +// |
| 3 | +// Copyright (c) 2015-2018 Rasmus Mikkelsen |
| 4 | +// Copyright (c) 2015-2018 eBay Software Foundation |
| 5 | +// https://github.com/eventflow/EventFlow |
| 6 | +// |
| 7 | +// Permission is hereby granted, free of charge, to any person obtaining a copy of |
| 8 | +// this software and associated documentation files (the "Software"), to deal in |
| 9 | +// the Software without restriction, including without limitation the rights to |
| 10 | +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
| 11 | +// the Software, and to permit persons to whom the Software is furnished to do so, |
| 12 | +// subject to the following conditions: |
| 13 | +// |
| 14 | +// The above copyright notice and this permission notice shall be included in all |
| 15 | +// copies or substantial portions of the Software. |
| 16 | +// |
| 17 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 | +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
| 19 | +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
| 20 | +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
| 21 | +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 22 | +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 23 | + |
| 24 | +using System.Threading; |
| 25 | +using System.Threading.Tasks; |
| 26 | +using EventFlow.Aggregates; |
| 27 | +using EventFlow.Aggregates.ExecutionResults; |
| 28 | +using EventFlow.Commands; |
| 29 | +using EventFlow.Core; |
| 30 | + |
| 31 | +namespace EventFlow.TestHelpers.Aggregates.Decorators |
| 32 | +{ |
| 33 | + /// <summary> |
| 34 | + /// Caused StackOverflowException when colocated with command handlers and using options.AddDefaults(). |
| 35 | + /// </summary> |
| 36 | + /// <seealso cref="http://github.com/eventflow/EventFlow/issues/523"/> |
| 37 | + public class SomeCommandHandlerDecorator<TAggregate, TIdentity, TResult, TCommand> : |
| 38 | + CommandHandler<TAggregate, TIdentity, TResult, TCommand> |
| 39 | + where TAggregate : IAggregateRoot<TIdentity> |
| 40 | + where TIdentity : IIdentity |
| 41 | + where TResult : IExecutionResult |
| 42 | + where TCommand : ICommand<TAggregate, TIdentity, TResult> |
| 43 | + { |
| 44 | + public SomeCommandHandlerDecorator(ICommandHandler<TAggregate, TIdentity, TResult, TCommand> inner) |
| 45 | + { |
| 46 | + } |
| 47 | + |
| 48 | + public override Task<TResult> ExecuteCommandAsync(TAggregate aggregate, TCommand command, CancellationToken cancellationToken) |
| 49 | + { |
| 50 | + throw new System.NotImplementedException(); |
| 51 | + } |
| 52 | + } |
| 53 | +} |
0 commit comments