Exemple #1
0
        private void GetExtensionManagerIncludeFolders(List <string> includeFolders)
        {
            IVsExtensionManager service = this.serviceProvider.GetService(typeof(SVsExtensionManager)) as IVsExtensionManager;

            if (service != null)
            {
                includeFolders.AddRange(service.GetEnabledExtensionContentLocations("Microsoft.T4.Include"));
            }
        }
        // internal for testing purpose
        internal static ImmutableArray<HostDiagnosticAnalyzerPackage> GetHostAnalyzerPackages(IVsExtensionManager extensionManager)
        {
            var references = ImmutableArray.CreateBuilder<string>();
            foreach (var reference in extensionManager.GetEnabledExtensionContentLocations(AnalyzerContentTypeName))
            {
                if (string.IsNullOrEmpty(reference))
                {
                    continue;
                }

                references.Add(reference);
            }

            return ImmutableArray.Create(new HostDiagnosticAnalyzerPackage(name: null, assemblies: references.ToImmutable()));
        }
Exemple #3
0
        // internal for testing purpose
        internal static ImmutableArray <HostDiagnosticAnalyzerPackage> GetHostAnalyzerPackages(IVsExtensionManager extensionManager)
        {
            var references = ImmutableArray.CreateBuilder <string>();

            foreach (var reference in extensionManager.GetEnabledExtensionContentLocations(AnalyzerContentTypeName))
            {
                if (string.IsNullOrEmpty(reference))
                {
                    continue;
                }

                references.Add(reference);
            }

            return(ImmutableArray.Create(new HostDiagnosticAnalyzerPackage(name: null, assemblies: references.ToImmutable())));
        }