Skip to content

Instantly share code, notes, and snippets.

View kent-h's full-sized avatar

Kent Hagerman kent-h

View GitHub Profile
@kent-h
kent-h / Covariance of Interface Function Parameters & Return Values - Advanced Example.md
Last active March 5, 2019 17:02
Covariance of Interface Method Parameters & Return Values - Advanced Example

Covariance of Interface Method Parameters & Return Values

Advanced Example

For this example, let's say we have three classes of user:

  • Advanced Users
    Users of this interface are granted unrestricted read/write access, with more implementation details being exposed
  • Tenant Users
    Users of this interface are granted restricted read/write access (Ex. a tenant application, or a plugin implementation)
  • Read-Only Users