Hey all,

There was a bug reported where a custom attribute wasn't properly
round tripped. To support all the scenarios this bug enlightened, a
change had to be made. Previously if you had an attribute like:

class MyAttribute { public object Value { get; set; } }

And that you were applying with:

[My (Value = "foo")]

Cecil would have created a named argument with a
CustomAttributeArgument as follows:

(String:"foo")

The issue is that we were losing the original information. It's now returning:

(Object:(String:"foo"))

That's a nested CustomAttributeArgument. Note that if you were writing
the argument yourself, you already had to create such an argument.

Long story short, every time in a custom attribute you have to box a
value, you have to wrap your argument in a CustomAttributeArgument
(module.TypeSystem.Object, argument_boxed_value).

Jb

-- 
--
mono-cecil

Reply via email to