当前位置: 首页>>代码示例>>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;未经允许,请勿转载。