Skip to content

Add [Calculated] attribute to denote properties to ignore #42

Description

@carusology

Background

There may be properties on the ImmutableBase<TImmutable> that are not storing relevant data, but instead represent a local caches or syntactic sugar that should actually be ignored when determining the immutable value object's equality, hash code, or string representation.

We should create a [Calculated] attribute that we have consumers flag these properties with so the ImmutableBase<TImmutable> can ignore them.

Task

Add a [Caculated] attribute that ImmutableBase<TImmutable> will look for on all of its child properties and, when found, ignore that property for the purposes of setting it, determining equality, hash code, or string representation. It could, however, be potentially fetched via the GetPropertyValueImpl method.

Activity

carusology commented on Feb 9, 2018

@carusology
ContributorAuthor

Not sure on the name here. I've seen an example of a cache, which [Calculated] doesn't quite fit with. However, the cache probably didn't belong on the immutable value object to begin with, but instead on the service that the cached object came from, so it may be irrelevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions