-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated FileCache to remove BinaryFormatter.
FileCacheManager: - Added magic header number `CACHE_VERSION`. + `HeaderVersionValid()` and `HeaderVersionWrite()` use it in writing/reading to figure out if the files were created using the old (BinaryFormatter) or new (BinaryWrite) way. - Removed `ReadSysFile()`. + Replaced it with: - `ReadSysValue<T>(string, out T)` + Just throws an Exception - below two functions are the actually used ones. - `ReadSysValue(string, out long)` - `ReadSysValue(string, out DateTime)` - Removed `WriteSysFile()`. + Replaced it with: - `WriteSysValue<T>(string, T)` + Just throws an Exception - below two functions are the actually used ones. - `WriteSysValue(string, long)` - `WriteSysValue(string, DateTime)` FileCache: - Implemented `FileCache.PayloadMode.RawBytes` for read & write. + Removed code in `PayloadReadMode` property to prevent its use. + Implemented the `ReadFile()` function helper: `LoadRawPayloadData()`. + Updated `WriteFile()` (PayloadMode.RawBytes path) to use BinaryWriter instead of BinaryFormatter.
- Loading branch information
1 parent
80fd36d
commit d738c50
Showing
3 changed files
with
196 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,5 @@ public override string GetPolicyPath(string key, string regionName = null) | |
} | ||
return filePath; | ||
} | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters