public void ShouldAlwaysMapFindToNavigation()
        {
            var @event = new FindEvent
            {
                Cancelled = true
            };

            AssertMapsToActivity(@event, Activity.Navigation);
        }
Пример #2
0
 private void _findEvents_FindDone(vsFindResult result, bool cancelled)
 {
     if (_lastEvent == null)
     {
         _lastEvent           = Create <FindEvent>();
         _lastEvent.Cancelled = cancelled;
     }
     FireNow(_lastEvent);
     _lastEvent = null;
 }
Пример #3
0
        public void ShouldSerializeToString()
        {
            var e = new FindEvent
            {
                Cancelled = false
            };
            const string expected =
                "{\"$type\":\"KaVE.Commons.Model.Events.VisualStudio.FindEvent, KaVE.Commons\",\"Cancelled\":false,\"TriggeredBy\":0}";

            JsonAssert.SerializesTo(e, expected);
            JsonAssert.DeserializesTo(expected, e);
        }
Пример #4
0
 public VEVENT Get(FindEvent request)
 {
     try
     {
         return eventRepository.Find(request.EventId);
     }
     catch (InvalidOperationException ex)
     {
         logger.Error(ex.ToString());
         throw;
     }
     catch (ApplicationException ex)
     {
         logger.Error(ex.ToString());
         throw;
     }
     catch (Exception ex)
     {
         logger.Error(ex.ToString()); 
         throw;
     }
 }