Ver código fonte

IEquatable for speed

IEquatable for speed in using EqualityComparer<TItem>.Default.Equals
release/3.x.x
Paul Fake 6 anos atrás
committed by GitHub
pai
commit
210d57b254
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: 4AEE18F83AFDEB23
1 arquivos alterados com 6 adições e 1 exclusões
  1. +6
    -1
      Source/MQTTnet.Extensions.ManagedClient/ManagedMqttApplicationMessage.cs

+ 6
- 1
Source/MQTTnet.Extensions.ManagedClient/ManagedMqttApplicationMessage.cs Ver arquivo

@@ -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);
}
}
}

Carregando…
Cancelar
Salvar