Mono.Addins.Addin.GetFullId C# (CSharp) Method

GetFullId() public static method

Returns the identifier of an add-in
public static GetFullId ( string ns, string id, string version ) : string
ns string /// Namespace of the add-in ///
id string /// Name of the add-in ///
version string /// Version of the add-in ///
return string
        public static string GetFullId(string ns, string id, string version)
        {
            string res;
            if (id.StartsWith ("::"))
                res = id.Substring (2);
            else if (ns != null && ns.Length > 0)
                res = ns + "." + id;
            else
                res = id;

            if (version != null && version.Length > 0)
                return res + "," + version;
            else
                return res;
        }

Usage Example

Beispiel #1
0
        RuntimeAddin[] GetDepAddins()
        {
            if (depAddins != null)
            {
                return(depAddins);
            }

            ArrayList plugList = new ArrayList();
            string    ns       = ainfo.Description.Namespace;

            // Collect dependent ids
            foreach (Dependency dep in module.Dependencies)
            {
                AddinDependency pdep = dep as AddinDependency;
                if (pdep != null)
                {
                    RuntimeAddin adn = addinEngine.GetAddin(Addin.GetFullId(ns, pdep.AddinId, pdep.Version));
                    if (adn != null)
                    {
                        plugList.Add(adn);
                    }
                    else
                    {
                        addinEngine.ReportError("Add-in dependency not loaded: " + pdep.FullAddinId, module.ParentAddinDescription.AddinId, null, false);
                    }
                }
            }
            return(depAddins = (RuntimeAddin[])plugList.ToArray(typeof(RuntimeAddin)));
        }
All Usage Examples Of Mono.Addins.Addin::GetFullId