Example #1
0
        protected override Stream UnParse()
        {
            var outputStream = new MemoryStream();
            var s            = new BinaryStreamWrapper(outputStream, ByteOrder.BigEndian);

            s.Write(mVersion);
            if (mEffectSections == null)
            {
                mEffectSections = new EffectSectionList(OnResourceChanged);
            }
            mEffectSections.UnParse(outputStream);
            if (mResourceSections == null)
            {
                mResourceSections = new ResourceSectionList(OnResourceChanged);
            }
            mResourceSections.UnParse(outputStream);
            if (mVisualEffectSections == null)
            {
                mVisualEffectSections = new VisualEffectSection(0, OnResourceChanged, 2);
            }
            s.Write(mVisualEffectSections.Version);
            mVisualEffectSections.UnParse(outputStream);
            if (mVisualEffectIds == null)
            {
                mVisualEffectIds = new VisualEffectIdList(OnResourceChanged);
            }
            mVisualEffectIds.UnParse(outputStream);
            if (mVisualEffectNames == null)
            {
                mVisualEffectNames = new VisualEffectNameList(OnResourceChanged);
            }
            mVisualEffectNames.UnParse(outputStream);
            return(outputStream);
        }