Example #1
0
        public CSharpAdapter(IAssemblyReferenceCollector referenceCollector, IAssemblyDocumentationResolver documentationResolver)
        {
            var referencedAssemblies = referenceCollector.SlowGetAllReferencedAssembliesRecursive(
                // Essential
                NetFrameworkRuntime.AssemblyOfValueTask,
                NetFrameworkRuntime.AssemblyOfValueTuple,
                NetFrameworkRuntime.AssemblyOfSpan,
                typeof(Binder).Assembly,

                // Runtime
                typeof(JitGenericAttribute).Assembly,

                // Requested
                typeof(XDocument).Assembly,   // System.Xml.Linq
                typeof(IDataReader).Assembly, // System.Data
                typeof(HttpUtility).Assembly  // System.Web
                ).ToImmutableList();

            var assemblyReferenceTaskSource = new AssemblyReferenceDiscoveryTaskSource();

            assemblyReferenceTaskSource.Complete(referencedAssemblies.Select(a => a.Location).ToImmutableList());
            AssemblyReferenceDiscoveryTask = assemblyReferenceTaskSource.Task;

            _references = referencedAssemblies
                          .Select(a => (MetadataReference)MetadataReference.CreateFromFile(a.Location, documentation: documentationResolver.GetDocumentation(a)))
                          .ToImmutableList();
        }
Example #2
0
 public VisualBasicAdapter(IAssemblyReferenceCollector referenceCollector, IAssemblyDocumentationResolver documentationResolver)
 {
     _referenceCollector    = referenceCollector;
     _documentationResolver = documentationResolver;
 }