private void WriteHeader(IProjectLoggerBatch logger, IProjectVersionedValue <IProjectSubscriptionUpdate> update, IComparable version, RuleHandlerType source, bool isActiveContext)
 {
     logger.WriteLine();
     logger.WriteLine("Processing language service changes for '{0}' [{1}]...", _project.FullPath, update.Value.ProjectConfiguration.Name);
     logger.WriteLine("Version:         {0}", version);
     logger.WriteLine("Source:          {0}", source);
     logger.WriteLine("IsActiveContext: {0}", isActiveContext);
     logger.IndentLevel++;
 }
Пример #2
0
 public static void EndNominateRestore(IProjectLogger logger, string fullPath)
 {
     if (logger.IsEnabled)
     {
         using IProjectLoggerBatch batch = logger.BeginBatch();
         batch.WriteLine();
         batch.WriteLine("------------------------------------------");
         batch.WriteLine($"COMPLETED Nominate Restore for {fullPath}");
         batch.WriteLine();
     }
 }
Пример #3
0
 private void CompleteLogProjectRestoreInfo(string fullPath)
 {
     if (_logger.IsEnabled)
     {
         using (IProjectLoggerBatch logger = _logger.BeginBatch())
         {
             logger.WriteLine();
             logger.WriteLine("------------------------------------------");
             logger.WriteLine($"COMPLETED Nominate Restore for {fullPath}");
             logger.WriteLine();
         }
     }
 }
Пример #4
0
        private void LogReferenceItems(IProjectLoggerBatch logger, string heading, ReferenceItems references)
        {
            logger.WriteLine(heading);
            logger.IndentLevel++;

            foreach (var reference in references)
            {
                var properties = reference.Properties.Cast <ReferenceProperty>()
                                 .Select(prop => $"{prop.Name}:{prop.Value}");
                logger.WriteLine($"{reference.Name} -- ({string.Join(" | ", properties)})");
            }

            logger.IndentLevel--;
        }
Пример #5
0
        private void LogProperties(IProjectLoggerBatch logger, string heading, ProjectProperties projectProperties)
        {
            var properties = projectProperties.Cast <ProjectProperty>()
                             .Select(prop => $"{prop.Name}:{prop.Value}");

            logger.WriteLine($"{heading} -- ({string.Join(" | ", properties)})");
        }
Пример #6
0
        private static void LogProperties(IProjectLoggerBatch logger, string heading, IVsProjectProperties projectProperties)
        {
            IEnumerable <string> properties = projectProperties.Cast <ProjectProperty>()
                                              .Select(prop => $"{prop.Name}:{prop.Value}");

            logger.WriteLine($"{heading} -- ({string.Join(" | ", properties)})");
        }
Пример #7
0
        private void LogTargetFramework(IProjectLoggerBatch logger, TargetFrameworkInfo targetFrameworkInfo)
        {
            logger.WriteLine(targetFrameworkInfo.TargetFrameworkMoniker);
            logger.IndentLevel++;

            LogReferenceItems(logger, "Project References", targetFrameworkInfo.ProjectReferences as ReferenceItems);
            LogReferenceItems(logger, "Package References", targetFrameworkInfo.PackageReferences as ReferenceItems);
            LogProperties(logger, "Target Framework Properties", targetFrameworkInfo.Properties as ProjectProperties);

            logger.IndentLevel--;
        }
Пример #8
0
        private void LogTargetFrameworks(IProjectLoggerBatch logger, TargetFrameworks targetFrameworks)
        {
            logger.WriteLine($"Target Frameworks ({targetFrameworks.Count})");
            logger.IndentLevel++;

            foreach (var tf in targetFrameworks)
            {
                LogTargetFramework(logger, tf as TargetFrameworkInfo);
            }
            logger.IndentLevel--;
        }
