|
|
@@ -38,46 +38,39 @@ using System.Web.J2EE;
|
|
|
namespace System.Web.Profile
|
|
|
{
|
|
|
internal sealed class ProfileParser
|
|
|
- {
|
|
|
- internal ProfileParser (HttpContext context)
|
|
|
- {
|
|
|
- }
|
|
|
-
|
|
|
- public static Type GetProfileCommonType (HttpContext context)
|
|
|
- {
|
|
|
- if (!ProfileCommonTypeExists)
|
|
|
- return null;
|
|
|
-
|
|
|
- Type profileBaseType = Type.GetType ("ProfileCommon");
|
|
|
- if (profileBaseType == null) {
|
|
|
- //PageMapper call
|
|
|
- string virtualPath = "~/App_Code/ProfileCommon";
|
|
|
- string resolvedUrl = System.Web.Util.UrlUtils.ResolveVirtualPathFromAppAbsolute (virtualPath).TrimEnd ('/');
|
|
|
- profileBaseType = PageMapper.GetObjectType (context, resolvedUrl, false);
|
|
|
+ {
|
|
|
+ const string virtualPathCommon = "~/App_Code/ProfileCommon";
|
|
|
+ const string virtualPathGroup = "~/App_Code/ProfileGroup";
|
|
|
|
|
|
- ProfileCommonTypeExists = profileBaseType != null;
|
|
|
- }
|
|
|
- return profileBaseType;
|
|
|
- }
|
|
|
-
|
|
|
- public static Type GetProfileGroupType (HttpContext context, string groupName)
|
|
|
+ internal ProfileParser (HttpContext context)
|
|
|
{
|
|
|
- if (!ProfileGroupTypeExists)
|
|
|
- return null;
|
|
|
-
|
|
|
- Type profileGroupType = Type.GetType ("ProfileGroup" + groupName);
|
|
|
- if (profileGroupType == null) {
|
|
|
- //PageMapper call
|
|
|
- string virtualPath = "~/App_Code/ProfileGroup" + groupName;
|
|
|
- string resolvedUrl = System.Web.Util.UrlUtils.ResolveVirtualPathFromAppAbsolute (virtualPath).TrimEnd ('/');
|
|
|
- profileGroupType = PageMapper.GetObjectType (context, resolvedUrl, false);
|
|
|
-
|
|
|
- ProfileGroupTypeExists = profileGroupType != null;
|
|
|
- }
|
|
|
- return profileGroupType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static Type GetProfileCommonType (HttpContext context)
|
|
|
+ {
|
|
|
+ if (!ProfileCommonTypeExists)
|
|
|
+ return null;
|
|
|
+
|
|
|
+ string resolvedUrl = System.Web.Util.UrlUtils.ResolveVirtualPathFromAppAbsolute (virtualPathCommon).TrimEnd ('/');
|
|
|
+ Type profileBaseType = PageMapper.GetObjectType (context, resolvedUrl, false);
|
|
|
+
|
|
|
+ ProfileCommonTypeExists = profileBaseType != null;
|
|
|
+ return profileBaseType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static Type GetProfileGroupType (HttpContext context, string groupName)
|
|
|
+ {
|
|
|
+ if (!ProfileGroupTypeExists)
|
|
|
+ return null;
|
|
|
+
|
|
|
+ string resolvedUrl = System.Web.Util.UrlUtils.ResolveVirtualPathFromAppAbsolute (virtualPathGroup + groupName).TrimEnd ('/');
|
|
|
+ Type profileGroupType = PageMapper.GetObjectType (context, resolvedUrl, false);
|
|
|
+
|
|
|
+ ProfileGroupTypeExists = profileGroupType != null;
|
|
|
+ return profileGroupType;
|
|
|
}
|
|
|
|
|
|
- const string profileKey = "System.Web.Profile.ProfileCommonType";
|
|
|
+ const string profileKey = "Profile.ProfileCommonType";
|
|
|
private static bool ProfileCommonTypeExists
|
|
|
{
|
|
|
get
|
|
|
@@ -90,7 +83,7 @@ namespace System.Web.Profile
|
|
|
set { AppDomain.CurrentDomain.SetData (profileKey, value); }
|
|
|
}
|
|
|
|
|
|
- const string groupKey = "System.Web.Profile.ProfileGroupType";
|
|
|
+ const string groupKey = "Profile.ProfileGroupType";
|
|
|
private static bool ProfileGroupTypeExists
|
|
|
{
|
|
|
get
|