Ejemplo n.º 1
0
 /// <inheritdoc />
 public override string ToString()
 {
     if (ArrayElementType != null)
     {
         return($"ARRAY<{ArrayElementType}>");
     }
     if (StructMembers != null && StructMembers.Count > 0)
     {
         var s = new StringBuilder();
         foreach (var keyValuePair in StructMembers)
         {
             s.Append(s.Length == 0 ? "STRUCT<" : ", ");
             s.Append($"{keyValuePair.Key}:{keyValuePair.Value}");
         }
         s.Append(">");
         return(s.ToString());
     }
     return(Size.HasValue ? $"{TypeCode.GetOriginalName()}({Size})" : TypeCode.GetOriginalName());
 }
Ejemplo n.º 2
0
 /// <inheritdoc />
 public override string ToString()
 {
     if (ArrayElementType != null)
     {
         return($"ARRAY<{ArrayElementType}>");
     }
     if (StructFields != null && StructFields.Count > 0)
     {
         var s = new StringBuilder();
         foreach (var field in StructFields)
         {
             s.Append(s.Length == 0 ? "STRUCT<" : ", ");
             s.Append(field.Name == "" ? field.Type.ToString() : $"{field.Name}: {field.Type}");
         }
         s.Append(">");
         return(s.ToString());
     }
     return(Size.HasValue ? $"{TypeCode.GetOriginalName()}({Size})" : TypeCode.GetOriginalName());
 }