Пример #1
0
        public void CreateMetadataFiler(int sectionNumber, string filterString, MootaDootaDefinishin md)
        {
            DynamikKodeFaktory factory = new DynamikKodeFaktory();

            List <IFilter> metadataFilters = new List <IFilter>();

            if (sectionNumber == 0)
            {
                metadataFilters.Add(KwoteModelFilterInfo.Create(md));
            }
            else if (sectionNumber == 1)
            {
                metadataFilters.Add(KwestionaireModelFilterInfo.Create(md));
            }
            else
            {
                metadataFilters.Add(DefaultFilterStuff.Create(md));
            }

            IEnumerable <IFilter> dynamikFilters = filterString.Split(';')
                                                   .Select(fs => factory.Create(fs, new[]
            {
                typeof(KwoteModel),
                typeof(KweschunareModel),
            },
                                                                                new[]
            {
                typeof(KwoteModel).Namespace,
                typeof(KweschunareModel).Namespace
            }));

            metadataFilters.AddRange(dynamikFilters);
        }