public object Clone() { return(new SCIMSchemaAttribute(Id) { CanonicalValues = CanonicalValues == null ? new List <string>() : CanonicalValues.ToList(), CaseExact = CaseExact, Description = Description, MultiValued = MultiValued, Mutability = Mutability, Name = Name, ReferenceTypes = ReferenceTypes.ToList(), Required = Required, Returned = Returned, SubAttributes = SubAttributes.Select(s => (SCIMSchemaAttribute)s.Clone()).ToList(), Type = Type, Uniqueness = Uniqueness, DefaultValueInt = DefaultValueInt == null ? new List <int>() : DefaultValueInt.ToList(), DefaultValueString = DefaultValueString == null ? new List <string>() : DefaultValueString.ToList(), Id = Id }); }
public bool HasAttribute(SCIMSchemaAttribute attribute) { return(SubAttributes.Any(attr => attr.Id == attribute.Id || attr.HasAttribute(attribute))); }
public void AddSubAttribute(SCIMSchemaAttribute subAttribute) { SubAttributes.Add(subAttribute); }
public bool ShouldSerializeSubAttributes() { return(SubAttributes != null && SubAttributes.Any()); }