FlavoredProjectBase FlavoredProjectBase FlavoredProjectBase FlavoredProjectBase Class

Definition

A project that is a subtype/flavor of an inner project.

public ref class FlavoredProjectBase abstract : IServiceProvider, Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget, Microsoft::VisualStudio::Shell::Flavor::IVsAggregatableProjectCorrected, Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy
public abstract class FlavoredProjectBase : IServiceProvider, Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget, Microsoft.VisualStudio.Shell.Flavor.IVsAggregatableProjectCorrected, Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy
type FlavoredProjectBase = class
    interface IVsAggregatableProjectCorrected
    interface IServiceProvider
    interface IVsHierarchy
    interface IVsUIHierarchy
    interface IOleCommandTarget
Public MustInherit Class FlavoredProjectBase
Implements IOleCommandTarget, IServiceProvider, IVsAggregatableProjectCorrected, IVsUIHierarchy
Inheritance
FlavoredProjectBaseFlavoredProjectBaseFlavoredProjectBaseFlavoredProjectBase
Implements

Remarks

The default behavior of all methods is to delegate to the inner project. For any behavior you want to change, simply handle the request yourself.

You must set the serviceProvider field on this class before attempting to load the project.

Constructors

FlavoredProjectBase() FlavoredProjectBase() FlavoredProjectBase() FlavoredProjectBase()

Initializes a new instance of FlavoredProjectBase.

Fields

_innerOleCommandTarget _innerOleCommandTarget _innerOleCommandTarget _innerOleCommandTarget

The inner command target.

_innerVsAggregatableProject _innerVsAggregatableProject _innerVsAggregatableProject _innerVsAggregatableProject

The aggregatable project.

_innerVsHierarchy _innerVsHierarchy _innerVsHierarchy _innerVsHierarchy

The inner hierarchy.

_innerVsUIHierarchy _innerVsUIHierarchy _innerVsUIHierarchy _innerVsUIHierarchy

The inner UI hierarchy.

serviceProvider serviceProvider serviceProvider serviceProvider

The service provider.

Methods

AdviseHierarchyEvents(IVsHierarchyEvents) AdviseHierarchyEvents(IVsHierarchyEvents) AdviseHierarchyEvents(IVsHierarchyEvents) AdviseHierarchyEvents(IVsHierarchyEvents)

Advises hierarchy events.

Close() Close() Close() Close()

Closes the hierarchy.

ExecCommand(UInt32, Guid, UInt32, UInt32, IntPtr, IntPtr) ExecCommand(UInt32, Guid, UInt32, UInt32, IntPtr, IntPtr) ExecCommand(UInt32, Guid, UInt32, UInt32, IntPtr, IntPtr) ExecCommand(UInt32, Guid, UInt32, UInt32, IntPtr, IntPtr)

Executes the specified command.

FreeInterfaces() FreeInterfaces() FreeInterfaces() FreeInterfaces()

Frees the different objects that make up the hierarchy.

GetCanonicalName(UInt32, String) GetCanonicalName(UInt32, String) GetCanonicalName(UInt32, String) GetCanonicalName(UInt32, String)

Gets the canonical name of the specified element.

GetComInterface<Interface_T>() GetComInterface<Interface_T>() GetComInterface<Interface_T>() GetComInterface<Interface_T>()

A project derived from this base class will be aggregated with a native COM component (the ProjectAggregator object) that can also aggregate an inner project in case of flavoring.

GetGuidProperty(UInt32, Int32) GetGuidProperty(UInt32, Int32) GetGuidProperty(UInt32, Int32) GetGuidProperty(UInt32, Int32)

Gets the GUID of the specified item.

GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32) GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32) GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32) GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32)

Gets the nested project.

GetProperty(UInt32, Int32, Object) GetProperty(UInt32, Int32, Object) GetProperty(UInt32, Int32, Object) GetProperty(UInt32, Int32, Object)
GetSite() GetSite() GetSite() GetSite()
InitializeForOuter(String, String, String, UInt32, Guid, Boolean) InitializeForOuter(String, String, String, UInt32, Guid, Boolean) InitializeForOuter(String, String, String, UInt32, Guid, Boolean) InitializeForOuter(String, String, String, UInt32, Guid, Boolean)

