本文整理汇总了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;
}
示例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);
}
示例3: RemoveCritical
public void RemoveCritical (MemberReference member)
{
string entry = member.GetFullName ();
remove_critical.Add (entry);
}
示例4: MarkAsSafeCritical
public void MarkAsSafeCritical (MemberReference member)
{
string entry = member.GetFullName ();
if (!safe_critical.Contains (entry))
safe_critical.Add (entry);
}
示例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;
}
}
示例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);
}
}
示例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);
}