static TupleArg[] PopulateTupleArgs(Type type, IList <string> tupleNames, ref int strsOffset)
 {
     if (type.FullName.StartsWith("System.ValueTuple`", StringComparison.Ordinal))
     {
         var tupleArgs  = type.GetGenericArguments();
         var thisOffset = strsOffset;
         strsOffset += tupleArgs.Length;
         var ret = new TupleArg[tupleArgs.Length];
         for (int i = 0; i < tupleArgs.Length; ++i)
         {
             ret[i] = new TupleArg(tupleArgs[i],
                                   (tupleNames != null) ? tupleNames[i + thisOffset] : $"Item{i}",
                                   PopulateTupleArgs(tupleArgs[i], tupleNames, ref strsOffset));
         }
         return(ret);
     }
     return(new[] { new TupleArg(type) });
 }
 public TupleArg(Type type)
 {
     Type = type; Name = "Arg"; TupleArgs = new TupleArg[0];
 }