| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4fe44c4 commit a1b9136
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,6 +5,14 @@ | |||
| 5 | 5 | ||
| 6 | 6 | namespace Python.Runtime | |
| 7 | 7 | { | |
| 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> | ||
| 8 | 16 | public sealed class PythonConsole | |
| 9 | 17 | { | |
| 10 | 18 | private static AssemblyLoader assemblyLoader = new AssemblyLoader(); | |
@@ -41,7 +49,7 @@ public AssemblyLoader() | |||
| 41 | 49 | AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => | |
| 42 | 50 | { | |
| 43 | 51 | string shortName = args.Name.Split(',')[0]; | |
| 44 | - string resourceName = string.Format("{0}.dll", shortName); | ||
| 52 | + string resourceName = $"{shortName}.dll"; | ||
| 45 | 53 | ||
| 46 | 54 | if (loadedAssemblies.ContainsKey(resourceName)) | |
| 47 | 55 | { | |
@@ -60,7 +68,6 @@ public AssemblyLoader() | |||
| 60 | 68 | return assembly; | |
| 61 | 69 | } | |
| 62 | 70 | } | |
| 63 | - | ||
| 64 | 71 | return null; | |
| 65 | 72 | }; | |
| 66 | 73 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments