exercism / exercism/csharp-analyzer

Add features for properties exercise

Open
#53 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
16
Forks
8
Avg merge
1d 3h
Merged PRs (30d)
4

Description

See the [properties exercise](https://github.com/exercism/v3/edit/master/languages/csharp/exercises/concept/properties/.meta/design.md).

There 7 features required for the properties exercise:

1. If `WeighingMachine.Units` is not auto-implemented
then the following comment should be made: "The appropriate form
for a property such as `WeighingMachine.Units` which has no validation or other processing required is
that for an auto-implemented property". - Approved with comment.

2. If `WeighingMachine.DisplayWeight` has a non-private set accessor
then the following comment should be made: "It is not approprirate
for a property such as `WeighingMachine.DisplayWeight` which simply returns a value
to have a set accessor. That should be removed.". - Approved with comment.

3. If `WeighingMachine.USDisplayWeight` has a non-private set accessor
then the following comment should be made: "It is not approprirate
for a property such as `USWeighingMachine.DisplayWeight` which simply returns a value
to have a set accessor. That should be removed.". - Approved with comment.

4. If `USDisplayWeight.Pounds` has a non-private set accessor
then the following comment should be made: "It is not approprirate
for a property such as `USDisplayWeight.Pounds` which simply returns a value
to have a set accessor. That should be removed.". - Approved with comment.

5. If `USDisplayWeight.Ounces` has a non-private set accessor
then the following comment should be made: "It is not approprirate
for a property such as `USDisplayWeight.Ounces` which simply returns a value
to have a set accessor. That should be removed.". - Approved with comment.

6. If `WeighingMachine.TareAdjustement` is not an auto-implemented property
then the following commen should be made: "A succinct way of implementing
`WeighingMachine.TareAdjustment` is as an auto-implemented property with a
`private` get accessor". - Approved with comment.

7. If `WeighingMachine.TareAdjustment` is an auto-implemented property
but the get accessor is non-private then the following comment should be made:
"A non-private set accessor is not appropriate for `WeighingMachine.TareAdjustment`
as the instructions stipulate that the value must not be available outside the
class". - Disapproved.

See the boilerplate [here](https://github.com/exercism/v3/blob/master/languages/csharp/exercises/concept/properties/Properties.cs).
See the completed example [here](https://github.com/exercism/v3/blob/master/languages/csharp/exercises/concept/properties/.meta/Example.cs).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.