Ejemplo n.º 1
0
 public CallInfo(AssemblyInfo assemblyInfo, MethodUniqueSignature signature, OpCode opcode, bool isPublic,
                 List <MethodUniqueSignature> overrideSignatures)
 {
     AssemblyInfo       = assemblyInfo;
     Signature          = signature;
     Opcode             = opcode;
     IsPublic           = isPublic;
     OverrideSignatures = overrideSignatures;
 }
Ejemplo n.º 2
0
        public List <CallInfo> GetCalls(MethodUniqueSignature methodSignature, AssemblyInfo assemblyInfo)
        {
            if (assemblyInfo == null ||
                assemblyInfo.Name == (UTF8String)null ||
                assemblyInfo.Name == UTF8String.Empty ||
                assemblyInfo.Version == null ||
                assemblyInfo.Version == AssemblyInfo.EmptyVersion)
            {
                return(GetCalls(methodSignature));
            }

            if (callers.TryGetValue(methodSignature, out var callInfoMap))
            {
                return(callInfoMap[assemblyInfo]);
            }

            return(empty);
        }
Ejemplo n.º 3
0
        // TODO: use IReadOnlyCollection<CallInfo>
        public List <CallInfo> GetCalls(MethodUniqueSignature methodSignature)
        {
            if (callers.TryGetValue(methodSignature, out var callInfoMap))
            {
                if (callInfoMap.Count == 1)
                {
                    return(callInfoMap.Values.First());
                }

                var result = new List <CallInfo>();
                foreach (var list in callInfoMap.Values)
                {
                    result.AddRange(list);
                }

                return(result);
            }

            return(empty);
        }
Ejemplo n.º 4
0
 private bool Equals(MethodUniqueSignature other)
 {
     return(string.Equals(fullName, other.fullName));
 }
Ejemplo n.º 5
0
 public PatternInfo(MethodUniqueSignature method, Version requiredOlderVersion)
 {
     Method = method;
     RequiredOlderVersion = requiredOlderVersion;
 }
Ejemplo n.º 6
0
 public ProcessingEntity(MethodUniqueSignature signature, CallGraphNode node)
 {
     Signature = signature;
     Node      = node;
 }