AttributeAccess
Namespace: Meshmakers.Octo.ConstructionKit.Contracts.DataTransferObjects
Resolution and behaviour predicates for CkAttributeAccessDto (CK v2, AB#5668). Consumers go through these instead of testing the enum inline.
public static class AttributeAccess
Inheritance Object → AttributeAccess
Methods
Resolve(Nullable<CkAttributeAccessDto>)
Effective access of an assignment: the declared value, otherwise CkAttributeAccessDto.ReadWrite.
public static CkAttributeAccessDto Resolve(Nullable<CkAttributeAccessDto> assignment)
Parameters
assignment Nullable<CkAttributeAccessDto>
Returns
IsExposedInOutput(CkAttributeAccessDto)
True when the attribute appears in GraphQL output types (everything except CkAttributeAccessDto.Hidden).
public static bool IsExposedInOutput(CkAttributeAccessDto access)
Parameters
access CkAttributeAccessDto
Returns
IsExposedInGenericInput(CkAttributeAccessDto)
True when the attribute appears in generic GraphQL input types (CkAttributeAccessDto.ReadWrite and CkAttributeAccessDto.ReadOnly).
public static bool IsExposedInGenericInput(CkAttributeAccessDto access)
Parameters
access CkAttributeAccessDto
Returns
IsGenericallyWritable(CkAttributeAccessDto, Boolean)
True when a generic mutation may write the attribute: always for CkAttributeAccessDto.ReadWrite, on create only for CkAttributeAccessDto.ReadOnly.
public static bool IsGenericallyWritable(CkAttributeAccessDto access, bool isCreate)
Parameters
access CkAttributeAccessDto
isCreate Boolean