src/Misc/EFTools/EntityDesign/VisualStudio/VsUtils.cs
// <summary>
//     Returns application type for given project
//     everything that is not WebSite nor WebApplication is considered to be a WindowsApplication
// </summary>
Returns application type for given project
everything that is not WebSite nor WebApplication is considered to be a WindowsApplication
Returns application type for given project everything that is not WebSite nor WebApplication is considered to be a WindowsApplication
internal static VisualStudioProjectSystem GetApplicationType(IServiceProvider serviceProvider, Project project)
        {
            var applicationType = VisualStudioProjectSystem.WindowsApplication;
            var guidsString = GetAggregateProjectTypeGuids(serviceProvider, project);
            if (null != guidsString)
            {
                if (guidsString.IndexOf(ProjectKindWeb, StringComparison.OrdinalIgnoreCase) >= 0)
                {
                    Debug.Assert(
                        guidsString.IndexOf(WebAppProjectGuid, StringComparison.OrdinalIgnoreCase) < 0,
                        string.Format(
                            CultureInfo.CurrentCulture, "guidsString should not contain both {0} and {1}", ProjectKindWeb, WebAppProjectGuid));
                    applicationType = VisualStudioProjectSystem.Website;
                }
                else if (guidsString.IndexOf(WebAppProjectGuid, StringComparison.OrdinalIgnoreCase) >= 0)
                {
                    applicationType = VisualStudioProjectSystem.WebApplication;
                }
            }
            else
            {
                if (String.Equals(project.Kind, ProjectKindWeb, StringComparison.OrdinalIgnoreCase))
                {
                    applicationType = VisualStudioProjectSystem.Website;
                }
                else if (String.Equals(project.Kind, WebAppProjectGuid, StringComparison.OrdinalIgnoreCase))
                {
                    applicationType = VisualStudioProjectSystem.WebApplication;
                }
            }
            return applicationType;
        }
internal static VisualStudioProjectSystem GetApplicationType ( IServiceProvider serviceProvider , Project project ) { var applicationType = VisualStudioProjectSystem . WindowsApplication ; var guidsString = GetAggregateProjectTypeGuids ( serviceProvider , project ) ; if ( null != guidsString ) { if ( guidsString . IndexOf ( ProjectKindWeb , StringComparison . OrdinalIgnoreCase ) >= 0 ) { Debug . Assert ( guidsString . IndexOf ( WebAppProjectGuid , StringComparison . OrdinalIgnoreCase ) < 0 , string . Format ( CultureInfo . CurrentCulture , " " , ProjectKindWeb , WebAppProjectGuid ) ) ; applicationType = VisualStudioProjectSystem . Website ; } else if ( guidsString . IndexOf ( WebAppProjectGuid , StringComparison . OrdinalIgnoreCase ) >= 0 ) { applicationType = VisualStudioProjectSystem . WebApplication ; } } else { if ( String . Equals ( project . Kind , ProjectKindWeb , StringComparison . OrdinalIgnoreCase ) ) { applicationType = VisualStudioProjectSystem . Website ; } else if ( String . Equals ( project . Kind , WebAppProjectGuid , StringComparison . OrdinalIgnoreCase ) ) { applicationType = VisualStudioProjectSystem . WebApplication ; } } return applicationType ; }
Returns application type for given project
everything that is not WebSite nor WebApplication is considered to be a WindowsApplication
Returns application type for given project everything that is not WebSite nor WebApplication is considered to be a WindowsApplication
// WebSite? // make sure, that no application contains both WebSite and WebApplication guids // WebApplication?
serviceProvider
IServiceProvider
project
Project