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
Philosophically, the IInteraction interface is the base interface for all interactions: Tasks and Questions. I like having that shared root.
Pragmatically, IInteraction is used by AnswerCache. I'm not sure why it doesn't use ICacheableQuestion instead. I don't remember. I'll ask the other core contributors.
Rather than removing IInteraction outright, we should consider if there is anything we should add directly to it. I don't think an attribute would be appropriate.
Okay, so I did some playing around, and I realized why AnswerCache uses IInteraction directly. The answer cache holds answers to any kind of cacheable questions. Its methods control the type conversion, but the internal Dictionary uses the IInteraction type as the key type. I suppose a non-generic Dictionary could be used instead.
Description
The
IInteraction
interface is a marker interface and according tohttps://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1040
this rule is violated.
Alternatives
Attributes might suit better.
Anything else?
If you have a different take on this, it would be nice to have it explained or even documented.
Commitments
The text was updated successfully, but these errors were encountered: