private string FormatMethodName(ParamValueOutputOptions valueOutputOptions = ParamValueOutputOptions.NoValue)
 {
     return(string.Format("{0}{1}.{2}",
                          this.IsStaticMethod ? "static " : this.FormatThisValue(valueOutputOptions),
                          this.ClassType.FormatCSharp(),
                          this.MethodReflectionInfo.Name
                          ));
 }
        public string GetMethodSignature(ParamValueOutputOptions valueOutputOptions = ParamValueOutputOptions.NoValue)
        {
            string signature = string.Format("{0} {1}({2})",
                                             this.MethodReturnType.FormatCSharp(),
                                             this.FormatMethodName(valueOutputOptions),
                                             this.FormatMethodParameters(valueOutputOptions)
                                             );

            return(signature);
        }
        public string ToString(ParamValueOutputOptions options)
        {
            string paramStrValue = null;

            if (options != ParamValueOutputOptions.NoValue)
            {
                paramStrValue = string.Format(" = {0}", this.FormatSlowEvaluatingValue(options == ParamValueOutputOptions.SlowUIValue));
            }

            string paramString = string.Format("{0} {1}{2}", this.ParamReflection.FormatCSharpType(), this.Name, paramStrValue);

            return(paramString);
        }
        private string FormatThisValue(ParamValueOutputOptions valueOutputOptions)
        {
            if (this.IsStaticMethod || valueOutputOptions == ParamValueOutputOptions.NoValue || this.IsReturnResultInvariant)
            {
                return(string.Empty);
            }

            object val  = this.methodInstance;
            Type   type = val == null ? null : val.GetType();

            string thisValueStr = InterceptedMethodParamMetadata.FormatParamValue(type, val, valueOutputOptions == ParamValueOutputOptions.SlowUIValue);

            return(string.Format("[this = {0}] ", thisValueStr));
        }
 private string FormatMethodParameters(ParamValueOutputOptions valueOutputOptions = ParamValueOutputOptions.NoValue)
 {
     return(string.Join(", ", this.Params.Select(pinfo => pinfo.ToString(valueOutputOptions))));
 }