Пример #9
0
        private static void LogTargetFrameworks(IProjectLoggerBatch logger, IVsTargetFrameworks2 targetFrameworks)
        {
            logger.WriteLine($"Target Frameworks ({targetFrameworks.Count})");
            logger.IndentLevel++;

            foreach (IVsTargetFrameworkInfo2 tf in targetFrameworks)
            {
                LogTargetFramework(logger, tf);
            }

            logger.IndentLevel--;
        }
Пример #10
0
        private static void LogTargetFramework(IProjectLoggerBatch logger, IVsTargetFrameworkInfo2 targetFrameworkInfo)
        {
            logger.WriteLine(targetFrameworkInfo.TargetFrameworkMoniker);
            logger.IndentLevel++;

            LogReferenceItems(logger, "Framework References", targetFrameworkInfo.FrameworkReferences);
            LogReferenceItems(logger, "Package Downloads", targetFrameworkInfo.PackageDownloads);
            LogReferenceItems(logger, "Project References", targetFrameworkInfo.ProjectReferences);
            LogReferenceItems(logger, "Package References", targetFrameworkInfo.PackageReferences);
            LogProperties(logger, "Target Framework Properties", targetFrameworkInfo.Properties);

            logger.IndentLevel--;
        }
Пример #11
0
        public static void BeginNominateRestore(IProjectLogger logger, string fullPath, IVsProjectRestoreInfo2 projectRestoreInfo)
        {
            if (logger.IsEnabled)
            {
                using IProjectLoggerBatch batch = logger.BeginBatch();
                batch.WriteLine();
                batch.WriteLine("------------------------------------------");
                batch.WriteLine($"BEGIN Nominate Restore for {fullPath}");
                batch.IndentLevel++;

                batch.WriteLine($"MSBuildProjectExtensionsPath:     {projectRestoreInfo.BaseIntermediatePath}");
                batch.WriteLine($"OriginalTargetFrameworks:         {projectRestoreInfo.OriginalTargetFrameworks}");
                LogTargetFrameworks(batch, projectRestoreInfo.TargetFrameworks);
                LogReferenceItems(batch, "Tool References", projectRestoreInfo.ToolReferences);

                batch.IndentLevel--;
                batch.WriteLine();
            }
        }
Пример #12
0
        private void LogProjectRestoreInfo(string fullPath, IVsProjectRestoreInfo projectRestoreInfo)
        {
            if (_logger.IsEnabled)
            {
                using (IProjectLoggerBatch logger = _logger.BeginBatch())
                {
                    logger.WriteLine();
                    logger.WriteLine("------------------------------------------");
                    logger.WriteLine($"BEGIN Nominate Restore for {fullPath}");
                    logger.IndentLevel++;

                    logger.WriteLine($"BaseIntermediatePath:     {projectRestoreInfo.BaseIntermediatePath}");
                    logger.WriteLine($"OriginalTargetFrameworks: {projectRestoreInfo.OriginalTargetFrameworks}");
                    LogTargetFrameworks(logger, projectRestoreInfo.TargetFrameworks as TargetFrameworks);
                    LogReferenceItems(logger, "Tool References", projectRestoreInfo.ToolReferences as ReferenceItems);

                    logger.IndentLevel--;
                    logger.WriteLine();
                }
            }
        }
 private static void WriteRuleHasNoChanges(IProjectLoggerBatch logger)
 {
     logger.WriteLine("No changes.");
 }
 private static void WriteRuleHeader(IProjectLoggerBatch logger, string ruleName)
 {
     logger.WriteLine();
     logger.WriteLine("Processing rule '{0}'...", ruleName);
     logger.IndentLevel++;
 }
 private void WriteFooter(IProjectLoggerBatch logger, IProjectVersionedValue <IProjectSubscriptionUpdate> update)
 {
     logger.IndentLevel--;
     logger.WriteLine();
     logger.WriteLine("Finished language service changes for '{0}' [{1}]", _project.FullPath, update.Value.ProjectConfiguration.Name);
 }