Ejemplo n.º 1
0
 public SkyApplication(IApplication bootApplication,
                       SystemApplicationType sysAppType,
                       IFileSystem metabaseFileSystem,
                       FileSystemSessionConnectParams metabaseFileSystemSessionParams,
                       string metabaseFileSystemRootPath,
                       string thisHostName,
                       bool allowNesting,
                       string[] cmdArgs,
                       ConfigSectionNode rootConfig) : base()
 {
     ctor(allowNesting, cmdArgs, rootConfig);
     m_BootLoader = new BootConfLoader(this, bootApplication,
                                       sysAppType,
                                       metabaseFileSystem,
                                       metabaseFileSystemSessionParams,
                                       metabaseFileSystemRootPath,
                                       thisHostName,
                                       cmdArgs,
                                       rootConfig);
     try
     {
         m_ConfigRoot = m_BootLoader.ApplicationConfiguration.Root;
         InitApplication();
     }
     catch
     {
         Destructor();
         throw;
     }
 }
Ejemplo n.º 2
0
        public SkyApplication(SystemApplicationType sysAppType,
                              bool allowNesting,
                              string[] args,
                              ConfigSectionNode rootConfig) : base()
        {
            var loader = new BootConfLoader(sysAppType);

            ctor(loader, allowNesting, args, rootConfig);
        }
Ejemplo n.º 3
0
        internal SkyApplication(IApplication bootApp,
                                SystemApplicationType sysAppType,
                                Metabank metabase,
                                string thisHost,
                                bool allowNesting,
                                string[] args,
                                ConfigSectionNode rootConfig) : base()
        {
            var loader = new BootConfLoader(bootApp, sysAppType, metabase, thisHost);

            ctor(loader, allowNesting, args, rootConfig);
        }
Ejemplo n.º 4
0
 public SkyApplication(SystemApplicationType sysAppType,
                       bool allowNesting,
                       string[] cmdArgs,
                       ConfigSectionNode rootConfig) : base()
 {
     ctor(allowNesting, cmdArgs, rootConfig);
     m_BootLoader = new BootConfLoader(this, null, sysAppType, cmdArgs, rootConfig);
     try
     {
         m_ConfigRoot = m_BootLoader.ApplicationConfiguration.Root;
         InitApplication();
     }
     catch
     {
         Destructor();
         throw;
     }
 }
Ejemplo n.º 5
0
 private void ctor(BootConfLoader loader,
                   bool allowNesting,
                   string[] args,
                   ConfigSectionNode rootConfig)
 {
     try
     {
         m_BootLoader     = loader;
         m_NOPLockManager = new NOPLockManager(this);
         var cmdArgs = args == null ? null : new CommandArgsConfiguration(args);
         Constructor(allowNesting,
                     cmdArgs,
                     rootConfig,
                     defaultDI: new Injection.SkyApplicationDependencyInjector(this));
         InitApplication();
     }
     catch
     {
         Destructor();
         throw;
     }
 }
Ejemplo n.º 6
0
        protected override Configuration GetConfiguration()
        {
            var localConfig = base.GetConfiguration();

            localConfig.Application = this;

            BootConfLoader.ProcessAllExistingIncludes(localConfig.Root, null, "boot");

            m_BootConfigRoot = localConfig.Root;

            var cmdArgs = new string[] {};

            if (CommandArgs.Configuration is CommandArgsConfiguration)
            {
                cmdArgs = ((CommandArgsConfiguration)this.CommandArgs.Configuration).Arguments;
            }

            var result = m_BootLoader.Load(cmdArgs, localConfig);

            result.Application = this;
            return(result);
        }