Esempio n. 1
0
        public byte[] GetChunk(uint id)
        {
            IAppDataChunk chunk = anim.GetAppDataChunk(cid._IClass_ID, scid, id);

            if (chunk == null)
            {
                return(null);
            }
            return(chunk.Data);
        }
Esempio n. 2
0
        private static Object GetAppData(IAnimatable anim, UInt32 address)
        {
            IAppDataChunk chunk = anim.GetAppDataChunk(ClassID, SuperClassID, address);

            if (chunk == null)
            {
                return(null);
            }

            BinaryFormatter binForm = new BinaryFormatter();

            using (MemoryStream memStream = new MemoryStream())
            {
                memStream.Write(chunk.Data, 0, chunk.Data.Length);
                memStream.Seek(0, SeekOrigin.Begin);
                return(binForm.Deserialize(memStream));
            }
        }