src/Misc/EFTools/EntityDesign/VisualStudio/VsUtils.cs
// <summary>
//     Return target framework moniker for given document.
// </summary>
Return target framework moniker for given document.
Return target framework moniker for given document .
[SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
        internal static string GetTargetFrameworkMonikerForDocument(Project project, uint itemId, IServiceProvider serviceProvider)
        {
            if (IsMiscellaneousProject(project))
            {
                return string.Empty;
            }
            var hierarchy = VSHelpers.GetVsHierarchy(project, serviceProvider);
            Debug.Assert(hierarchy != null, "Hierarchy should not be null");
            object moniker;
            if (NativeMethods.Succeeded(
                hierarchy.GetProperty(itemId, (int)__VSHPROPID4.VSHPROPID_TargetFrameworkMoniker, out moniker)))
            {
                return moniker as string;
            }
            if (NativeMethods.Succeeded(
                hierarchy.GetProperty(VSConstants.VSITEMID_ROOT, (int)__VSHPROPID4.VSHPROPID_TargetFrameworkMoniker, out moniker)))
            {
                return moniker as string;
            }
            return String.Empty;
        }
[ SuppressMessage ( " " , " " ) ] internal static string GetTargetFrameworkMonikerForDocument ( Project project , uint itemId , IServiceProvider serviceProvider ) { if ( IsMiscellaneousProject ( project ) ) { return string . Empty ; } var hierarchy = VSHelpers . GetVsHierarchy ( project , serviceProvider ) ; Debug . Assert ( hierarchy != null , " " ) ; object moniker ; if ( NativeMethods . Succeeded ( hierarchy . GetProperty ( itemId , ( int ) __VSHPROPID4 . VSHPROPID_TargetFrameworkMoniker , out moniker ) ) ) { return moniker as string ; } if ( NativeMethods . Succeeded ( hierarchy . GetProperty ( VSConstants . VSITEMID_ROOT , ( int ) __VSHPROPID4 . VSHPROPID_TargetFrameworkMoniker , out moniker ) ) ) { return moniker as string ; } return String . Empty ; }
Return target framework moniker for given document.
Return target framework moniker for given document .
project
Project
itemId
uint
serviceProvider
IServiceProvider