예제 #1
0
        public void Emit(IlBuilder builder)
        {
            builder.Start();

            foreach (InterType t in Types)
            {
                t.Bind(this);
            }

            foreach (InterType t in Types)
            {
                t.BindSubMembers(this);
            }

            foreach (InterType t in Types)
            {
                t.BindSubSubMembers(this);
            }

            EmitCLRHeader(builder);

            foreach (InterType t in Types)
            {
                t.Emit(builder);
            }

            builder.End();
        }
예제 #2
0
        private void EmitCLRHeader(IlBuilder builder)
        {
            builder.EmitLine($".assembly {assemblyName} {{}}");

            builder.EmitLine();

            foreach (var reference in ReferenceTracker.UsedReferences)
            {
                reference.Emit(builder);
            }

            builder.EmitLine(".module TestModule");

            builder.EmitLine();
        }