This PR intended to remove depencency to IgnoresAccessChecksToGenerator library.
There are two reasons for this changes.
IgnoresAccessChecksToGenerator run MSBuild Task(PublicizeInternals) and it introduce extra build complexity.
All internal types are exposed to Intellisense code completion.
.NET 8 or later supports UnsafeAccessor attribute.
And it can safely expose internal/private members via static extern method.
What's changed
1. Catalog::NamedDestinations / NamedDestinations::TryGetNamedDestinations
Replace to extension methods.
And access internal implementation via UnsafeAccessor.
Replaced with custom delegate that is generated by ILGenerator.
These logics will be replaced by UnsafeAccessor in future.
It require private type access supports (See: https://github.com/dotnet/runtime/issues/90081)
This PR intended to remove depencency to
IgnoresAccessChecksToGenerator
library.There are two reasons for this changes.
IgnoresAccessChecksToGenerator
run MSBuild Task(PublicizeInternals
) and it introduce extra build complexity..NET 8 or later supports
UnsafeAccessor
attribute. And it can safely expose internal/private members viastatic extern
method.What's changed
1.
Catalog::NamedDestinations
/NamedDestinations::TryGetNamedDestinations
Replace to extension methods. And access internal implementation viaUnsafeAccessor
.2.
ISymbol::GetParameters
/ISymbol::GetTypeParameters
Replaced with
custom extension methods
that equivalent to original methods.3.
symbol.GetDocumentationComment(args).FullXmlFragment
Replaced with
custom delegate
that is generated by ILGenerator.These logics will be replaced by
UnsafeAccessor
in future. It requireprivate type access
supports (See:https://github.com/dotnet/runtime/issues/90081
)