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


C# MethodDefinition.ExternallyVisible方法代碼示例

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


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

示例1: VisitMethod

		public void VisitMethod(MethodDefinition method)
		{				
			if (method.ExternallyVisible(Cache))
			{
				Log.DebugLine(this, "-----------------------------------"); 
				Log.DebugLine(this, "checking {0}", method.Name);				

				if (DoObsoleteTerm(method.Name))
				{
					Reporter.MethodFailed(method, CheckID, 0, string.Empty);
				}
				else
				{
					foreach (ParameterDefinition arg in method.Parameters)
					{
						Log.DebugLine(this, "checking {0}", arg.Name);				
						if (DoObsoleteTerm(arg.Name))
						{
							Reporter.MethodFailed(method, CheckID, 0, string.Empty);
							break;
						}
					}
				}
			}
		}
開發者ID:dbremner,項目名稱:smokey,代碼行數:25,代碼來源:PreferredTermRule.cs

示例2: VisitMethod

		public void VisitMethod(MethodDefinition method)
		{
			Log.DebugLine(this, "{0}", method);
			Log.DebugLine(this, "   IsPInvokeImpl: {0}", method.IsPInvokeImpl);
			Log.DebugLine(this, "   IsUnmanagedExport: {0}", method.IsUnmanagedExport);
			
			if (method.IsPInvokeImpl)
			{
				if (method.ExternallyVisible(Cache))
				{
					Reporter.MethodFailed(method, CheckID, 0, string.Empty);
				}
			}
		}
開發者ID:dbremner,項目名稱:smokey,代碼行數:14,代碼來源:VisiblePInvokeRule.cs

示例3: VisitMethod

		public void VisitMethod(MethodDefinition method)
		{						
			if (method.ExternallyVisible(Cache))
			{
				m_methods.Add(method.Name);
				
				List<string> args = new List<string>();
				foreach (ParameterDefinition p in method.Parameters)
					args.Add(p.Name);
	
				List<string> bad = new List<string>();
				DoGetMatches(bad, args, "Arguments: ");
	
				if (bad.Count == 1)
				{
					Log.DebugLine(this, bad[0]);
					Reporter.MethodFailed(method, CheckID, 0, bad[0]);
				}
			}
		}
開發者ID:dbremner,項目名稱:smokey,代碼行數:20,代碼來源:IdentifierCasingRule.cs


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