Meta.TemplateProfiler.TemplateProfiler C# (CSharp) Method

TemplateProfiler() public method

public TemplateProfiler ( EnvDTE proj, string file, int stackMaxSize, IVsOutputWindowPane pane, System.Action onFinished ) : System
proj EnvDTE
file string
stackMaxSize int
pane IVsOutputWindowPane
onFinished System.Action
return System
        public TemplateProfiler(EnvDTE.Project proj, string file, int stackMaxSize, IVsOutputWindowPane pane, Action onFinished)
        {
            project = proj;
            clTool = new VCCompilerHelper(project);
            filename = file;
            profilePane = pane;
            try
            {
                profiler = new ActiveObject(stackMaxSize);
            }
            catch (System.OutOfMemoryException /*ex*/)
            {
                string message = "The Tools->Meta->Options page specifies a " + stackMaxSize + " byte stack reserve size. This exceeds available memory."
                    + Environment.NewLine + "Please try again with a lower stack size reserve value.";
                string caption = "Stack Reserve Size Too Large...";
                MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
                cancelProfile = true;
                return;
            }

            signalFinished = onFinished;
            Initialize();
            profiler.Signal();
        }