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


C# MemberReference.GetFullName方法代碼示例

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


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

示例1: Annotate

	static bool Annotate (MemberReference member, string note)
	{
		if (String.IsNullOrWhiteSpace (note))
			return true;

		note = note.Trim ();

		List<string> list;
		string entry = member.GetFullName ();
		if (!annotations.TryGetValue (entry, out list)) {
			list = new List<string> ();
			annotations.Add (entry, list);
			list.Add (note);
		} else if (!list.Contains (note)) {
			list.Add (note);
		}
		return true;
	}
開發者ID:dfr0,項目名稱:moon,代碼行數:18,代碼來源:detect.cs

示例2: MarkAsCritical

	public void MarkAsCritical (MemberReference member)
	{
		string entry = member.GetFullName ();
		if (remove_critical.Contains (entry))
			return;

		if (!critical.Contains (entry))
			critical.Add (entry);

		if (safe_critical.Contains (entry))
			safe_critical.Remove (entry);
	}
開發者ID:dfr0,項目名稱:moon,代碼行數:12,代碼來源:detect.cs

示例3: RemoveCritical

	public void RemoveCritical (MemberReference member)
	{
		string entry = member.GetFullName ();
		remove_critical.Add (entry);
	}
開發者ID:dfr0,項目名稱:moon,代碼行數:5,代碼來源:detect.cs

示例4: MarkAsSafeCritical

	public void MarkAsSafeCritical (MemberReference member)
	{
		string entry = member.GetFullName ();
		if (!safe_critical.Contains (entry))
			safe_critical.Add (entry);
	}
開發者ID:dfr0,項目名稱:moon,代碼行數:6,代碼來源:detect.cs

示例5: IsNewException

		private static bool IsNewException (MemberReference method)
		{
			switch (method.GetFullName ()) {
			// supplying a callback is enough to make the Timer creation worthwhile
			case "System.Void System.Threading.Timer::.ctor(System.Threading.TimerCallback,System.Object,System.Int32,System.Int32)":
				return true;
			default:
				return false;
			}
		}
開發者ID:remobjects,項目名稱:mono-tools,代碼行數:10,代碼來源:DontIgnoreMethodResultRule.cs

示例6: CheckIfBaseDisposeIsCalled

		private void CheckIfBaseDisposeIsCalled (MethodDefinition method, MemberReference baseMethod)
		{
			bool found = false;

			if (method.HasBody) {
				OpCodeBitmask bitmask = OpCodeEngine.GetBitmask (method);
				if (bitmask.Get (Code.Ldarg_0) && (OpCodeBitmask.Calls.Intersect (bitmask))) {

					//Check for a call to base.Dispose();
					foreach (Instruction ins in method.Body.Instructions) {
						if (ins.OpCode.Code != Code.Ldarg_0) //ldarg_0 (this)
							continue;

						Instruction call = ins.Next; //call baseMethod
						if (call == null)
							continue;
						if (call.OpCode.Code != Code.Call && call.OpCode.Code != Code.Callvirt)
							continue;
						MethodReference calledMethod = (MethodReference) call.Operand;
						if (calledMethod.GetFullName () != baseMethod.GetFullName ())
							continue;
						found = true;
					}
				}
			}

			if (!found) {
				string s = String.Format (CultureInfo.InvariantCulture, "{0} should call base.Dispose().", method.GetFullName ());
				Runner.Report (method, Severity.Medium, Confidence.High, s);
			}
		}
開發者ID:FreeBSD-DotNet,項目名稱:mono-tools,代碼行數:31,代碼來源:DisposableFieldsShouldBeDisposedRule.cs

示例7: ResolveMethod

		private void ResolveMethod (MemberReference method)
		{
			HashSet<string> rules;

			string m = method.GetFullName ();
			m = m.Substring (m.IndexOf (' ') + 1);

			if (targets.TryGetValue (m, out rules))
				Add (method, rules);
		}
開發者ID:col42dev,項目名稱:mono-tools,代碼行數:10,代碼來源:SuppressMessageEngine.cs


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