Преглед на файлове

IEquatable for speed

IEquatable for speed in using EqualityComparer<TItem>.Default.Equals
release/3.x.x
Paul Fake преди 6 години
committed by GitHub
родител
ревизия
210d57b254
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. +6
    -1
      Source/MQTTnet.Extensions.ManagedClient/ManagedMqttApplicationMessage.cs

+ 6
- 1
Source/MQTTnet.Extensions.ManagedClient/ManagedMqttApplicationMessage.cs Целия файл

@@ -2,10 +2,15 @@

namespace MQTTnet.Extensions.ManagedClient
{
public class ManagedMqttApplicationMessage
public class ManagedMqttApplicationMessage : IEquatable<ManagedMqttApplicationMessage>
{
public Guid Id { get; set; } = Guid.NewGuid();

public MqttApplicationMessage ApplicationMessage { get; set; }
public bool Equals(ManagedMqttApplicationMessage other)
{
return Id.Equals(other.Id);
}
}
}

Зареждане…
Отказ
Запис