mirror of
				https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
				synced 2025-10-31 10:15:33 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using HaDocument.Models;
 | |
| using HaDocument.Comparers;
 | |
| using HaDocument.Interfaces;
 | |
| using System.Collections.Generic;
 | |
| 
 | |
| namespace HaLive.Models {
 | |
|     public class DocumentSearchResult {
 | |
|         public Meta MetaData { get; }
 | |
|         public List<DocumentResult> Results { get; }
 | |
| 
 | |
|         public DocumentSearchResult(Meta meta) {
 | |
|             MetaData = meta;
 | |
|             Results = new List<DocumentResult>(4);
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     public class DocumentResult {
 | |
|         public string PreviewString { get; }
 | |
|         public string Page { get; }
 | |
|         public string Line { get; }
 | |
| 
 | |
|         public DocumentResult(string previewstring, string page, string line) {
 | |
|             PreviewString = previewstring;
 | |
|             Page = page;
 | |
|             Line = line;
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     public class LetterComparer : IComparer<DocumentSearchResult>
 | |
|     {
 | |
|         public int Compare(DocumentSearchResult first, DocumentSearchResult second)
 | |
|         {
 | |
|             var cmp = new DefaultComparer();
 | |
|             return cmp.Compare(first.MetaData, second.MetaData);
 | |
|         }
 | |
|     }
 | |
| } | 
