GetIdName() public static méthode

Given a full add-in identifier, returns the namespace and name of the add-in (it removes the version number)
public static GetIdName ( string addinId ) : string
addinId string /// Add-in identifier. ///
Résultat string
Exemple #1
0
        internal void UnloadAddin(string id)
        {
            defaultContext.RemoveAddinExtensions(id);

            RuntimeAddin addin = GetAddin(id);

            if (addin != null)
            {
                addin.UnloadExtensions();
                loadedAddins.Remove(Addin.GetIdName(id));
                AddinManager.ReportAddinUnload(id);
            }
        }
Exemple #2
0
        bool InsertAddin(IProgressStatus statusMonitor, Addin iad)
        {
            try {
                RuntimeAddin p = new RuntimeAddin();

                // Read the config file and load the add-in assemblies
                AddinDescription description = p.Load(iad);

                // Register the add-in
                loadedAddins [Addin.GetIdName(p.Id)] = p;

                if (!AddinDatabase.RunningSetupProcess)
                {
                    // Load the extension points and other addin data

                    foreach (ExtensionNodeSet rel in description.ExtensionNodeSets)
                    {
                        RegisterNodeSet(rel);
                    }

                    foreach (ConditionTypeDescription cond in description.ConditionTypes)
                    {
                        Type ctype = p.GetType(cond.TypeName, true);
                        defaultContext.RegisterCondition(cond.Id, ctype);
                    }
                }

                foreach (ExtensionPoint ep in description.ExtensionPoints)
                {
                    InsertExtensionPoint(p, ep);
                }

                foreach (Assembly asm in p.Assemblies)
                {
                    loadedAssemblies [asm] = p;
                }

                // Fire loaded event
                defaultContext.NotifyAddinLoaded(p);
                AddinManager.ReportAddinLoad(p.Id);
                return(true);
            }
            catch (Exception ex) {
                AddinManager.ReportError("Extension could not be loaded", iad.Id, ex, false);
                if (statusMonitor != null)
                {
                    statusMonitor.ReportError("Extension '" + iad.Id + "' could not be loaded.", ex);
                }
                return(false);
            }
        }
Exemple #3
0
        internal void UnloadAddin(string id)
        {
            defaultContext.RemoveAddinExtensions(id);

            RuntimeAddin addin = GetAddin(id);

            if (addin != null)
            {
                addin.UnloadExtensions();
                loadedAddins.Remove(Addin.GetIdName(id));
                foreach (Assembly asm in addin.Assemblies)
                {
                    loadedAssemblies.Remove(asm);
                }
                AddinManager.ReportAddinUnload(id);
            }
        }
Exemple #4
0
        bool InsertAddin(IProgressStatus statusMonitor, Addin iad)
        {
            try {
                RuntimeAddin p = new RuntimeAddin(this);

                // Read the config file and load the add-in assemblies
                AddinDescription description = p.Load(iad);

                // Register the add-in
                var loadedAddinsCopy = new Dictionary <string, RuntimeAddin> (loadedAddins);
                loadedAddinsCopy [Addin.GetIdName(p.Id)] = p;
                loadedAddins = loadedAddinsCopy;

                if (!AddinDatabase.RunningSetupProcess)
                {
                    // Load the extension points and other addin data

                    RegisterNodeSets(iad.Id, description.ExtensionNodeSets);

                    foreach (ConditionTypeDescription cond in description.ConditionTypes)
                    {
                        Type ctype = p.GetType(cond.TypeName, true);
                        RegisterCondition(cond.Id, ctype);
                    }
                }

                foreach (ExtensionPoint ep in description.ExtensionPoints)
                {
                    InsertExtensionPoint(p, ep);
                }

                // Fire loaded event
                NotifyAddinLoaded(p);
                ReportAddinLoad(p.Id);
                return(true);
            }
            catch (Exception ex) {
                ReportError("Add-in could not be loaded", iad.Id, ex, false);
                if (statusMonitor != null)
                {
                    statusMonitor.ReportError("Add-in '" + iad.Id + "' could not be loaded.", ex);
                }
                return(false);
            }
        }
 public void ResetCachedData()
 {
     if (extensionPoint != null)
     {
         string       aid = Addin.GetIdName(extensionPoint.ParentAddinDescription.AddinId);
         RuntimeAddin ad  = AddinManager.SessionService.GetAddin(aid);
         if (ad != null)
         {
             extensionPoint = ad.Addin.Description.ExtensionPoints [GetPath()];
         }
     }
     if (childrenList != null)
     {
         foreach (TreeNode cn in childrenList)
         {
             cn.ResetCachedData();
         }
     }
 }
Exemple #6
0
 /// <summary>
 /// Checks if an add-in has been loaded.
 /// </summary>
 /// <param name="id">
 /// Full identifier of the add-in.
 /// </param>
 /// <returns>
 /// True if the add-in is loaded.
 /// </returns>
 public bool IsAddinLoaded(string id)
 {
     CheckInitialized();
     ValidateAddinRoots();
     return(loadedAddins.ContainsKey(Addin.GetIdName(id)));
 }
 internal RuntimeAddin GetAddin(string id)
 {
     return((RuntimeAddin)loadedAddins [Addin.GetIdName(id)]);
 }
 /// <summary>
 /// Checks if an add-in has been loaded.
 /// </summary>
 /// <param name="id">
 /// Full identifier of the add-in.
 /// </param>
 /// <returns>
 /// True if the add-in is loaded.
 /// </returns>
 public bool IsAddinLoaded(string id)
 {
     CheckInitialized();
     return(loadedAddins.Contains(Addin.GetIdName(id)));
 }
Exemple #9
0
 public bool IsAddinLoaded(string id)
 {
     return(loadedAddins.Contains(Addin.GetIdName(id)));
 }