Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetDefaultIdentityAndHash()

static void System.IO.IsolatedStorage.Helper.GetDefaultIdentityAndHash ( out object identity,
out string hash,
char separator )
inlinestaticpackage

Definition at line 76 of file Helper.cs.

77 {
78 Assembly entryAssembly = Assembly.GetEntryAssembly();
79 string text = null;
80 if (entryAssembly != null)
81 {
82 AssemblyName name = entryAssembly.GetName();
84 if (hash != null)
85 {
86 hash = "StrongName" + separator + hash;
87 identity = name;
88 return;
89 }
90 text = entryAssembly.Location;
91 }
92 if (string.IsNullOrEmpty(text))
93 {
94 text = Environment.ProcessPath;
95 }
96 if (string.IsNullOrEmpty(text))
97 {
98 throw new IsolatedStorageException(System.SR.IsolatedStorage_Init);
99 }
100 Uri uri = new Uri(text);
101 hash = "Url" + separator + IdentityHelper.GetNormalizedUriHash(uri);
102 identity = uri;
103 }
virtual AssemblyName GetName()
Definition Assembly.cs:294
static ? Assembly GetEntryAssembly()
Definition Assembly.cs:486
virtual string Location
Definition Assembly.cs:92
static string IsolatedStorage_Init
Definition SR.cs:32
Definition SR.cs:7
static string GetNormalizedUriHash(Uri uri)
static string GetNormalizedStrongNameHash(AssemblyName name)

References System.Reflection.Assembly.GetEntryAssembly(), System.Reflection.Assembly.GetName(), System.Security.IdentityHelper.GetNormalizedStrongNameHash(), System.Security.IdentityHelper.GetNormalizedUriHash(), System.SR.IsolatedStorage_Init, System.Reflection.Assembly.Location, System.Environment.ProcessPath, and System.text.

Referenced by System.IO.IsolatedStorage.IsolatedStorage.InitStore().