+#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 ProfileManager ()
+ {
+ config = (ProfileSection) WebConfigurationManager.GetSection ("system.web/profile");
+ }
+#endif
+