예제 #1
0
        private static IEnumerable <SPProfileSyncProvider> GetProfileSyncProviders()
        {
            var profileSyncPlugin = Plugin;

            if (profileSyncPlugin != null)
            {
                var settingsList = new SPProfileSyncProviderList(profileSyncPlugin.Configuration.GetString(PropertyId.SPProfileSyncSettings));
                return(settingsList.All());
            }
            return(new List <SPProfileSyncProvider>());
        }
        protected override void OnPreRender(EventArgs e)
        {
            if (Page.IsPostBack)
            {
                syncSettingsList = new SPProfileSyncProviderList(hdnSyncSettingsList.Value);
            }
            ProcessSubmitedData(syncSettingsList);
            hdnSyncSettingsList.Value = syncSettingsList.ToXml();
            string syncSettingsListKey = TemporaryStore.Add(syncSettingsList.ToXml()).ToString();
            var    presenters          = (from settings in syncSettingsList.All()
                                          orderby settings.Id
                                          select new SPProfileSyncPresenter(settings, syncSettingsList, BaseUrl, syncSettingsListKey)).ToList();

            Bind(presenters, true);
            base.OnPreRender(e);
            SetControlStyles();
        }