Example #1
0
        public void ProjectLoaded(ProjectLoadedEventArgs args)
        {
            try
            {
                var projectId           = GetProjectId(args);
                var sessionId           = GetSessionId(args);
                var targetFrameworks    = GetTargetFrameworks(args.ProjectInstance);
                var sdkVersion          = GetSdkVersion(args);
                var outputKind          = GetOutputKind(args);
                var projectCapabilities = GetProjectCapabilities(args.ProjectInstance);

                if (args.References == null)
                {
                    return;
                }

                var hashedReferences = GetHashedReferences(args);
                var(hashedFileExtensions, fileCounts) = GetUniqueHashedFileExtensionsAndCounts(args);

                _eventEmitter.ProjectInformation(projectId, sessionId, (int)outputKind, projectCapabilities, targetFrameworks, sdkVersion, hashedReferences, hashedFileExtensions, fileCounts);
            }
            catch (Exception ex)
            {
                _logger.LogError("Unexpected exception got thrown from project load listener: " + ex);
            }
        }
Example #2
0
        public void ProjectLoaded(ProjectLoadedEventArgs args)
        {
            try
            {
                var projectId        = GetProjectId(args);
                var targetFrameworks = GetTargetFrameworks(args.ProjectInstance);

                if (args.References == null)
                {
                    return;
                }

                var hashedReferences     = GetHashedReferences(args);
                var hashedFileExtensions = GetUniqueHashedFileExtensions(args);

                _eventEmitter.ProjectInformation(projectId, targetFrameworks, hashedReferences, hashedFileExtensions);
            }
            catch (Exception ex)
            {
                _logger.LogError("Unexpected exception got thrown from project load listener: " + ex);
            }
        }