Guid parameter support?

Mar 5, 2011 at 12:31 PM

I am experimenting with Caliburn.micro and WP7 and discovered that CM doesn't support Guid parameters. This is simple enough to work around with strings but I banged my head against the wall for a good hour till it occurred to me that the type might be the problem.

Question 1: are the supported types used for auto parameter parsing / injection documented somewhere and I just didn't find it? If so, I'd appreciate a pointer, as there's probably a ton of other stuff I should read up on.

Question 2: could support for Guid parameters be added?



Mar 5, 2011 at 1:22 PM

Guids should be supported. Can you send me a sample that reproduces the problem? If there is a bug in the framework, I want to get that fixed quickly. Please send the sample to robertheisenberg at hotmail dot com Thanks!

May 31, 2011 at 12:15 AM

Did this issue with Guid parameters get solved? I've come up against what I suspect is the same issue today. I'm working with a WP7 app that has a viewmodel with a Guid parameter exposed. When navigating to the associated view I'm constructing the URI appropriately, but the parameter in the URI isn't being bound to the property on the viewmodel.

I worked around it by adding a custom converter to the MessageBinder, and that works fine. This is added to my bootstrapper:

MessageBinder.CustomConverters.Add(typeof(Guid), (providedValue, context) =>
	return (providedValue is string)
		? (object) new Guid((string) providedValue)
		: (object) null;

Would be good if this was out-of-the-box, though.



May 31, 2011 at 1:13 AM

I added the the custom converters as en extensibility point for that sort of thing. If you are willing to make  a sample for me that reproduces the problem and attach it to an issue, I can make that work out of the box. But, you need to do it in the next 24 hours or it isn't going to make it into this release :)

May 31, 2011 at 9:34 AM

I've just attached a sample wp7 project to an issue with the same title as this thread


May 31, 2011 at 12:49 PM