Example #1
0
 public static DocumentIndexDto Map(ISearchHit searchHit) => new DocumentIndexDto
 {
     DocumentID            = int.Parse(searchHit.DocumentID),
     DocumentCode          = searchHit.GetInt(Common.DocumentIndex.FieldNames.DocumentCode),
     DocumentDirectoryCode = searchHit.GetString(Common.DocumentIndex.FieldNames.DocumentDirectoryCode),
     Content  = searchHit.GetString(Common.DocumentIndex.FieldNames.Content),
     FileName = searchHit.GetString(Common.DocumentIndex.FieldNames.FileName)
 };
 /// <summary>
 /// Initialization constructor.
 /// </summary>
 /// <param name="occurrence">Underlying occurrence.</param>
 public OccurrenceViewModel(IOccurrence occurrence, ISearchHit parentSearchHit)
 {
     mOccurrence      = occurrence;
     mParentSearchHit = parentSearchHit;
 }