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

Enabling Nullable Reference Types #20

Merged
merged 32 commits into from
Jul 15, 2020
Merged

Enabling Nullable Reference Types #20

merged 32 commits into from
Jul 15, 2020

Conversation

slewis74
Copy link
Contributor

@slewis74 slewis74 commented Jun 25, 2020

This involved a number of changes to classes in this library. Most were changes to the ctors to force required things, where we'd been relying on object initializers and everyone setting the properties correctly.

Result<T> has also been moved to here, from the server codebase. It is used in cases where we want to return an object that explains reasons, rather than just a null.

Copy link
Contributor

@uglybugger uglybugger left a comment

Choose a reason for hiding this comment

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

This looks really good. So much nicer to not have public setters all over the place.

One question about null propagation versus null forgiveness below but that's a minor one.

# Conflicts:
#	source/Octopus.Data/Model/SensitiveString.cs
#	source/Octopus.Data/Model/User/IdentityClaim.cs
#	source/Octopus.Data/Resources/Attributes/PropertyApplicabilityAttribute.cs
#	source/Octopus.Data/Resources/Resource.cs
#	source/Octopus.Data/Resources/Users/IdentityClaimResource.cs
#	source/Octopus.Data/Resources/Users/IdentityResource.cs
#	source/Octopus.Data/Storage/User/ApiKeyDescriptor.cs
#	source/Tests/IdentityResourceTests.cs
#	source/Tests/IdentityTests.cs
Copy link
Contributor

@uglybugger uglybugger left a comment

Choose a reason for hiding this comment

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

Happy days :)

If only we could find an elegant way to share code style settings across the organisation :p

@slewis74 slewis74 merged commit 9d4a28a into main Jul 15, 2020
@slewis74 slewis74 deleted the enh-nullable branch July 15, 2020 01:26
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.

2 participants