static public ProfileBase Create(string username, bool isAuthenticated) { if (!ProfileManager.Enabled) { throw new ProviderException(SR.GetString(SR.Profile_not_enabled)); } InitializeStatic(); if (s_SingletonInstance != null) { return(s_SingletonInstance); } if (s_Properties.Count == 0) { lock (s_InitializeLock) { if (s_SingletonInstance == null) { s_SingletonInstance = new DefaultProfile(); } return(s_SingletonInstance); } } HttpRuntime.CheckAspNetHostingPermission(AspNetHostingPermissionLevel.Low, SR.Feature_not_supported_at_this_level); return(CreateMyInstance(username, isAuthenticated)); }
static public ProfileBase Create(string username, bool isAuthenticated) { if (!ProfileManager.Enabled) throw new ProviderException(SR.GetString(SR.Profile_not_enabled)); InitializeStatic(); if (s_SingletonInstance != null) return s_SingletonInstance; if (s_Properties.Count == 0) { lock (s_InitializeLock) { if (s_SingletonInstance == null) s_SingletonInstance = new DefaultProfile(); return s_SingletonInstance; } } HttpRuntime.CheckAspNetHostingPermission(AspNetHostingPermissionLevel.Low, SR.Feature_not_supported_at_this_level); return CreateMyInstance(username, isAuthenticated); }