コード例 #1
0
 /// <summary>
 /// Gets the filter text or null. This is <see cref="DsCompletion.FilterText"/> or <see cref="Completion.DisplayText"/>
 /// if <paramref name="completion"/> is not a <see cref="DsCompletion"/>
 /// </summary>
 /// <param name="completion">Completion</param>
 /// <returns></returns>
 public static string?TryGetFilterText(this Completion completion) => (completion as DsCompletion)?.FilterText ?? completion.DisplayText;
コード例 #2
0
 /// <summary>
 /// GetHashCode()
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode() => (Completion?.GetHashCode() ?? 0) ^ (IsSelected ? int.MinValue : 0) ^ (IsUnique ? 0x40000000 : 0);
コード例 #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="completion">Completion or null</param>
 /// <param name="isSelected">true if it's selected</param>
 /// <param name="isUnique">true if it's a unique match</param>
 public CurrentCompletion(Completion completion, bool isSelected, bool isUnique)
 {
     Completion = completion;
     IsSelected = isSelected;
     IsUnique   = isUnique;
 }
コード例 #4
0
ファイル: DsCompletionSet.cs プロジェクト: dotfornet/dnSPy
 public MruSelection(Completion completion, int index)
 {
     Completion = completion;
     Index      = index;
 }
コード例 #5
0
ファイル: DsCompletionSet.cs プロジェクト: dotfornet/dnSPy
 /// <summary>
 /// Gets the MRU index of <paramref name="completion"/>
 /// </summary>
 /// <param name="completion">Completion item</param>
 /// <returns></returns>
 protected virtual int GetMruIndex(Completion completion) => int.MaxValue;
コード例 #6
0
 /// <summary>
 /// Returns the index of <paramref name="item"/> in the collection or -1 if it's not present
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public int IndexOf(Completion item) => items.IndexOf(item);
コード例 #7
0
 /// <summary>
 /// Checks whether <paramref name="item"/> is present in the collection
 /// </summary>
 /// <param name="item">Item</param>
 /// <returns></returns>
 public bool Contains(Completion item) => items.Contains(item);
コード例 #8
0
 bool ICollection <Completion> .Remove(Completion item)
 {
     throw new NotSupportedException();
 }
コード例 #9
0
 void IList <Completion> .Insert(int index, Completion item)
 {
     throw new NotSupportedException();
 }
コード例 #10
0
 void ICollection <Completion> .Add(Completion item)
 {
     throw new NotSupportedException();
 }