|
@@ -3394,18 +3394,7 @@ void __fastcall TSessionData::GenerateAssemblyCode(
|
|
SessionData->Timeout = FactoryDefaults->Timeout;
|
|
SessionData->Timeout = FactoryDefaults->Timeout;
|
|
}
|
|
}
|
|
|
|
|
|
- switch (Language)
|
|
|
|
- {
|
|
|
|
- case alCSharp:
|
|
|
|
- case alPowerShell:
|
|
|
|
- Head += AssemblyNewClassInstanceEnd(Language, false);
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
- case alVBNET:
|
|
|
|
- // noop
|
|
|
|
- // Ending With only after AddRawSettings
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
|
|
+ Head += AssemblyNewClassInstanceEnd(Language, false);
|
|
|
|
|
|
std::unique_ptr<TStrings> RawSettings(SessionData->SaveToOptions(FactoryDefaults.get()));
|
|
std::unique_ptr<TStrings> RawSettings(SessionData->SaveToOptions(FactoryDefaults.get()));
|
|
|
|
|
|
@@ -3422,23 +3411,12 @@ void __fastcall TSessionData::GenerateAssemblyCode(
|
|
UnicodeString AddRawSettingsMethod =
|
|
UnicodeString AddRawSettingsMethod =
|
|
RtfLibraryMethod(SessionOptionsClassName, L"AddRawSettings", false) +
|
|
RtfLibraryMethod(SessionOptionsClassName, L"AddRawSettings", false) +
|
|
FORMAT(L"(%s, %s)", (AssemblyString(Language, Name), AssemblyString(Language, Value)));
|
|
FORMAT(L"(%s, %s)", (AssemblyString(Language, Name), AssemblyString(Language, Value)));
|
|
- switch (Language)
|
|
|
|
- {
|
|
|
|
- case alCSharp:
|
|
|
|
- Head += RtfText(SessionOptionsVariableName + L".") + AddRawSettingsMethod + RtfText(L";") + RtfPara;
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
- case alVBNET:
|
|
|
|
- Head += RtfText(L" .") + AddRawSettingsMethod + RtfPara;
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
- case alPowerShell:
|
|
|
|
- Head += RtfText(SessionOptionsVariableName + L".") + AddRawSettingsMethod + RtfPara;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
|
|
+ Head += RtfText(SessionOptionsVariableName + L".") + AddRawSettingsMethod + AssemblyStatementSeparator(Language) + RtfPara;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ Head += RtfPara;
|
|
|
|
+
|
|
UnicodeString Indentation = L" ";
|
|
UnicodeString Indentation = L" ";
|
|
UnicodeString SessionVariableName = AssemblyVariableName(Language, SessionClassName);
|
|
UnicodeString SessionVariableName = AssemblyVariableName(Language, SessionClassName);
|
|
UnicodeString RtfSessionClass = RtfLibraryClass(SessionClassName);
|
|
UnicodeString RtfSessionClass = RtfLibraryClass(SessionClassName);
|
|
@@ -3454,7 +3432,6 @@ void __fastcall TSessionData::GenerateAssemblyCode(
|
|
{
|
|
{
|
|
case alCSharp:
|
|
case alCSharp:
|
|
Head +=
|
|
Head +=
|
|
- RtfPara +
|
|
|
|
RtfKeyword(L"using") + RtfText(" (") + NewSessionInstance + RtfText(L"())") + RtfPara +
|
|
RtfKeyword(L"using") + RtfText(" (") + NewSessionInstance + RtfText(L"())") + RtfPara +
|
|
RtfText(L"{") + RtfPara +
|
|
RtfText(L"{") + RtfPara +
|
|
OpenCall;
|
|
OpenCall;
|
|
@@ -3465,8 +3442,6 @@ void __fastcall TSessionData::GenerateAssemblyCode(
|
|
|
|
|
|
case alVBNET:
|
|
case alVBNET:
|
|
Head +=
|
|
Head +=
|
|
- AssemblyNewClassInstanceEnd(Language, false) +
|
|
|
|
- RtfPara +
|
|
|
|
RtfKeyword(L"Using") + RtfText(L" ") + NewSessionInstance + RtfPara +
|
|
RtfKeyword(L"Using") + RtfText(L" ") + NewSessionInstance + RtfPara +
|
|
OpenCall;
|
|
OpenCall;
|
|
|
|
|
|
@@ -3476,7 +3451,6 @@ void __fastcall TSessionData::GenerateAssemblyCode(
|
|
|
|
|
|
case alPowerShell:
|
|
case alPowerShell:
|
|
Head +=
|
|
Head +=
|
|
- RtfPara +
|
|
|
|
NewSessionInstance + RtfPara +
|
|
NewSessionInstance + RtfPara +
|
|
RtfPara +
|
|
RtfPara +
|
|
RtfKeyword(L"try") + RtfPara +
|
|
RtfKeyword(L"try") + RtfPara +
|