Ejemplo n.º 1
0
        private CheckResults AnalyzeAssembly(string assemblyPath)
        {
            IMetaDataProvider metadataDecoder = this.analysis_driver.MetaDataProvider;
            AssemblyNode      assembly;
            string            reason;

            if (!metadataDecoder.TryLoadAssembly(assemblyPath, out assembly, out reason))
            {
                return(CheckResults.Error(string.Format("Cannot load assembly: {0}", reason)));
            }

            var proofResults = new Dictionary <string, ICollection <string> > ();

            foreach (Method method in metadataDecoder.Methods(assembly))
            {
                AnalyzeMethod(method, proofResults);
            }
            if (proofResults.Count == 0)
            {
                return(CheckResults.Error("No methods found."));
            }

            return(new CheckResults(null, null, proofResults));
        }