Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

EmailUnsubscribedEvent.cs

namespace Nop.Core.Domain.Messages;

/// 
/// Email unsubscribed event
/// 
public partial class EmailUnsubscribedEvent
{
    /// 
    /// Ctor
    /// 
    /// Subscription
    public EmailUnsubscribedEvent(NewsLetterSubscription subscription)
    {
        Subscription = subscription;
    }

    /// 
    /// Subscription
    /// 
    public NewsLetterSubscription Subscription { get; }

    /// 
    /// Equals
    /// 
    /// Other event
    /// Result
    public bool Equals(EmailUnsubscribedEvent other)
    {
        if (other is null)
            return false;

        if (ReferenceEquals(this, other))
            return true;

        return Equals(other.Subscription, Subscription);
    }

    /// 
    /// Equals
    /// 
    /// Object
    /// Result
    public override bool Equals(object obj)
    {
        if (obj is null)
            return false;

        if (ReferenceEquals(this, obj))
            return true;

        if (obj.GetType() != typeof(EmailUnsubscribedEvent))
            return false;

        return Equals((EmailUnsubscribedEvent)obj);
    }

    /// 
    /// Get hash code
    /// 
    /// Hash code
    public override int GetHashCode()
    {
        return Subscription != null ? Subscription.GetHashCode() : 0;
    }
}