コード例 #1
0
        public void LoadOpenFx()
        {
            logger.Info("Initializing Open Framework " + OpenFramework.BuildInfo.SDK_VERSION);
            OpenFx.Initialize(new AutumnBoxGuiBaseApiImpl());
            logger.Info("Open framework api system is initialized");
            var libsManager = OpenFx.Lake.Get <ILibsManager>();

            logger.Info($"There are {libsManager.Librarians.Count()} librarians and {libsManager.Registry.Count()} wrappers");
            libsManager.Registry.All((extInf) =>
            {
                logger.Info(extInf.ExtensionInfo.Id + " has been registerd by " + extInf.Librarian?.Name);
                return(true);
            });
            isLoaded = true;
            while (handlers.Any())
            {
                try
                {
                    handlers.Dequeue()();
                }
                catch (Exception e)
                {
                    logger.Warn("", e);
                }
            }
        }
コード例 #2
0
ファイル: FakeOpenFx.cs プロジェクト: yqym2019/AutumnBox
 public static void Initialize()
 {
     OpenFx.Initialize(FakeApi);
     OpenFx.RefreshExtensionsList();
 }