1
Vote

Projects automation objects to not support extenders

description

Currently the automation objects for projects do not support extenders. This means doing something like project.Extender["WebApplication"] will not work on a project which is flavored w/ web applications (and of course other extenders won't work for other flavored project types).
 
The fix for this is pretty simple, these methods on OAProject.cs need to have real implementations such as:
 
/// <summary>
/// Gets the requested Extender object if it is available for this object.
/// </summary>
/// <param name="name">The name of the extender object.</param>
/// <returns>An Extender object. </returns>
public virtual object get_Extender(string name)
{
        return DTE.ObjectExtenders.GetExtender(project.NodeProperties.ExtenderCATID.ToUpper(), name, project.NodeProperties);
}
 
/// <summary>
/// Gets a list of available Extenders for the object.
/// </summary>
public virtual object ExtenderNames
{
        get { return DTE.ObjectExtenders.GetExtenderNames(project.NodeProperties.ExtenderCATID.ToUpper(), project.NodeProperties); }
}
 
/// <summary>
/// Gets the Extender category ID (CATID) for the object.
/// </summary>
public virtual string ExtenderCATID
{
        get { return project.NodeProperties.ExtenderCATID; }
}

comments