internal DatabaseObject(BigDB owner, string table, string key, string version, List <ObjectProperty> properties) { this.Owner = owner; this.Table = table; this.Key = key; this.Version = version; this.Properties = new Dictionary <string, object>(); this.ExistsInDatabase = true; if (properties != null) { this.Properties = (DatabaseEx.FromDictionary(DatabaseEx.ToDictionary(properties)) as DatabaseObject).Properties; } }
/// <summary> /// This method allows you to load a Database Object (properties only) from a TSON string. /// </summary> /// <param name="input"> The TSON string. </param> /// <returns> A database object containing the properties of the deserialized TSON. </returns> public static DatabaseObject LoadFromString(string input) => DatabaseEx.FromDictionary(TsonConvert.DeserializeObject(input)) as DatabaseObject;