Open sandboxFocus

Method GetConstructorOverloadingAction

GetConstructorOverloadingAction(IConstructor, IParameter)

Gets the action the framework should apply when a constructor has just been mutated: generate a forwarding constructor (optionally decorated with ObsoleteAttribute), or do nothing.

Declaration
ConstructorOverloadingAction GetConstructorOverloadingAction(IConstructor mutatedConstructor, IParameter introducedParameter)
Parameters
Type Name Description
IConstructor mutatedConstructor

The constructor immediately after the new parameter has been appended.

IParameter introducedParameter

The parameter that was just introduced.

Returns
Type Description
ConstructorOverloadingAction

A ConstructorOverloadingAction describing the decision; when ForwardAndMarkObsolete(string?, bool) is used, it also carries the [Obsolete] metadata to emit on the generated forwarding constructor.