public MoonlightTypeConverter (string propertyName, Type destinationType)
{
this.propertyName = propertyName;
this.destinationType = destinationType;
destinationKind = Deployment.Current.Types.TypeToKind (destinationType);
if (destinationKind == Kind.INVALID)
throw new InvalidOperationException (string.Format ("Cannot convert to type {0} (property {1})", destinationType, propertyName));
var nullable = Nullable.GetUnderlyingType (destinationType);
if (nullable != null) {
this.destinationType = nullable;
nullableDestination = true;
}
}