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

Member predicate ObjectCreation::getInitializer

Gets the object initializer or collection initializer of this constructor call, if any. For example { {0, "a"}, {1, "b"} } in

var dict = new Dictionary<int, string>{
  {0, "a"},
  {1, "b"}
};
ObjectOrCollectionInitializer getInitializer()