PclAnalyzer.Reflection.AssemblyParser.GetAssemblyCalls C# (CSharp) Method

GetAssemblyCalls() public method

public GetAssemblyCalls ( ) : IList
return IList
        public IList<MethodCall> GetAssemblyCalls()
        {
            var module = ModuleDefinition.ReadModule(_assemblyPath);

            var methods = from t in module.Types
                          from m in t.Methods
                          where m.Body != null
                          select m;

            return GetMethodCalls(module, methods).ToList();
        }

Usage Example

Example #1
0
 public AnalyzerService(string assemblyPath, Platforms requestedPlatforms, bool excludeThirdPartyReferences)
 {
     _assemblyPath = assemblyPath;
     _requestedPlatforms = requestedPlatforms;
     _portabilityAnalyzer = new PortabilityAnalyzer(PortabilityDatabase.Collection);
     _assemblyParser = new AssemblyParser(_assemblyPath);
     _portabilityAnalyzer.SupportedPlatforms = _requestedPlatforms;
     _portabilityAnalyzer.ExcludeThirdPartyReferences = excludeThirdPartyReferences;
     _portabilityAnalyzer.CallCollection = _assemblyParser.GetAssemblyCalls();
 }