~a-schlapsi/nunit-3.0/linux-makefile

« back to all changes in this revision

Viewing changes to src/framework/Internal/MethodHelper.cs

  • Committer: Andreas Schlapsi
  • Date: 2010-01-23 23:14:05 UTC
  • mfrom: (18.1.137 work)
  • Revision ID: a.schlapsi@gmx.at-20100123231405-17deqoh18nfnbq1j
Merged with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
using System.Reflection;
26
26
using System.Text;
27
27
 
28
 
namespace NUnit.Core
 
28
namespace NUnit.Framework.Internal
29
29
{
 
30
    /// <summary>
 
31
    /// MethodHelper provides static methods for working with methods.
 
32
    /// </summary>
30
33
    public class MethodHelper
31
34
    {
 
35
        /// <summary>
 
36
        /// Gets the display name for a method as used by NUnit.
 
37
        /// </summary>
 
38
        /// <param name="method">The method for which a display name is needed.</param>
 
39
        /// <param name="arglist">The arguments provided.</param>
 
40
        /// <returns>The display name for the method</returns>
32
41
        public static string GetDisplayName(MethodInfo method, object[] arglist)
33
42
        {
34
43
            StringBuilder sb = new StringBuilder(method.Name);
66
75
        private static string GetDisplayString(object arg)
67
76
        {
68
77
            string display = arg == null 
69
 
                ? "null" 
70
 
                : Convert.ToString( arg, System.Globalization.CultureInfo.InvariantCulture);
 
78
                ? "null"
 
79
#if NETCF_1_0
 
80
                : Convert.ToString( arg );
 
81
#else
 
82
                : Convert.ToString(arg, System.Globalization.CultureInfo.InvariantCulture);
 
83
#endif
71
84
 
72
85
            if (arg is double)
73
86
            {