private void AddCapability(OdcmObject odcmObject, OdcmCapability capability) { var capabilities = _propertyCapabilitiesCache.GetCapabilities(odcmObject); // Check if this annotation was overridden by the object bool overridden = capabilities.Any(x => x.TermName == capability.TermName); if (!overridden) { capabilities.Add(capability); } }
private static OdcmCapability DefaultCapability(OdcmObject odcmObject, string term) { OdcmCapability result = UserDefaultCapabilityProvider?.Invoke(odcmObject, term); if (result == null) { DefaultProvider func; if (_wellKnownCapabilities.TryGetValue(term, out func)) { result = func(odcmObject, term); } } return(result); }
private void AddCapability(OdcmObject odcmObject, OdcmCapability capability) { try { var capabilities = _propertyCapabilitiesCache.GetCapabilities(odcmObject); // Check if this annotation was overridden by the object bool overridden = capabilities.Any(x => x.TermName == capability.TermName); if (!overridden) { capabilities.Add(capability); } } catch (Exception e) { Logger.Error(e, e.Message); } }
public static string GetShortName(this OdcmCapability capability) { return(_wellKnownCapabilityNames[OdcmProjection.ToInternal(capability.TermName)]); }