src/Misc/EFTools/DesignXmlCore/VisualStudio/VSHelpers.cs
/// <summary>
///     Get miscellaneous project from current solution. NOTE: this
///     implementation much different than that in VsShellUtilities due
///     to a bug in their implementation.
/// </summary>
/// <param name="provider">
///     The service provider
/// </param>
/// <returns>
///     A refernce to the IVsProject3 interface for the misceleneous project.
/// </returns>
Get miscellaneous project from current solution. NOTE: this
implementation much different than that in VsShellUtilities due
to a bug in their implementation.
Get miscellaneous project from current solution . NOTE : this implementation much different than that in VsShellUtilities due to a bug in their implementation .
public static IVsProject3 GetMiscellaneousProject(IServiceProvider provider)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }
            var miscFiles = provider.GetService(typeof(SVsExternalFilesManager)) as IVsExternalFilesManager;
            IVsProject project = null;
            if (miscFiles != null)
            {
                NativeMethods.ThrowOnFailure(miscFiles.GetExternalFilesProject(out project));
            }
            return (project as IVsProject3);
        }
public static IVsProject3 GetMiscellaneousProject ( IServiceProvider provider ) { if ( provider == null ) { throw new ArgumentNullException ( " " ) ; } var miscFiles = provider . GetService ( typeof ( SVsExternalFilesManager ) ) as IVsExternalFilesManager ; IVsProject project = null ; if ( miscFiles != null ) { NativeMethods . ThrowOnFailure ( miscFiles . GetExternalFilesProject ( out project ) ) ; } return ( project as IVsProject3 ) ; }
Get miscellaneous project from current solution.
Get miscellaneous project from current solution .
A refernce to the IVsProject3 interface for the misceleneous project.
A refernce to the IVsProject3 interface for the misceleneous project .
provider
IServiceProvider
The service provider
The service provider