File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 55
66namespace Python . Runtime
77{
8+ /// <summary>
9+ /// Example of Embedding Python inside of a .NET program.
10+ /// </summary>
11+ /// <remarks>
12+ /// It has similar functionality to doing `import clr` from within Python, but this does it
13+ /// the other way around; That is, it loads Python inside of .NET program.
14+ /// See https://github.com/pythonnet/pythonnet/issues/358 for more info.
15+ /// </remarks>
816 public sealed class PythonConsole
917 {
1018 private static AssemblyLoader assemblyLoader = new AssemblyLoader ( ) ;
@@ -41,7 +49,7 @@ public AssemblyLoader()
4149 AppDomain . CurrentDomain . AssemblyResolve += ( sender , args ) =>
4250 {
4351 string shortName = args . Name . Split ( ',' ) [ 0 ] ;
44- string resourceName = string . Format ( "{0 }.dll", shortName ) ;
52+ string resourceName = $ " { shortName } .dll";
4553
4654 if ( loadedAssemblies . ContainsKey ( resourceName ) )
4755 {
@@ -60,7 +68,6 @@ public AssemblyLoader()
6068 return assembly ;
6169 }
6270 }
63-
6471 return null ;
6572 } ;
6673 }
You can’t perform that action at this time.
0 commit comments