101 references to Create
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (8)
InteractiveSessionReferencesTests.cs (8)
165
var script = CSharpScript.
Create
(@"
251
var script = CSharpScript.
Create
($@"
281
var script0 = CSharpScript.
Create
($@"
360
var result = CSharpScript.
Create
($@"
399
var result = CSharpScript.
Create
($@"
419
var script0 = CSharpScript.
Create
($@"
480
var script = CSharpScript.
Create
("new S1()", options);
535
var s0 = await CSharpScript.
Create
("new C()", options: ScriptOptions.AddReferences(portableLibRef), assemblyLoader: loader).RunAsync();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (88)
InteractiveSessionReferencesTests.cs (3)
39
var s0 = CSharpScript.
Create
($@"
97
var s0 = CSharpScript.
Create
($@"
136
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 (47)
35
var script = CSharpScript.
Create
("1 + 2", ScriptOptions);
42
Assert.Throws<ArgumentNullException>(() => CSharpScript.
Create
((string)null));
82
var script = CSharpScript.
Create
("1 + 2", options: ScriptOptions.WithEmitDebugInformation(true));
106
var script = CSharpScript.
Create
("1 + 2", ScriptOptions);
135
var script = CSharpScript.
Create
("1 + 2", ScriptOptions);
168
CSharpScript.
Create
("System.Console.WriteLine(0);", ScriptOptions),
293
var script = CSharpScript.
Create
("X + Y", options: ScriptOptions, globalsType: typeof(Globals));
302
var script = CSharpScript.
Create
("X + Y", ScriptOptions);
311
var script = CSharpScript.
Create
("X + Y", options: ScriptOptions, globalsType: typeof(Globals));
320
var script = CSharpScript.
Create
("X + Y", options: ScriptOptions, globalsType: typeof(Globals));
388
CSharpScript.
Create
(
415
var script = CSharpScript.
Create
("var x = 1;", ScriptOptions);
506
CSharpScript.
Create
("System.Console.WriteLine();", ScriptOptions), ""));
520
var script = CSharpScript.
Create
(@"
533
var script = CSharpScript.
Create
(@"
543
script = CSharpScript.
Create
(@"
581
var script = CSharpScript.
Create
(@"
591
script = CSharpScript.
Create
(@"
649
var script = CSharpScript.
Create
("#load \"a.csx\"", options);
653
script = CSharpScript.
Create
(@"
672
var script = CSharpScript.
Create
("#load \"a.csx\"", options);
676
script = CSharpScript.
Create
(@"
695
var script = CSharpScript.
Create
("#load \"a.csx\"", options);
699
script = CSharpScript.
Create
(@"
715
var script = CSharpScript.
Create
("#load \"b.csx\"", options);
723
script = CSharpScript.
Create
(@"
733
script = CSharpScript.
Create
(@"
750
var script = CSharpScript.
Create
("#load \"b.csx\"", options);
758
script = CSharpScript.
Create
(@"
768
script = CSharpScript.
Create
(@"
788
var script = CSharpScript.
Create
(@"
796
script = CSharpScript.
Create
(@"
810
var script = CSharpScript.
Create
("return;", ScriptOptions);
814
script = CSharpScript.
Create
(@"
862
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts), line: 1, column: 1, filename: "debug.csx");
869
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts));
876
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts));
899
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts), line: 1, column: 1, filename: "");
907
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts), line: 1, column: 1, filename: "");
914
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts));
921
return VerifyStackTraceAsync(() => CSharpScript.
Create
("throw new System.Exception();", opts));
944
var script = CSharpScript.
Create
(@"#load ""a.csx""", options);
951
var script = CSharpScript.
Create
(@"string x = default;", ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp7));
964
var script = CSharpScript.
Create
(@"#nullable enable
987
var script = CSharpScript.
Create
(code, ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp8));
1069
var script = CSharpScript.
Create
("class partial;", ScriptOptions.WithLanguageVersion(LanguageVersion.Preview))
1089
var script = CSharpScript.
Create
("class partial;", ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp13))
Microsoft.CodeAnalysis.Scripting.UnitTests (5)
ScriptOptionsTests.cs (5)
163
var compilation = CSharpScript.
Create
(string.Empty, scriptOptions).GetCompilation();
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();