ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.UserSettingsSupport/IsolatedStoragePath.cs
(Generate patch)

Comparing trunk/RomCheater.UserSettingsSupport/IsolatedStoragePath.cs (file contents):
Revision 723 by william, Tue Jun 18 19:32:24 2013 UTC vs.
Revision 724 by william, Tue Jun 18 20:22:08 2013 UTC

--- trunk/RomCheater.UserSettingsSupport/IsolatedStoragePath.cs	2013/06/18 19:32:24	723
+++ trunk/RomCheater.UserSettingsSupport/IsolatedStoragePath.cs	2013/06/18 20:22:08	724
@@ -66,8 +66,12 @@ namespace RomCheater.UserSettingsSupport
             //path = builder.ToString();
             //this.ConfigFilePath = path;
 
+
+            //var asm_test = Assembly.LoadFile(this.AssemblyInfo.Location);
+
             ClientConfigPaths t = new ClientConfigPaths(this.AssemblyInfo, true);
-            
+
+            this.ConfigFilePath = t.LocalConfigFilename;
 
         }
 
@@ -95,15 +99,15 @@ namespace RomCheater.UserSettingsSupport
                 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 
                 'y', 'z', '0', '1', '2', '3', '4', '5'};
 
-            static volatile ClientConfigPaths s_current;
-            static volatile bool s_currentIncludesUserConfig;
+            //static volatile ClientConfigPaths s_current;
+            //static volatile bool s_currentIncludesUserConfig;
             static SecurityPermission s_serializationPerm;
             static SecurityPermission s_controlEvidencePerm;
 
-            bool _hasEntryAssembly;
-            bool _includesUserConfig;
-            string _applicationUri;
-            string _applicationConfigUri;
+            //bool _hasEntryAssembly;
+            //bool _includesUserConfig;
+            //string _applicationUri;
+            //string _applicationConfigUri;
             string _roamingConfigDirectory;
             string _roamingConfigFilename;
             string _localConfigDirectory;
@@ -238,10 +242,11 @@ namespace RomCheater.UserSettingsSupport
                     //string validAppDomainName = Validate(AppDomain.CurrentDomain.FriendlyName, true);
                     string friendlyName = new FileInfo(exeAssembly.Location).Name;
                     string validAppDomainName = Validate(friendlyName, true);
-                    string applicationUriLower = !String.IsNullOrEmpty(_applicationUri) ? _applicationUri.ToLower(CultureInfo.InvariantCulture) : null;
+                    //string applicationUriLower = !String.IsNullOrEmpty(_applicationUri) ? _applicationUri.ToLower(CultureInfo.InvariantCulture) : null;
                     string namePrefix = !String.IsNullOrEmpty(validAppDomainName) ? validAppDomainName : Validate(_productName, true);
                     //string hashSuffix = GetTypeAndHashSuffix(AppDomain.CurrentDomain, applicationUriLower);
-                    string hashSuffix = GetTypeAndHashSuffix(exeAssembly, applicationUriLower);
+                    //string hashSuffix = GetTypeAndHashSuffix(exeAssembly, applicationUriLower);
+                    string hashSuffix = GetTypeAndHashSuffix(exeAssembly);
 
                     string part2 = (!String.IsNullOrEmpty(namePrefix) && !String.IsNullOrEmpty(hashSuffix)) ? namePrefix + hashSuffix : null;
 
@@ -287,11 +292,11 @@ namespace RomCheater.UserSettingsSupport
             //    return result;
             //}
 
-            internal static void RefreshCurrent()
-            {
-                s_currentIncludesUserConfig = false;
-                s_current = null;
-            }
+            //internal static void RefreshCurrent()
+            //{
+            //    s_currentIncludesUserConfig = false;
+            //    s_current = null;
+            //}
 
             //internal static ClientConfigPaths Current
             //{
@@ -301,29 +306,29 @@ namespace RomCheater.UserSettingsSupport
             //    }
             //}
 
-            internal bool HasEntryAssembly
-            {
-                get
-                {
-                    return _hasEntryAssembly;
-                }
-            }
+            //internal bool HasEntryAssembly
+            //{
+            //    get
+            //    {
+            //        return _hasEntryAssembly;
+            //    }
+            //}
 
