101 references to Create
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (8)
InteractiveSessionReferencesTests.cs (8)
165var script = CSharpScript.Create(@" 251var script = CSharpScript.Create($@" 281var script0 = CSharpScript.Create($@" 360var result = CSharpScript.Create($@" 399var result = CSharpScript.Create($@" 419var script0 = CSharpScript.Create($@" 480var script = CSharpScript.Create("new S1()", options); 535var s0 = await CSharpScript.Create("new C()", options: ScriptOptions.AddReferences(portableLibRef), assemblyLoader: loader).RunAsync();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (88)
InteractiveSessionReferencesTests.cs (3)
39var s0 = CSharpScript.Create($@" 97var s0 = CSharpScript.Create($@" 136var 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 (47)
35var script = CSharpScript.Create("1 + 2", ScriptOptions); 42Assert.Throws<ArgumentNullException>(() => CSharpScript.Create((string)null)); 82var script = CSharpScript.Create("1 + 2", options: ScriptOptions.WithEmitDebugInformation(true)); 106var script = CSharpScript.Create("1 + 2", ScriptOptions); 135var script = CSharpScript.Create("1 + 2", ScriptOptions); 168CSharpScript.Create("System.Console.WriteLine(0);", ScriptOptions), 293var script = CSharpScript.Create("X + Y", options: ScriptOptions, globalsType: typeof(Globals)); 302var script = CSharpScript.Create("X + Y", ScriptOptions); 311var script = CSharpScript.Create("X + Y", options: ScriptOptions, globalsType: typeof(Globals)); 320var script = CSharpScript.Create("X + Y", options: ScriptOptions, globalsType: typeof(Globals)); 388CSharpScript.Create( 415var script = CSharpScript.Create("var x = 1;", ScriptOptions); 506CSharpScript.Create("System.Console.WriteLine();", ScriptOptions), "")); 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;", ScriptOptions); 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.WithLanguageVersion(LanguageVersion.CSharp7)); 964var script = CSharpScript.Create(@"#nullable enable 987var script = CSharpScript.Create(code, ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp8)); 1069var script = CSharpScript.Create("class partial;", ScriptOptions.WithLanguageVersion(LanguageVersion.Preview)) 1089var script = CSharpScript.Create("class partial;", ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp13))
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();