public override bool Evaluate(object candidate) { candidate = AsAttributeValuesMapValue(candidate); if (candidate == null && TheObject == null) { return(true); } if (candidate == null || TheObject == null) { return(false); } var oid = candidate as OID; if (oid != null && !IsNative()) { return(_oid != null && _oid.Equals(oid)); } if (AttributeValueComparator.IsNumber(candidate) && AttributeValueComparator.IsNumber(TheObject)) { return(AttributeValueComparator.Compare((IComparable)candidate, (IComparable)TheObject) == 0); } return(Equals(candidate, TheObject)); }
public override bool Evaluate(object candidate) { candidate = AsAttributeValuesMapValue(candidate); if (candidate == null && TheObject == null && _oid == null) { return(true); } var objectOid = (OID)candidate; return(_oid != null && _oid.Equals(objectOid)); }
/// <summary> /// Compares two <strong>CertificateTemplate</strong> objects for equality. /// </summary> /// <param name="other">An <strong>CertificateTemplate</strong> object to compare to the current object.</param> /// <returns> /// <strong>True</strong> if the current <strong>CertificateTemplate</strong> object is equal to the object specified by the other parameter; /// otherwise, <strong>False</strong>. /// </returns> /// <remarks> /// Two objects are considered equal if they are <strong>CertificateTemplate</strong> objects and they have the same /// name and OID values. /// </remarks> protected bool Equals(CertificateTemplate other) { return(String.Equals(Name, other.Name) && OID.Equals(other.OID)); }