VsTeXProject.VisualStudio.Project.ProjectConfig.QueryDebugLaunch C# (CSharp) Méthode

QueryDebugLaunch() public méthode

Determines whether the debugger can be launched, given the state of the launch flags.
public QueryDebugLaunch ( uint flags, int &fCanLaunch ) : int
flags uint /// Flags that determine the conditions under which to launch the debugger. /// For valid grfLaunch values, see __VSDBGLAUNCHFLAGS or __VSDBGLAUNCHFLAGS2. ///
fCanLaunch int true if the debugger can be launched, otherwise false
Résultat int
        public virtual int QueryDebugLaunch(uint flags, out int fCanLaunch)
        {
            CCITracing.TraceCall();
            var assembly = ProjectMgr.GetAssemblyName(ConfigName);
            fCanLaunch = assembly != null &&
                         assembly.ToUpperInvariant().EndsWith(".exe", StringComparison.OrdinalIgnoreCase)
                ? 1
                : 0;
            if (fCanLaunch == 0)
            {
                var property = GetConfigurationProperty("StartProgram", true);
                fCanLaunch = property != null && property.Length > 0 ? 1 : 0;
            }
            return VSConstants.S_OK;
        }