src/Misc/EFTools/DesignXmlCore/VisualStudio/VSHelpers.cs
/// <summary>
///     Get the itemId of the item specified by path, and the IVsHierarchy of the project containing the item.
/// </summary>
/// <param name="originalPath">the full path to a document</param>
/// <param name="serviceProvider">the service provider to retrieve the solution and miscellaneous files project reference used by this method</param>
/// <param name="projectHierarchy">will contain the IVsHierarchy for the project</param>
/// <param name="itemId">will contain the itemID of the document</param>
/// <param name="isDocumentInProject">will be true if the document is contained in a project</param>
/// <param name="project">Out param will contain the Project that this item is contained in, or null if the item isn't in a project</param>
Get the itemId of the item specified by path, and the IVsHierarchy of the project containing the item.
Get the itemId of the item specified by path and the IVsHierarchy of the project containing the item .
internal static void GetProjectAndFileInfoForPath(
            string originalPath, IServiceProvider serviceProvider, out IVsHierarchy projectHierarchy, out Project project,
            out uint fileItemId, out bool isDocumentInProject)
        {
            var solution = serviceProvider.GetService(typeof(SVsSolution)) as IVsSolution;
            GetProjectAndFileInfoForPath(
                originalPath, serviceProvider, solution, out projectHierarchy, out project, out fileItemId, out isDocumentInProject);
        }
internal static void GetProjectAndFileInfoForPath ( string originalPath , IServiceProvider serviceProvider , out IVsHierarchy projectHierarchy , out Project project , out uint fileItemId , out bool isDocumentInProject ) { var solution = serviceProvider . GetService ( typeof ( SVsSolution ) ) as IVsSolution ; GetProjectAndFileInfoForPath ( originalPath , serviceProvider , solution , out projectHierarchy , out project , out fileItemId , out isDocumentInProject ) ; }
Get the itemId of the item specified by path, and the IVsHierarchy of the project containing the item.
Get the itemId of the item specified by path and the IVsHierarchy of the project containing the item .
originalPath
string
the full path to a document
the full path to a document
serviceProvider
IServiceProvider
the service provider to retrieve the solution and miscellaneous files project reference used by this method
the service provider to retrieve the solution and miscellaneous files project reference used by this method
IVsHierarchy
out
<not_specific>
Project
out
<not_specific>
uint
out
<not_specific>
bool
out
<not_specific>
projectHierarchy
<not_specific>
will contain the IVsHierarchy for the project
will contain the IVsHierarchy for the project
itemId
<not_specific>
will contain the itemID of the document
will contain the itemID of the document
isDocumentInProject
<not_specific>
will be true if the document is contained in a project
will be true if the document is contained in a project
project
<not_specific>
Out param will contain the Project that this item is contained in, or null if the item isn't in a project
Out param will contain the Project that this item is contained in or null if the item isn ' t in a project