ACAT.Lib.Extension.AppAgents.Outlook.OutlookAgentBase.createOutlookInspector C# (CSharp) Method

createOutlookInspector() private method

Creates the outlook inspector depending on the version of Outlook installed on the client computer. Returns default inspector if outlook is not installed or is the unsupported version.
private createOutlookInspector ( ) : IOutlookInspector
return IOutlookInspector
        private IOutlookInspector createOutlookInspector()
        {
            int version = -1;
            IOutlookInspector inspector;

            if (IsOutlookInstalled())
            {
                version = getOutlookVersion();
            }

            switch (version)
            {
                case 14:  // Outlook 2010
                    inspector = new OutlookInspector2010();
                    break;

                default:
                    inspector = new DefaultOutlookInspector();
                    break;
            }

            return inspector;
        }