Exemplo n.º 1
0
        /// <summary>
        /// Serialization handler for the InventoryNode Class
        /// </summary>
        public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
        {
            if (parent != null)
            {
                info.AddValue("Parent", parent.Data.UUID, typeof(UUID)); //We need to track the parent UUID for de-serialization
            }
            else
            {
                info.AddValue("Parent", UUID.Zero, typeof(UUID));
            }

            info.AddValue("Type", data.GetType(), typeof(Type));

            data.GetObjectData(info, ctxt);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Serialization handler for the InventoryNode Class
        /// </summary>
        public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
        {
            if (parent != null)
            {
                info.AddValue("Parent", parent.Data.UUID, typeof(UUID)); //We need to track the parent UUID for de-serialization
            }
            else
            {
                info.AddValue("Parent", UUID.Zero, typeof(UUID));
            }

            info.AddValue("Type", data.GetType(), typeof(Type));

            if (data is InventoryAnimation)
            {
                ((InventoryAnimation)data).GetObjectData(info, ctxt);
            }
            if (data is InventoryAttachment)
            {
                ((InventoryAttachment)data).GetObjectData(info, ctxt);
            }
            if (data is InventoryCallingCard)
            {
                ((InventoryCallingCard)data).GetObjectData(info, ctxt);
            }
            if (data is InventoryFolder)
            {
                ((InventoryFolder)data).GetObjectData(info, ctxt);
            }
            if (data is InventoryGesture)
            {
                ((InventoryGesture)data).GetObjectData(info, ctxt);
            }
            if (data is InventoryLandmark)
            {
                ((InventoryLandmark)data).GetObjectData(info, ctxt);
            }
            if (data is InventoryLSL)
            {
                ((InventoryLSL)data).GetObjectData(info, ctxt);
            }
            if (data is InventoryNotecard)
            {
                ((InventoryNotecard)data).GetObjectData(info, ctxt);
            }
            if (data is InventoryObject)
            {
                ((InventoryObject)data).GetObjectData(info, ctxt);
            }
            if (data is InventorySnapshot)
            {
                ((InventorySnapshot)data).GetObjectData(info, ctxt);
            }
            if (data is InventorySound)
            {
                ((InventorySound)data).GetObjectData(info, ctxt);
            }
            if (data is InventoryTexture)
            {
                ((InventoryTexture)data).GetObjectData(info, ctxt);
            }
            if (data is InventoryWearable)
            {
                ((InventoryWearable)data).GetObjectData(info, ctxt);
            }
        }