C# Class MonkeyWrench.Database.DBRevisionWork_Extensions

Show file Open project: rolfbjarne/monkeywrench Class Usage Examples

Public Methods

Method Description
CalculateState ( DB db, int id, bool &completed ) : DBState

Calculates the state. Always hits the db.

CalculateState ( this rw, DB db ) : DBState

Calculates the state. Always hits the db.

Create ( DB db, int id ) : DBRevisionWork
EnsureState ( DB db, int id, DBState current ) : DBState

Calculates a new state if the current state is NotDone.

EnsureState ( this rw, DB db ) : DBState

Calculates a new state if the current state is NotDone

Find ( DB db, DBLane lane, MonkeyWrench.DataClasses.DBHost host, DBRevision revision ) : DBRevisionWork
GetCount ( DB db, int lane_id, int host_id ) : int
GetFiles ( this rw, DB db ) : List

Returns a list of all the files this revisionwork has produced

GetNextWork ( this rw, DB db, DBLane lane, MonkeyWrench.DataClasses.DBHost host, DBRevision revision, bool multiple_work ) : List

Finds pending steps for the current revision

SetWorkHost ( this rw, DB db, MonkeyWrench.DataClasses.DBHost host ) : bool

Sets workhost to the specified host and saves it to the db.

UpdateState ( this rw, DB db ) : void

Private Methods

Method Description
FilterPendingWork ( this rw, DB db, List steps, List result, bool multiple_work ) : void

Puts pending steps in result

ForAll ( List states, List nonfatal, IsMatch pred ) : bool
ForAny ( List states, List nonfatal, IsMatch pred ) : bool
SaveState ( DB db, int id, DBState state, bool completed ) : void

Method Details

CalculateState() public static method

Calculates the state. Always hits the db.
public static CalculateState ( DB db, int id, bool &completed ) : DBState
db DB
id int
completed bool
return DBState

CalculateState() public static method

Calculates the state. Always hits the db.
public static CalculateState ( this rw, DB db ) : DBState
rw this
db DB
return DBState

Create() public static method

public static Create ( DB db, int id ) : DBRevisionWork
db DB
id int
return MonkeyWrench.DataClasses.DBRevisionWork

EnsureState() public static method

Calculates a new state if the current state is NotDone.
public static EnsureState ( DB db, int id, DBState current ) : DBState
db DB
id int
current DBState
return DBState

EnsureState() public static method

Calculates a new state if the current state is NotDone
public static EnsureState ( this rw, DB db ) : DBState
rw this
db DB
return DBState

Find() public static method

public static Find ( DB db, DBLane lane, MonkeyWrench.DataClasses.DBHost host, DBRevision revision ) : DBRevisionWork
db DB
lane MonkeyWrench.DataClasses.DBLane
host MonkeyWrench.DataClasses.DBHost
revision MonkeyWrench.DataClasses.DBRevision
return MonkeyWrench.DataClasses.DBRevisionWork

GetCount() public static method

public static GetCount ( DB db, int lane_id, int host_id ) : int
db DB
lane_id int
host_id int
return int

GetFiles() public static method

Returns a list of all the files this revisionwork has produced
public static GetFiles ( this rw, DB db ) : List
rw this
db DB
return List

GetNextWork() public static method

Finds pending steps for the current revision
public static GetNextWork ( this rw, DB db, DBLane lane, MonkeyWrench.DataClasses.DBHost host, DBRevision revision, bool multiple_work ) : List
rw this
db DB
lane MonkeyWrench.DataClasses.DBLane
host MonkeyWrench.DataClasses.DBHost
revision MonkeyWrench.DataClasses.DBRevision
multiple_work bool
return List

SetWorkHost() public static method

Sets workhost to the specified host and saves it to the db.
public static SetWorkHost ( this rw, DB db, MonkeyWrench.DataClasses.DBHost host ) : bool
rw this
db DB
host MonkeyWrench.DataClasses.DBHost
return bool

UpdateState() public static method

public static UpdateState ( this rw, DB db ) : void
rw this
db DB
return void