public bool Run() { Landmark landmark; Landmark landmarkserialized; AssetData assetdata; m_Log.Info("Serializing grid-local landmark variant"); landmark = new Landmark() { LocalPos = new Vector3(1, 2, 4), Location = new GridVector(1000, 2000), RegionID = UUID.Random }; assetdata = landmark.Asset(); landmarkserialized = new Landmark(assetdata); if (landmarkserialized.GatekeeperURI != null) { m_Log.Fatal("Landmark gatekeeper URI is unexpectedly set"); return(false); } if (landmarkserialized.LocalPos != landmark.LocalPos) { m_Log.Fatal("Landmark LocalPos not identical"); return(false); } if (landmarkserialized.Location.RegionHandle != landmark.Location.RegionHandle) { m_Log.Fatal("Landmark Location not identical"); return(false); } if (landmarkserialized.RegionID != landmark.RegionID) { m_Log.Fatal("Landmark RegionID not identical"); return(false); } m_Log.Info("Serializing HG landmark variant"); landmark = new Landmark() { GatekeeperURI = new URI("http://gatekeeper.example.com/"), LocalPos = new Vector3(1, 2, 4), Location = new GridVector(1000, 2000), RegionID = UUID.Random }; assetdata = landmark.Asset(); landmarkserialized = new Landmark(assetdata); if (!landmarkserialized.GatekeeperURI.Equals(landmark.GatekeeperURI)) { m_Log.FatalFormat("Landmark gatekeeper URI not identical ({0} != {1})", landmarkserialized.GatekeeperURI, landmark.GatekeeperURI); return(false); } if (landmarkserialized.LocalPos != landmark.LocalPos) { m_Log.Fatal("Landmark LocalPos not identical"); return(false); } if (landmarkserialized.Location.RegionHandle != landmark.Location.RegionHandle) { m_Log.Fatal("Landmark Location not identical"); return(false); } if (landmarkserialized.RegionID != landmark.RegionID) { m_Log.Fatal("Landmark RegionID not identical"); return(false); } return(true); }