Serialize() публичный Метод

Serialize the object
public Serialize ( ) : OSDMap
Результат OSDMap
        public void ScriptRunningReplyMessage()
        {
            ScriptRunningReplyMessage s = new ScriptRunningReplyMessage();
            s.ItemID = UUID.Random();
            s.Mono = true;
            s.Running = true;
            s.ObjectID = UUID.Random();

            OSDMap map = s.Serialize();

            ScriptRunningReplyMessage t = new ScriptRunningReplyMessage();
            t.Deserialize(map);

            Assert.AreEqual(s.ItemID, t.ItemID);
            Assert.AreEqual(s.Mono, t.Mono);
            Assert.AreEqual(s.ObjectID, t.ObjectID);
            Assert.AreEqual(s.Running, t.Running);
        }
Пример #2
0
        private void GetScriptRunningHandler(Packet packet, LLAgent agent)
        {
            GetScriptRunningPacket getRunning = (GetScriptRunningPacket)packet;

            ScriptRunningReplyMessage reply = new ScriptRunningReplyMessage();
            reply.ItemID = getRunning.Script.ItemID; ;
            reply.ObjectID = getRunning.Script.ObjectID;
            reply.Running = m_scriptEngine.IsScriptRunning(getRunning.Script.ItemID);
            reply.Mono = true;

            agent.EventQueue.QueueEvent("ScriptRunningReply", reply.Serialize());
        }