Beispiel #1
0
 private bool TryGetConstructors(TypeReference type, out HashSet <MethodDefinition> constructorsIfAny)
 {
     if (Constructors.ContainsKey(type))
     {
         constructorsIfAny = Constructors[type];
         return(constructorsIfAny != null && constructorsIfAny.Count > 0);
     }
     else
     {
         bool isTypeWithNoConstructor;
         if (AnalysisUtils.TryGetConstructors(type, _modules, out constructorsIfAny, out isTypeWithNoConstructor))
         {
             Constructors.Add(type, constructorsIfAny);
             return(true);
         }
         else
         {
             constructorsIfAny = null;
             Constructors.Add(type, null);
             return(false);
         }
     }
 }