File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,20 @@ public async Task UsingSystemXmlLinq()
121121 await AssertScriptCanIncludeUsingStatementAsync ( "System.Xml.Linq" ) ;
122122 }
123123
124+ [ Fact ]
125+ public async Task UsingSystemXml ( )
126+ {
127+ await AssertScriptCanIncludeUsingStatementAsync ( "System.Xml" ) ;
128+
129+ Assert . Equal ( "True" , await EvalAsync ( "using System.Xml; var xnm = typeof(XmlNamespaceManager); return true.ToString();" ) ) ;
130+ }
131+
132+ [ Fact ]
133+ public async Task UsingSystemXmlXPath ( )
134+ {
135+ await AssertScriptCanIncludeUsingStatementAsync ( "System.Xml.XPath" ) ;
136+ }
137+
124138 [ Fact ]
125139 public async Task UsingRegex ( )
126140 {
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ public static IEnumerable<MetadataReference> GetDefaultMetadataReferences()
5151 {
5252 yield return MetadataReference . CreateFromFile ( typeof ( Enumerable ) . GetTypeInfo ( ) . Assembly . Location ) ;
5353 yield return MetadataReference . CreateFromFile ( typeof ( System . Xml . Linq . XElement ) . GetTypeInfo ( ) . Assembly . Location ) ;
54+ yield return MetadataReference . CreateFromFile ( typeof ( System . Xml . XmlNamespaceManager ) . GetTypeInfo ( ) . Assembly . Location ) ;
5455 yield return MetadataReference . CreateFromFile ( typeof ( System . IO . File ) . GetTypeInfo ( ) . Assembly . Location ) ;
5556 yield return MetadataReference . CreateFromFile ( typeof ( System . Diagnostics . Debug ) . GetTypeInfo ( ) . Assembly . Location ) ;
5657 yield return MetadataReference . CreateFromFile ( typeof ( Newtonsoft . Json . JsonConvert ) . GetTypeInfo ( ) . Assembly . Location ) ;
@@ -100,6 +101,8 @@ public static IEnumerable<MetadataReference> GetDefaultMetadataReferences()
100101 {
101102 yield return MetadataReference . CreateFromFile ( typeof ( Enumerable ) . GetTypeInfo ( ) . Assembly . Location ) ;
102103 yield return MetadataReference . CreateFromFile ( typeof ( System . Xml . Linq . XElement ) . GetTypeInfo ( ) . Assembly . Location ) ;
104+ yield return MetadataReference . CreateFromFile ( typeof ( System . Xml . XmlNamespaceManager ) . GetTypeInfo ( ) . Assembly . Location ) ;
105+ yield return MetadataReference . CreateFromFile ( typeof ( System . Xml . XPath . Extensions ) . GetTypeInfo ( ) . Assembly . Location ) ;
103106 yield return MetadataReference . CreateFromFile ( typeof ( System . IO . File ) . GetTypeInfo ( ) . Assembly . Location ) ;
104107 yield return MetadataReference . CreateFromFile ( typeof ( System . Diagnostics . Debug ) . GetTypeInfo ( ) . Assembly . Location ) ;
105108 yield return MetadataReference . CreateFromFile ( typeof ( System . Text . RegularExpressions . Regex ) . GetTypeInfo ( ) . Assembly . Location ) ;
You can’t perform that action at this time.
0 commit comments