Lean
Lean copied to clipboard
ObjectStore Contains the Information about StorageLimit and StorageFileCount
Expected Behavior
We can find the StorageLimit and StorageFileCount programmatically:
var storageLimit = ObjectStore.StorageLimit;
var storageFileCount = ObjectStore.StorageFileCount;
if (ObjectStore.Count() == ObjectStore.StorageFileCount)
{
Log("You hit the maximum number of files: {ObjectStore.StorageFileCount}");
}
Actual Behavior
We need to know the limit beforehand and hard-code it, so if we purchase more space, we must patch all algorithms.
Potential Solution
Add members to the ObjectStore class. Also, we could improve the error message:
You have reached the ObjectStore limit for files it can save: 1004. Unable to save the new file to You have reached the ObjectStore limit for files it can save: 1004. Unable to save the new file. You can find the limit with the ObjectStore.StorageFileCount property.
Checklist
- [x] I have completely filled out this template
- [x] I have confirmed that this issue exists on the current
masterbranch - [x] I have confirmed that this is not a duplicate issue by searching issues