From 527f387f3ddcff3c3110c60164ccfeb9c3c4e8bb Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:45:25 +0000 Subject: Utilisateur : Fcolin Date : 22/12/05 Heure : 12:14 Archivé dans $/CSharp/Ivy Commentaire: (vss 4) --- CSharp/Ivy/Ivy/IvyBinding.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/CSharp/Ivy/Ivy/IvyBinding.cs b/CSharp/Ivy/Ivy/IvyBinding.cs index 1ff96e5..09e22c9 100644 --- a/CSharp/Ivy/Ivy/IvyBinding.cs +++ b/CSharp/Ivy/Ivy/IvyBinding.cs @@ -1,6 +1,5 @@ using System; using System.Collections; -using System.Collections.Specialized; using System.Text.RegularExpressions; namespace IvyBus @@ -39,13 +38,11 @@ namespace IvyBus if (result.Success) { // Start at 1 because group 0 represent entire matching - StringCollection coll = new StringCollection(); + args = new string[result.Groups.Count-1]; for (int sub = 1; sub < result.Groups.Count; sub++) { - coll.Add(result.Groups[sub].Value); + args[sub-1] = result.Groups[sub].Value; } - args = new string[coll.Count]; - coll.CopyTo(args, 0); } return args; } @@ -91,13 +88,11 @@ namespace IvyBus if (msgtag == msgname) { - StringCollection coll = new StringCollection(); + args = new string[msgargs.Length]; for( int sub= 0; sub < msgargs.Length; sub++) { - coll.Add((string)args_values[msgargs[sub]]); + args[sub] = (string)args_values[msgargs[sub]]; } - args = new string[coll.Count]; - coll.CopyTo(args, 0); } return args; } -- cgit v1.1