private bool hasSockets(NeededSocket[] neededSockets, BoxModuleFactoryCreatorPrx creator)
 {
     Dictionary<string,SocketInfo> socketsDict = new Dictionary<string,SocketInfo>();
     BoxModuleFactoryPrx factory = creator.createBoxModuleFactory(
         helper.LocalePrefs,
         helper.ManagersEnginePrx);
     SocketInfo[] sockets = factory.getSockets();
     factory.destroy();
     foreach (SocketInfo socket in sockets)
     {
         socketsDict[socket.name] = socket;
     }
     foreach (NeededSocket socketNeeded in neededSockets)
     {
         SocketInfo sockNfo;
         if (!socketsDict.TryGetValue(socketNeeded.socketName, out sockNfo))
             return false;
         BoxType[] boxTypeSeq = sockNfo.socketType;
         bool finded = false;
         foreach (BoxType boxType in boxTypeSeq)
         {
             if (boxType.functionIceId == socketNeeded.functionIceId)
             {
                 finded = true;
                 break;
             }
         }
         if (!finded) return false;
     }
     return true;
 }