Skip to content

Add NullableExtensions.DangerousGetValueOrNullReference - #64

Merged
Sergio0694 merged 3 commits into
mainfrom
dev/nullable-get-value-or-null-ref
Dec 20, 2021
Merged

Sergio0694 merged 3 commits into
mainfrom
dev/nullable-get-value-or-null-ref

Conversation

@Sergio0694

Copy link
Copy Markdown
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

@rickbrew rickbrew left a comment

Copy link
Copy Markdown

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