Esempio n. 1
0
 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();
 }
Esempio n. 2
0
        public void Remove()
        {
            Api = null;

            if (RegisteredFunctions != null)
            {
                ExcelAsyncUtil.QueueAsMacro(() =>
                {
                    FunctionRegistrar.DeregisterFunctions(RegisteredFunctions);
                });
            }
        }