コード例 #1
0
 /// <summary>
 /// This method invokes the finder which scans the assemblies for the types and then loads the result into the type finder.
 /// Once the results are loaded, we update the cached type xml file
 /// </summary>
 /// <param name="typeList"></param>
 /// <param name="resolutionKind"> </param>
 /// <param name="finder"></param>
 /// <remarks>
 /// THIS METHODS IS NOT THREAD SAFE
 /// </remarks>
 private void LoadViaScanningAndUpdateCacheFile <T>(TypeList typeList, TypeResolutionKind resolutionKind, Func <IEnumerable <Type> > finder)
 {
     //we don't have a cache for this so proceed to look them up by scanning
     foreach (var t in finder())
     {
         typeList.AddType(t);
     }
     UpdateCachedPluginsFile <T>(typeList.GetTypes(), resolutionKind);
 }