From 2a07a862eea86c2dc3242332e98f6e3c6587c602 Mon Sep 17 00:00:00 2001 From: Kevin Glynn Date: Mon, 10 Jan 2011 11:21:32 +0100 Subject: [PATCH] allow to add collections --- CSharpTranslator/antlr3/src/cs2j/Utils/Set.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CSharpTranslator/antlr3/src/cs2j/Utils/Set.cs b/CSharpTranslator/antlr3/src/cs2j/Utils/Set.cs index ded0857..0b58908 100644 --- a/CSharpTranslator/antlr3/src/cs2j/Utils/Set.cs +++ b/CSharpTranslator/antlr3/src/cs2j/Utils/Set.cs @@ -54,6 +54,21 @@ namespace RusticiSoftware.Translator.Utils } } + /// + /// Adds the specified element to this set if it is not already present. + /// o: The object to add to the set. + /// returns true if the object was added, false if it was already present. + public void Add(IList els) + { + if (els != null) + { + foreach (T s in els) + { + Add(s); + } + } + } + public T[] AsArray() { ICollection keys = setD.Keys;