For the below code, specifically the {}
that don't seem connected to anything, what is the syntax called and what is it doing?
And when/why can I omit the ()
when using this syntax?
var a = new OpenApiSecurityRequirement() // Can I omit () and when/why?
{
{ // What is this doing?
new OpenApiSecurityScheme
{
Reference = new OpenApiReference
{
Type = ReferenceType.SecurityScheme,
Id="Bearer"
}
},
new string[]{}
} // What is this doing?
};
CodePudding user response: