浏览代码

IEquatable for speed

IEquatable for speed in using EqualityComparer<TItem>.Default.Equals
release/3.x.x
Paul Fake 6 年前
committed by GitHub
父节点
当前提交
210d57b254
找不到此签名对应的密钥 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);
}
}
}

正在加载...
取消
保存