Beispiel #1
0
            private string BuildExceptionMessage()
            {
                StringBuilder sb = new StringBuilder()
                                   .Append("No matching method found in the type ")
                                   .Append(_targetType)
                                   .Append(" for signature ")
                                   .Append(_returnType).Append(" ")
                                   .Append(_methodName).Append("(");

                if (_parameterTypes.Length > 0)
                {
                    foreach (Type parameter in _parameterTypes)
                    {
                        sb.Append(parameter).Append(", ");
                    }
                    sb.Length -= 2;
                }
                sb.Append(") with binding flags: ").Append(_bindingAttr);
                if (MethodFilter != null)
                {
                    sb.Append(" with filter ").Append(MethodFilterMessage ?? MethodFilter.ToString());
                }
                sb.Append(".");
                return(sb.ToString());
            }
        private string BuildExceptionMessage()
        {
            StringBuilder sb = new StringBuilder()
                               .Append("No matching method found in the type ")
                               .Append(_targetType)
                               .Append(" for signature ")
                               .Append(_returnType).Append(" ")
                               .Append(_methodName).Append("(");

            sb.AppendArrayCommaSeparated(_parameterTypes);
            sb.Append(") with binding flags: ").Append(_bindingAttr);
            if (MethodFilter != null)
            {
                sb.Append(" with filter ").Append(MethodFilterMessage ?? MethodFilter.ToString());
            }
            sb.Append(".");
            return(sb.ToString());
        }