コード例 #1
0
ファイル: SessionManager.cs プロジェクト: insightmind/MORR
#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);
        }
コード例 #2
0
 public static IEnumerable <Codec> FindEncoders(CodecID id) => Encoders.Where(x => x.Id == id);