Merge pull request #1519 from akoeplinger/remove-net35-ifdef
[mono.git] / mcs / class / System.Web / System.Web.Profile / ProfileManager.cs
index 806068efff8145b7c356697cc3b1254b5d496f13..24d20ed54eaadb4f6ead36fd17f53d32c84ddbf3 100644 (file)
@@ -27,7 +27,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
 using System;
 using System.Web;
 using System.Web.Configuration;
@@ -37,47 +36,13 @@ namespace System.Web.Profile
 {
        public static class ProfileManager
        {
-#if TARGET_J2EE
-               const string Profiles_config = "Profiles.config";
-               const string Profiles_ProfileProviderCollection = "Profiles.ProfileProviderCollection";
-               private static ProfileSection config
-               {
-                       get
-                       {
-                               object o = AppDomain.CurrentDomain.GetData (Profiles_config);
-                               if (o == null) {
-                                       config = (ProfileSection) WebConfigurationManager.GetSection ("system.web/profile");
-                                       return (ProfileSection) config;
-                               }
-
-                               return (ProfileSection) o;
-                       }
-                       set
-                       {
-                               AppDomain.CurrentDomain.SetData (Profiles_config, value);
-                       }
-               }
-               private static ProfileProviderCollection providersCollection
-               {
-                       get
-                       {
-                               object o = AppDomain.CurrentDomain.GetData (Profiles_ProfileProviderCollection);
-                               return (ProfileProviderCollection) o;
-                       }
-                       set
-                       {
-                               AppDomain.CurrentDomain.SetData (Profiles_ProfileProviderCollection, value);
-                       }
-               }
-#else
-               private static ProfileSection config;
-               private static ProfileProviderCollection providersCollection;
+               static ProfileSection config;
+               static ProfileProviderCollection providersCollection;
 
                static ProfileManager ()
                {
                        config = (ProfileSection) WebConfigurationManager.GetSection ("system.web/profile");
                }
-#endif
 
                public static int DeleteInactiveProfiles (ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate)
                {
@@ -203,7 +168,7 @@ namespace System.Web.Profile
                        }
                }
 
-               private static void CheckEnabled ()
+               static void CheckEnabled ()
                {
                        if (!Enabled)
                                throw new Exception ("This feature is not enabled.  To enable it, add <profile enabled=\"true\"> to your configuration file.");
@@ -212,4 +177,3 @@ namespace System.Web.Profile
        }
 }
 
-#endif