示例#1
0
 public PluginManager(ILogProvider logProvider,
                      IContentDirectoryProvider contentDirectory,
                      IPluginConfigurationStore databaseProvider)
 {
     this.logProvider        = logProvider;
     this.contentDirectory   = contentDirectory;
     this.loadedPlugins      = new Dictionary <Type, IImmutableList <IPlugin> >();
     this.configurationStore = databaseProvider;
 }
示例#2
0
        private bool disposedValue = false; // To detect redundant calls

        /// <summary>
        /// Initializes the default plugin manager.
        /// </summary>
        /// <param name="logProvider">The logging provider.</param>
        /// <param name="contentDirectory">The content directory provider.</param>
        /// <param name="databaseProvider">The plugin configuration store.</param>
        /// <param name="rootFs">The root file system used to create new subfilesystems.</param>
        public PluginManager(ILogProvider logProvider,
            IContentDirectoryProvider contentDirectory,
            IPluginConfigurationStore databaseProvider,
            IFileSystem rootFs)
        {
            this.logProvider = logProvider;
            this.contentDirectory = contentDirectory;
            this.loadedPlugins = new Dictionary<Type, IImmutableList<IPlugin>>();
            this.configurationStore = databaseProvider;
            this.rootFs = rootFs;
            this.Logger = this.logProvider.GetLogger("PluginManager");
            this.jsonSerializerOptions = new JsonSerializerOptions();
            this.jsonSerializerOptions.Converters.Add(new PluginPropertiesConverter());
        }
示例#3
0
 public SystemFileProvider(IContentDirectoryProvider cdp)
 {
     this.SystemFileRoot = cdp.ApplicationData.CreateSubdirectory("bios");
 }
 public EmulatorTaskRootDirectoryProvider(IContentDirectoryProvider cdp)
 {
     this.EmulatorTaskRoot = cdp.ApplicationData.CreateSubdirectory("emulatorapproot");
 }
示例#5
0
 public SaveLocationProvider(IContentDirectoryProvider contentDirectoryProvider)
 {
     this.SaveLocationRoot = contentDirectoryProvider.ApplicationData.CreateSubdirectory("saves");
 }