Allows the project to initialize itself. At this point it possible to call the inner project. This method also allows canceling the project creation process.

OnAggregationComplete() OnAggregationComplete() OnAggregationComplete() OnAggregationComplete()

This is called when all object in aggregation have received InitializeForOuter calls. At this point the aggregation is complete and fully functional.

ParseCanonicalName(String, UInt32) ParseCanonicalName(String, UInt32) ParseCanonicalName(String, UInt32) ParseCanonicalName(String, UInt32)
QueryClose() QueryClose() QueryClose() QueryClose()
QueryStatusCommand(UInt32, Guid, UInt32, OLECMD[], IntPtr) QueryStatusCommand(UInt32, Guid, UInt32, OLECMD[], IntPtr) QueryStatusCommand(UInt32, Guid, UInt32, OLECMD[], IntPtr) QueryStatusCommand(UInt32, Guid, UInt32, OLECMD[], IntPtr)
SetGuidProperty(UInt32, Int32, Guid) SetGuidProperty(UInt32, Int32, Guid) SetGuidProperty(UInt32, Int32, Guid) SetGuidProperty(UInt32, Int32, Guid)
SetInnerProject(IntPtr) SetInnerProject(IntPtr) SetInnerProject(IntPtr) SetInnerProject(IntPtr)

This is were all QI for interface on the inner object should happen Then set the inner project wait for InitializeForOuter to be called to do the real initialization

SetProperty(UInt32, Int32, Object) SetProperty(UInt32, Int32, Object) SetProperty(UInt32, Int32, Object) SetProperty(UInt32, Int32, Object)
UnadviseHierarchyEvents(UInt32) UnadviseHierarchyEvents(UInt32) UnadviseHierarchyEvents(UInt32) UnadviseHierarchyEvents(UInt32)
Unused0() Unused0() Unused0() Unused0()
Unused1() Unused1() Unused1() Unused1()
Unused2() Unused2() Unused2() Unused2()
Unused3() Unused3() Unused3() Unused3()
Unused4() Unused4() Unused4() Unused4()

Events

DirectoryAdded DirectoryAdded DirectoryAdded DirectoryAdded

Called after a directory was added to this project.

DirectoryRemoved DirectoryRemoved DirectoryRemoved DirectoryRemoved

Called after a directory was remove from this project.

DirectoryRenamed DirectoryRenamed DirectoryRenamed DirectoryRenamed

Called after a directory was renamed in this project.

FileAdded FileAdded FileAdded FileAdded

Called after a file was added to this project.

FileRemoved FileRemoved FileRemoved FileRemoved

Called after a file was remove from this project.

FileRenamed FileRenamed FileRenamed FileRenamed

Called after a file was renamed in this project.

SccStatusChanged SccStatusChanged SccStatusChanged SccStatusChanged

Called after the source code control status of a file in this project changed.

Explicit Interface Implementations

IOleCommandTarget.Exec(Guid, UInt32, UInt32, IntPtr, IntPtr) IOleCommandTarget.Exec(Guid, UInt32, UInt32, IntPtr, IntPtr) IOleCommandTarget.Exec(Guid, UInt32, UInt32, IntPtr, IntPtr) IOleCommandTarget.Exec(Guid, UInt32, UInt32, IntPtr, IntPtr)
IOleCommandTarget.QueryStatus(Guid, UInt32, OLECMD[], IntPtr) IOleCommandTarget.QueryStatus(Guid, UInt32, OLECMD[], IntPtr) IOleCommandTarget.QueryStatus(Guid, UInt32, OLECMD[], IntPtr) IOleCommandTarget.QueryStatus(Guid, UInt32, OLECMD[], IntPtr)
IVsAggregatableProjectCorrected.GetAggregateProjectTypeGuids(String) IVsAggregatableProjectCorrected.GetAggregateProjectTypeGuids(String) IVsAggregatableProjectCorrected.GetAggregateProjectTypeGuids(String) IVsAggregatableProjectCorrected.GetAggregateProjectTypeGuids(String)

This must be delegetated to the inner most project

