Beispiel #1
0
        public void SetSource <T>(ICepObservable <EdgeEvent <T> > source)
        {
            InternalSetSource(source.Select(e => e.EventKind == EventKind.Insert
                ? e.EdgeType == EdgeType.End
                ? new
            {
                EventKind = e.EventKind,
                EdgeType  = (EdgeType?)e.EdgeType,
                StartTime = e.StartTime,
                EndTime   = (DateTimeOffset?)e.EndTime,
                Payload   = e.Payload,
            }
                : new
            {
                EventKind = e.EventKind,
                EdgeType  = (EdgeType?)e.EdgeType,
                StartTime = e.StartTime,
                EndTime   = (DateTimeOffset?)null,
                Payload   = e.Payload,
            }
                : new
            {
                EventKind = e.EventKind,
                EdgeType  = (EdgeType?)null,
                StartTime = e.StartTime,
                EndTime   = (DateTimeOffset?)null,
                Payload   = default(T),
            }
                                            ));

            AddEventFields <EdgeEvent <T>, T>();
        }
Beispiel #2
0
        public void SetSource <T>(ICepObservable <IntervalEvent <T> > source)
        {
            InternalSetSource(source.Select(i => i.EventKind == EventKind.Insert
                ? new { i.EventKind, i.StartTime, EndTime = (DateTimeOffset?)i.EndTime, i.Payload }
                : new { i.EventKind, i.StartTime, EndTime = (DateTimeOffset?)null, Payload = default(T) }));

            AddEventFields <IntervalEvent <T>, T>();
        }
Beispiel #3
0
        public void SetSource <T>(ICepObservable <PointEvent <T> > source)
        {
            InternalSetSource(source.Select(p => p.EventKind == EventKind.Insert
                ? new { p.EventKind, p.StartTime, p.Payload }
                : new { p.EventKind, p.StartTime, Payload = default(T) }));

            AddEventFields <PointEvent <T>, T>();
        }