Beispiel #1
0
        public static IProfileTypeRegistry Create(
            IOptionsViewModelParent optionsViewModelParent,
            IOutlookAccountPasswordProvider outlookAccountPasswordProvider,
            IReadOnlyList <string> availableCategories,
            IOptionTasks optionTasks,
            ISettingsFaultFinder settingsFaultFinder,
            GeneralOptions generalOptions,
            IViewOptions viewOptions)
        {
            if (optionsViewModelParent == null)
            {
                throw new ArgumentNullException(nameof(optionsViewModelParent));
            }
            if (outlookAccountPasswordProvider == null)
            {
                throw new ArgumentNullException(nameof(outlookAccountPasswordProvider));
            }
            if (availableCategories == null)
            {
                throw new ArgumentNullException(nameof(availableCategories));
            }
            if (optionTasks == null)
            {
                throw new ArgumentNullException(nameof(optionTasks));
            }
            if (settingsFaultFinder == null)
            {
                throw new ArgumentNullException(nameof(settingsFaultFinder));
            }
            if (generalOptions == null)
            {
                throw new ArgumentNullException(nameof(generalOptions));
            }
            if (viewOptions == null)
            {
                throw new ArgumentNullException(nameof(viewOptions));
            }


            var generic = new GenericProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions);
            var google  = new GoogleProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions);
            var all     = new List <IProfileType> {
                generic, google
            };

            all.Add(new FruuxProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions));
            all.Add(new PosteoProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions));
            all.Add(new YandexProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions));
            all.Add(new GmxCalendarProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions));
            all.Add(new SarenetProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions));
            all.Add(new LandmarksProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions));
            all.Add(new SogoProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions));
            all.Add(new CozyProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions));
            all.Add(new NextcloudProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions));
            all.Add(new MailboxOrgProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions));
            all.Add(new EasyProjectProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions));
            all.Add(new WebDeProfile(optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, settingsFaultFinder, generalOptions, viewOptions));

            return(new ProfileTypeRegistry(all, generic, google));
        }
Beispiel #2
0
 private ProfileTypeRegistry(IReadOnlyList <IProfileType> allTypes, GenericProfile genericProfile, GoogleProfile googleProfile)
 {
     _genericProfile = genericProfile;
     _googleProfile  = googleProfile;
     AllTypes        = allTypes;
 }