Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Pouliot <sebastien@ximian.com>2008-11-20 06:24:01 +0300
committerSebastien Pouliot <sebastien@ximian.com>2008-11-20 06:24:01 +0300
commit48273817a64827f3ffbc58ca08be83862a730e46 (patch)
treea3caac6bfbab17b6c039b0225904e4086c02f063 /gendarme/framework/Gendarme.Framework.Engines/NamespaceEngine.cs
parentc3b5514f1937e2acaeabaf0141f41ff5065ded54 (diff)
2008-11-19 Sebastien Pouliot <sebastien@ximian.com>
* NamespaceEngine.cs: Add Exists method to check the existance of a namespace withint the assembly set. svn path=/trunk/mono-tools/; revision=119409
Diffstat (limited to 'gendarme/framework/Gendarme.Framework.Engines/NamespaceEngine.cs')
-rw-r--r--gendarme/framework/Gendarme.Framework.Engines/NamespaceEngine.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/gendarme/framework/Gendarme.Framework.Engines/NamespaceEngine.cs b/gendarme/framework/Gendarme.Framework.Engines/NamespaceEngine.cs
index e54a33fc..27eed66a 100644
--- a/gendarme/framework/Gendarme.Framework.Engines/NamespaceEngine.cs
+++ b/gendarme/framework/Gendarme.Framework.Engines/NamespaceEngine.cs
@@ -83,6 +83,19 @@ namespace Gendarme.Framework.Engines {
}
/// <summary>
+ /// Return if a namespace exist inside the assembly set
+ /// </summary>
+ /// <param name="nameSpace">Namespace to confirm existance</param>
+ /// <returns>True if the namespace exists, False otherwise</returns>
+ public static bool Exists (string nameSpace)
+ {
+ if (nameSpace == null)
+ throw new ArgumentNullException ("nameSpace");
+
+ return namespaces.ContainsKey (nameSpace);
+ }
+
+ /// <summary>
/// Return all namespaces defined inside the specified assembly.
/// </summary>
/// <param name="assembly">Assembly to search into</param>