Ejemplo n.º 1
0
#pragma warning disable CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable.
        public SessionManager(FilePath configurationPath,
                              IBootstrapper bootstrapper,
                              IConfigurationManager configurationManager,
                              IModuleManager moduleManager,
                              IFileSystem fileSystem)
        {
            this.moduleManager        = moduleManager;
            this.configurationManager = configurationManager;
            this.fileSystem           = fileSystem;

            GlobalHook.Initialize();

            bootstrapper.ComposeImports(this);
            bootstrapper.ComposeImports(configurationManager);
            bootstrapper.ComposeImports(moduleManager);

            configurationManager.LoadConfiguration(configurationPath);

            encoders = Encoders.Where(x => Configuration.Encoders.Contains(x.GetType()));
            decoders = Decoders.Where(x => Configuration.Decoders?.Contains(x.GetType()) ?? false);
        }