Beispiel #1
0
        protected sealed override int InsertPosition(ISwitchExpressionOperation switchExpression)
        {
            // If the last section has a default label, then we want to be above that.
            // Otherwise, we just get inserted at the end.

            var arms = switchExpression.Arms;

            return(arms.Length > 0 && PopulateSwitchExpressionHelpers.IsDefault(arms[arms.Length - 1])
                ? arms.Length - 1
                : arms.Length);
        }
Beispiel #2
0
 protected sealed override ICollection <ISymbol> GetMissingEnumMembers(
     ISwitchExpressionOperation switchOperation
     ) => PopulateSwitchExpressionHelpers.GetMissingEnumMembers(switchOperation);
 protected sealed override bool HasDefaultCase(ISwitchExpressionOperation operation)
 => PopulateSwitchExpressionHelpers.HasDefaultCase(operation);
 protected override bool HasNullSwitchArm(ISwitchExpressionOperation switchOperation)
 => PopulateSwitchExpressionHelpers.HasNullSwitchArm(switchOperation);