Source/NFX/IO/FileSystem/FileSystem.cs
/// <summary>
/// Automatically starts systems designated in config with auto-start attribute
/// </summary>
Automatically starts systems designated in config with auto-start attribute
Automatically starts systems designated in config with auto - start attribute
public static void AutoStartSystems()
        {
          foreach (var fsNode in App.ConfigRoot[CONFIG_FILESYSTEMS_SECTION].Children.Where(cn => cn.IsSameName(CONFIG_FILESYSTEM_SECTION)))
          {
            var name = fsNode.AttrByName(Configuration.CONFIG_NAME_ATTR).Value;
            if (!fsNode.AttrByName(CONFIG_AUTO_START_ATTR).ValueAsBool()) continue;
            var system = FactoryUtils.MakeAndConfigure<FileSystem>(fsNode, typeof(FileSystem), new object[] {name, fsNode});
            if (s_Instances[system.Name] != null) 
              throw new FileSystemException("AutoStart: " + StringConsts.FS_DUPLICATE_NAME_ERROR.Args(system.GetType().FullName, system.Name));
            s_Instances.Register(system);
          }
        }
public static void AutoStartSystems ( ) { foreach ( var fsNode in App . ConfigRoot [ CONFIG_FILESYSTEMS_SECTION ] . Children . Where ( cn => cn . IsSameName ( CONFIG_FILESYSTEM_SECTION ) ) ) { var name = fsNode . AttrByName ( Configuration . CONFIG_NAME_ATTR ) . Value ; if ( ! fsNode . AttrByName ( CONFIG_AUTO_START_ATTR ) . ValueAsBool ( ) ) continue ; var system = FactoryUtils . MakeAndConfigure < FileSystem > ( fsNode , typeof ( FileSystem ) , new object [ ] { name , fsNode } ) ; if ( s_Instances [ system . Name ] != null ) throw new FileSystemException ( " " + StringConsts . FS_DUPLICATE_NAME_ERROR . Args ( system . GetType ( ) . FullName , system . Name ) ) ; s_Instances . Register ( system ) ; } }
Automatically starts systems designated in config with auto-start attribute
Automatically starts systems designated in config with auto - start attribute
// already started