0

can anyone tell me how to add generic type (bean) to configure the CEP runtime? I'm in NEsper environment using C#., I have an event(bean) - Signal which has the attribute - value. Depends on what kind of Signal it is, the value can be bool or double or string ... value. So I've define Signal as a generic: Signal. My following code return an exception. If I'm not using generic type as event, it works. How should I add the generic event type correctly?

var container = ContainerExtensions.CreateDefaultContainer()
                        .InitializeDefaultServices()
                        .InitializeDatabaseDrivers();
var configuration = new Configuration(container); 
configuration.Common.AddEventType("Signal", typeof(Signal<bool>));
configuration.Common.AddEventType("Signal", typeof(Signal<double>));
var runtime = EPRuntimeProvider.GetDefaultRuntime(configuration);

Thanks for any help!

Narisu

Narsu
  • 1

1 Answers1

0

There is no support for generic type-parameterized bean events in Nesper yet. There is support in the Java version.

user650839
  • 2,594
  • 1
  • 13
  • 9