示例#1
0
        public PaDnnAdapterBase GetDnnAdapter()
        {
            ModuleDefinitionVersion Version  = GetModuleVersion();
            PaDnnAdapterBase        retValue = null;

            switch (Version)
            {
            case ModuleDefinitionVersion.V2:

                retValue = new PaDnnAdapter_V2(InstallerInfo);
                break;

            case ModuleDefinitionVersion.V3:

                retValue = new PaDnnAdapter_V3(InstallerInfo);
                break;

            case ModuleDefinitionVersion.V2_Skin:

                retValue = new PaDnnAdapter_V2Skin(InstallerInfo);
                break;

            case ModuleDefinitionVersion.V2_Provider:

                retValue = new PaDnnAdapter_V2Provider(InstallerInfo);
                break;

            case ModuleDefinitionVersion.VUnknown:

                throw (new Exception(EXCEPTION_Format));
            }

            return(retValue);
        }
        public PaDnnAdapterBase GetDnnAdapter()
        {
            ModuleDefinitionVersion Version = GetModuleVersion();
            PaDnnAdapterBase retValue = null;

            switch (Version)
            {
                case ModuleDefinitionVersion.V2:

                    retValue = new PaDnnAdapter_V2(InstallerInfo);
                    break;
                case ModuleDefinitionVersion.V3:

                    retValue = new PaDnnAdapter_V3(InstallerInfo);
                    break;
                case ModuleDefinitionVersion.V2_Skin:

                    retValue = new PaDnnAdapter_V2Skin(InstallerInfo);
                    break;
                case ModuleDefinitionVersion.V2_Provider:

                    retValue = new PaDnnAdapter_V2Provider(InstallerInfo);
                    break;
                case ModuleDefinitionVersion.VUnknown:

                    throw (new Exception(EXCEPTION_Format));                    
            }

            return retValue;
        }