예제 #1
0
 void AddInstanceFields(TypeDesc type)
 {
     foreach (var field in type.GetFields())
     {
         if (!field.IsStatic)
         {
             _compilation.AddField(field);
             var fieldType = field.FieldType;
             if (fieldType.IsValueType && !fieldType.IsPrimitive)
             {
                 AddInstanceFields(fieldType);
             }
         }
     }
 }