Exemple #1
0
        public List <GroupMembersData> GetGroupMembers(string RequestingAgentID, UUID GroupID)
        {
            string url = string.Empty, gname = string.Empty;

            if (IsLocal(GroupID, out url, out gname))
            {
                string agentID = AgentUUI(RequestingAgentID);
                return(m_LocalGroupsConnector.GetGroupMembers(agentID, GroupID));
            }
            else if (!string.IsNullOrEmpty(url))
            {
                ExtendedGroupMembershipData membership = m_LocalGroupsConnector.GetAgentGroupMembership(RequestingAgentID, RequestingAgentID, GroupID);
                string accessToken = string.Empty;
                if (membership != null)
                {
                    accessToken = membership.AccessToken;
                }
                else
                {
                    return(null);
                }

                GroupsServiceHGConnector c = GetConnector(url);
                if (c != null)
                {
                    return(m_CacheWrapper.GetGroupMembers(RequestingAgentID, GroupID, delegate
                    {
                        return c.GetGroupMembers(AgentUUIForOutside(RequestingAgentID), GroupID, accessToken);
                    }));
                }
            }
            return(new List <GroupMembersData>());
        }
 public List <GroupMembersData> GetGroupMembers(string RequestingAgentID, UUID GroupID)
 {
     return(m_CacheWrapper.GetGroupMembers(RequestingAgentID, GroupID, delegate
     {
         return m_GroupsService.GetGroupMembers(RequestingAgentID, GroupID);
     }));
 }
        public List <GroupMembersData> GetGroupMembers(string RequestingAgentID, UUID GroupID)
        {
            if (m_log.IsDebugEnabled)
            {
                m_log.DebugFormat("{0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
            }

            string url = string.Empty, gname = string.Empty;

            if (IsLocal(GroupID, out url, out gname))
            {
                string agentID = AgentUUI(RequestingAgentID);
                return(m_LocalGroupsConnector.GetGroupMembers(agentID, GroupID));
            }
            else if (!string.IsNullOrEmpty(url))
            {
                ExtendedGroupMembershipData membership = m_LocalGroupsConnector.GetAgentGroupMembership(RequestingAgentID, RequestingAgentID, GroupID);
                string accessToken = string.Empty;
                if (membership != null)
                {
                    accessToken = membership.AccessToken;
                }
                else
                {
                    return(null);
                }

                GroupsServiceHGConnector c = GetConnector(url);
                if (c != null)
                {
                    return(m_CacheWrapper.GetGroupMembers(RequestingAgentID, GroupID, delegate
                    {
                        return c.GetGroupMembers(AgentUUIForOutside(RequestingAgentID), GroupID, accessToken);
                    }));
                }
            }
            return(new List <GroupMembersData>());
        }