From bb505ecd2b3485a2548ed678fe09b5d7401e4fcb Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 10:04:43 +0000 Subject: Utilisateur : Fcolin Date : 20/04/06 Heure : 13:15 Archivé dans $/CSharp/Ivy/IvyPerf Commentaire: filtrage classes (vss 7) --- CSharp/Ivy/IvyPerf/IvyPerf.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CSharp/Ivy/IvyPerf/IvyPerf.cs b/CSharp/Ivy/IvyPerf/IvyPerf.cs index b82f449..1351318 100644 --- a/CSharp/Ivy/IvyPerf/IvyPerf.cs +++ b/CSharp/Ivy/IvyPerf/IvyPerf.cs @@ -2,6 +2,7 @@ using System; using IvyBus; using System.Threading; using System.Globalization; +using System.Collections.Specialized; namespace IvyPerf { @@ -40,8 +41,12 @@ namespace IvyPerf [STAThread] static void Main(string[] args) { - + StringCollection my_messsages = new StringCollection(); + my_messsages.Add("ping"); + my_messsages.Add("pong"); bus = new Ivy("IvyPerf", "IvyPref ready"); + bus.BindingFilter += new Ivy.ClientRemoveBindingHandler(bus_BindingFilter); + bus.SentMessageClasses = my_messsages; bus.AutoBinding(typeof(IvyPerf)); bus.start(null); while( true ) @@ -51,5 +56,10 @@ namespace IvyPerf if ( count == 0 ) Console.Write( "." ); } } + + static void bus_BindingFilter(IvyClient app, string arg) + { + Console.WriteLine( "The app {0} regexp {1} was Filtred.", app.ApplicationName,arg); + } } } -- cgit v1.1