コード例 #1
0
        public static string ToName(this DetectorType type, DetectorTypeNameForm name)
        {
            switch (name)
            {
            case DetectorTypeNameForm.Normal:
                return(type.ToName());

            case DetectorTypeNameForm.Short:
                return(type.ToShortName());

            default:
                throw new ArgumentException("Unknown name kind");
            }
        }
コード例 #2
0
 public static string ToName(this DetectorType type, DetectorTypeNameForm name)
 {
     switch (name)
     {
         case DetectorTypeNameForm.Normal:
             return type.ToName();
         case DetectorTypeNameForm.Short:
             return type.ToShortName();
         default:
             throw new ArgumentException("Unknown name kind");
     }
 }