IVsAggregatableProjectCorrected.InitializeForOuter(String, String, String, UInt32, Guid, IntPtr, Int32) IVsAggregatableProjectCorrected.InitializeForOuter(String, String, String, UInt32, Guid, IntPtr, Int32) IVsAggregatableProjectCorrected.InitializeForOuter(String, String, String, UInt32, Guid, IntPtr, Int32) IVsAggregatableProjectCorrected.InitializeForOuter(String, String, String, UInt32, Guid, IntPtr, Int32)

Do the initialization here (such as loading flavor specific information from the project)

IVsAggregatableProjectCorrected.OnAggregationComplete() IVsAggregatableProjectCorrected.OnAggregationComplete() IVsAggregatableProjectCorrected.OnAggregationComplete() IVsAggregatableProjectCorrected.OnAggregationComplete()

This is called when all object in aggregation have received InitializeForOuter calls. At this point the aggregation is complete and fully functional.

IVsAggregatableProjectCorrected.SetAggregateProjectTypeGuids(String) IVsAggregatableProjectCorrected.SetAggregateProjectTypeGuids(String) IVsAggregatableProjectCorrected.SetAggregateProjectTypeGuids(String) IVsAggregatableProjectCorrected.SetAggregateProjectTypeGuids(String)

This must be delegated to the innermost project

IVsAggregatableProjectCorrected.SetInnerProject(IntPtr) IVsAggregatableProjectCorrected.SetInnerProject(IntPtr) IVsAggregatableProjectCorrected.SetInnerProject(IntPtr) IVsAggregatableProjectCorrected.SetInnerProject(IntPtr)

This is where all QI for interface on the inner object should happen Then set the inner project wait for InitializeForOuter to be called to do the real initialization

IVsHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32) IVsHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32) IVsHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32) IVsHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32)
IVsHierarchy.Close() IVsHierarchy.Close() IVsHierarchy.Close() IVsHierarchy.Close()
IVsHierarchy.GetCanonicalName(UInt32, String) IVsHierarchy.GetCanonicalName(UInt32, String) IVsHierarchy.GetCanonicalName(UInt32, String) IVsHierarchy.GetCanonicalName(UInt32, String)
IVsHierarchy.GetGuidProperty(UInt32, Int32, Guid) IVsHierarchy.GetGuidProperty(UInt32, Int32, Guid) IVsHierarchy.GetGuidProperty(UInt32, Int32, Guid) IVsHierarchy.GetGuidProperty(UInt32, Int32, Guid)
IVsHierarchy.GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32) IVsHierarchy.GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32) IVsHierarchy.GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32) IVsHierarchy.GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32)
IVsHierarchy.GetProperty(UInt32, Int32, Object) IVsHierarchy.GetProperty(UInt32, Int32, Object) IVsHierarchy.GetProperty(UInt32, Int32, Object) IVsHierarchy.GetProperty(UInt32, Int32, Object)
IVsHierarchy.GetSite(IServiceProvider) IVsHierarchy.GetSite(IServiceProvider) IVsHierarchy.GetSite(IServiceProvider) IVsHierarchy.GetSite(IServiceProvider)
IVsHierarchy.ParseCanonicalName(String, UInt32) IVsHierarchy.ParseCanonicalName(String, UInt32) IVsHierarchy.ParseCanonicalName(String, UInt32) IVsHierarchy.ParseCanonicalName(String, UInt32)
IVsHierarchy.QueryClose(Int32) IVsHierarchy.QueryClose(Int32) IVsHierarchy.QueryClose(Int32) IVsHierarchy.QueryClose(Int32)
IVsHierarchy.SetGuidProperty(UInt32, Int32, Guid) IVsHierarchy.SetGuidProperty(UInt32, Int32, Guid) IVsHierarchy.SetGuidProperty(UInt32, Int32, Guid) IVsHierarchy.SetGuidProperty(UInt32, Int32, Guid)
IVsHierarchy.SetProperty(UInt32, Int32, Object) IVsHierarchy.SetProperty(UInt32, Int32, Object) IVsHierarchy.SetProperty(UInt32, Int32, Object) IVsHierarchy.SetProperty(UInt32, Int32, Object)
IVsHierarchy.SetSite(IServiceProvider) IVsHierarchy.SetSite(IServiceProvider) IVsHierarchy.SetSite(IServiceProvider) IVsHierarchy.SetSite(IServiceProvider)
IVsHierarchy.UnadviseHierarchyEvents(UInt32) IVsHierarchy.UnadviseHierarchyEvents(UInt32) IVsHierarchy.UnadviseHierarchyEvents(UInt32) IVsHierarchy.UnadviseHierarchyEvents(UInt32)
IVsHierarchy.Unused0() IVsHierarchy.Unused0() IVsHierarchy.Unused0() IVsHierarchy.Unused0()
IVsHierarchy.Unused1() IVsHierarchy.Unused1() IVsHierarchy.Unused1() IVsHierarchy.Unused1()
IVsHierarchy.Unused2() IVsHierarchy.Unused2() IVsHierarchy.Unused2() IVsHierarchy.Unused2()
IVsHierarchy.Unused3() IVsHierarchy.Unused3() IVsHierarchy.Unused3() IVsHierarchy.Unused3()
IVsHierarchy.Unused4() IVsHierarchy.Unused4() IVsHierarchy.Unused4() IVsHierarchy.Unused4()
IVsUIHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32) IVsUIHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32) IVsUIHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32) IVsUIHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32)
IVsUIHierarchy.Close() IVsUIHierarchy.Close() IVsUIHierarchy.Close() IVsUIHierarchy.Close()
IVsUIHierarchy.ExecCommand(UInt32, Guid, UInt32, UInt32, IntPtr, IntPtr) IVsUIHierarchy.ExecCommand(UInt32, Guid, UInt32, UInt32, IntPtr, IntPtr) IVsUIHierarchy.ExecCommand(UInt32, Guid, UInt32, UInt32, IntPtr, IntPtr) IVsUIHierarchy.ExecCommand(UInt32, Guid, UInt32, UInt32, IntPtr, IntPtr)
IVsUIHierarchy.GetCanonicalName(UInt32, String) IVsUIHierarchy.GetCanonicalName(UInt32, String) IVsUIHierarchy.GetCanonicalName(UInt32, String) IVsUIHierarchy.GetCanonicalName(UInt32, String)
IVsUIHierarchy.GetGuidProperty(UInt32, Int32, Guid) IVsUIHierarchy.GetGuidProperty(UInt32, Int32, Guid) IVsUIHierarchy.GetGuidProperty(UInt32, Int32, Guid) IVsUIHierarchy.GetGuidProperty(UInt32, Int32, Guid)
IVsUIHierarchy.GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32) IVsUIHierarchy.GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32) IVsUIHierarchy.GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32) IVsUIHierarchy.GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32)
IVsUIHierarchy.GetProperty(UInt32, Int32, Object) IVsUIHierarchy.GetProperty(UInt32, Int32, Object) IVsUIHierarchy.GetProperty(UInt32, Int32, Object) IVsUIHierarchy.GetProperty(UInt32, Int32, Object)
IVsUIHierarchy.GetSite(IServiceProvider) IVsUIHierarchy.GetSite(IServiceProvider) IVsUIHierarchy.GetSite(IServiceProvider) IVsUIHierarchy.GetSite(IServiceProvider)
IVsUIHierarchy.ParseCanonicalName(String, UInt32) IVsUIHierarchy.ParseCanonicalName(String, UInt32) IVsUIHierarchy.ParseCanonicalName(String, UInt32) IVsUIHierarchy.ParseCanonicalName(String, UInt32)
IVsUIHierarchy.QueryClose(Int32) IVsUIHierarchy.QueryClose(Int32) IVsUIHierarchy.QueryClose(Int32) IVsUIHierarchy.QueryClose(Int32)
IVsUIHierarchy.QueryStatusCommand(UInt32, Guid, UInt32, OLECMD[], IntPtr) IVsUIHierarchy.QueryStatusCommand(UInt32, Guid, UInt32, OLECMD[], IntPtr) IVsUIHierarchy.QueryStatusCommand(UInt32, Guid, UInt32, OLECMD[], IntPtr) IVsUIHierarchy.QueryStatusCommand(UInt32, Guid, UInt32, OLECMD[], IntPtr)
IVsUIHierarchy.SetGuidProperty(UInt32, Int32, Guid) IVsUIHierarchy.SetGuidProperty(UInt32, Int32, Guid) IVsUIHierarchy.SetGuidProperty(UInt32, Int32, Guid) IVsUIHierarchy.SetGuidProperty(UInt32, Int32, Guid)
IVsUIHierarchy.SetProperty(UInt32, Int32, Object) IVsUIHierarchy.SetProperty(UInt32, Int32, Object) IVsUIHierarchy.SetProperty(UInt32, Int32, Object) IVsUIHierarchy.SetProperty(UInt32, Int32, Object)
IVsUIHierarchy.SetSite(IServiceProvider) IVsUIHierarchy.SetSite(IServiceProvider) IVsUIHierarchy.SetSite(IServiceProvider) IVsUIHierarchy.SetSite(IServiceProvider)
IVsUIHierarchy.UnadviseHierarchyEvents(UInt32) IVsUIHierarchy.UnadviseHierarchyEvents(UInt32) IVsUIHierarchy.UnadviseHierarchyEvents(UInt32) IVsUIHierarchy.UnadviseHierarchyEvents(UInt32)
IVsUIHierarchy.Unused0() IVsUIHierarchy.Unused0() IVsUIHierarchy.Unused0() IVsUIHierarchy.Unused0()
IVsUIHierarchy.Unused1() IVsUIHierarchy.Unused1() IVsUIHierarchy.Unused1() IVsUIHierarchy.Unused1()
IVsUIHierarchy.Unused2() IVsUIHierarchy.Unused2() IVsUIHierarchy.Unused2() IVsUIHierarchy.Unused2()
IVsUIHierarchy.Unused3() IVsUIHierarchy.Unused3() IVsUIHierarchy.Unused3() IVsUIHierarchy.Unused3()
IVsUIHierarchy.Unused4() IVsUIHierarchy.Unused4() IVsUIHierarchy.Unused4() IVsUIHierarchy.Unused4()
IServiceProvider.GetService(Type) IServiceProvider.GetService(Type) IServiceProvider.GetService(Type) IServiceProvider.GetService(Type)

