Skip to content

Commit

Permalink
Fix attribute usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-englert committed Aug 13, 2024
1 parent d38e80c commit 2748c91
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ILSpy/ExportProviderAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ T IExportProvider.GetExportedValue<T>(string? contractName) where T : class
return _exportProvider.GetExportedValues<T>(contractName).SingleOrDefault();
}

#pragma warning disable CS8769 // Nullability of reference types in type of parameter doesn't match implemented member (possibly because of nullability attributes).
// can't apply NotNullWhen here, because ICSharpCode.Decompiler defines a duplicate attribute, and uses InternalsVisibleTo("ILSpy"), so this attribute is now ambiguous!
bool IExportProvider.TryGetExportedValue<T>(string? contractName, /*[NotNullWhen(true)]*/ out T? value) where T : class
#pragma warning restore CS8769 // Nullability of reference types in type of parameter doesn't match implemented member (possibly because of nullability attributes).
bool IExportProvider.TryGetExportedValue<T>(string? contractName, [NotNullWhen(true)] out T? value) where T : class
{
value = _exportProvider.GetExportedValues<T>(contractName).SingleOrDefault();

Expand Down

0 comments on commit 2748c91

Please sign in to comment.