Adf.Business.SmartReferences.SmartReferencePropertyParser.IsEqual C# (CSharp) Method

IsEqual() public method

Checks whether the two specified Objects are equal or not.
public IsEqual ( object compare, object to ) : bool
compare object The Object to compare.
to object The Object to compare with.
return bool
        public bool IsEqual(object compare, object to)
        {
            var left = compare as ISmartReference;
            var right = to as string;

            if (left == null && right == null) return true;
            if (left == null || right == null) return false;

            return left.Name == right;
        }