Пример #1
0
        public static ListManager Create(IBaseContext baseContext, GEDCOMRecordType recType)
        {
            ListManager result = null;

            switch (recType)
            {
            case GEDCOMRecordType.rtIndividual:
                result = new IndividualListMan(baseContext);
                break;

            case GEDCOMRecordType.rtFamily:
                result = new FamilyListMan(baseContext);
                break;

            case GEDCOMRecordType.rtNote:
                result = new NoteListMan(baseContext);
                break;

            case GEDCOMRecordType.rtMultimedia:
                result = new MultimediaListMan(baseContext);
                break;

            case GEDCOMRecordType.rtSource:
                result = new SourceListMan(baseContext);
                break;

            case GEDCOMRecordType.rtRepository:
                result = new RepositoryListMan(baseContext);
                break;

            case GEDCOMRecordType.rtGroup:
                result = new GroupListMan(baseContext);
                break;

            case GEDCOMRecordType.rtResearch:
                result = new ResearchListMan(baseContext);
                break;

            case GEDCOMRecordType.rtTask:
                result = new TaskListMan(baseContext);
                break;

            case GEDCOMRecordType.rtCommunication:
                result = new CommunicationListMan(baseContext);
                break;

            case GEDCOMRecordType.rtLocation:
                result = new LocationListMan(baseContext);
                break;

            case GEDCOMRecordType.rtSubmission:
                result = null;
                break;

            case GEDCOMRecordType.rtSubmitter:
                result = null;
                break;
            }

            return(result);
        }