forked from AngleSharp/AngleSharp.Js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFiles.cs
More file actions
31 lines (26 loc) · 905 Bytes
/
Files.cs
File metadata and controls
31 lines (26 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
namespace AngleSharp.Scripting.JavaScript.Generator
{
using System;
using System.Collections.Generic;
public static class Files
{
public static IEnumerable<GeneratedFile> Generate()
{
var options = new Options();
return Generate(options);
}
public static IEnumerable<GeneratedFile> Generate(Options options)
{
if (options == null)
throw new ArgumentNullException("options");
var assembly = typeof(BrowsingContext).Assembly;
var candidates = assembly.GetCandidates();
var bindings = candidates.GetBindings();
var types = bindings.ResolveTypes();
var visitor = new GeneratorVisitor(options);
foreach (var binding in bindings)
binding.Accept(visitor);
return visitor.Files;
}
}
}