ToString() public method

public ToString ( ) : string
return string
Esempio n. 1
0
    MemberReference GetMemberReference (MemberReference member)
    {
        foreach (MemberReference reference in m_module.MemberReferences)
            if (reference.ToString () == member.ToString ())
                return reference;

        return null;
    }
Esempio n. 2
0
        MemberReference GetMemberReference(MemberReference member)
        {
            foreach (MemberReference reference in m_module.MemberReferences)
            {
                if (reference.ToString() == member.ToString())
                {
                    return(reference);
                }
            }

            return(null);
        }
Esempio n. 3
0
		/// <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();
		}
Esempio n. 4
0
 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());
 }
		public MemberReference GetMemberReference (MemberReferenceCollection members, MemberReference member)
		{
			foreach (MemberReference mr in members) {
				if (mr.ToString () == member.ToString ())
					return mr;
			}
			return null;
		}
Esempio n. 6
0
        protected MemberReference GetMemberReference(MemberReference member)
        {
            foreach (MemberReference reference in m_module.MemberReferences)
                if (reference.ToString () == member.ToString ())
                    return reference;

            return null;
        }
		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;
			}
		}
Esempio n. 8
0
		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 ();
		}