Exemplo n.º 1
0
        private static bool CheckImports(importchecker check)
        {
            bool ok = true;

            foreach (var el in check.library)
            {
                AssemblyDefinition ad = Program.resolver.Resolve(el.fullname);

                foreach (var type in el.type)
                {
                    if (!CheckType(ad, type))
                    {
                        ok = false;
                    }
                }
            }
            return(ok);
        }
Exemplo n.º 2
0
        private static int Check()
        {
            XmlSerializer ser = new XmlSerializer(typeof(importchecker));
            bool          ok  = true;

            foreach (var el in input)
            {
                using (StreamReader sr = new StreamReader(el))
                {
                    importchecker check = ser.Deserialize(sr) as importchecker;
                    if (!CheckImports(check))
                    {
                        ok = false;
                    }
                }
            }
            if (ok)
            {
                return(0);
            }
            return(2);
        }
Exemplo n.º 3
0
        private static bool CheckImports(importchecker check)
        {
            bool ok = true;
            foreach (var el in check.library)
            {
                AssemblyDefinition ad = Program.resolver.Resolve(el.fullname);

                foreach (var type in el.type) {
                    if (!CheckType(ad, type))
                        ok = false;
                }
            }
            return ok;
        }