public void ReadNative(NativeMethods.WSmallObject failed) { switch(failed.type) { case NativeMethods.TYPE_FILE: { _type = WipeObjectType.File; break; } case NativeMethods.TYPE_FOLDER: { _type = WipeObjectType.Folder; break; } case NativeMethods.TYPE_DRIVE: { _type = WipeObjectType.Drive; break; } } _path = failed.path; }
public FailedObject(WipeObjectType type, string path, WipeError error) { _type = type; _path = path; _associatedError = error; }
public void FromNative(NativeMethods.WStatus s) { _contextId = s.context; _objectIndex = s.objectIndex; _auxMessage = s.auxMessage; _mainMessage = s.message; switch(s.type) { case NativeMethods.TYPE_FILE: { _objectType = WipeObjectType.File; break; } case NativeMethods.TYPE_FOLDER: { _objectType = WipeObjectType.Folder; break; } case NativeMethods.TYPE_DRIVE: { _objectType = WipeObjectType.Drive; break; } case NativeMethods.TYPE_MFT: { _objectType = WipeObjectType.MFT; break; } case NativeMethods.TYPE_CLUSTER_TIPS: { _objectType = WipeObjectType.ClusterTips; break; } } _bytesToWipe = s.totalBytes; _bytesWiped = s.wipedBytes; _bytesInClusterTipsWiped = s.clusterTipsBytes; _objectBytesToWipe = s.objectBytes; _objectBytesWiped = s.objectWipedBytes; _steps = s.steps; _actualStep = s.step; _wipeStopped = s.stopped == 1; }