Exemplo n.º 1
0
        public static string AsCircularJson(this IJsCsGlue glue)
        {
            var descriptionBuilder = GetConventionedBuilder();

            glue.BuilString(descriptionBuilder);
            return(descriptionBuilder.BuildString());
        }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
        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());
        }