File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,12 @@ public async Task UsingSystemXmlLinq()
115115 Assert . Equal ( "OK" , await EvalAsync ( "using System.Xml.Linq; return \" OK\" ;" ) ) ;
116116 }
117117
118+ [ Fact ]
119+ public async Task UsingRegex ( )
120+ {
121+ Assert . Equal ( "OK" , await EvalAsync ( "using System.Text.RegularExpressions; return \" OK\" ;" ) ) ;
122+ }
123+
118124 [ Fact ]
119125 public async Task UsingSystemDiagnosticsDebug ( )
120126 {
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ public override async Task<string> GetBodyAsync(RequestInfo requestInfo)
3535 var sourceCode = SourceCode ;
3636 if ( _compiledType == null || _sourceAtCompilationTime != sourceCode )
3737 {
38+ //TODO: Debug logging of referenced assemblies
3839 var scriptOptions = ScriptOptions . Default . WithReferences (
3940 MetadataReference . CreateFromFile ( typeof ( Enumerable ) . GetTypeInfo ( ) . Assembly . Location ) , // System.Linq
4041 MetadataReference . CreateFromFile ( typeof ( System . Xml . Linq . XElement ) . GetTypeInfo ( ) . Assembly . Location ) , // System.Xml.Linq
@@ -86,7 +87,8 @@ public override async Task<string> GetBodyAsync(RequestInfo requestInfo)
8687 MetadataReference . CreateFromFile ( typeof ( Enumerable ) . GetTypeInfo ( ) . Assembly . Location ) , // System.Linq
8788 MetadataReference . CreateFromFile ( typeof ( System . Xml . Linq . XElement ) . GetTypeInfo ( ) . Assembly . Location ) , // System.Xml.Linq
8889 MetadataReference . CreateFromFile ( typeof ( System . IO . File ) . GetTypeInfo ( ) . Assembly . Location ) ,
89- MetadataReference . CreateFromFile ( typeof ( System . Diagnostics . Debug ) . GetTypeInfo ( ) . Assembly . Location )
90+ MetadataReference . CreateFromFile ( typeof ( System . Diagnostics . Debug ) . GetTypeInfo ( ) . Assembly . Location ) ,
91+ MetadataReference . CreateFromFile ( typeof ( System . Text . RegularExpressions . Regex ) . GetTypeInfo ( ) . Assembly . Location )
9092 ) ;
9193
9294 var script = CSharpScript . Create < string > (
You can’t perform that action at this time.
0 commit comments