Ejemplo n.º 1
0
        public async Task Raise <TData>(Event <TData> @event, TData data, CancellationToken cancellationToken = default(CancellationToken))
        {
            var eventContext = new EventContextProxy <TInstance, TData>(this, @event, data, cancellationToken);

            using (eventContext)
            {
                await _machine.RaiseEvent(eventContext).ConfigureAwait(false);
            }
        }
        public async Task Raise(Event @event, CancellationToken cancellationToken = default)
        {
            var eventContext = new EventContextProxy <TInstance>(this, @event, cancellationToken);

            using (eventContext)
            {
                await _machine.RaiseEvent(eventContext).ConfigureAwait(false);
            }
        }
        public Task Raise <TData>(Event <TData> @event, TData data)
        {
            var eventContext = new EventContextProxy <TInstance, TData>(this, @event, data);

            return(_machine.RaiseEvent(eventContext));
        }
        public Task Raise(Event @event)
        {
            var eventContext = new EventContextProxy <TInstance>(this, @event);

            return(_machine.RaiseEvent(eventContext));
        }