Source/NFX/ApplicationModel/CommonApplicationLogic.cs
/// <summary>
/// RESERVED for future use. Loads assemblies specified in 'preload-assemblies' section from disk optionally checking the 'enabled' flag.
/// This method is called on application startup by the framework
/// </summary>
RESERVED for future use. Loads assemblies specified in 'preload-assemblies' section from disk optionally checking the 'enabled' flag.
This method is called on application startup by the framework
RESERVED for future use . Loads assemblies specified in ' preload - assemblies ' section from disk optionally checking the ' enabled ' flag . This method is called on application startup by the framework
public bool PreloadAssemblies(bool checkFlag = true)
            {
               var nPreload = m_ConfigRoot[CONFIG_PRELOAD_ASSEMBLIES_SECTION];
               if (checkFlag && !nPreload.AttrByName(CONFIG_ENABLED_ATTR).ValueAsBool(true)) return false;
               string apath = CoreConsts.UNKNOWN;
               try
               {
                foreach(var anode in nPreload.Children.Where(c=>c.IsSameName(CONFIG_ASSEMBLY_SECTION)))
                {
                  apath = anode.AttrByName(CONFIG_PATH_ATTR).Value;
                  if (apath.IsNullOrWhiteSpace()) continue;
                  if (!File.Exists(apath)) continue;
                  Assembly.LoadFrom(apath);
                }
               }
               catch(Exception error)
               {
                  throw new NFXException(StringConsts.APP_ASSEMBLY_PRELOAD_ERROR.Args(apath, error.ToMessageWithType()), error);
               }
               return true;
            }
public bool PreloadAssemblies ( bool checkFlag = true ) { var nPreload = m_ConfigRoot [ CONFIG_PRELOAD_ASSEMBLIES_SECTION ] ; if ( checkFlag && ! nPreload . AttrByName ( CONFIG_ENABLED_ATTR ) . ValueAsBool ( true ) ) return false ; string apath = CoreConsts . UNKNOWN ; try { foreach ( var anode in nPreload . Children . Where ( c => c . IsSameName ( CONFIG_ASSEMBLY_SECTION ) ) ) { apath = anode . AttrByName ( CONFIG_PATH_ATTR ) . Value ; if ( apath . IsNullOrWhiteSpace ( ) ) continue ; if ( ! File . Exists ( apath ) ) continue ; Assembly . LoadFrom ( apath ) ; } } catch ( Exception error ) { throw new NFXException ( StringConsts . APP_ASSEMBLY_PRELOAD_ERROR . Args ( apath , error . ToMessageWithType ( ) ) , error ) ; } return true ; }
RESERVED for future use.
RESERVED for future use .
checkFlag
bool