當前位置: 首頁>>代碼示例>>C#>>正文


C# MethodReference.ThreadSafeResolve方法代碼示例

本文整理匯總了C#中Mono.Cecil.MethodReference.ThreadSafeResolve方法的典型用法代碼示例。如果您正苦於以下問題:C# MethodReference.ThreadSafeResolve方法的具體用法?C# MethodReference.ThreadSafeResolve怎麽用?C# MethodReference.ThreadSafeResolve使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Mono.Cecil.MethodReference的用法示例。


在下文中一共展示了MethodReference.ThreadSafeResolve方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: IsTeardown

 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;
 }
開發者ID:jeroldhaas,項目名稱:ContinuousTests,代碼行數:9,代碼來源:xUnitTestIdentifier.cs

示例2: IsSetup

 public bool IsSetup(MethodReference target)
 {
     var def = target.ThreadSafeResolve();
     if (def != null && def.IsConstructor)
     {
         return IsXunitFixture(target);
     }
     return false;
 }
開發者ID:jeroldhaas,項目名稱:ContinuousTests,代碼行數:9,代碼來源:xUnitTestIdentifier.cs

示例3: GetHiddenDependenciesForTest

 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;
 }
開發者ID:jeroldhaas,項目名稱:ContinuousTests,代碼行數:23,代碼來源:MSTestTestIdentifier.cs

示例4: GetSpecificallyMangledName

 public string GetSpecificallyMangledName(MethodReference target)
 {
     if (!IsTest(target)) return null;
     var ret = MSpecTranslator.TranslateGeneratedMethod(target.ThreadSafeResolve());
     return ret == null ? null : ret.GetCacheName();
 }
開發者ID:jeroldhaas,項目名稱:ContinuousTests,代碼行數:6,代碼來源:mSpecTestIdentifier.cs


注:本文中的Mono.Cecil.MethodReference.ThreadSafeResolve方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。