Added ICodeSwitchFactory to allow extension methods for creating switches