Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-5563

Create AstExpression extension methods to make testing for constants easier

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: LINQ
    • None
    • None
    • Dotnet Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      For example, instead of:

      if (node.FieldName is AstConstantExpression constantFieldName &&
          constantFieldName.Value.IsString &&
          constantFieldName.Value.AsString == "_elements")
      

      we could write:

      if (node.FieldName.IsStringConstant("_elements"))
      

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: