@@ -19,7 +19,7 @@ namespace SmartImage.Lib.Engines.Results;
1919
2020// todo: refactor to not inherit from UniImageUrl and instead contain a UniImageUrl
2121
22- public class SearchResultItem : IComparable < SearchResultItem > , IComparable , IEquatable < SearchResultItem > , IResultItem , IUrl
22+ public class SearchResultItem : UniImageUrl , IComparable < SearchResultItem > , IComparable , IEquatable < SearchResultItem >
2323{
2424
2525#region
@@ -42,9 +42,11 @@ public class SearchResultItem : IComparable<SearchResultItem>, IComparable, IEqu
4242
4343#endregion
4444
45+ /*
4546 [MN]
4647 [JPN("url")]
4748 public Url Url { get; protected set; }
49+ */
4850
4951 /// <summary>
5052 /// Title/caption of this result
@@ -102,15 +104,6 @@ public class SearchResultItem : IComparable<SearchResultItem>, IComparable, IEqu
102104 /// </summary>
103105 public DateTime ? Time { get ; internal set ; }
104106
105- public double ? Similarity { get ; internal set ; }
106-
107- [ MNNW ( true , nameof ( Similarity ) ) ]
108- public bool HasSimilarity => Similarity . HasValue ;
109-
110- public ulong ? Hash { get ; internal set ; }
111-
112- [ MNNW ( true , nameof ( Hash ) ) ]
113- public bool HasHash => Hash . HasValue ;
114107
115108 /// <summary>
116109 /// Additional metadata.
@@ -134,9 +127,9 @@ public double Score
134127
135128 var s = 0d ;
136129
137- /* if (HasImage) {
130+ if ( HasImage ) {
138131 s ++ ;
139- }*/
132+ }
140133
141134 if ( HasHash ) {
142135 s ++ ;
@@ -217,7 +210,7 @@ internal SearchResultItem(SearchResult r, bool isRaw = false) : base(null)
217210
218211#region
219212
220- /* public List<SearchResultItem> ScannedItems { get; }
213+ public List < SearchResultItem > ScannedItems { get ; }
221214
222215 [ MNNW ( true , nameof ( ScannedItems ) ) ]
223216 public bool HasScannedItems => ScannedItems is { Count : > 0 } ;
@@ -249,7 +242,7 @@ public override async ValueTask<bool> AllocImageAsync(CancellationToken ct = def
249242 else { }
250243
251244 return HasImage ;
252- }*/
245+ }
253246
254247 [ MNNW ( true , nameof ( Thumbnail ) ) ]
255248 public async ValueTask < bool > LoadThumbnailAsync ( CancellationToken ct = default )
@@ -437,20 +430,4 @@ public int CompareTo(object obj)
437430
438431#endregion
439432
440- public event PropertyChangedEventHandler PropertyChanged ;
441-
442- protected virtual void OnPropertyChanged ( [ CMN ] string propertyName = null )
443- {
444- PropertyChanged ? . Invoke ( this , new PropertyChangedEventArgs ( propertyName ) ) ;
445- }
446-
447- protected virtual bool SetField < T > ( ref T field , T value , [ CMN ] string propertyName = null )
448- {
449- if ( EqualityComparer < T > . Default . Equals ( field , value ) )
450- return false ;
451-
452- field = value ;
453- OnPropertyChanged ( propertyName ) ;
454- return true ;
455- }
456433}
0 commit comments