/// <summary> /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>. /// </summary> /// <returns> /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>. /// </returns> public override string ToString() { if (FullName != null) { return(FullName); } StringBuilder result = new StringBuilder(); result.Append(DeclaringType.ToString()); result.Append('.'); result.Append(Name); result.Append('('); if (this.Parameters.Count != 0) { MethodSignature sig = this.Signature; int i = 0; foreach (RuntimeParameter p in this.Parameters) { result.AppendFormat("{0} {1},", sig.Parameters[i++].Type, p.Name); } result.Remove(result.Length - 1, 1); } result.Append(')'); FullName = result.ToString(); return(FullName); }
public override void Execute(Interpreter interpreter) { var typeName = DeclaringType.ToString(); ObjectInstance instance; var reference = interpreter.CreateObjectInstance(interpreter.LookUpType(typeof(string)), out instance); instance["Value"] = typeName; interpreter.PushToStack(reference); }
public override string ToString() { StringBuilder builder = new StringBuilder(); builder.Append(Signature.ReturnType.FullName); builder.Append(" "); builder.Append(DeclaringType.ToString()); builder.Append("::"); builder.Append(Name); if (GenericArguments != null && GenericArguments.Length > 0) { builder.Append("<"); for (int i = 0; i < GenericArguments.Length; i++) { builder.Append(GenericArguments[i].FullName + (i == GenericArguments.Length - 1 ? "": ", ")); } builder.Append(">"); } builder.Append(Signature.GetParameterString()); return(builder.ToString()); }
public override string ToString() { return(DeclaringType.ToString() + "(" + GetParameters().ToString(",") + ")"); }
/// <summary> /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>. /// </summary> /// <returns> /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>. /// </returns> public override string ToString() { return(DeclaringType.ToString() + '.' + Name + " [Type: " + Type.ToString() + ']'); }