private void LogCaseClauseCommon(ICaseClause operation)
        {
            var kindStr = $"{nameof(CaseKind)}.{operation.CaseKind}";

            LogString($" ({kindStr})");
            LogCommonPropertiesAndNewLine(operation);
        }
Exemple #2
0
        private static void ReportAtLastClause([NotNull] ISwitchCase switchCase, OperationAnalysisContext context)
        {
            ICaseClause lastClause = switchCase.Clauses.Last();

            Location location = lastClause.GetLocationForKeyword();

            context.ReportDiagnostic(Diagnostic.Create(Rule, location));
        }