private void AfterLoaded(string url, OpenApiDocument apiDefinition) { ExcelAsyncUtil.QueueAsMacro(() => { RegisteredFunctions = FunctionRegistrar.RegisterApi(apiDefinition, false); ApiKeyCredentials = Api.Components.SecuritySchemes.Values.Where(ss => ss.Type == SecuritySchemeType.ApiKey).ToDictionary(s => s.Name, s => new ApiKey { Key = s.Name, Value = "", In = s.In }); }); ApiLoadStatusStatic.Status = ApiLoadStatus.Loaded; RibbonController.InvalidateRibbon(); }
public void Remove() { Api = null; if (RegisteredFunctions != null) { ExcelAsyncUtil.QueueAsMacro(() => { FunctionRegistrar.DeregisterFunctions(RegisteredFunctions); }); } }