C# Class SecureDelete.WipeContext

Manages a native wipe context.
Mostrar archivo Open project: gratianlup/SecureDelete Class Usage Examples

Public Methods

Method Description
CreateContext ( ) : bool

Create a context

DestroyContext ( ) : bool

Destroy a context

GetChildWipeStatus ( int child, NativeMethods &status ) : bool

Get the wipe status of a child

GetChildrenNumber ( int &childrenNumber ) : bool

Get the number of children

GetContextStatus ( ContextStatus &status ) : bool

Get the status from the native context

GetError ( int index, NativeMethods &error ) : bool

Get an error by its index

GetErrorNumber ( int &errorNumber ) : bool

Get the error number

GetErrors ( ) : SecureDelete.NativeMethods.WError[]

Get all errors

GetFailedObject ( int index, NativeMethods &item, bool getAssociatedError, NativeMethods &error ) : bool

Get an failed object, and optionally, its associated error

GetFailedObjectNumber ( int &failedNumber ) : bool

Get the number of failed objects

GetFailedObjects ( ) : SecureDelete.NativeMethods.WSmallObject[]

Get all failed objects

GetFailedObjectsWithErrors ( ) : NativeMethods.WError>[].KeyValuePair

Get all failed objects with their associated errors

GetWipeStatus ( NativeMethods &status ) : bool

Get the wipe status of the context

InitializeContext ( NativeMethods options ) : bool

Initialize the context with the given settings

InserObjectRange ( NativeMethods items ) : bool

Insert object from an array into the context

InsertObject ( NativeMethods item ) : bool

Insert an object into the context

SetContextStatus ( ContextStatus newStatus ) : bool

Set the status of the context (wipe,paused,stopped)

WipeContext ( ) : System

Private Methods

Method Description
CheckContextClosed ( ) : void

Throw an exception if the context is not closed

CheckContextInitialized ( ) : void

Trow an exception if the context is not initialized

CheckContextOpen ( ) : void

Trow an exception if the context is not open

ValidResult ( int result ) : bool

Check the result received from the native methods

Method Details

CreateContext() public method

Create a context
public CreateContext ( ) : bool
return bool

DestroyContext() public method

Destroy a context
public DestroyContext ( ) : bool
return bool

GetChildWipeStatus() public method

Get the wipe status of a child
public GetChildWipeStatus ( int child, NativeMethods &status ) : bool
child int
status NativeMethods
return bool

GetChildrenNumber() public method

Get the number of children
public GetChildrenNumber ( int &childrenNumber ) : bool
childrenNumber int
return bool

GetContextStatus() public method

Get the status from the native context
public GetContextStatus ( ContextStatus &status ) : bool
status ContextStatus
return bool

GetError() public method

Get an error by its index
public GetError ( int index, NativeMethods &error ) : bool
index int
error NativeMethods
return bool

GetErrorNumber() public method

Get the error number
public GetErrorNumber ( int &errorNumber ) : bool
errorNumber int
return bool

GetErrors() public method

Get all errors
public GetErrors ( ) : SecureDelete.NativeMethods.WError[]
return SecureDelete.NativeMethods.WError[]

GetFailedObject() public method

Get an failed object, and optionally, its associated error
public GetFailedObject ( int index, NativeMethods &item, bool getAssociatedError, NativeMethods &error ) : bool
index int
item NativeMethods
getAssociatedError bool
error NativeMethods
return bool

GetFailedObjectNumber() public method

Get the number of failed objects
public GetFailedObjectNumber ( int &failedNumber ) : bool
failedNumber int
return bool

GetFailedObjects() public method

Get all failed objects
public GetFailedObjects ( ) : SecureDelete.NativeMethods.WSmallObject[]
return SecureDelete.NativeMethods.WSmallObject[]

GetFailedObjectsWithErrors() public method

Get all failed objects with their associated errors
public GetFailedObjectsWithErrors ( ) : NativeMethods.WError>[].KeyValuePair
return NativeMethods.WError>[].KeyValuePair

GetWipeStatus() public method

Get the wipe status of the context
public GetWipeStatus ( NativeMethods &status ) : bool
status NativeMethods
return bool

InitializeContext() public method

Initialize the context with the given settings
public InitializeContext ( NativeMethods options ) : bool
options NativeMethods
return bool

InserObjectRange() public method

Insert object from an array into the context
public InserObjectRange ( NativeMethods items ) : bool
items NativeMethods
return bool

InsertObject() public method

Insert an object into the context
public InsertObject ( NativeMethods item ) : bool
item NativeMethods
return bool

SetContextStatus() public method

Set the status of the context (wipe,paused,stopped)
public SetContextStatus ( ContextStatus newStatus ) : bool
newStatus ContextStatus
return bool

WipeContext() public method

public WipeContext ( ) : System
return System