IsNodeLibrary() static private method

Determine if an assembly is in the "node_libraries" list for the package. This algorithm accepts assemblies that don't have the same version, but the same name. This is important when a package author has updated a dll in their package. This algorithm assumes all of the entries in nodeLibraryFullNames are properly formatted as returned by the Assembly.FullName property. If they are not, it ignores the entry.
static private IsNodeLibrary ( IEnumerable nodeLibraryFullNames, AssemblyName name, IList &messages ) : bool
nodeLibraryFullNames IEnumerable
name System.Reflection.AssemblyName
messages IList
return bool
Example #1
0
        public void IsNodeLibrary_IsFalseAndHasMessagesForBadlyFormatted()
        {
            IList <ILogMessage> ws = new List <ILogMessage>();

            Assert.False(Package.IsNodeLibrary(new List <string>
            {
                "\\ x x x x x x"
            }, assemName, ref ws));
            Assert.AreEqual(2, ws.Count());
        }
Example #2
0
        public void IsNodeLibrary_ThrowsForNullArg2()
        {
            IList <ILogMessage> ws = new List <ILogMessage>();

            Assert.Throws <ArgumentNullException>(() => Package.IsNodeLibrary(null, null, ref ws));
        }