コード例 #1
0
ファイル: JsGlueExtension.cs プロジェクト: zengfr/Neutronium
        public static string AsCircularJson(this IJsCsGlue glue)
        {
            var descriptionBuilder = GetConventionedBuilder();

            glue.BuilString(descriptionBuilder);
            return(descriptionBuilder.BuildString());
        }
コード例 #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());
        }
コード例 #3
0
ファイル: JsGlueExtension.cs プロジェクト: zengfr/Neutronium
        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());
        }