public override string ToString() { var str = base.ToString() + String.Format( " | UserId: {0} | State: {1} | Name: {2} | From: {3} | City: {4} | BodyBuild: {5} | EyeColor: {6} | HairColor: {7} | Smokes: {8} | Alcohol: {9} | DickSize: {13} | DickThickness: {14} | BreastSize: {15} | Religion: {10} | Height: {11} | BirthYear: {12}", (User == null) ? 0 : User.Id, "REMOVED", Name, Location, "", Enum.GetName(typeof(BodyBuild), BodyBuild), Enum.GetName(typeof(EyeColor), EyeColor), Enum.GetName(typeof(HairColor), HairColor), Enum.GetName(typeof(Smokes), Smokes), Enum.GetName(typeof(Alcohol), Alcohol), Enum.GetName(typeof(Religion), Religion), Enum.GetName(typeof(DickSize), DickSize), Enum.GetName(typeof(DickThickness), DickThickness), Enum.GetName(typeof(BreastSize), BreastSize), Height, BirthYear ); if (Searches != null && Searches.Count > 0) { str += "\r\nSearches: [\r\n"; str = Searches.Aggregate(str, (current, search) => current + ("\t" + search.ToString() + "\r\n")); str += "]"; } if (Photos != null && Photos.Count > 0) { str += "\r\nPhotos: [\r\n"; str = Photos.Aggregate(str, (current, photo) => current + ("\t" + photo + "\r\n")); str += "]"; } if (CountriesToVisit != null && CountriesToVisit.Count > 0) { str += "\r\nCountriesToVisit: [\r\n"; str = CountriesToVisit.Aggregate(str, (current, countriesToVisit) => current + ("\t" + countriesToVisit + "\r\n")); str += "]"; } if (LanguagesSpoken != null && LanguagesSpoken.Count > 0) { str += "\r\nLanguagesSpoken: [\r\n"; str = LanguagesSpoken.Aggregate(str, (current, languagesSpoken) => current + ("\t" + languagesSpoken + "\r\n")); str += "]"; } return(str); }
public string ToHtml(int index) { var rentalHtml = RentalTemplate; rentalHtml = rentalHtml.Replace("[Url]", Url); rentalHtml = rentalHtml.Replace("[Title]", $"{index}. {Title}"); rentalHtml = rentalHtml.Replace("[Location]", Location); rentalHtml = rentalHtml.Replace("[Price]", Rent); rentalHtml = rentalHtml.Replace("[SquareFeet]", RentPerSquareFeet < double.MaxValue ? $"{SquareFootage} ({RentPerSquareFeet:F2}$/sq.ft.)" : SquareFootage); rentalHtml = rentalHtml.Replace("[Bedrooms]", Bedrooms); rentalHtml = rentalHtml.Replace("[Availability]", Available); rentalHtml = rentalHtml.Replace("[Pets]", Pets); rentalHtml = rentalHtml.Replace("[Type]", StructureType); rentalHtml = rentalHtml.Replace("[Parking]", Parking); rentalHtml = rentalHtml.Replace("[Address]", Address); rentalHtml = rentalHtml.Replace("[Contact]", Contact); rentalHtml = rentalHtml.Replace("[Photos]", Photos.Aggregate("", (current, photo) => current + PhotoTemplate.Replace("[PhotoURL]", photo))); return(rentalHtml); }