madhatter22 / LinqToLdap

C# LINQ provider built on top of System.DirectoryServices.Protocols for querying and updating LDAP servers.
MIT License
45 stars 23 forks source link

Allow attributes read-only property to be configured by operation #13

Closed madhatter22 closed 4 years ago

madhatter22 commented 4 years ago

There is a rare set of attributes which have the "No user modification" property. These can only be initialized, but may not be changed afterward. Meaning, their value needs to be provided when adding the entry, but may not be present when updating the entry.

For these attributes the proper annotations by operation would be:

This could be modeled by changing the ReadOnly property of the annotation from bool to an enum such as the following:

[Flags]
public enum ReadOnlyOperations
{
None = 0x0,
Add = 0x1,
Set = 0x2,
All = Add | Set
}