Record 1 assembly strongname version1

Info icon This preview shows pages 461–464. Sign up to view the full content.

View Full Document Right Arrow Icon
Record #1 [Assembly] <StrongName version="1" Key="0024000004800000940000000602000000240000525341310004000001000100A5FE84898F 190EA6423A7D7FFB1AE778141753A6F8F8235CBC63A9C5D04143C7E0A2BE1FC61FA6EBB52E7FA9B 48D22BAF4027763A12046DB4A94FA3504835ED9F29CD031600D5115939066AABE59A4E61E932AEF 0C24178B54967DD33643FDE04AE50786076C1FB32F64915E8200729301EB912702A8FDD40F63DD5 A2DE218C7" Name="ConsoleApplication7" Version="1.0.0.0"/> Size : 0 Record #2 [Domain] <StrongName version="1" Key="0024000004800000940000000602000000240000525341310004000001000100A5FE84898F 190EA6423A7D7FFB1AE778141753A6F8F8235CBC63A9C5D04143C7E0A2BE1FC61FA6EBB52E7FA9B 48D22BAF4027763A12046DB4A94FA3504835ED9F29CD031600D5115939066AABE59A4E61E932AEF 0C24178B54967DD33643FDE04AE50786076C1FB32F64915E8200729301EB912702A8FDD40F63DD5 A2DE218C7" Name="ConsoleApplication7" Version="1.0.0.0"/> [Assembly] <StrongName version="1" Key="0024000004800000940000000602000000240000525341310004000001000100A5FE84898F 190EA6423A7D7FFB1AE778141753A6F8F8235CBC63A9C5D04143C7E0A2BE1FC61FA6EBB52E7FA9B 48D22BAF4027763A12046DB4A94FA3504835ED9F29CD031600D5115939066AABE59A4E61E932AEF 0C24178B54967DD33643FDE04AE50786076C1FB32F64915E8200729301EB912702A8FDD40F63DD5 A2DE218C7" Name="ConsoleApplication7" Version="1.0.0.0"/> Size : 0 Notice that there are two stores in that example. One is identified by some assembly evidence (the strong name key, name, and major version info). The other is identified by both domain and assembly evidence. Because the sample application is in a single assembly, the assembly evidence for both stores happens to be identical! You can also add the /REMOVE parameter which will delete all of the isolated storage in use at the specified scope. Be very careful if you do this, as you may well delete storage used by another application entirely. Isolated Storage | 437
Image of page 461

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
That’s all very well, but you can’t see the place where those files are stored. That’s because the actual storage is intended to be abstracted away behind the API. Sometimes, however, it is useful to be able to go and pry into the actual storage itself. Remember, this is an implementation detail, and it could change be- tween versions. It has been consistent since the first version of the .NET Framework, but in the future, Microsoft could decide to store it all in one big file hidden away somewhere, or using some mystical API that we don’t have access to. We can take advantage of the fact that the debugger can show us the private innards of the IsolatedStorageFile class. If we set a breakpoint on the store.CreateFile line in our sample application, we can inspect the IsolatedStorageFile object that was returned by GetUserStoreForApplication in the previous line. You will see that there is a private field called m_RootDir . This is the actual root directory (in the real filesystem) for the store. You can see an example of that as it is on my machine in Figure 11-12 . Figure 11-12. IsolatedStorageFile internals If you copy that path and browse to it using Windows Explorer, you’ll see something like the folder in Figure 11-13 . There’s the Settings directory that we created! As you might expect, if you were to look inside, you’d see the standardsettings.txt file our program created. 438 | Chapter 11: Files and Streams
Image of page 462
Figure 11-13. An isolated storage folder As you can see, this is a very useful debugging technique, allowing you to inspect and modify the contents of files in isolated storage, and identify exactly which store you have for a particular scope. It does rely on implementation details, but since you’d only
Image of page 463

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 464
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern