Skip to content

Commit

Permalink
Fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Linda-Editor authored Jun 2, 2022
1 parent 35dde3f commit 8137718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graph/patterns/subsets.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ A common pattern is to apply a policy or state to a collection of resources. Wit

An example is where you have a policy that you need to be able to apply to users in an organization. You might want to support the default **None**, enablement for **All**, or enablement for **Select** users where you only grant it to a few users.

Existing patterns for this either have special-cased `strings` or have tightly coupled dependencies between two independent properties. Neither is intuitive, both require reading documentation, and neither can be inferred from the schema or within client libraries.
Existing patterns for this either have special-cased strings or have tightly coupled dependencies between two independent properties. Neither is intuitive, both require reading documentation, and neither can be inferred from the schema or within client libraries.

## Solution

Have an abstract base class where all `variants` of the subset are derived types from the base subset. For more information, see the [general subtyping guidance](./subtypes.md).
Have an abstract base class where all variants of the subset are derived types from the base subset. For more information, see the [general subtyping guidance](./subtypes.md).

The abstract base class should also hold an enum for all possible variants. The purpose of including this is to allow for easier ways to do query and filter operations on variants like `all` and `none` without relying on `isof` functions.

Expand Down

0 comments on commit 8137718

Please sign in to comment.