Example #1
0
        public void CreateRelation(string relationId, string relationTypeName, IEnumerable <Role> roles)
        {
            AssertNotNull(relationId, "relationId");
            AssertNotNull(relationTypeName, "relationTypeName");
            AssertRegistered();

            RelationSupport relation = new RelationSupport(relationId, _ownName, _server, relationTypeName, roles);

            ValidateRelation(relation);
            _relations[relationId] = new RelationWrapper(relation, null);
            foreach (Role r in roles)
            {
                UpdateRoleMap(relationId, r, null);
            }
        }
Example #2
0
        public void CreateRelation(string relationId, string relationTypeName, IEnumerable<Role> roles)
        {
            AssertNotNull(relationId, "relationId");
            AssertNotNull(relationTypeName, "relationTypeName");
            AssertRegistered();

            RelationSupport relation = new RelationSupport(relationId, _ownName, _server, relationTypeName, roles);
            ValidateRelation(relation);
            _relations[relationId] = new RelationWrapper(relation, null);
            foreach (Role r in roles)
            {
                UpdateRoleMap(relationId, r, null);
            }
        }