-            internal string ApplicationUri
-            {
-                get
-                {
-                    return _applicationUri;
-                }
-            }
+            //internal string ApplicationUri
+            //{
+            //    get
+            //    {
+            //        return _applicationUri;
+            //    }
+            //}
 
-            internal string ApplicationConfigUri
-            {
-                get
-                {
-                    return _applicationConfigUri;
-                }
-            }
+            //internal string ApplicationConfigUri
+            //{
+            //    get
+            //    {
+            //        return _applicationConfigUri;
+            //    }
+            //}
 
             internal string RoamingConfigFilename
             {
@@ -341,14 +346,14 @@ namespace RomCheater.UserSettingsSupport
                 }
             }
 
-            internal bool HasRoamingConfig
-            {
-                get
-                {
-                    // Assume we have roaming config if we haven't loaded user config file information.
-                    return RoamingConfigFilename != null || !_includesUserConfig;
-                }
-            }
+            //internal bool HasRoamingConfig
+            //{
+            //    get
+            //    {
+            //        // Assume we have roaming config if we haven't loaded user config file information.
+            //        return RoamingConfigFilename != null || !_includesUserConfig;
+            //    }
+            //}
 
             internal string LocalConfigFilename
             {
@@ -366,14 +371,14 @@ namespace RomCheater.UserSettingsSupport
                 }
             }
 
-            internal bool HasLocalConfig
-            {
-                get
-                {
-                    // Assume we have roaming config if we haven't loaded user config file information.
-                    return LocalConfigFilename != null || !_includesUserConfig;
-                }
-            }
+            //internal bool HasLocalConfig
+            //{
+            //    get
+            //    {
+            //        // Assume we have roaming config if we haven't loaded user config file information.
+            //        return LocalConfigFilename != null || !_includesUserConfig;
+            //    }
+            //}
 
             internal string ProductName
             {
@@ -442,13 +447,14 @@ namespace RomCheater.UserSettingsSupport
             // priority order, is Strong Name, Url and Exe Path. If one of these is found, we compute a
             // SHA1 hash of it and return a suffix based on that. If none is found, we return null.
             //private string GetTypeAndHashSuffix(AppDomain appDomain, string exePath)
-            private string GetTypeAndHashSuffix(Assembly appDomain, string exePath)
+            //private string GetTypeAndHashSuffix(Assembly appDomain, string exePath)
+            private string GetTypeAndHashSuffix(Assembly appDomain)
             {
                 string suffix = null;
                 string typeName = null;
                 object evidenceObj = null;
-
-                evidenceObj = GetEvidenceInfo(appDomain, exePath, out typeName);
+                //evidenceObj = GetEvidenceInfo(appDomain, exePath, out typeName);
+                evidenceObj = GetEvidenceInfo(appDomain, out typeName);
 
                 if (evidenceObj != null && !String.IsNullOrEmpty(typeName))
                 {
@@ -470,7 +476,8 @@ namespace RomCheater.UserSettingsSupport
 
             // Mostly borrowed from IsolatedStorage, with some modifications 
             //private static object GetEvidenceInfo(AppDomain appDomain, string exePath, out string typeName)
-            private static object GetEvidenceInfo(Assembly appDomain, string exePath, out string typeName)
+            //private static object GetEvidenceInfo(Assembly appDomain, string exePath, out string typeName)
+            private static object GetEvidenceInfo(Assembly appDomain, out string typeName)
             {
                 ControlEvidencePermission.Assert();
                 Evidence evidence = appDomain.Evidence;
@@ -512,11 +519,11 @@ namespace RomCheater.UserSettingsSupport
                     o = url.Value.ToUpperInvariant();
                     typeName = UrlDesc;
                 }
-                else if (exePath != null)
-                {
-                    o = exePath;
-                    typeName = PathDesc;
-                }
+                //else if (exePath != null)
+                //{
+                //    o = exePath;
+                //    typeName = PathDesc;
+                //}
                 else
                 {
                     typeName = null;