public static InvalidType ( string typeName ) : |
||
typeName | string | |
return |
private Type GetDataType(ExpressionNode node) { Type nodeType = node.GetType(); string typeName = null; if (nodeType == typeof(NameNode)) { typeName = ((NameNode)node)._name; } if (nodeType == typeof(ConstNode)) { typeName = ((ConstNode)node)._val.ToString(); } if (typeName == null) { throw ExprException.ArgumentType(s_funcs[_info]._name, 2, typeof(Type)); } Type dataType = Type.GetType(typeName); if (dataType == null) { throw ExprException.InvalidType(typeName); } // ReadXml might not be on the current call stack. So we'll use the TypeLimiter // that was captured when this FunctionNode instance was created. TypeLimiter.EnsureTypeIsAllowed(dataType, _capturedLimiter); return(dataType); }
private Type GetDataType(ExpressionNode node) { Type nodeType = node.GetType(); string typeName = null; if (nodeType == typeof(NameNode)) { typeName = ((NameNode)node)._name; } if (nodeType == typeof(ConstNode)) { typeName = ((ConstNode)node)._val.ToString(); } if (typeName == null) { throw ExprException.ArgumentType(s_funcs[_info]._name, 2, typeof(Type)); } Type dataType = Type.GetType(typeName); if (dataType == null) { throw ExprException.InvalidType(typeName); } return(dataType); }