-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAssemblyGeneratorProvider.cs
More file actions
41 lines (38 loc) · 1.38 KB
/
AssemblyGeneratorProvider.cs
File metadata and controls
41 lines (38 loc) · 1.38 KB
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
32
33
34
35
36
37
38
39
40
41
using System;
using System.Collections.Generic;
using System.Linq;
using Diz.LogWriter.assemblyGenerators;
namespace Diz.LogWriter;
public static class AssemblyGeneratorRegistration
{
public static IEnumerable<Type> AssemblyGeneratorTypes()
{
return new List<Type>
{
typeof(AssemblyGeneratePercent),
typeof(AssemblyGenerateEmpty),
typeof(AssemblyGenerateLabel),
typeof(AssemblyGenerateCode),
typeof(AssemblyGenerateOrg),
typeof(AssemblyGenerateMap),
typeof(AssemblyGenerateBankCross),
typeof(AssemblyGenerateIndirectAddress),
typeof(AssemblyGenerateProgramCounter),
typeof(AssemblyGenerateOffset),
typeof(AssemblyGenerateDataBytes),
typeof(AssemblyGenerateComment),
typeof(AssemblyGenerateDataBank),
typeof(AssemblyGenerateDirectPage),
typeof(AssemblyGenerateMFlag),
typeof(AssemblyGenerateXFlag),
typeof(AssemblyGenerateLabelAssign),
typeof(AssemblyGenerateIncSrc),
};
}
public static Dictionary<string, AssemblyPartialLineGenerator> Create()
{
return AssemblyGeneratorTypes()
.Select(gType => (AssemblyPartialLineGenerator)Activator.CreateInstance(gType))
.ToDictionary(generator => generator.Token);
}
}