示例#1
0
        /// <summary>
        /// Returns whether the parameter project is a test project or not.
        /// </summary>
        public static bool IsTestProject(this IVsProject project, Guid projectGuid)
        {
            ValidateArg.NotNull(project, "project");

            string projectTypeGuids = project.GetAggregateProjectTypeGuids();

            // Currently we assume that all matching projects are test projects.
            return(projectTypeGuids.IndexOf(projectGuid.ToString(), StringComparison.OrdinalIgnoreCase) >= 0);
        }
        /// <summary>
        /// Returns whether the parameter project is a test project or not.
        /// </summary>
        public static bool IsTestProject(this IVsProject project, Guid projectGuid)
        {
            // Overload IsTestProject method to check if we should use this test adapter
            // at all. This is much less error prone than adding this check to all locations
            // where this method is called.
            if (!IsTestAdapaterEnabled())
            {
                return(false);
            }

            ValidateArg.NotNull(project, "project");

            var projectTypeGuids = project.GetAggregateProjectTypeGuids();

            // Currently we assume that all matching projects are test projects.
            return(projectTypeGuids.IndexOf(projectGuid.ToString(), StringComparison.OrdinalIgnoreCase) >= 0);
        }