SharedStringList DelegateStaticBoundObject::GetPropertyNames()
{
    ScopedLock lock(&mutex);

    SharedStringList globalList = global->GetPropertyNames();
    SharedStringList localList = local->GetPropertyNames();

    for (size_t i = 0; i < globalList->size(); i++)
    {
        bool found = false;
        for (size_t j = 0; j < localList->size(); j++)
        {
            if (globalList->at(i).get() == localList->at(j).get())
            {
                found = true;
                break;
            }
        }

        if (!found)
        {
            localList->push_back(globalList->at(i));
        }
    }

    return localList;
}
Esempio n. 2
0
 SharedStringList EnvironmentBinding::GetPropertyNames()
 {
     std::map<std::string, std::string> env = EnvironmentUtils::GetEnvironment();
     SharedStringList keys = new StringList();
     
     std::map<std::string, std::string>::iterator iter = env.begin();
     for (; iter != env.end(); iter++)
     {
         keys->push_back(new std::string(iter->first));
     }
     return keys;
 }