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

◆ VisitConstant()

override Expression System.Linq.Expressions.ExpressionStringBuilder.VisitConstant ( ConstantExpression node)
inlinepackagevirtual

Reimplemented from System.Linq.Expressions.ExpressionVisitor.

Definition at line 325 of file ExpressionStringBuilder.cs.

326 {
327 if (node.Value != null)
328 {
329 string text = node.Value.ToString();
330 if (node.Value is string)
331 {
332 Out('"');
333 Out(text);
334 Out('"');
335 }
336 else if (text == node.Value.GetType().ToString())
337 {
338 Out("value(");
339 Out(text);
340 Out(')');
341 }
342 else
343 {
344 Out(text);
345 }
346 }
347 else
348 {
349 Out("null");
350 }
351 return node;
352 }

References System.Reflection.Out, and System.text.