Skip to content

Records and init only properties #442

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

Merged
merged 3 commits into from
Nov 30, 2020
Merged

Records and init only properties #442

merged 3 commits into from
Nov 30, 2020

Conversation

david-driscoll
Copy link
Member

HandlerIdentity is now an interface named IHandlerIdentity

HandlerIdentity is not automatically implemented via source generators (you can implement it yourself if you want to)

This type is used to ensure proper routing of CodeAction, CodeLens and other requests. Changing it an interface was required to support classes and records at the same time.

Records

Most model classes have been moved to record classes and init only properties. This allows use of the with operator.

Records are supported in netstandard2.0 using a shim class very similar to null reference types.

…on options and capabilities are not records and do not have init only properties. These values can be adjusted during the startup lifecycle.
@david-driscoll david-driscoll added the breaking change This breaks existing behavior label Nov 29, 2020
@github-actions github-actions bot added this to the v0.18.4 milestone Nov 29, 2020
@david-driscoll david-driscoll merged commit 735bc29 into master Nov 30, 2020
@mergify mergify bot deleted the feature/3-records branch November 30, 2020 17:46
@github-actions github-actions bot modified the milestones: v0.18.4, v0.19.0 Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This breaks existing behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant