Created
January 13, 2014 16:32
-
-
Save BartDM/8403270 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace LuceneWrapper.TestApp | |
{ | |
public class Person | |
{ | |
public int Id { get; set; } | |
public string FirstName { get; set; } | |
public string LastName { get; set; } | |
public string EmailAddress { get; set; } | |
public List<Language> Languages { get; set; } | |
public DateTime RegistrationDate { get; set; } | |
public int RegistrationNumber { get; set; } | |
public string RegistrationSuffix { get; set; } | |
public override string ToString() | |
{ | |
var sb = new StringBuilder(); | |
sb.AppendLineFormat("Id: {0}", Id); | |
sb.AppendLineFormat("FirstName: {0}", FirstName); | |
sb.AppendLineFormat("LastName: {0}", LastName); | |
sb.AppendLineFormat("EmailAddress: {0}", EmailAddress); | |
foreach (var language in Languages) | |
{ | |
sb.AppendLineFormat("Language: {0}", language.LanguageCode); | |
} | |
sb.AppendLineFormat("Registration: {0}-{1}-{2}", RegistrationDate.Year, RegistrationNumber, | |
RegistrationSuffix); | |
return sb.ToString(); | |
} | |
} | |
public class Language | |
{ | |
public int Id { get; set; } | |
public string Description { get; set; } | |
public string LanguageCode { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment