Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NullableExtensions.DangerousGetValueOrNullReference #64

Merged
merged 3 commits into from
Dec 20, 2021

Conversation

Sergio0694
Copy link
Member

Closes #61

This PR adds the NullableExtensions.DangerousGetValueOrNullReference method.
It also adjusts the namespace for NullableExtensions, which was incorrect.

cc. @rickbrew

API breakdown:

namespace CommunityToolkit.HighPerformance
{
    public static class NullableExtensions
    {
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static unsafe ref T DangerousGetValueOrNullReference<T>(ref this T? value)
            where T : struct;
    }
}

@Sergio0694 Sergio0694 added feature 💡 A new feature being implemented introduce breaking changes 💥 This change would be a breaking change high-performance 🚂 Issues/PRs for the HighPerformance package labels Dec 17, 2021
@Sergio0694 Sergio0694 changed the title Add Add NullableExtensions.DangerousGetValueOrNullReference Dec 17, 2021
Copy link

@rickbrew rickbrew left a comment

Choose a reason for hiding this comment

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

lgtm 😺👍🏼

@Sergio0694 Sergio0694 merged commit 0ab8bd1 into main Dec 20, 2021
@delete-merged-branch delete-merged-branch bot deleted the dev/nullable-get-value-or-null-ref branch December 20, 2021 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 💡 A new feature being implemented high-performance 🚂 Issues/PRs for the HighPerformance package introduce breaking changes 💥 This change would be a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NullableExtensions.DangerousGetValueOrNullReference()
3 participants