Example #1
0
        // <summary>
        //  Shoud ignore this property?
        // </summary>
        // <param name="propertyName">property name</param>
        // <param name="owner">owner</param>
        // <param name="whatToIgnore">Valueonly or Value and name to ignore?</param>
        // <returns></returns>
        private static bool ShouldIgnoreProperty(string propertyName, object owner, IgnoreProperty whatToIgnore)
        {
            PropertyToIgnore property = null;

            foreach (string key in TreeComparer._skipProperties.Keys)
            {
                if (String.Equals(key, propertyName, StringComparison.InvariantCulture) ||
                    key.StartsWith(propertyName + "___owner___"))
                {
                    property = TreeComparer._skipProperties[key];
                    if (whatToIgnore == property.WhatToIgnore && ((null == property.Owner) || TreeComparer._DoesTypeMatch(owner.GetType(), property.Owner)))
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }