Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetDataType()

Type System.Data.FunctionNode.GetDataType ( ExpressionNode node)
inlineprivate

Definition at line 261 of file FunctionNode.cs.

262 {
263 Type type = node.GetType();
264 string text = null;
265 if (type == typeof(NameNode))
266 {
267 text = ((NameNode)node)._name;
268 }
269 if (type == typeof(ConstNode))
270 {
271 text = ((ConstNode)node)._val.ToString();
272 }
273 if (text == null)
274 {
275 throw ExprException.ArgumentType(s_funcs[_info]._name, 2, typeof(Type));
276 }
277 Type type2 = Type.GetType(text);
278 if (type2 == null)
279 {
280 throw ExprException.InvalidType(text);
281 }
282 TypeLimiter.EnsureTypeIsAllowed(type2, _capturedLimiter);
283 return type2;
284 }
readonly TypeLimiter _capturedLimiter
static readonly Function[] s_funcs
readonly string _name

References System.Data.FunctionNode._capturedLimiter, System.Data.FunctionNode._info, System.Data.FunctionNode._name, System.Data.ExprException.ArgumentType(), System.Runtime.Serialization.Dictionary, System.Data.TypeLimiter.EnsureTypeIsAllowed(), System.Type.GetType(), System.Data.ExprException.InvalidType(), System.Data.FunctionNode.s_funcs, System.text, and System.type.

Referenced by System.Data.FunctionNode.Eval().