Skip to content

Commit 5377142

Browse files
committed
Adding PoC - Azure Code execution.h2
1 parent 4ce456d commit 5377142

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
var topPanel = "PoC - Azure Code execution".popupWindow(700,400).insert_LogViewer();
2+
//var topPanel = panel.clear().add_Panel();
3+
var script = topPanel.add_Script();
4+
script.set_Code("return Environment.CurrentDirectory;");
5+
6+
var webService = new WebService();
7+
var replResponse = topPanel.insert_Right().add_Script_Me(webService);
8+
replResponse.add_InvocationParameter("response","");
9+
replResponse.set_Code(
10+
@"return response;
11+
12+
return webService;
13+
14+
//O2Ref:System.Web.Services.dll
15+
//O2Ref:{0}".format(webService.type().assemblyLocation().fileName()));
16+
17+
18+
19+
Action executeOnAzure =
20+
()=>{
21+
"Executing Code on Azure".info();
22+
var code = script.Code;
23+
var response = webService.ExecuteCSharpCode(code );
24+
"Got response with size {0}".info(response.size());
25+
replResponse.InvocationParameters.add("response", response);
26+
script.showResult(response);
27+
};
28+
29+
script.executeButton.set_Text("Execute Locally");
30+
script.executeButton.insert_Left().add_Button("Execute on Azure").onClick(()=> executeOnAzure()).fill();
31+
32+
//O2File:E:\O2\O2.Temp\7_5_2013\wsdl_tmp5F5B\WebService.cs
33+
//O2Ref:System.Web.Services.dll

0 commit comments

Comments
 (0)