PageRenderTime 24ms CodeModel.GetById 15ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/IronPython_Main/Tools/IronStudio/IronStudio/VisualStudio/Project/Interfaces.cs

#
C# | 168 lines | 72 code | 18 blank | 78 comment | 0 complexity | 051a1208fd06aabae7a35af71d2c0a4f MD5 | raw file
  1/* ****************************************************************************
  2 *
  3 * Copyright (c) Microsoft Corporation. 
  4 *
  5 * This source code is subject to terms and conditions of the Apache License, Version 2.0. A 
  6 * copy of the license can be found in the License.html file at the root of this distribution. If 
  7 * you cannot locate the Apache License, Version 2.0, please send an email to 
  8 * ironpy@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
  9 * by the terms of the Apache License, Version 2.0.
 10 *
 11 * You must not remove this notice, or any other, from this software.
 12 *
 13 * ***************************************************************************/
 14
 15using System;
 16using System.Collections.Generic;
 17using System.Diagnostics.CodeAnalysis;
 18using System.Runtime.InteropServices;
 19using Microsoft.VisualStudio.Shell.Interop;
 20using MSBuild = Microsoft.Build.Evaluation;
 21
 22namespace Microsoft.VisualStudio.Project
 23{
 24
 25	/// <summary>
 26	/// This interface defines the rules for handling build dependency on a project container.
 27	/// </summary>
 28	/// <remarks>Normally this should be an internal interface but since it shouldbe available for the aggregator it must be made public.</remarks>
 29	[ComVisible(true)]
 30	[CLSCompliant(false)]
 31	public interface IBuildDependencyOnProjectContainer
 32	{
 33		/// <summary>
 34		/// Defines whether the nested projects should be build with the parent project.
 35		/// </summary>
 36		bool BuildNestedProjectsOnBuild
 37		{
 38			get;
 39			set;
 40		}
 41
 42		/// <summary>
 43		/// Enumerates the nested hierachies present that will participate in the build dependency update.
 44		/// </summary>
 45		/// <returns>A list of hierrachies.</returns>
 46		[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Hierachies")]
 47		IVsHierarchy[] EnumNestedHierachiesForBuildDependency();
 48	}
 49
 50	/// <summary>
 51	/// Interface for manipulating build dependency
 52	/// </summary>
 53	/// <remarks>Normally this should be an internal interface but since it shouldbe available for the aggregator it must be made public.</remarks>
 54	[ComVisible(true)]
 55	[CLSCompliant(false)]
 56	public interface IBuildDependencyUpdate
 57	{
 58		/// <summary>
 59		/// Defines a container for storing BuildDependencies
 60		/// </summary>
 61
 62		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
 63		IVsBuildDependency[] BuildDependencies
 64		{
 65			get;
 66		}
 67
 68		/// <summary>
 69		/// Adds a BuildDependency to the container
 70		/// </summary>
 71		/// <param name="dependency">The dependency to add</param>
 72		void AddBuildDependency(IVsBuildDependency dependency);
 73
 74		/// <summary>
 75		/// Removes the builddependency from teh container.
 76		/// </summary>
 77		/// <param name="dependency">The dependency to add</param>
 78		void RemoveBuildDependency(IVsBuildDependency dependency);
 79
 80	}
 81
 82	/// <summary>
 83	/// Provides access to the reference data container.
 84	/// </summary>
 85	/// <remarks>Normally this should be an internal interface but since it should be available for
 86	/// the aggregator it must be made public.</remarks>
 87	[ComVisible(true)]
 88	public interface IReferenceContainerProvider
 89	{
 90		IReferenceContainer GetReferenceContainer();
 91	}
 92
 93	/// <summary>
 94	/// Defines a container for manipulating references
 95	/// </summary>
 96	/// <remarks>Normally this should be an internal interface but since it should be available for
 97	/// the aggregator it must be made public.</remarks>
 98	[ComVisible(true)]
 99	public interface IReferenceContainer
100	{
101		IList<ReferenceNode> EnumReferences();
102		ReferenceNode AddReferenceFromSelectorData(VSCOMPONENTSELECTORDATA selectorData);
103		void LoadReferencesFromBuildProject(MSBuild.Project buildProject);
104	}
105
106	/// <summary>
107	/// Defines the events that are internally defined for communication with other subsytems.
108	/// </summary>
109	[ComVisible(true)]
110	public interface IProjectEvents
111	{
112		/// <summary>
113		/// Event raised just after the project file opened.
114		/// </summary>
115		[SuppressMessage("Microsoft.Naming", "CA1713:EventsShouldNotHaveBeforeOrAfterPrefix")]
116		event EventHandler<AfterProjectFileOpenedEventArgs> AfterProjectFileOpened;
117
118		/// <summary>
119		/// Event raised before the project file closed.
120		/// </summary>
121		[SuppressMessage("Microsoft.Naming", "CA1713:EventsShouldNotHaveBeforeOrAfterPrefix")]
122		event EventHandler<BeforeProjectFileClosedEventArgs> BeforeProjectFileClosed;
123	}
124
125	/// <summary>
126	/// Defines the interface that will specify ehethrr the object is a project events listener.
127	/// </summary>
128	[ComVisible(true)]
129	public interface IProjectEventsListener
130	{
131
132		/// <summary>
133		/// Is the object a project events listener.
134		/// </summary>
135		/// <returns></returns>
136		bool IsProjectEventsListener
137		{ get; set; }
138
139	}
140
141	/// <summary>
142	/// Enable getting and setting the project events provider
143	/// </summary>
144	[ComVisible(true)]
145	public interface IProjectEventsProvider
146	{
147		/// <summary>
148		/// Defines the provider for the project events
149		/// </summary>
150		IProjectEvents ProjectEventsProvider
151		{
152			get;
153			set;
154		}
155	}
156
157	/// <summary>
158	/// Defines support for single file generator
159	/// </summary>
160	public interface ISingleFileGenerator
161	{
162		///<summary>
163		/// Runs the generator on the item represented by the document moniker.
164		/// </summary>
165		/// <param name="document"></param>
166		void RunGenerator(string document);
167	}
168}