コード例 #1
0
        public override bool Equals(object?obj)
        {
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }

            return(!(obj is LocatorInfo rhs) ? false : Locator.Equals(rhs.Locator));
        }
コード例 #2
0
ファイル: ClientConfig.cs プロジェクト: fs7744/Tars
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            var other = (ClientConfig)obj;

            if (Locator == null)
            {
                if (other.Locator != null)
                {
                    return(false);
                }
            }
            else if (!Locator.Equals(other.Locator))
            {
                return(false);
            }
            if (ModuleName == null)
            {
                if (other.ModuleName != null)
                {
                    return(false);
                }
            }
            else if (!ModuleName.Equals(other.ModuleName))
            {
                return(false);
            }
            return(true);
        }
コード例 #3
0
 public bool Equals(TPath obj)
 {
     return(!ReferenceEquals(null, obj) && Locator.Equals(obj.Locator));
 }