正常的firebird服务器是否会在引发任何注册事件时发送所有注册事件计数?
以火鸟网站为例,我这样做:
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);
}
}
在这样的代码中,如果引发任何事件,我总是会得到所有事件的计数。它应该如何工作?