This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111//
1212
1313using System ;
14- using System . Collections . Generic ;
14+ using System . Globalization ;
1515using System . IO ;
16- using System . Linq ;
1716using System . Text ;
18- using System . Globalization ;
1917using System . Text . RegularExpressions ;
2018using ServiceStack . Text . Support ;
19+ using System . Collections . Generic ;
20+ #if WINDOWS_PHONE
21+ using System . IO . IsolatedStorage ;
22+ using ServiceStack . Text . WP ;
23+
24+ #endif
2125
2226namespace ServiceStack . Text
2327{
@@ -438,6 +442,15 @@ public static string ReadAllText(this string filePath)
438442 {
439443 return new StreamReader ( fileStream ) . ReadToEnd ( ) ;
440444 }
445+
446+ #elif WINDOWS_PHONE
447+ using ( var isoStore = IsolatedStorageFile . GetUserStoreForApplication ( ) )
448+ {
449+ using ( var fileStream = isoStore . OpenFile ( filePath , FileMode . Open ) )
450+ {
451+ return new StreamReader ( fileStream ) . ReadToEnd ( ) ;
452+ }
453+ }
441454#else
442455 return File . ReadAllText ( filePath ) ;
443456#endif
You can’t perform that action at this time.
0 commit comments