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