You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.
Properties should not be of type Task or Task<T>.
Most people perceive properties as near instantaneous (synchronous) operations. Task and Task<T> are associated with asynchronous operations and should therefore not be used as property types, as this does not match with the expectations of the majority of developers.
The text was updated successfully, but these errors were encountered:
Having a Task as the type of a property must not always be a "bad" thing. I remember some custom task runner I once wrote (with retry policies and stuff). At least the internal bits had Tasks as fields and properties. This scenario seems small, so I'd rather vote for a warning. Also, even in this scenario, having a property, which, by the semantics of a property, is supposed to be publicly exposed, with type task seems worth a warning for above mentioned reasons. So pleas, let's make it a thing ;)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Inspired by #21:
Properties should not be of type
Task
orTask<T>
.Most people perceive properties as near instantaneous (synchronous) operations.
Task
andTask<T>
are associated with asynchronous operations and should therefore not be used as property types, as this does not match with the expectations of the majority of developers.The text was updated successfully, but these errors were encountered: