Candor.Security.UserPrincipal.EnsureRolesLoadedIfAuthenticated C# (CSharp) Method

EnsureRolesLoadedIfAuthenticated() private method

private EnsureRolesLoadedIfAuthenticated ( ) : void
return void
        private void EnsureRolesLoadedIfAuthenticated()
        {
            if (_roles == null && Identity != null && Identity.IsAuthenticated)
            {
                _roles = new List<string>(Roles.GetRolesForUser(Identity.Name));
                _roles.Sort();
            }
        }