protected JObject ToJSON(Boolean Embedded, Boolean IncludeLastChange, Boolean IncludeCryptoHash, Func <JObject, JObject> CustomAEntitySerializer = null, params JProperty[] JSONProperties) { var JSON = JSONObject.Create( new JProperty[] { new JProperty("@id", Id.ToString()), Embedded ? null : new JProperty("@context", JSONLDContext.ToString()), CustomData != default ? new JProperty("customData", CustomData) : null, DataSource.IsNotNullOrEmpty() ? new JProperty("dataSource", DataSource) : null, IncludeLastChange ? new JProperty("lastChange", LastChange.ToIso8601()) : null, IncludeCryptoHash ? new JProperty("hashValue", HashValue) : null }.
public void UpdateCount(int count) { if (Count == count) { return; } LastUpdated = DateTime.Now; LastChange = count - Count; LastChangeDescription = LastChange.ToString(); if (!LastChangeDescription.StartsWith("-")) { LastChangeDescription = $"+{LastChangeDescription}"; } this.Count = count; }
public override string ToString() { return(string.Format("\nID:{0}\nCategory:{10}\nTitle:{1}\nPrice:{2}\nPostDate:{3}\nLastChange:{4}\nLocation:{5}\nPhoneSaler:{7}\nQuality:{8}\nAddress:{9}\nContent:{6}", ID.ToString() , Title.ToString() , Price.ToString() , PostDate.ToString() , LastChange.ToString() , Location , Content , PhoneSaler , Quality , Address , Category )); }
public override string ToString() { return(string.Format("ID:{0}\nTitle:{1}\nPrice:{2}\nPostDate:{3}\nLastChange:{4}", ID.ToString(), Title.ToString(), Price.ToString(), PostDate.ToString(), LastChange.ToString())); }