public AlbumRelease(IAlbumRelease contract) { ParamIs.NotNull(() => contract); CatNum = contract.CatNum; ReleaseDate = (contract.ReleaseDate != null ? OptionalDateTime.Create(contract.ReleaseDate) : null); EventName = contract.EventName; }
private void AddBasicDescription(StringBuilder sb, AlbumContract album, Func <DiscType, string> albumTypeNames) { var typeName = albumTypeNames(album.DiscType); sb.Append(typeName); if (!album.ReleaseDate.IsEmpty) { var date = OptionalDateTime.Create(album.ReleaseDate).ToString(CultureInfo.InvariantCulture); sb.AppendFormat(", released {0}", date); } }