예제 #1
0
        public override void GenerateCode(ILGenerator gen, CodeFlow cf)
        {
            var constantFieldName = "inlineList$" + cf.NextFieldId();

            cf.RegisterNewField(constantFieldName, new List <object>());
            cf.RegisterNewInitGenerator((initGenerator, cflow) => { GenerateInitCode(constantFieldName, initGenerator, cflow); });

            GenerateLoadListCode(gen, constantFieldName);
            cf.PushDescriptor(new TypeDescriptor(typeof(IList)));
        }