Exemplo n.º 1
0
        public SCIMRepresentationAttributeBuilder AddComplexAttribute(string name, string schemaId, Action <SCIMRepresentationAttributeBuilder> callback)
        {
            var schemaAttribute = _scimSchemaAttribute.SubAttributes.FirstOrDefault(a => a.Name == name);
            var builder         = new SCIMRepresentationAttributeBuilder(schemaAttribute);

            callback(builder);
            return(this);
        }
Exemplo n.º 2
0
        public SCIMRepresentationBuilder AddComplexAttribute(string name, Action <SCIMRepresentationAttributeBuilder> callback)
        {
            var builder = new SCIMRepresentationAttributeBuilder(null);

            callback(builder);
            var id           = Guid.NewGuid().ToString();
            var newAttribute = new SCIMRepresentationAttribute(id, null);

            foreach (var subAttribute in builder.Build())
            {
                newAttribute.Add(subAttribute);
            }

            _attributes.Add(newAttribute);
            return(this);
        }
        public SCIMRepresentationBuilder AddComplexAttribute(string name, string schemaId, Action <SCIMRepresentationAttributeBuilder> callback)
        {
            var schemaAttribute = _schemas.First(s => s.Id == schemaId).Attributes.FirstOrDefault(a => a.Name == name);
            var builder         = new SCIMRepresentationAttributeBuilder(schemaAttribute);

            callback(builder);
            var id           = Guid.NewGuid().ToString();
            var newAttribute = new SCIMRepresentationAttribute(id, schemaAttribute);

            foreach (var subAttribute in builder.Build())
            {
                newAttribute.Add(subAttribute);
            }

            _attributes.Add(newAttribute);
            return(this);
        }