Example #1
0
        protected void RemoveCAPS()
        {
            List <ICapsServiceConnector> connectors = GetServiceConnectors();

            foreach (ICapsServiceConnector connector in connectors)
            {
                connector.DeregisterCaps();
            }

            IExternalCapsHandler externalService = Registry.RequestModuleInterface <IExternalCapsHandler>();

            if (externalService != null)
            {
                externalService.RemoveExternalCaps(AgentID, Region);
            }
        }
Example #2
0
        protected void AddCAPS()
        {
            List <ICapsServiceConnector> connectors = GetServiceConnectors();

            foreach (ICapsServiceConnector connector in connectors)
            {
                connector.RegisterCaps(this);
            }

            IExternalCapsHandler externalService = Registry.RequestModuleInterface <IExternalCapsHandler>();

            if (externalService != null)
            {
                foreach (KeyValuePair <string, OSD> kvp in externalService.GetExternalCaps(AgentID, Region))
                {
                    if (kvp.Key != null && kvp.Value != null && !registeredCAPS.ContainsKey(kvp.Key))
                    {
                        registeredCAPS.Add(kvp.Key, kvp.Value);
                    }
                }
            }
        }