Example #1
0
 public override void Observe()
 {
     try
     {
         adapter.Push(new TestEvent());
     }
     catch (Exception e)
     {
         actual_exception = e;
     }
 }
Example #2
0
        public void Publish(IEvent @event)
        {
            if (@event == null)
            {
                const string message = "The event to be published is null";
                log.FatalFormat(message);
                throw new Exception(message);
            }

            if (pipelineAdapter == null)
            {
                const string message =
                    "The pipeline adapter is null. To set the pipeline adapter use the Publisher.Use method";
                log.FatalFormat(message);
                throw new Exception(message);
            }

            log.DebugFormat("Pushing {0} down the pipeline using adapter {1}", @event.GetType(),
                            pipelineAdapter.GetType());


            pipelineAdapter.Push(@event);
        }
Example #3
0
 public override void Observe()
 {
     adapter.Push(new TestEvent());
 }