public static string AsCircularJson(this IJsCsGlue glue) { var descriptionBuilder = GetConventionedBuilder(); glue.BuilString(descriptionBuilder); return(descriptionBuilder.BuildString()); }
public static string AsCircularJson(this IJsCsGlue glue) { var descriptionBuilder = new DescriptionBuilder("cmd({0})"); glue.BuilString(descriptionBuilder); if (glue.Type == JsCsGlueType.Object) { descriptionBuilder.Prepend($@"{(descriptionBuilder.StringLength > 2 ? "," : "")}""version"":2"); } return(descriptionBuilder.BuildString()); }
public static string AsCircularVersionedJson(this IJsCsGlue glue, int?version = null) { version = version ?? CurrentVersion; var descriptionBuilder = GetConventionedBuilder(); glue.BuilString(descriptionBuilder); if (glue.Type == JsCsGlueType.Object) { descriptionBuilder.Prepend($@"{(descriptionBuilder.StringLength > 2 ? "," : "")}""version"":{version}"); } return(descriptionBuilder.BuildString()); }