Exemplo n.º 1
0
        internal AzRoleAssignment GetOrCreateAzRoleAssignment(string name)
        {
            var role = RoleAssignments[name];

            if (role != null)
            {
                return(role);
            }

            var azRole = IAzScope.CreateRole(name);

            azRole.Submit();

            role = new AzRoleAssignment {
                IAzItem = azRole
            };
            RoleAssignments.Add(role);

            HasChanged = true;
            return(role);
        }
Exemplo n.º 2
0
 public IAzRole CreateRole(string name)
 => _scope != null?_scope.CreateRole(name) : _application.CreateRole(name);