You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: Optimized & improved DosExecResult and DosFileOperationResult. (#2181)
* refactor: Optimized & improved DosExecResult and DosFileOperationResult.
- DosExecResult implements IEquatable<T> interface.
- DosExecResult added static cache for storing a subset of common error results.
- DosFileOperationResult implements IEquatable<T> interface.
- DosFileOperationResult added static cache for storing a subset of common error results and NoValue() result.
- DosFileOperationResult class is now sealed (was not possible to inherit before anyways).
* refactor: Optimized DosFileOperationResult.Value16 method.
- Cache the last 16-bit result for repeated results (useful for chained block read results).
- Also fixed potential thread safety issue in DosExecResult.Fail and DosFileOperationResult.Error methods introduced by previous commit.
@@ -90,4 +125,20 @@ public static DosFileOperationResult NoValueWithRefCount(byte refCount) {
90
125
/// The number of handles associated with the file or device after a successful <see cref="DosFileManager.CloseFileOrDevice(ushort)"/> operation. Defaults to 0 for other DOS operations.
0 commit comments