Преглед изворни кода

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

Loading…
Откажи
Сачувај