当前位置: 首页>>代码示例>>C#>>正文


C# MemberReference.ToString方法代码示例

本文整理汇总了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();
		}
开发者ID:KevinCathcart,项目名称:ILSpy,代码行数:11,代码来源:Language.cs

示例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());
 }
开发者ID:vanika,项目名称:xRAT,代码行数:11,代码来源:Renamer.cs

示例3: GetMemberReference

		public MemberReference GetMemberReference (MemberReferenceCollection members, MemberReference member)
		{
			foreach (MemberReference mr in members) {
				if (mr.ToString () == member.ToString ())
					return mr;
			}
			return null;
		}
开发者ID:transformersprimeabcxyz,项目名称:cecil-old,代码行数:8,代码来源:BaseMergeReflectionVisitor.cs

示例4: GetMemberReference

        protected MemberReference GetMemberReference(MemberReference member)
        {
            foreach (MemberReference reference in m_module.MemberReferences)
                if (reference.ToString () == member.ToString ())
                    return reference;

            return null;
        }
开发者ID:sidecut,项目名称:xaeios,代码行数:8,代码来源:DefaultImporter.cs

示例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;
			}
		}
开发者ID:nolanlum,项目名称:mono-tools,代码行数:10,代码来源:DontIgnoreMethodResultRule.cs

示例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 ();
		}
开发者ID:sharpos,项目名称:SharpOS,代码行数:37,代码来源:Class.cs


注:本文中的Mono.Cecil.MemberReference.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。