예제 #1
0
        }         //method

        private string FormatArg(InputValueDef argDef, object value)
        {
            string strV;

            if (value == null)
            {
                strV = "null";
            }
            else
            {
                strV = argDef.TypeRef.TypeDef.ToSchemaDocString(value);
            }
            return($"{argDef.Name}: {strV}");
        }
예제 #2
0
 private void Append(InputValueDef valueDef, bool indent = false)
 {
     AppendDescr(valueDef.Description, true);
     if (indent)
     {
         _builder.Append(Indent);
     }
     _builder.Append(valueDef.Name);
     _builder.Append(": ");
     _builder.Append(valueDef.TypeRef.Name);
     if (valueDef.HasDefaultValue)
     {
         _builder.Append(" = ");
         var tdef = valueDef.TypeRef.TypeDef;
         _builder.Append(tdef.ToSchemaDocString(valueDef.DefaultValue));
     }
     AppendDirs(valueDef.Directives);
 }