public OeAttributeReader(OeModelBoundSettingsBuilder modelBoundSettingsBuilder) { _modelBoundSettingsBuilder = modelBoundSettingsBuilder; _modelBoundKind = GetModelBoundKind(); }
public SelectExpandType?GetPropertySetting(IEdmProperty property, OeModelBoundKind modelBoundKind) { if (_properties.TryGetValue(property, out SelectExpandType?[] propertySettings))
public bool IsAllowed(OeModelBoundProvider modelBoundProvider, IEdmProperty property, OeModelBoundKind modelBoundKind) { SelectExpandType?propertySetting = GetPropertySetting(property, modelBoundKind); if (propertySetting != null) { return(propertySetting.Value != SelectExpandType.Disabled); } if (NavigationProperty != null) { OeModelBoundSettings entitySettings = modelBoundProvider.GetSettings((IEdmEntityType)property.DeclaringType); if (entitySettings != null && entitySettings.GetPropertySetting(property, modelBoundKind) == SelectExpandType.Disabled) { return(false); } } return(true); }
private bool IsAllowed(IEdmProperty property, OeModelBoundSettings entitySettings, OeModelBoundKind modelBoundKind) { if (entitySettings == null) { entitySettings = GetSettings((IEdmEntityType)property.DeclaringType); if (entitySettings == null) { return(true); } } return(entitySettings.IsAllowed(this, property, modelBoundKind)); }
private void SetPropertySetting(IEdmProperty property, OeModelBoundKind modelBoundKind, SelectExpandType allowed, IEdmNavigationProperty navigationProperty) { GetSettingsOrAdd(navigationProperty).SetPropertySetting(property, modelBoundKind, allowed); }
private void SetPropertySetting(IEdmProperty property, OeModelBoundKind modelBoundKind, SelectExpandType allowed) { var entityType = (IEdmEntityType)property.DeclaringType; GetSettingsOrAdd(entityType).SetPropertySetting(property, modelBoundKind, allowed); }