public bool IsTeardown(MethodReference target)
 {
     var def = target.ThreadSafeResolve();
     if (def != null  && def.Name == "Finalize" && target.Parameters.Count == 0)
     {
         return target.DeclaringType.ThreadSafeResolve().GetMethods().Any(IsTest);
     }
     return false;
 }
 public bool IsSetup(MethodReference target)
 {
     var def = target.ThreadSafeResolve();
     if (def != null && def.IsConstructor)
     {
         return IsXunitFixture(target);
     }
     return false;
 }
 public List<MemberAccess> GetHiddenDependenciesForTest(MethodReference refernece)
 {
     var m = refernece.ThreadSafeResolve();
     var ret = new List<MemberAccess>();
     if (!IsTest(refernece)) return ret;
     foreach (var method in m.DeclaringType.GetMethodsInHierarchyWithAttribute("ClassInitializeAttribute"))
     {
         ret.Add(MethodBuildingHelper.BuildMemberAccess(refernece, method));
     }
     foreach (var method in m.DeclaringType.GetMethodsInHierarchyWithAttribute("ClassCleanupAttribute"))
     {
         ret.Add(MethodBuildingHelper.BuildMemberAccess(refernece, method));
     }
     foreach (var method in m.DeclaringType.GetMethodsInHierarchyWithAttribute("TestInitializeAttribute"))
     {
         ret.Add(MethodBuildingHelper.BuildMemberAccess(refernece, method));
     }
     foreach (var method in m.DeclaringType.GetMethodsInHierarchyWithAttribute("TestCleanupAttribute"))
     {
         ret.Add(MethodBuildingHelper.BuildMemberAccess(refernece, method));
     }
     return ret;
 }
 public string GetSpecificallyMangledName(MethodReference target)
 {
     if (!IsTest(target)) return null;
     var ret = MSpecTranslator.TranslateGeneratedMethod(target.ThreadSafeResolve());
     return ret == null ? null : ret.GetCacheName();
 }