/// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio.Shell.Interop;
using MSBuild = Microsoft.Build.BuildEngine;
namespace Microsoft.VisualStudio.Project
{
///
/// This interface defines the rules for handling build dependency on a project container.
///
/// Normally this should be an internal interface but since it shouldbe available for the aggregator it must be made public.
[ComVisible(true)]
[CLSCompliant(false)]
public interface IBuildDependencyOnProjectContainer
{
///
/// Defines whether the nested projects should be build with the parent project.
///
bool BuildNestedProjectsOnBuild
{
get;
set;
}
///
/// Enumerates the nested hierachies present that will participate in the build dependency update.
///
/// A list of hierrachies.
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Hierachies")]
IVsHierarchy[] EnumNestedHierachiesForBuildDependency();
}
///
/// Interface for manipulating build dependency
///
/// Normally this should be an internal interface but since it shouldbe available for the aggregator it must be made public.
[ComVisible(true)]
[CLSCompliant(false)]
public interface IBuildDependencyUpdate
{
///
/// Defines a container for storing BuildDependencies
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
IVsBuildDependency[] BuildDependencies
{
get;
}
///
/// Adds a BuildDependency to the container
///
/// The dependency to add
void AddBuildDependency(IVsBuildDependency dependency);
///
/// Removes the builddependency from teh container.
///
/// The dependency to add
void RemoveBuildDependency(IVsBuildDependency dependency);
}
///
/// Provides access to the reference data container.
///
/// Normally this should be an internal interface but since it should be available for
/// the aggregator it must be made public.
[ComVisible(true)]
public interface IReferenceContainerProvider
{
IReferenceContainer GetReferenceContainer();
}
///
/// Defines a container for manipulating references
///
/// Normally this should be an internal interface but since it should be available for
/// the aggregator it must be made public.
[ComVisible(true)]
public interface IReferenceContainer
{
IList EnumReferences();
ReferenceNode AddReferenceFromSelectorData(VSCOMPONENTSELECTORDATA selectorData);
void LoadReferencesFromBuildProject(MSBuild.Project buildProject);
}
///
/// Defines the events that are internally defined for communication with other subsytems.
///
[ComVisible(true)]
public interface IProjectEvents
{
///
/// Event raised just after the project file opened.
///
[SuppressMessage("Microsoft.Naming", "CA1713:EventsShouldNotHaveBeforeOrAfterPrefix")]
event EventHandler AfterProjectFileOpened;
///
/// Event raised before the project file closed.
///
[SuppressMessage("Microsoft.Naming", "CA1713:EventsShouldNotHaveBeforeOrAfterPrefix")]
event EventHandler BeforeProjectFileClosed;
}
///
/// Defines the interface that will specify ehethrr the object is a project events listener.
///
[ComVisible(true)]
public interface IProjectEventsListener
{
///
/// Is the object a project events listener.
///
///
bool IsProjectEventsListener
{ get; set; }
}
///
/// Enable getting and setting the project events provider
///
[ComVisible(true)]
public interface IProjectEventsProvider
{
///
/// Defines the provider for the project events
///
IProjectEvents ProjectEventsProvider
{
get;
set;
}
}
///
/// Defines support for single file generator
///
public interface ISingleFileGenerator
{
///
/// Runs the generator on the item represented by the document moniker.
///
///
void RunGenerator(string document);
}
}