/// <summary>
 /// Checks whether the specified tag set equals the current one.
 /// </summary>
 /// <param name="other">Tag set to compare with.</param>
 /// <returns>
 /// true, if the specified tag set equals the current one;
 /// otherwise false.
 /// </returns>
 public bool Equals(ITagSet other)
 {
     if (other == null)
     {
         return(false);
     }
     return(mTags.SequenceEqual(other, StringComparer.Ordinal));
 }
Exemple #2
0
 /// <summary>
 /// Checks whether the specified tag set equals the current one.
 /// </summary>
 /// <param name="other">Tag set to compare with.</param>
 /// <returns>
 /// true, if the specified tag set equals the current one;
 /// otherwise false.
 /// </returns>
 public bool Equals(ITagSet other)
 {
     if (other == null)
     {
         return(false);
     }
     if (other is LogWriterTagSet set)
     {
         return(Equals(set));
     }
     return(mTags
            .Select(x => x.Name)
            .SequenceEqual(other, StringComparer.Ordinal));
 }