Пример #1
0
        /// <summary>
        /// Check every type in the current Assembly.
        /// </summary>
        public void Run()
        {
            if (!_isInitialized)
            {
                throw new Exception("AssemblyAnalyzer must be initialized. Please Call Init() first.");
            }

            foreach (TypeDefinition type in Assembly.MainModule.Types)
            {
                HashSet <string> unsupportedMethodsInCurrentType;
                _unsupportedMethodsInCurrentAssembly.TryGetValue(type.Name, out unsupportedMethodsInCurrentType);
                //we want to check the type only if we know there is unsupported stuff in it.
                if (unsupportedMethodsInCurrentType != null)
                {
                    ClassAnalyzer.Set(type, unsupportedMethodsInCurrentType);//, 0);
                    ClassAnalyzer.Run();
                }
            }
        }