Пример #1
0
        private void LogCaseClauseCommon(ICaseClause operation)
        {
            var kindStr = $"{nameof(CaseKind)}.{operation.CaseKind}";

            LogString($" ({kindStr})");
            LogCommonPropertiesAndNewLine(operation);
        }
Пример #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));
        }