98 references to Create
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (8)
InteractiveSessionReferencesTests.cs (8)
167
var script = CSharpScript.
Create
(@"
253
var script = CSharpScript.
Create
($@"
283
var script0 = CSharpScript.
Create
($@"
362
var result = CSharpScript.
Create
($@"
401
var result = CSharpScript.
Create
($@"
421
var script0 = CSharpScript.
Create
($@"
482
var script = CSharpScript.
Create
("new S1()", options);
537
var s0 = await CSharpScript.
Create
("new C()", options: ScriptOptions.AddReferences(portableLibRef), assemblyLoader: loader).RunAsync();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (86)
InteractiveSessionReferencesTests.cs (3)
41
var s0 = CSharpScript.
Create
($@"
99
var s0 = CSharpScript.
Create
($@"
138
var s0 = CSharpScript.
Create
($@"
InteractiveSessionTests.cs (38)
45
var script = CSharpScript.
Create
(@"
66
var script = CSharpScript.
Create
(@"
87
var script = CSharpScript.
Create
(@"
104
var script = CSharpScript.
Create
(@"
134
var script = CSharpScript.
Create
(@"
154
var script = CSharpScript.
Create
(@"
173
var script = CSharpScript.
Create
(@"
188
var script = CSharpScript.
Create
(@"
218
var script = CSharpScript.
Create
(@"
234
var script = CSharpScript.
Create
(@"
328
var script = CSharpScript.
Create
(@"
364
var script = CSharpScript.
Create
(@"
389
var script = CSharpScript.
Create
(
404
var script = CSharpScript.
Create
("var x = 1;", ScriptOptions).ContinueWith("x");
412
CSharpScript.
Create
("using InteractiveFixtures.C;", ScriptOptions.AddReferences(HostAssembly)).
447
var script = CSharpScript.
Create
(@"
532
CSharpScript.
Create
("using System;", ScriptOptions).
540
CSharpScript.
Create
("int Environment = 1;", ScriptOptions).
552
CSharpScript.
Create
("int System = 1;", ScriptOptions).
603
var s0 = CSharpScript.
Create
("int x = 1;", ScriptOptions);
716
var script = CSharpScript.
Create
(@"
742
var s0 = CSharpScript.
Create
(@"
1138
CSharpScript.
Create
("int i = 0;", options).
1175
var script = CSharpScript.
Create
(@"
1242
var script = CSharpScript.
Create
(
1262
var script = CSharpScript.
Create
(
1295
var r2 = CSharpScript.
Create
($@"#r ""{fileMain.Path}""", ScriptOptions).ContinueWith($@"M.X.F").RunAsync().Result.ReturnValue;
1326
var r2 = CSharpScript.
Create
($@"#r ""{fileMain.Path}""", ScriptOptions).ContinueWith($@"M.X.F").RunAsync().Result.ReturnValue;
1341
var script = CSharpScript.
Create
(@"new C()",
1641
var scriptCompilation = CSharpScript.
Create
(
1698
var scriptCompilation = CSharpScript.
Create
(
1766
var scriptCompilation = CSharpScript.
Create
(
1920
var s0 = CSharpScript.
Create
(@"
1943
var s0 = CSharpScript.
Create
(@"
1970
var s0 = CSharpScript.
Create
(@"
2031
var s0 = CSharpScript.
Create
(@"
2065
var s0 = CSharpScript.
Create
(@"
2099
var s0 = CSharpScript.
Create
(@"
ScriptTests.cs (45)
39
var script = CSharpScript.
Create
("1 + 2", ScriptOptions);
46
Assert.Throws<ArgumentNullException>(() => CSharpScript.
Create
((string)null));
86
var script = CSharpScript.
Create
("1 + 2", options: ScriptOptions.WithEmitDebugInformation(true));
110
var script = CSharpScript.
Create
("1 + 2", ScriptOptions);
139
var script = CSharpScript.
Create
("1 + 2", ScriptOptions);
172
CSharpScript.
Create
("System.Console.WriteLine(0);", ScriptOptions),
297
var script = CSharpScript.
Create
("X + Y", options: ScriptOptions, globalsType: typeof(Globals));
306
var script = CSharpScript.
Create
("X + Y", ScriptOptions);
315
var script = CSharpScript.
Create
("X + Y", options: ScriptOptions, globalsType: typeof(Globals));
324
var script = CSharpScript.
Create
("X + Y", options: ScriptOptions, globalsType: typeof(Globals));
392
CSharpScript.
Create
(
419
var script = CSharpScript.
Create
("var x = 1;", ScriptOptions);
510
CSharpScript.
Create
("System.Console.WriteLine();", ScriptOptions), ""));
524
var script = CSharpScript.
Create
(@"
537
var script = CSharpScript.
Create
(@"
547
script = CSharpScript.
Create
(@"
585
var script = CSharpScript.
Create
(@"
595
script = CSharpScript.
Create
(@"
653
var script = CSharpScript.
Create
("#load \"a.csx\"", options);
657
script = CSharpScript.
Create
(@"
676
var script = CSharpScript.
Create
("#load \"a.csx\"", options);
680
script = CSharpScript.
Create
(@"
699
var script = CSharpScript.
Create
("#load \"a.csx\"", options);
703
script = CSharpScript.
Create
(@"
719
var script = CSharpScript.
Create
("#load \"b.csx\"", options);
727
script = CSharpScript.
Create
(@"
737
script = CSharpScript.
Create
(@"
754
var script = CSharpScript.
Create
("#load \"b.csx\"", options);
762
script = CSharpScript.
Create
(@"
772
script = CSharpScript.
Create
(@"
792
var script = CSharpScript.
Create
(@"
800
script = CSharpScript.
Create
(@"
814
var script = CSharpScript.
Create
("return;", ScriptOptions);
818
script = CSharpScript.
Create
(@"
866
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts), line: 1, column: 1, filename: "debug.csx");
873
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts));
880
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts));
903
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts), line: 1, column: 1, filename: "");
911
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts), line: 1, column: 1, filename: "");
918
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts));
925
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts));
948
var script = CSharpScript.
Create
(@"#load ""a.csx""", options);
955
var script = CSharpScript.
Create
(@"string x = default;", ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp7));
968
var script = CSharpScript.
Create
(@"#nullable enable
991
var script = CSharpScript.
Create
(code, ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp8));
Microsoft.CodeAnalysis.Scripting.UnitTests (4)
ScriptOptionsTests.cs (4)
219
var compilation = (CSharpCompilation)CSharpScript.
Create
(string.Empty, scriptOptions).GetCompilation();
246
var compilation = CSharpScript.
Create
(string.Empty, scriptOptions).GetCompilation();
274
var compilation = CSharpScript.
Create
(string.Empty, scriptOptions).GetCompilation();
311
var compilation = CSharpScript.
Create
(string.Empty, scriptOptions).GetCompilation();