示例#1
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            using var tw     = new StringWriter(sb, CultureInfo.InvariantCulture);
            using var writer = new OclWriter(tw);
            writer.Write(this);
            return(sb.ToString());
        }
示例#2
0
        public string Serialize(OclDocument document)
        {
            var sb = new StringBuilder();

            // ReSharper disable once ConvertToUsingDeclaration
            using (var writer = new OclWriter(sb, options))
            {
                writer.Write(document);
            }

            return(sb.ToString());
        }