diff options
Diffstat (limited to 'gendarme/framework/Gendarme.Framework.Engines/NamespaceEngine.cs')
-rw-r--r-- | gendarme/framework/Gendarme.Framework.Engines/NamespaceEngine.cs | 13 |
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> |