public static ObjectDto RetrieveObjectHeadVersion(Type actualType, string objUuid) { string json = _persistentObj.RetrieveObjectJsonHeadVersion(objUuid); var obj = Jsonizer.Deserialize(json, actualType); // This is a hack! If we don't do this, we will have to make Uuid property public, // or accessible to outsiders, in which case it is open to modification. Therefore // we have made this property internal. Which also means that the Newton Json library // will also *not* be able to access it. Thusly, this hack. It hurts, but what the heck! obj.Uuid = objUuid; obj.VersionIndex = _persistentObj.GetObjectLastVersionNumber(objUuid); return(obj); }