CodeQL library for C#
codeql/csharp-all 3.1.1 (changelog, source)
Search

Member predicate ObjectInitializer::getAMemberInitializer

Gets a member initializer of this object initializer. For example, X = 0 is a member initializer of the object initializer { X = 0, Y = 1 } on line 6 in

class A {
  int X;
  int Y;

  public static A Create() {
    return new A { X = 0, Y = 1 };
  }
}
MemberInitializer getAMemberInitializer()