99 references to Create
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (8)
InteractiveSessionReferencesTests.cs (8)
167var script = CSharpScript.Create(@" 253var script = CSharpScript.Create($@" 283var script0 = CSharpScript.Create($@" 362var result = CSharpScript.Create($@" 401var result = CSharpScript.Create($@" 421var script0 = CSharpScript.Create($@" 482var script = CSharpScript.Create("new S1()", options); 537var s0 = await CSharpScript.Create("new C()", options: ScriptOptions.Default.AddReferences(portableLibRef), assemblyLoader: loader).RunAsync();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (86)
InteractiveSessionReferencesTests.cs (3)
40var s0 = CSharpScript.Create($@" 98var s0 = CSharpScript.Create($@" 137var s0 = CSharpScript.Create($@"
InteractiveSessionTests.cs (38)
44var script = CSharpScript.Create(@" 65var script = CSharpScript.Create(@" 86var script = CSharpScript.Create(@" 103var script = CSharpScript.Create(@" 133var script = CSharpScript.Create(@" 153var script = CSharpScript.Create(@" 172var script = CSharpScript.Create(@" 187var script = CSharpScript.Create(@" 217var script = CSharpScript.Create(@" 233var script = CSharpScript.Create(@" 327var script = CSharpScript.Create(@" 363var script = CSharpScript.Create(@" 388var script = CSharpScript.Create( 403var script = CSharpScript.Create("var x = 1;").ContinueWith("x"); 411CSharpScript.Create("using InteractiveFixtures.C;", ScriptOptions.Default.AddReferences(HostAssembly)). 446var script = CSharpScript.Create(@" 531CSharpScript.Create("using System;"). 539CSharpScript.Create("int Environment = 1;"). 551CSharpScript.Create("int System = 1;"). 602var s0 = CSharpScript.Create("int x = 1;"); 715var script = CSharpScript.Create(@" 741var s0 = CSharpScript.Create(@" 1137CSharpScript.Create("int i = 0;", options). 1174var script = CSharpScript.Create(@" 1241var script = CSharpScript.Create( 1261var script = CSharpScript.Create( 1294var r2 = CSharpScript.Create($@"#r ""{fileMain.Path}""").ContinueWith($@"M.X.F").RunAsync().Result.ReturnValue; 1325var r2 = CSharpScript.Create($@"#r ""{fileMain.Path}""").ContinueWith($@"M.X.F").RunAsync().Result.ReturnValue; 1340var script = CSharpScript.Create(@"new C()", 1640var scriptCompilation = CSharpScript.Create( 1697var scriptCompilation = CSharpScript.Create( 1765var scriptCompilation = CSharpScript.Create( 1919var s0 = CSharpScript.Create(@" 1942var s0 = CSharpScript.Create(@" 1969var s0 = CSharpScript.Create(@" 2030var s0 = CSharpScript.Create(@" 2064var s0 = CSharpScript.Create(@" 2098var s0 = CSharpScript.Create(@"
ScriptTests.cs (45)
36var script = CSharpScript.Create("1 + 2"); 43Assert.Throws<ArgumentNullException>(() => CSharpScript.Create((string)null)); 83var script = CSharpScript.Create("1 + 2", options: ScriptOptions.Default.WithEmitDebugInformation(true)); 107var script = CSharpScript.Create("1 + 2"); 136var script = CSharpScript.Create("1 + 2"); 169CSharpScript.Create("System.Console.WriteLine(0);"), 294var script = CSharpScript.Create("X + Y", globalsType: typeof(Globals)); 303var script = CSharpScript.Create("X + Y"); 312var script = CSharpScript.Create("X + Y", globalsType: typeof(Globals)); 321var script = CSharpScript.Create("X + Y", globalsType: typeof(Globals)); 389CSharpScript.Create( 415var script = CSharpScript.Create("var x = 1;"); 506CSharpScript.Create("System.Console.WriteLine();"), "")); 520var script = CSharpScript.Create(@" 533var script = CSharpScript.Create(@" 543script = CSharpScript.Create(@" 581var script = CSharpScript.Create(@" 591script = CSharpScript.Create(@" 649var script = CSharpScript.Create("#load \"a.csx\"", options); 653script = CSharpScript.Create(@" 672var script = CSharpScript.Create("#load \"a.csx\"", options); 676script = CSharpScript.Create(@" 695var script = CSharpScript.Create("#load \"a.csx\"", options); 699script = CSharpScript.Create(@" 715var script = CSharpScript.Create("#load \"b.csx\"", options); 723script = CSharpScript.Create(@" 733script = CSharpScript.Create(@" 750var script = CSharpScript.Create("#load \"b.csx\"", options); 758script = CSharpScript.Create(@" 768script = CSharpScript.Create(@" 788var script = CSharpScript.Create(@" 796script = CSharpScript.Create(@" 810var script = CSharpScript.Create("return;"); 814script = CSharpScript.Create(@" 862return VerifyStackTraceAsync(() => CSharpScript.Create("throw new System.Exception();", opts), line: 1, column: 1, filename: "debug.csx"); 869return VerifyStackTraceAsync(() => CSharpScript.Create("throw new System.Exception();", opts)); 876return VerifyStackTraceAsync(() => CSharpScript.Create("throw new System.Exception();", opts)); 899return VerifyStackTraceAsync(() => CSharpScript.Create("throw new System.Exception();", opts), line: 1, column: 1, filename: ""); 907return VerifyStackTraceAsync(() => CSharpScript.Create("throw new System.Exception();", opts), line: 1, column: 1, filename: ""); 914return VerifyStackTraceAsync(() => CSharpScript.Create("throw new System.Exception();", opts)); 921return VerifyStackTraceAsync(() => CSharpScript.Create("throw new System.Exception();", opts)); 944var script = CSharpScript.Create(@"#load ""a.csx""", options); 951var script = CSharpScript.Create(@"string x = default;", ScriptOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7)); 964var script = CSharpScript.Create(@"#nullable enable 987var script = CSharpScript.Create(code, ScriptOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8));
Microsoft.CodeAnalysis.Scripting.UnitTests (5)
ScriptOptionsTests.cs (5)
163var compilation = CSharpScript.Create(string.Empty, scriptOptions).GetCompilation(); 219var compilation = (CSharpCompilation)CSharpScript.Create(string.Empty, scriptOptions).GetCompilation(); 246var compilation = CSharpScript.Create(string.Empty, scriptOptions).GetCompilation(); 274var compilation = CSharpScript.Create(string.Empty, scriptOptions).GetCompilation(); 311var compilation = CSharpScript.Create(string.Empty, scriptOptions).GetCompilation();