コード例 #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);
        }
コード例 #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);
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: carlokok/importchecker
        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;
        }