Kirikiri.Tjs2.ArrayNI.SaveStructuredData C# (CSharp) Method

SaveStructuredData() public method

public SaveStructuredData ( AList stack, TextWriteStreamInterface stream, string indentstr ) : void
stack AList
stream TextWriteStreamInterface
indentstr string
return void
        public virtual void SaveStructuredData(AList<Dispatch2> stack, TextWriteStreamInterface
            stream, string indentstr)
        {
            stream.Write("(const) [\n");
            string indentstr2 = indentstr + " ";
            int count = mItems.Count;
            for (int i = 0; i < count; i++)
            {
                Variant v = mItems[i];
                stream.Write(indentstr2);
                if (v.IsObject())
                {
                    // object
                    VariantClosure clo = v.AsObjectClosure();
                    SaveStructuredDataForObject(clo.SelectObject(), stack, stream, indentstr2);
                }
                else
                {
                    stream.Write(Utils.VariantToExpressionString(v));
                }
                if (i != mItems.Count - 1)
                {
                    // unless last
                    stream.Write(",\n");
                }
                else
                {
                    stream.Write("\n");
                }
            }
            stream.Write(indentstr);
            stream.Write("]");
        }