Extension Methods

FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)
IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

IsCapabilityMatch(IVsHierarchy, String) IsCapabilityMatch(IVsHierarchy, String) IsCapabilityMatch(IVsHierarchy, String) IsCapabilityMatch(IVsHierarchy, String)

Checks whether a given project matches the requirements prescribed in an AppliesTo expression.

EnumImportingProjects(IVsHierarchy) EnumImportingProjects(IVsHierarchy) EnumImportingProjects(IVsHierarchy) EnumImportingProjects(IVsHierarchy)

Enumerates all the projects that are importing the shared assets owned by the given Shared Assets Project hierarchy.

EnumOwningProjectsOfSharedAssets(IVsHierarchy) EnumOwningProjectsOfSharedAssets(IVsHierarchy) EnumOwningProjectsOfSharedAssets(IVsHierarchy) EnumOwningProjectsOfSharedAssets(IVsHierarchy)

The Shared Assets Projects that own and manage the shared assets imported by the given project.

GetActiveProjectContext(IVsHierarchy) GetActiveProjectContext(IVsHierarchy) GetActiveProjectContext(IVsHierarchy) GetActiveProjectContext(IVsHierarchy)

Gets the active project context.

GetSharedItemsImportFullPaths(IVsHierarchy) GetSharedItemsImportFullPaths(IVsHierarchy) GetSharedItemsImportFullPaths(IVsHierarchy) GetSharedItemsImportFullPaths(IVsHierarchy)

Gets the full paths of the "Shared.items" files imported by the given project.

IsProjectImportingSharedAssets(IVsHierarchy) IsProjectImportingSharedAssets(IVsHierarchy) IsProjectImportingSharedAssets(IVsHierarchy) IsProjectImportingSharedAssets(IVsHierarchy)

Determines whether the given project imports shared assets.

IsSharedAssetsProject(IVsHierarchy) IsSharedAssetsProject(IVsHierarchy) IsSharedAssetsProject(IVsHierarchy) IsSharedAssetsProject(IVsHierarchy)

Determines whether the given project is a Shared Assets Project.

SetActiveProjectContext(IVsHierarchy, IVsHierarchy) SetActiveProjectContext(IVsHierarchy, IVsHierarchy) SetActiveProjectContext(IVsHierarchy, IVsHierarchy) SetActiveProjectContext(IVsHierarchy, IVsHierarchy)

Sets the active project context.

Applies to