public bool TryBindAsType(TypeSpec type, out object form)
{
form = this.deserializedBody;
if (form == null || !type.Type.IsInstanceOfType(form))
form = Deserialize(type as StructuredType, null);
if (type.Type.IsInstanceOfType(form))
{
this.deserializedBody = form;
return true;
}
return false;
}