void ProviderService::OnDestroy() { STAFF_ASSERT(m_pDataSource, "Not initialized"); const ProvidersInfoList& rlsProviders = m_pDataSource->GetProviders(); for (ProvidersInfoList::const_iterator itProvider = rlsProviders.begin(); itProvider != rlsProviders.end(); ++itProvider) { const xml::Element& rConfigElem = itProvider->tConfig; const xml::Element* pOnDestroy = rConfigElem.FindChildElementByName("ondestroy"); if (pOnDestroy) { const xml::Element* pScript = pOnDestroy->FindChildElementByName("script"); if (!pScript) { pScript = pOnDestroy->FindChildElementByName("execute"); } if (pScript) { ScriptExecuter tScriptExecuter(*m_pDataSource, GetProviders()); tScriptExecuter.SetSessionStorage(m_mSessionStorage, m_tSessionStorageMutex); tScriptExecuter.Process(*pScript); } } } }
void ProviderService::OnCreate() { Var& rVar = m_mSessionStorage["id"]; rVar.tType.eType = DataType::Generic; rVar.sValue = GetSessionId(); m_pDataSource = &DataSourceFactory::Inst().GetDataSource(IService::GetServiceName()); const ProvidersInfoList& rlsProviders = m_pDataSource->GetProviders(); for (ProvidersInfoList::const_iterator itProvider = rlsProviders.begin(); itProvider != rlsProviders.end(); ++itProvider) { const xml::Element& rConfigElem = itProvider->tConfig; const xml::Element* pOnCreate = rConfigElem.FindChildElementByName("oncreate"); if (pOnCreate) { const xml::Element* pScript = pOnCreate->FindChildElementByName("script"); if (!pScript) { pScript = pOnCreate->FindChildElementByName("execute"); } if (pScript) { ScriptExecuter tScriptExecuter(*m_pDataSource, GetProviders()); tScriptExecuter.SetSessionStorage(m_mSessionStorage, m_tSessionStorageMutex); tScriptExecuter.Process(*pScript); } } } }
void ProviderService::Invoke(const DataObject& rdoOperation, DataObject& rdoResult) { STAFF_ASSERT(m_pDataSource, "Not initialized"); ScriptExecuter tScriptExecuter(*m_pDataSource, GetProviders()); tScriptExecuter.SetSessionStorage(m_mSessionStorage, m_tSessionStorageMutex); tScriptExecuter.Process(rdoOperation, rdoResult); }
void FDiffTest::GetTests(TArray<FString>& OutBeautifiedNames, TArray<FString>& OutTestCommands) const { GetProviders(OutBeautifiedNames, OutTestCommands); }
void FGetRevisionTest::GetTests(TArray<FString>& OutBeautifiedNames, TArray<FString>& OutTestCommands) const { GetProviders(OutBeautifiedNames, OutTestCommands); AppendFilename(TEXT("/Engine/EditorAutomation/SourceControlTest"), OutBeautifiedNames, OutTestCommands); }
void FGetLabelTest::GetTests(TArray<FString>& OutBeautifiedNames, TArray<FString>& OutTestCommands) const { GetProviders(OutBeautifiedNames, OutTestCommands); AppendFilename(TEXT("SourceControlAutomationLabel"), OutBeautifiedNames, OutTestCommands); }
void FUpdateStatusTest::GetTests(TArray<FString>& OutBeautifiedNames, TArray<FString>& OutTestCommands) const { GetProviders(OutBeautifiedNames, OutTestCommands); AppendFilename(TEXT("/Engine/NotForLicensees/Automation/EditorAutomation/SourceControlTest"), OutBeautifiedNames, OutTestCommands); }