Inheritance: IEDCFileParser
示例#1
0
        public IEDCFileParser GetParserForFile(string filename, bool isPrimaryFile)
        {
            IEDCFileParser parser = null;
            EDCFileType fileType = DetermineFileType(filename, isPrimaryFile);
            switch (fileType)
            {
                case EDCFileType.EDC15P:
                    parser = new EDC15PFileParser();
                    break;
                case EDCFileType.EDC15P6:
                    parser = new EDC15P6FileParser();
                    break;
                case EDCFileType.EDC15V:
                    parser = new EDC15VFileParser();
                    break;
                case EDCFileType.EDC15C:
                    parser = new EDC15CFileParser();
                    break;
                case EDCFileType.EDC15M:
                    parser = new EDC15MFileParser();
                    break;
                case EDCFileType.EDC16:
                    parser = new EDC16FileParser();
                    break;
                case EDCFileType.EDC17:
                    parser = new EDC17FileParser();
                    break;
                case EDCFileType.MSA15: //?
                case EDCFileType.MSA12:
                case EDCFileType.MSA11:
                    parser = new MSA15FileParser();
                    break;
                case EDCFileType.MSA6:
                    parser = new MSA6FileParser();
                    break;

            }
            return parser;
        }