#develop (short for SharpDevelop) is a free IDE for .NET programming languages.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 lines
1.0 KiB

// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
namespace PythonBinding.Tests.Utils
{
public class AddInHelper
{
AddInHelper()
{
}
/// <summary>
/// Gets the codon with the specified extension path and name.
/// </summary>
public static Codon GetCodon(AddIn addin, string extensionPath, string name)
{
if (addin.Paths.ContainsKey(extensionPath)) {
ExtensionPath path = addin.Paths[extensionPath];
return GetCodon(path.Codons, name);
}
return null;
}
/// <summary>
/// Gets the codon with the specified name.
/// </summary>
public static Codon GetCodon(IEnumerable<Codon> codons, string name)
{
foreach (Codon codon in codons) {
if (codon.Id == name) {
return codon;
}
}
return null;
}
}
}