Skip to content

Conversation

@stefannikolei
Copy link
Contributor

I added a new Property to PngChunk --> DataSpan. On all places Data was used the same way. So we have the guard on this place and can just use it.

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

I added a new Property to PngChunk --> DataSpan. On all places Data was used the same way. So we have the guard on this place and can just use it.
public IMemoryOwner<byte> Data { get; }
public IMemoryOwner<byte>? Data { get; }

public ReadOnlySpan<byte> DataSpan
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have a better idea to to this? Or should I check for null at all consuming places?

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.

1 participant