PropagationFlags [Access Control Entries (ACE)] Enumeration Passes in C #

What is the point of having enum flags such as PropagationFlags if the contents of an enum:

  • No . Indicates that inheritance flags are not set.
  • NoPropagateInherit : Indicates that the ACE does not extend to child objects.
  • InheritOnly : Indicates that ACE applies only to child objects. This includes both container and leaf children.

What will the variable mean with No | InheritOnly or NoPropagateInherit | Inheritonly

Am I missing something or is it a bad design .Net framework?

+3
source share
1 answer

Nonein this listing simply means that you are not setting any flags, in fact, you want the default. The framework rules state that zero (as well as not set or essentially zero) should be called None. In this case, the name may be confusing because you think it means “No distribution”, but it is not. The other two values ​​should be OR'd together potentially. OR'with zero always returns the original value.

+4
source

Source: https://habr.com/ru/post/1785951/


All Articles