Example #1
0
 /// <summary>
 /// Constructs module identity for the given module
 /// </summary>
 /// <param name="module">Module for which the identity is desired.</param>
 /// <returns>The module identity corresponding to the passed module.</returns>
 public static ModuleIdentity GetModuleIdentity(
     IModule module
     )
 {
     if (module.ContainingAssembly != null)
     {
         return(new ModuleIdentity(module.Name, module.Location, UnitHelper.GetAssemblyIdentity(module.ContainingAssembly)));
     }
     else
     {
         return(new ModuleIdentity(module.Name, module.Location));
     }
 }
Example #2
0
        /// <summary>
        /// Constructs module identity for the given module
        /// </summary>
        /// <param name="module">Module for which the identity is desired.</param>
        /// <returns>The module identity corresponding to the passed module.</returns>
        public static ModuleIdentity GetModuleIdentity(IModule module)
        {
            Contract.Requires(module != null);
            Contract.Ensures(Contract.Result <ModuleIdentity>() != null);

            if (module.ContainingAssembly != null)
            {
                return(new ModuleIdentity(module.Name, module.Location, UnitHelper.GetAssemblyIdentity(module.ContainingAssembly)));
            }
            else
            {
                return(new ModuleIdentity(module.Name, module.Location));
            }
        }