Freigeben über


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
FlavoredProjectBase
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()

Initializes a new instance of FlavoredProjectBase.

Fields

_innerOleCommandTarget

The inner command target.

_innerVsAggregatableProject

The aggregatable project.

_innerVsHierarchy

The inner hierarchy.

_innerVsUIHierarchy

The inner UI hierarchy.

serviceProvider

The service provider.

Methods

AdviseHierarchyEvents(IVsHierarchyEvents)

Advises hierarchy events.

Close()

Closes the hierarchy.

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

Executes the specified command.

FreeInterfaces()

Frees the different objects that make up the hierarchy.

GetCanonicalName(UInt32, String)

Gets the canonical name of the specified element.

GetComInterface<TInterface>()

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)

Gets the GUID of the specified item.

GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32)

Gets the nested project.

GetProperty(UInt32, Int32, Object)
GetSite()
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()

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)
QueryClose()
QueryStatusCommand(UInt32, Guid, UInt32, OLECMD[], IntPtr)
SetGuidProperty(UInt32, Int32, Guid)
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)
UnadviseHierarchyEvents(UInt32)
Unused0()
Unused1()
Unused2()
Unused3()
Unused4()

Events

DirectoryAdded

Called after a directory was added to this project.

DirectoryRemoved

Called after a directory was remove from this project.

DirectoryRenamed

Called after a directory was renamed in this project.

FileAdded

Called after a file was added to this project.

FileRemoved

Called after a file was remove from this project.

FileRenamed

Called after a file was renamed in this project.

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.QueryStatus(Guid, UInt32, OLECMD[], IntPtr)
IServiceProvider.GetService(Type)
IVsAggregatableProjectCorrected.GetAggregateProjectTypeGuids(String)

This must be delegetated to the inner most project

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

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

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)

This must be delegated to the innermost project

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.Close()
IVsHierarchy.GetCanonicalName(UInt32, String)
IVsHierarchy.GetGuidProperty(UInt32, Int32, Guid)
IVsHierarchy.GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32)
IVsHierarchy.GetProperty(UInt32, Int32, Object)
IVsHierarchy.GetSite(IServiceProvider)
IVsHierarchy.ParseCanonicalName(String, UInt32)
IVsHierarchy.QueryClose(Int32)
IVsHierarchy.SetGuidProperty(UInt32, Int32, Guid)
IVsHierarchy.SetProperty(UInt32, Int32, Object)
IVsHierarchy.SetSite(IServiceProvider)
IVsHierarchy.UnadviseHierarchyEvents(UInt32)
IVsHierarchy.Unused0()
IVsHierarchy.Unused1()
IVsHierarchy.Unused2()
IVsHierarchy.Unused3()
IVsHierarchy.Unused4()
IVsUIHierarchy.AdviseHierarchyEvents(IVsHierarchyEvents, UInt32)
IVsUIHierarchy.Close()
IVsUIHierarchy.ExecCommand(UInt32, Guid, UInt32, UInt32, IntPtr, IntPtr)
IVsUIHierarchy.GetCanonicalName(UInt32, String)
IVsUIHierarchy.GetGuidProperty(UInt32, Int32, Guid)
IVsUIHierarchy.GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32)
IVsUIHierarchy.GetProperty(UInt32, Int32, Object)
IVsUIHierarchy.GetSite(IServiceProvider)
IVsUIHierarchy.ParseCanonicalName(String, UInt32)
IVsUIHierarchy.QueryClose(Int32)
IVsUIHierarchy.QueryStatusCommand(UInt32, Guid, UInt32, OLECMD[], IntPtr)
IVsUIHierarchy.SetGuidProperty(UInt32, Int32, Guid)
IVsUIHierarchy.SetProperty(UInt32, Int32, Object)
IVsUIHierarchy.SetSite(IServiceProvider)
IVsUIHierarchy.UnadviseHierarchyEvents(UInt32)
IVsUIHierarchy.Unused0()
IVsUIHierarchy.Unused1()
IVsUIHierarchy.Unused2()
IVsUIHierarchy.Unused3()
IVsUIHierarchy.Unused4()

Extension Methods

IsCapabilityMatch(IVsHierarchy, String)

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

EnumImportingProjects(IVsHierarchy)

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

EnumOwningProjectsOfSharedAssets(IVsHierarchy)

Enumerates all the Shared Projects that own and manage the shared assets being imported by the given project.

GetActiveProjectContext(IVsHierarchy)

Gets the active project context.

GetSharedItemsImportFullPaths(IVsHierarchy)

Gets the full paths of the shared ".projitems" files imported by the given project.

IsProjectImportingSharedAssets(IVsHierarchy)

Is the given project importing shared assets?

IsSharedAssetsProject(IVsHierarchy)

Is the given project a Shared Project?

SetActiveProjectContext(IVsHierarchy, IVsHierarchy)

Sets the active project context.

Applies to