本文整理汇总了C#中Mono.Cecil.MemberReference.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# MemberReference.ToString方法的具体用法?C# MemberReference.ToString怎么用?C# MemberReference.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Cecil.MemberReference
的用法示例。
在下文中一共展示了MemberReference.ToString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTooltip
/// <summary>
/// Converts a member signature to a string.
/// This is used for displaying the tooltip on a member reference.
/// </summary>
public virtual string GetTooltip(MemberReference member)
{
if (member is TypeReference)
return TypeToString((TypeReference)member, true);
else
return member.ToString();
}
示例2: GiveName
public void GiveName(MemberReference member)
{
string currentName = GetCurrentName();
string originalName = member.ToString();
member.Name = currentName;
while (_renamedMembers.ContainsValue(member.ToString()))
{
member.Name = GetCurrentName();
}
_renamedMembers.Add(originalName, member.ToString());
}
示例3: GetMemberReference
public MemberReference GetMemberReference (MemberReferenceCollection members, MemberReference member)
{
foreach (MemberReference mr in members) {
if (mr.ToString () == member.ToString ())
return mr;
}
return null;
}
示例4: GetMemberReference
protected MemberReference GetMemberReference(MemberReference member)
{
foreach (MemberReference reference in m_module.MemberReferences)
if (reference.ToString () == member.ToString ())
return reference;
return null;
}
示例5: IsNewException
private static bool IsNewException (MemberReference method)
{
switch (method.ToString ()) {
// 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: GetTypeFullName
internal static string GetTypeFullName (MemberReference type)
{
if (type is TypeDefinition) {
TypeDefinition typeDefinition = type as TypeDefinition;
foreach (CustomAttribute attribute in typeDefinition.CustomAttributes) {
if (!attribute.Constructor.DeclaringType.FullName.Equals (typeof (SharpOS.AOT.Attributes.TargetNamespaceAttribute).ToString ()))
continue;
return attribute.ConstructorParameters [0].ToString () + "." + type.Name;
}
} else if (type is FieldReference) {
FieldReference typeDefinition = type as FieldReference;
foreach (CustomAttribute attribute in typeDefinition.DeclaringType.CustomAttributes) {
if (!attribute.Constructor.DeclaringType.FullName.Equals (typeof (SharpOS.AOT.Attributes.TargetNamespaceAttribute).ToString ()))
continue;
return attribute.ConstructorParameters [0].ToString () + "." + type.DeclaringType.Name;
}
return typeDefinition.DeclaringType.FullName;
} else if (type is TypeSpecification) {
TypeSpecification typeSpecification = type as TypeSpecification;
foreach (CustomAttribute attribute in typeSpecification.ElementType.CustomAttributes) {
if (!attribute.Constructor.DeclaringType.FullName.Equals (typeof (SharpOS.AOT.Attributes.TargetNamespaceAttribute).ToString ()))
continue;
return attribute.ConstructorParameters [0].ToString () + "." + typeSpecification.Name;
}
}
return type.ToString ();
}