public bool EntityIsAvailable(string name, SupportEntityType searchType) { switch (searchType) { case SupportEntityType.Method: { if (null == _listSupportedEntities) { _listSupportedEntities = Factory.GetSupportedEntities(_underlyingObject); } string outValue = null; return(_listSupportedEntities.TryGetValue("Method-" + name, out outValue)); } case SupportEntityType.Property: { if (null == _listSupportedEntities) { _listSupportedEntities = Factory.GetSupportedEntities(_underlyingObject); } string outValue = null; return(_listSupportedEntities.TryGetValue("Property-" + name, out outValue)); } default: { if (null == _listSupportedEntities) { _listSupportedEntities = Factory.GetSupportedEntities(_underlyingObject); } string outValue = null; bool result = _listSupportedEntities.TryGetValue("Property-" + name, out outValue); if (result) { return(true); } return(_listSupportedEntities.TryGetValue("Method-" + name, out outValue)); } } }
public bool EntityIsAvailable(string name, SupportEntityType searchType) { switch (searchType) { case SupportEntityType.Method: { if (null == _listSupportedEntities) _listSupportedEntities = Factory.GetSupportedEntities(_underlyingObject); string outValue = null; return _listSupportedEntities.TryGetValue("Method-" + name, out outValue); } case SupportEntityType.Property: { if (null == _listSupportedEntities) _listSupportedEntities = Factory.GetSupportedEntities(_underlyingObject); string outValue = null; return _listSupportedEntities.TryGetValue("Property-" + name, out outValue); } default: { if (null == _listSupportedEntities) _listSupportedEntities = Factory.GetSupportedEntities(_underlyingObject); string outValue = null; bool result = _listSupportedEntities.TryGetValue("Property-" + name, out outValue); if (result) return true; return _listSupportedEntities.TryGetValue("Method-" + name, out outValue); } } }