In this section, we will show you how to a write a custom FixAll code fix provider to batch fix diagnostics. We will use the code fix implemented in the first recipe of this chapter to Remove unused local. As shown in that recipe, removal of an unused local might have different code fixes based on whether the enclosing local declaration statement declares a single or multiple variables. Additionally, we might have multiple unused locals declared in the single statement, and if all the locals declared in a statement are unused, the batch fix should remove the entire statement. Hence, we cannot use the well-known batch fixer. For example, for the following code, the batch fix should delete the entire first two local declaration statements, but only the declarator for d in the third declaration statement...
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia