Beispiel #1
0
        public override string ToString()
        {
            StringBuilder sbName = new StringBuilder(Name);

            sbName.Append("Void ");

            sbName.Append("(");
            RuntimeParameterInfo.FormatParameters(sbName, GetParametersNoCopy(), CallingConvention);
            sbName.Append(")");

            return(sbName.ToString());
        }
Beispiel #2
0
        private string FormatNameAndSig()
        {
            // Serialization uses ToString to resolve MethodInfo overloads.
            StringBuilder sbName = new StringBuilder(Name);

            if (IsGenericMethod)
                sbName.Append(RuntimeMethodHandle.ConstructInstantiation(this, TypeNameFormatFlags.FormatBasic));

            sbName.Append('(');
            RuntimeParameterInfo.FormatParameters(sbName, GetParametersNoCopy(), CallingConvention);
            sbName.Append(')');

            return sbName.ToString();
        }
        private string FormatNameAndSig()
        {
            StringBuilder sbName = new StringBuilder(PropertyType.FormatTypeName());

            sbName.Append(' ');
            sbName.Append(Name);

            ParameterInfo[] pi = GetIndexParameters();
            if (pi.Length > 0)
            {
                sbName.Append(" [");
                RuntimeParameterInfo.FormatParameters(sbName, pi, 0);
                sbName.Append(']');
            }

            return(sbName.ToString());
        }
        public override string ToString()
        {
#if NETCORE
            StringBuilder sbName = new StringBuilder(Name);
            sbName.Append("Void ");

            TypeNameFormatFlags format = TypeNameFormatFlags.FormatBasic;

            sbName.Append("(");
            RuntimeParameterInfo.FormatParameters(sbName, GetParametersNoCopy(), CallingConvention, false);
            sbName.Append(")");

            return(sbName.ToString());
#else
            return("Void " + FormatNameAndSig(false));
#endif
        }
Beispiel #5
0
        private string FormatNameAndSig(bool serialization)
        {
            StringBuilder sbName = new StringBuilder(PropertyType.FormatTypeName(serialization));

            sbName.Append(" ");
            sbName.Append(Name);

            var pi = GetIndexParameters();

            if (pi.Length > 0)
            {
                sbName.Append(" [");
                RuntimeParameterInfo.FormatParameters(sbName, pi, 0, serialization);
                sbName.Append("]");
            }

            return(sbName.ToString());
        }
Beispiel #6
0
        internal override string FormatNameAndSig(bool serialization)
        {
            // Serialization uses ToString to resolve MethodInfo overloads.
            StringBuilder sbName = new StringBuilder(Name);

            // serialization == true: use unambiguous (except for assembly name) type names to distinguish between overloads.
            // serialization == false: use basic format to maintain backward compatibility of MethodInfo.ToString().
            TypeNameFormatFlags format = serialization ? TypeNameFormatFlags.FormatSerialization : TypeNameFormatFlags.FormatBasic;

            if (IsGenericMethod)
            {
                sbName.Append(RuntimeMethodHandle.ConstructInstantiation(this, format));
            }

            sbName.Append("(");
            RuntimeParameterInfo.FormatParameters(sbName, GetParametersNoCopy(), CallingConvention, serialization);
            sbName.Append(")");

            return(sbName.ToString());
        }
Beispiel #7
0
        private string FormatNameAndSig(bool serialization)
        {
#if NETCORE
            throw new NotImplementedException();
#else
            StringBuilder sbName = new StringBuilder(PropertyType.FormatTypeName(serialization));

            sbName.Append(" ");
            sbName.Append(Name);

            var pi = GetIndexParameters();
            if (pi.Length > 0)
            {
                sbName.Append(" [");
                RuntimeParameterInfo.FormatParameters(sbName, pi, 0, serialization);
                sbName.Append("]");
            }

            return(sbName.ToString());
#endif
        }