private static bool CanSetAnnotationValue( ConventionalAnnotation annotation, object value, ConfigurationSource configurationSource, bool canOverrideSameSource) { if (Equals(annotation.Value, value)) { return(true); } var existingConfigurationSource = annotation.GetConfigurationSource(); return(!configurationSource.Overrides(existingConfigurationSource) || ((configurationSource == existingConfigurationSource) && !canOverrideSameSource) ? false : true); }
private bool CanSetAnnotationValue( ConventionalAnnotation annotation, object value, ConfigurationSource configurationSource, bool canOverrideSameSource) { if (annotation.Value.Equals(value)) { return true; } var existingConfigurationSource = annotation.GetConfigurationSource(); if (!configurationSource.Overrides(existingConfigurationSource) || ((configurationSource == existingConfigurationSource) && !canOverrideSameSource)) { return false; } return true; }