public void CallValueAs(Type clrType)
{
MethodInfo meth;
meth = XmlILMethods.StorageMethods[clrType].ValueAs;
if (meth == null)
{
// Call (Type) item.ValueAs(Type, null)
LoadType(clrType);
Emit(OpCodes.Ldnull);
Call(XmlILMethods.ValueAsAny);
// Unbox or down-cast
TreatAs(typeof(object), clrType);
}
else
{
// Call strongly typed ValueAs method
Call(meth);
}
}