Core/CafeLib.Core.Dynamic/Expando.cs
/// <summary>
/// Checks whether a property exists in the Property collection
/// or as a property on the instance
/// </summary>
/// <param name="item"></param>
/// <param name="includeInstanceProperties"></param>
/// <returns></returns>
Checks whether a property exists in the Property collection
or as a property on the instance
Checks whether a property exists in the Property collection or as a property on the instance
public bool Contains(KeyValuePair<string, object> item, bool includeInstanceProperties = false)
        {
            var result = false;
            result |= Properties.ContainsKey(item.Key);
            if (!result && includeInstanceProperties && _instance != null)
            {
                result |= InstancePropertyInfo.Any(prop => prop.Name == item.Key);
            }
            return result;
        }
public bool Contains ( KeyValuePair < string , object > item , bool includeInstanceProperties = false ) { var result = false ; result |= Properties . ContainsKey ( item . Key ) ; if ( ! result && includeInstanceProperties && _instance != null ) { result |= InstancePropertyInfo . Any ( prop => prop . Name == item . Key ) ; } return result ; }
Checks whether a property exists in the Property collection
or as a property on the instance
Checks whether a property exists in the Property collection or as a property on the instance
None
item
KeyValuePair<string, object>
None
includeInstanceProperties
bool
None