I would use something like this:
class Checker {
private const byte INVENTORY = 1;
private const byte PO = 2;
private const byte PROMOTION = 4;
public void process(int? inventory, int? po, int? promotion){
int value = (inventory != null ? INVENTORY : 0) +
(po != null ? PO : 0) +
(promotion != null ? PROMOTION : 0);
Process(value);
}
private void Process(int action){
switch(action){
case 0:
Console.WriteLine("Nothing happens");
break;
case INVENTORY:
Console.WriteLine("inventory check");
break;
case PO:
Console.WriteLine("po check");
break;
case PROMOTION:
Console.WriteLine("promotion check");
break;
case INVENTORY + PO:
Console.WriteLine("inventorycheck = 4 & inventorycheck");
break;
// All other statements
default:
throw new ArgumentException("out of bounds");
}
}
}
Basically it will determine the action based on a value computed by the combination of the bits representing them. It keeps it very clear what the options are and how they are handled.
An example of usage:
new Checker().process(5, null, null); // "inventory check"
new Checker().process(5, 2, null); // "inventorycheck = 4 & inventorycheck"