diff options
Diffstat (limited to 'OpenSim/Region/Environment/Types/UpdateQueue.cs')
-rw-r--r-- | OpenSim/Region/Environment/Types/UpdateQueue.cs | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Types/UpdateQueue.cs b/OpenSim/Region/Environment/Types/UpdateQueue.cs index 0078678..ce0927c 100644 --- a/OpenSim/Region/Environment/Types/UpdateQueue.cs +++ b/OpenSim/Region/Environment/Types/UpdateQueue.cs | |||
@@ -30,9 +30,14 @@ using System.Collections.Generic; | |||
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | using OpenSim.Region.Environment.Scenes; | 31 | using OpenSim.Region.Environment.Scenes; |
32 | 32 | ||
33 | using System; | ||
34 | using System.Runtime.Serialization; | ||
35 | using System.Security.Permissions; | ||
36 | |||
33 | namespace OpenSim.Region.Environment.Types | 37 | namespace OpenSim.Region.Environment.Types |
34 | { | 38 | { |
35 | public class UpdateQueue | 39 | [Serializable] |
40 | public class UpdateQueue : ISerializable | ||
36 | { | 41 | { |
37 | private Queue<SceneObjectPart> m_queue; | 42 | private Queue<SceneObjectPart> m_queue; |
38 | 43 | ||
@@ -86,5 +91,46 @@ namespace OpenSim.Region.Environment.Types | |||
86 | 91 | ||
87 | return part; | 92 | return part; |
88 | } | 93 | } |
94 | |||
95 | protected UpdateQueue(SerializationInfo info, StreamingContext context) | ||
96 | { | ||
97 | //System.Console.WriteLine("UpdateQueue Deserialize BGN"); | ||
98 | |||
99 | if (info == null) | ||
100 | { | ||
101 | throw new System.ArgumentNullException("info"); | ||
102 | } | ||
103 | |||
104 | m_queue = (Queue<SceneObjectPart>)info.GetValue("m_queue", typeof(Queue<SceneObjectPart>)); | ||
105 | List<Guid> ids_work = (List<Guid>)info.GetValue("m_ids", typeof(List<Guid>)); | ||
106 | |||
107 | foreach (Guid guid in ids_work) | ||
108 | { | ||
109 | m_ids.Add(new LLUUID(guid)); | ||
110 | } | ||
111 | |||
112 | //System.Console.WriteLine("UpdateQueue Deserialize END"); | ||
113 | } | ||
114 | |||
115 | [SecurityPermission(SecurityAction.LinkDemand, | ||
116 | Flags = SecurityPermissionFlag.SerializationFormatter)] | ||
117 | public virtual void GetObjectData( | ||
118 | SerializationInfo info, StreamingContext context) | ||
119 | { | ||
120 | if (info == null) | ||
121 | { | ||
122 | throw new System.ArgumentNullException("info"); | ||
123 | } | ||
124 | |||
125 | List<Guid> ids_work = new List<Guid>(); | ||
126 | |||
127 | foreach (LLUUID uuid in m_ids) | ||
128 | { | ||
129 | ids_work.Add(uuid.UUID); | ||
130 | } | ||
131 | |||
132 | info.AddValue("m_queue", m_queue); | ||
133 | info.AddValue("m_ids", ids_work); | ||
134 | } | ||
89 | } | 135 | } |
90 | } \ No newline at end of file | 136 | } |