Is it normal firebird server sends all registered event counts on raising any of registered event?
By example on firebirds site I do this:
class FirebirdListenerTest
{
public FirebirdListenerTest()
{
try
{
FbConnectionStringBuilder cs = new FbConnectionStringBuilder();
cs.DataSource = "localhost";
cs.Database = "C:\\FIREBIRD\\TEST.GDB";
cs.UserID = "SYSDBA";
cs.Password = "masterkey";
cs.Charset = "NONE";
FbConnection connection = new FbConnection(cs.ToString());
connection.Open();
FbRemoteEvent revent = new FbRemoteEvent(connection);
revent.AddEvents(new string[] { "text_changed", "text_inserted", "justtest_event" });
// Add callback to the Firebird events
revent.RemoteEventCounts += new FbRemoteEventEventHandler(EventCounts);
// Queue events
revent.QueueEvents();
Console.ReadLine();
connection.Close();
}
catch (Exception e)
{
Debug.WriteLine(e.ToString());
}
}
static void EventCounts(object sender, FbRemoteEventEventArgs args)
{
Console.WriteLine("Event {0} has {1} counts.", args.Name, args.Counts);
}
}
In such code, if any of events is raised, I always get counts for all events. Is it how it should works?
Yes it is. You can filter it base on Counts property, it can be 0-n.