예제 #1
0
        public ProfileGroupBase GetProfileGroup(string groupName)
        {
            ProfileGroupBase group     = null;
            Type             groupType = ProfileParser.GetProfileGroupType(HttpContext.Current, groupName);

            if (groupType != null)
            {
                group = (ProfileGroupBase)Activator.CreateInstance(groupType);
            }
            else
            {
                throw new ProviderException("Group '" + groupName + "' not found");
            }

            group.Init(this, groupName);
            return(group);
        }
예제 #2
0
        public ProfileGroupBase GetProfileGroup(string groupName)
        {
            ProfileGroupBase base2 = (ProfileGroupBase)this._Groups[groupName];

            if (base2 == null)
            {
                Type profileType = BuildManager.GetProfileType();
                if (profileType == null)
                {
                    throw new ProviderException(System.Web.SR.GetString("Profile_group_not_found", new object[] { groupName }));
                }
                profileType = profileType.Assembly.GetType("ProfileGroup" + groupName, false);
                if (profileType == null)
                {
                    throw new ProviderException(System.Web.SR.GetString("Profile_group_not_found", new object[] { groupName }));
                }
                base2 = (ProfileGroupBase)Activator.CreateInstance(profileType);
                base2.Init(this, groupName);
            }
            return(base2);
        }
예제 #3
0
        public ProfileGroupBase GetProfileGroup(string groupName)
        {
            ProfileGroupBase grp = (ProfileGroupBase)_Groups[groupName];

            if (grp == null)
            {
                Type t = BuildManager.GetProfileType();
                if (t == null)
                {
                    throw new ProviderException(SR.GetString(SR.Profile_group_not_found, groupName));
                }
                t = t.Assembly.GetType("ProfileGroup" + groupName, false);
                if (t == null)
                {
                    throw new ProviderException(SR.GetString(SR.Profile_group_not_found, groupName));
                }

                grp = (ProfileGroupBase)Activator.CreateInstance(t);
                grp.Init(this, groupName);
            }

            return(grp);
        }