src/Misc/EFTools/EntityDesign/VisualStudio/ErrorListHelper.cs
// <summary>
//     This method will log errors to the "Wizard" Multi-doc error list.
// </summary>
This method will log errors to the "Wizard" Multi-doc error list.
This method will log errors to the " Wizard " Multi - doc error list .
internal static void LogUpdateModelWizardError(ErrorInfo errorInfo, string projectItemFileName)
        {
            var serviceProvider = Services.ServiceProvider;
            Debug.Assert(serviceProvider != null, "ServiceProvider does not exist");
            if (null != serviceProvider)
            {
                var solution = serviceProvider.GetService(typeof(SVsSolution)) as IVsSolution;
                if (null == solution)
                {
                    return;
                }
                var projectItem = VsUtils.GetProjectItemForDocument(projectItemFileName, serviceProvider);
                Debug.Assert(
                    projectItem != null,
                    "The filename you passed in, " + projectItemFileName + ", does not have a corresponding ProjectItem");
                if (projectItem != null)
                {
                    var hierarchy = VsUtils.GetVsHierarchy(projectItem.ContainingProject, serviceProvider);
                    var itemId = VsUtils.GetProjectItemId(hierarchy, projectItem);
                    var errorList = WizardErrorList;
                    var errors = new List<ErrorInfo>();
                    errors.Add(errorInfo);
                    AddErrorInfosToErrorList(errors, hierarchy, itemId, errorList);
                }
            }
        }
internal static void LogUpdateModelWizardError ( ErrorInfo errorInfo , string projectItemFileName ) { var serviceProvider = Services . ServiceProvider ; Debug . Assert ( serviceProvider != null , " " ) ; if ( null != serviceProvider ) { var solution = serviceProvider . GetService ( typeof ( SVsSolution ) ) as IVsSolution ; if ( null == solution ) { return ; } var projectItem = VsUtils . GetProjectItemForDocument ( projectItemFileName , serviceProvider ) ; Debug . Assert ( projectItem != null , " " + projectItemFileName + " " ) ; if ( projectItem != null ) { var hierarchy = VsUtils . GetVsHierarchy ( projectItem . ContainingProject , serviceProvider ) ; var itemId = VsUtils . GetProjectItemId ( hierarchy , projectItem ) ; var errorList = WizardErrorList ; var errors = new List < ErrorInfo > ( ) ; errors . Add ( errorInfo ) ; AddErrorInfosToErrorList ( errors , hierarchy , itemId , errorList ) ; } } }
This method will log errors to the "Wizard" Multi-doc error list.
This method will log errors to the " Wizard " Multi - doc error list .
// If the serviceProvider cannot provide a solution we are being called outside // of VS - so there is no Error List window in which to log the errors. This can  // happen in e.g. Model.Tests and is not an error.
errorInfo
ErrorInfo
projectItemFileName
string