OpenMetaverse.Messages.Linden.UpdateAgentInformationMessage.Serialize C# (CSharp) Method

Serialize() public method

Serialize the object
public Serialize ( ) : OSDMap
return OSDMap
        public OSDMap Serialize()
        {
            OSDMap map = new OSDMap(1);
            OSDMap prefsMap = new OSDMap(1);
            prefsMap["max"] = OSD.FromString(MaxAccess);
            map["access_prefs"] = prefsMap;
            return map;
        }

Usage Example

        public void UpdateAgentInformationMessage()
        {
            UpdateAgentInformationMessage s = new UpdateAgentInformationMessage();
            s.MaxAccess = "PG";
            OSDMap map = s.Serialize();

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

            Assert.AreEqual(s.MaxAccess, t.MaxAccess);
        }
UpdateAgentInformationMessage