예제 #1
0
        public CSharpAdapter(IAssemblyReferenceCollector referenceCollector)
        {
            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 referencedAssembliesTaskSource = new ReferencedAssembliesLoadTaskSource();

            referencedAssembliesTaskSource.Complete(referencedAssemblies);
            ReferencedAssembliesTask = referencedAssembliesTaskSource.Task;

            _references = referencedAssemblies
                          .Select(a => (MetadataReference)MetadataReference.CreateFromFile(a.Location))
                          .ToImmutableList();
        }
예제 #2
0
        public CSharpAdapter(
            IAssemblyReferenceCollector referenceCollector,
            IAssemblyDocumentationResolver documentationResolver,
            ICSharpTopLevelProgramSupport topLevelProgramSupport
            )
        {
            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();
            _topLevelProgramSupport = topLevelProgramSupport;
        }
        public PluginSnippetCompiler(IAssemblyReferenceCollector assemblyReferenceCollector)
        {
            if (assemblyReferenceCollector == null)
                throw new ArgumentNullException("assemblyReferenceCollector");

            _AssemblyReferenceCollector = assemblyReferenceCollector;
        }
예제 #4
0
        public PluginSnippetCompiler(IAssemblyReferenceCollector assemblyReferenceCollector)
        {
            if (assemblyReferenceCollector == null)
            {
                throw new ArgumentNullException("assemblyReferenceCollector");
            }

            _AssemblyReferenceCollector = assemblyReferenceCollector;
        }
예제 #5
0
 public VisualBasicAdapter(IAssemblyReferenceCollector referenceCollector, IAssemblyDocumentationResolver documentationResolver)
 {
     _referenceCollector    = referenceCollector;
     _documentationResolver = documentationResolver;
 }
예제 #6
0
 public VisualBasicAdapter(IAssemblyReferenceCollector referenceCollector)
 {
     _referenceCollector = referenceCollector;
 }
예제 #7
0
 public FSharpAdapter(IAssemblyReferenceCollector referenceCollector)
 {
     _referenceCollector = referenceCollector;
 }