Skip to content

Fix returning properties from NpgsqlConnectionStringBuilder.GetProperties#6290

Merged
vonzshik merged 1 commit intomainfrom
6289-string-builder-get-properties-fix
Nov 6, 2025
Merged

Fix returning properties from NpgsqlConnectionStringBuilder.GetProperties#6290
vonzshik merged 1 commit intomainfrom
6289-string-builder-get-properties-fix

Conversation

@vonzshik
Copy link
Contributor

@vonzshik vonzshik commented Nov 5, 2025

Fixes #6289

@vonzshik vonzshik requested a review from roji as a code owner November 5, 2025 12:01
foreach (var attribute in d.Attributes)
if (attribute is NpgsqlConnectionStringPropertyAttribute or ObsoleteAttribute)
toRemove.Add(d);
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is the right translation for:

.Where(d =>
    !d.Attributes.Cast<Attribute>().Any(a => a is NpgsqlConnectionStringPropertyAttribute) ||
    d.Attributes.Cast<Attribute>().Any(a => a is ObsoleteAttribute)
)

Thanks for fixing it...

@NinoFloris NinoFloris added this to the 8.0.9 milestone Nov 5, 2025
@vonzshik vonzshik merged commit ce11aaa into main Nov 6, 2025
18 checks passed
@vonzshik vonzshik deleted the 6289-string-builder-get-properties-fix branch November 6, 2025 10:40
vonzshik added a commit that referenced this pull request Nov 6, 2025
vonzshik added a commit that referenced this pull request Nov 6, 2025
@vonzshik
Copy link
Contributor Author

vonzshik commented Nov 6, 2025

Backported to 9.0.5 via 8bb2db2, 8.0.9 via 03a6ae2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NpgsqlConnectionStringBuilder ICustomTypeDescriptor implementation broken since version 8.x

2 participants