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); } } } }