Beispiel #1
0
        /// <summary>
        /// Fired whenever a value gets assigned to the Profile property.
        /// </summary>
        /// <param name="oContext"></param>
        /// <param name="oCollection"></param>
        /// <returns></returns>
        public override SettingsPropertyValueCollection GetPropertyValues(System.Configuration.SettingsContext oContext, SettingsPropertyCollection oCollection)
        {
            #region VARIABLES

            System.Configuration.SettingsPropertyValueCollection oSettingsPropertyValueCollection;
            List <ProfilePropertyValueContract> oSettingsPropertyValueCollectionSerialized;
            List <ProfilePropertyContract>      oCollectionSerialized;

            #endregion

            Sitecore.Diagnostics.Log.Info("GenProfileProvider.GetPropertyValues", this);

            oCollectionSerialized = Genworth.SitecoreExt.Utilities.ProfileServiceSerialization.SerializeSettingsPropertyCollection(oCollection);

            Sitecore.Diagnostics.Log.Info(string.Format("GenProfileProvider.GetPropertyValues, Properties Count:{0}", oCollectionSerialized.Count), this);

            try
            {
                using (var oGenProfileProviderService = new GenProfileProviderServiceProxy())
                {
                    oSettingsPropertyValueCollectionSerialized = oGenProfileProviderService.GetPropertyValues(oContext, oCollectionSerialized);
                }
            }
            catch (Exception oGenProfileProviderException)
            {
                Sitecore.Diagnostics.Log.Error("Genworth Profile Provider Error", oGenProfileProviderException, this);
                throw;
            }
            oSettingsPropertyValueCollection = Genworth.SitecoreExt.Utilities.ProfileServiceSerialization.DeserializeSettingsPropertyValueCollection(oSettingsPropertyValueCollectionSerialized);

            return(oSettingsPropertyValueCollection);
        }
Beispiel #2
0
        public override System.Web.Profile.ProfileInfoCollection GetAllInactiveProfiles(System.Web.Profile.ProfileAuthenticationOption oAuthenticationOption, DateTime dUserInactiveSinceDate, int iPageIndex, int iPageSize, out int iTotalRecords)
        {
            System.Web.Profile.ProfileInfoCollection oProfileInfoCollection;

            Sitecore.Diagnostics.Log.Info("GenProfileProvider.GetAllInactiveProfiles", this);

            try
            {
                using (var oGenProfileProviderService = new GenProfileProviderServiceProxy())
                {
                    oProfileInfoCollection = oGenProfileProviderService.GetAllInactiveProfiles(out iTotalRecords, iPageIndex, iPageSize, oAuthenticationOption, dUserInactiveSinceDate);
                }
            }
            catch (Exception oGenProfileProviderException)
            {
                Sitecore.Diagnostics.Log.Error("Genworth Profile Provider Error", oGenProfileProviderException, this);
                throw;
            }
            return(oProfileInfoCollection);
        }
Beispiel #3
0
        public override System.Web.Profile.ProfileInfoCollection FindProfilesByUserName(System.Web.Profile.ProfileAuthenticationOption oAuthenticationOption, string sUsernameToMatch, int iPageIndex, int iPageSize, out int iTotalRecords)
        {
            System.Web.Profile.ProfileInfoCollection oProfileInfoCollection;

            Sitecore.Diagnostics.Log.Info("GenProfileProvider.FindProfilesByUserName", this);

            try
            {
                using (var oGenProfileProviderService = new GenProfileProviderServiceProxy())
                {
                    oProfileInfoCollection = oGenProfileProviderService.FindProfilesByUserName(out iTotalRecords, iPageIndex, iPageSize, oAuthenticationOption, sUsernameToMatch);
                }
            }
            catch (Exception oGenProfileProviderException)
            {
                Sitecore.Diagnostics.Log.Error("Genworth Profile Provider Error", oGenProfileProviderException, this);
                throw;
            }
            return(oProfileInfoCollection);
        }
Beispiel #4
0
        public override int GetNumberOfInactiveProfiles(System.Web.Profile.ProfileAuthenticationOption oAuthenticationOption, DateTime dUserInactiveSinceDate)
        {
            int iNumberOfInactiveProfiles;

            Sitecore.Diagnostics.Log.Info("GenProfileProvider.GetNumberOfInactiveProfiles", this);

            try
            {
                using (var oGenProfileProviderService = new GenProfileProviderServiceProxy())
                {
                    iNumberOfInactiveProfiles = oGenProfileProviderService.GetNumberOfInactiveProfiles(oAuthenticationOption, dUserInactiveSinceDate);
                }
            }
            catch (Exception oGenProfileProviderException)
            {
                Sitecore.Diagnostics.Log.Error("Genworth Profile Provider Error", oGenProfileProviderException, this);
                throw;
            }

            return(iNumberOfInactiveProfiles);
        }