Example #1
0
        /// <summary>将当前 <see cref="T:System.Security.Policy.Publisher" /> 与指定的对象比较以判断它们是否等同。</summary>
        /// <returns>如果 <see cref="T:System.Security.Policy.Publisher" /> 类的两个实例相等,则为 true;否则为 false。</returns>
        /// <param name="o">将测试是否与当前对象等同的 <see cref="T:System.Security.Policy.Publisher" />。</param>
        /// <exception cref="T:System.ArgumentException">
        /// <paramref name="o" /> 参数不是 <see cref="T:System.Security.Policy.Publisher" /> 对象。</exception>
        public override bool Equals(object o)
        {
            Publisher publisher = o as Publisher;

            if (publisher != null)
            {
                return(Publisher.PublicKeyEquals(this.m_cert, publisher.m_cert));
            }
            return(false);
        }
        public override bool Equals(object o)
        {
            PublisherMembershipCondition condition = o as PublisherMembershipCondition;

            if (condition != null)
            {
                if ((this.m_certificate == null) && (this.m_element != null))
                {
                    this.ParseCertificate();
                }
                if ((condition.m_certificate == null) && (condition.m_element != null))
                {
                    condition.ParseCertificate();
                }
                if (Publisher.PublicKeyEquals(this.m_certificate, condition.m_certificate))
                {
                    return(true);
                }
            }
            return(false);
        }
Example #3
0
        public override bool Equals(Object o)
        {
            PublisherMembershipCondition that = (o as PublisherMembershipCondition);

            if (that != null)
            {
                if (this.m_certificate == null && this.m_element != null)
                {
                    this.ParseCertificate();
                }
                if (that.m_certificate == null && that.m_element != null)
                {
                    that.ParseCertificate();
                }

                if (Publisher.PublicKeyEquals(this.m_certificate, that.m_certificate))
                {
                    return(true);
                }
            }
            return(false);
        }
		/// <summary>Compares the current <see cref="T:System.Security.Policy.Publisher" /> to the specified object for equivalence.</summary>
		/// <param name="o">The <see cref="T:System.Security.Policy.Publisher" /> to test for equivalence with the current object. </param>
		/// <returns>
		///     <see langword="true" /> if the two instances of the <see cref="T:System.Security.Policy.Publisher" /> class are equal; otherwise, <see langword="false" />.</returns>
		/// <exception cref="T:System.ArgumentException">The <paramref name="o" /> parameter is not a <see cref="T:System.Security.Policy.Publisher" /> object. </exception>
		// Token: 0x06002AE0 RID: 10976 RVA: 0x0009F458 File Offset: 0x0009D658
		public override bool Equals(object o)
		{
			Publisher publisher = o as Publisher;
			return publisher != null && Publisher.PublicKeyEquals(this.m_cert, publisher.m_cert);
		}