當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。