1- // ==========================================================================
2- // This software is subject to the provisions of the Zope Public License,
3- // Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
4- // THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
5- // WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6- // WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
7- // FOR A PARTICULAR PURPOSE.
8- // ==========================================================================
91
102using System ;
113using System . IO ;
1911namespace Python . Runtime {
2012
2113 /// <summary>
22- /// The AssemblyManager maintains information about loaded assemblies
14+ /// The AssemblyManager maintains information about loaded assemblies
2315 /// namespaces and provides an interface for name-based type lookup.
2416 /// </summary>
2517
@@ -42,7 +34,7 @@ private AssemblyManager() {}
4234 //===================================================================
4335
4436 internal static void Initialize ( ) {
45- namespaces = new
37+ namespaces = new
4638 Dictionary < string , Dictionary < Assembly , string > > ( 32 ) ;
4739 probed = new Dictionary < string , int > ( 32 ) ;
4840 //generics = new Dictionary<string, Dictionary<string, string>>();
@@ -54,7 +46,7 @@ internal static void Initialize() {
5446 lhandler = new AssemblyLoadEventHandler ( AssemblyLoadHandler ) ;
5547 domain . AssemblyLoad += lhandler ;
5648
57- rhandler = new ResolveEventHandler ( ResolveHandler ) ;
49+ rhandler = new ResolveEventHandler ( ResolveHandler ) ;
5850 domain . AssemblyResolve += rhandler ;
5951
6052 Assembly [ ] items = domain . GetAssemblies ( ) ;
@@ -85,10 +77,10 @@ internal static void Shutdown() {
8577
8678
8779 //===================================================================
88- // Event handler for assembly load events. At the time the Python
80+ // Event handler for assembly load events. At the time the Python
8981 // runtime loads, we scan the app domain to map the assemblies that
9082 // are loaded at the time. We also have to register this event handler
91- // so that we can know about assemblies that get loaded after the
83+ // so that we can know about assemblies that get loaded after the
9284 // Python runtime is initialized.
9385 //===================================================================
9486
@@ -122,11 +114,11 @@ static Assembly ResolveHandler(Object ob, ResolveEventArgs args){
122114
123115 //===================================================================
124116 // We __really__ want to avoid using Python objects or APIs when
125- // probing for assemblies to load, since our ResolveHandler may be
117+ // probing for assemblies to load, since our ResolveHandler may be
126118 // called in contexts where we don't have the Python GIL and can't
127119 // even safely try to get it without risking a deadlock ;(
128120 //
129- // To work around that, we update a managed copy of sys.path (which
121+ // To work around that, we update a managed copy of sys.path (which
130122 // is the main thing we care about) when UpdatePath is called. The
131123 // import hook calls this whenever it knows its about to use the
132124 // assembly manager, which lets us keep up with changes to sys.path
@@ -216,11 +208,11 @@ public static Assembly LoadAssemblyPath(string name) {
216208 return assembly ;
217209 }
218210
219- /// <summary>
220- /// Loads an assembly using full path.
221- /// </summary>
222- /// <param name="name"></param>
223- /// <returns></returns>
211+ /// <summary>
212+ /// Loads an assembly using full path.
213+ /// </summary>
214+ /// <param name="name"></param>
215+ /// <returns></returns>
224216 public static Assembly LoadAssemblyFullPath ( string name ) {
225217 Assembly assembly = null ;
226218 if ( Path . IsPathRooted ( name ) ) {
@@ -249,7 +241,7 @@ public static Assembly FindLoadedAssembly(string name) {
249241 }
250242
251243 //===================================================================
252- // Given a qualified name of the form A.B.C.D, attempt to load
244+ // Given a qualified name of the form A.B.C.D, attempt to load
253245 // an assembly named after each of A.B.C.D, A.B.C, A.B, A. This
254246 // will only actually probe for the assembly once for each unique
255247 // namespace. Returns true if any assemblies were loaded.
@@ -304,7 +296,7 @@ public static bool LoadImplicit(string name, bool warn=true) {
304296 //===================================================================
305297 // Scans an assembly for exported namespaces, adding them to the
306298 // mapping of valid namespaces. Note that for a given namespace
307- // a.b.c.d, each of a, a.b, a.b.c and a.b.c.d are considered to
299+ // a.b.c.d, each of a, a.b, a.b.c and a.b.c.d are considered to
308300 // be valid namespaces (to better match Python import semantics).
309301 //===================================================================
310302
@@ -402,7 +394,7 @@ public static List<string> GetNames(string nsname) {
402394 //string tail = key.Substring(nslen);
403395 if ( key . IndexOf ( '.' ) == - 1 ) {
404396 names . Add ( key ) ;
405- }
397+ }
406398 }
407399 }
408400 }
0 commit comments