瀏覽代碼

IEquatable for speed

IEquatable for speed in using EqualityComparer<TItem>.Default.Equals
release/3.x.x
Paul Fake 6 年之前
committed by GitHub
父節點
當前提交
210d57b254
沒有發現已知的金鑰在資料庫的簽署中 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…
取消
儲存